1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Modding Yields to Civ IV levels seems to be impossible - bugs ?

Discussion in 'Civ5 - Creation & Customization' started by bryanb2007, Dec 29, 2010.

  1. bryanb2007

    bryanb2007 Chieftain

    Joined:
    Apr 9, 2007
    Messages:
    26
    I have been trying to mod the tile yields to the Civ IV levels and have found it to be impossible because of what seem to be bugs in how tile yields are calculated.

    For Reference here is a simplified list of Civ IV yields

    Terrain.................Food Prod Gold
    Grass.....................2
    Plains.....................1.......1
    Tundra...................1
    Desert

    Yield Modifications:

    Hills......................-1.....+1
    River......................................+1
    Forest...........................+1


    I have tried several different combinations and methods. Here is one that should work.

    First mod the FEATURE_FOREST to have its yield be additive:
    <Features>
    <Update>
    <Set YieldNotAdditive="false"/>
    <Where Type="FEATURE_FOREST"/>
    </Update>
    </Features>

    Next mod the FEATURE_FOREST YieldChanges to be
    <Feature_YieldChanges>
    <Update>
    <Set Yield="0"/>
    <Where FeatureType="FEATURE_FOREST" YieldType="YIELD_FOOD"/>
    </Update>
    <Update>
    <Set Yield="1"/>
    <Where FeatureType="FEATURE_FOREST" YieldType="YIELD_PRODUCTION"/>
    </Update>
    </Feature_YieldChanges>

    Now Hills are for some odd reason implemented as a terrain ? and yet work as a totally different component, but we try and modify the HillsYieldChanges

    <Terrain_HillsYieldChanges>
    <Delete />
    <Row>
    <TerrainType>TERRAIN_GRASS</TerrainType>
    <YieldType>YIELD_FOOD</YieldType>
    <Yield>-1</Yield>
    </Row>
    <Row>
    <TerrainType>TERRAIN_GRASS</TerrainType>
    <YieldType>YIELD_PRODUCTION</YieldType>
    <Yield>1</Yield>
    </Row>
    <Row>
    <TerrainType>TERRAIN_PLAINS</TerrainType>
    <YieldType>YIELD_FOOD</YieldType>
    <Yield>-1</Yield>
    </Row>
    <Row>
    <TerrainType>TERRAIN_PLAINS</TerrainType>
    <YieldType>YIELD_PRODUCTION</YieldType>
    <Yield>1</Yield>
    </Row>
    <Row>
    <TerrainType>TERRAIN_DESERT</TerrainType>
    <YieldType>YIELD_PRODUCTION</YieldType>
    <Yield>1</Yield>
    </Row>
    <Row>
    <TerrainType>TERRAIN_TUNDRA</TerrainType>
    <YieldType>YIELD_FOOD</YieldType>
    <Yield>-1</Yield>
    </Row>
    <Row>
    <TerrainType>TERRAIN_TUNDRA</TerrainType>
    <YieldType>YIELD_PRODUCTION</YieldType>
    <Yield>1</Yield>
    </Row>
    </Terrain_HillsYieldChanges>


    The combination of those changes should result in a Civ IV terrain yields, unfortunately it appears that the yield changes for hills and forests do not stack, this appears to be a bug.

    In addition the fact the there is a TERRAIN_HILLS seems complicated. There really is no hills terrain on the map as far as i can tell, it is simply a grass, plains, desert or tundra, with a hills overlay. So the map building scripts must be treating hills (and mountains) seperately. There does not appear to be the necessary data in the xml files to control this.

    Also why are jungles on the plains and not grasslands ? Why is wheat allowed in the desert ? Why is there no improvement entries for mine/iron and farm/wheat ?


    Has anyone been able to mod the tile yields to something similar to civ IV ?
     
  2. bryanb2007

    bryanb2007 Chieftain

    Joined:
    Apr 9, 2007
    Messages:
    26
    I added a zip of my mod changes for reference.
     
  3. Zyxpsilon

    Zyxpsilon Running Spider

    Joined:
    Oct 29, 2009
    Messages:
    3,245
    Gender:
    Male
    Location:
    On Earth
    Before jumping into conclusions about whatever flaws could prevent someone from altering yields, i'd highly recommend a thorough analysis of the modding_tricks exposed by Alpaca within his PlayWithMe MOD.
    In particular, the What spoiler section contains great insight over the process itself.

    Secondly, arm yourself with a "comparing tool" for LUA/XML (such as WinMerge, btw) and delve into specific contents of both the Vanilla files & whichever Modded elements you'd want to look at.

    Then, you're all set... besides any other technicalities found within proper activation_function of any new mods.
     

Share This Page