Need help with changing terrain yields

gabe_oz

Chieftain
Joined
Feb 10, 2015
Messages
21
So it's been a while since iv'e really modded a civ game, and iv'e ran into an issue I cannot seem to fix. I am trying to change the yield changes of terrain, but nothing I do works.

Here's an example of code:
Spoiler Code :


<Terrain_YieldChanges>

<Row>
<TerrainType>TERRAIN_COAST</TerrainType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>5</Yield>
</Row>

<Row>
<TerrainType>TERRAIN_GRASS</TerrainType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>5</Yield>
</Row>
<Row>
<TerrainType>TERRAIN_PLAINS</TerrainType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>5</Yield>
</Row>

</Terrain_YieldChanges>


I'm pretty sure this should work, am I doing something wrong or msising something? I might be making a stupid mistake.
 
These already exist
Code:
<Row TerrainType="TERRAIN_COAST" YieldType="YIELD_FOOD" YieldChange="1"/>
<Row TerrainType="TERRAIN_GRASS" YieldType="YIELD_FOOD" YieldChange="2"/>
<Row TerrainType="TERRAIN_PLAINS" YieldType="YIELD_FOOD" YieldChange="1"/>
In civ6 the combination of TerrainType+YieldType must be unique to all other rows already existing within the table, so your code is rejected. In addition, <Terrain_YieldChanges> in civ6 uses column YieldChange rather than Yield, so your code is also rejected for that.

In civ5 the code would not have been rejected for overlapping rows but I can't at the moment remember whether the game only implemented the first or the last such overlapping row added to the game.

You need to use Update structure, or Replace structure:
Code:
<Terrain_YieldChanges>
      <Update>
           <Where TerrainType="TERRAIN_COAST" YieldType="YIELD_FOOD" />
           <Set YieldChange="5"/>
      </Update>
      <Update>
           <Where TerrainType="TERRAIN_GRASS" YieldType="YIELD_FOOD" />
           <Set YieldChange="5"/>
      </Update>
      <Update>
           <Where TerrainType="TERRAIN_PLAINS" YieldType="YIELD_FOOD" />
           <Set YieldChange="5"/>
      </Update>
 </Terrain_YieldChanges>
or
Code:
<Terrain_YieldChanges>
     <Replace TerrainType="TERRAIN_COAST" YieldType="YIELD_FOOD" YieldChange="5"/>
     <Replace TerrainType="TERRAIN_GRASS" YieldType="YIELD_FOOD" YieldChange="5"/>
     <Replace TerrainType="TERRAIN_PLAINS" YieldType="YIELD_FOOD" YieldChange="5"/>
 </Terrain_YieldChanges>
Also be aware that in civ6 Hills and Mountains are their own actual terrain types, unlike in Civ5 where they were a "fake" graphics-only terrain-type.
 
Back
Top Bottom