I'm creating a new civ for a mod that I'm creating / learning with, and I've figured out what I want to implement for their trait but I'm having trouble actually making some of those changes happen as a trait - I can make these changes apply to the game in general however.
The idea is that this civ comes from the cold northern regions, and abides in the tundra / snowy areas of the world. Therefore I want them to have certain benefits to be able to live in that terrain quite comfortably, where other civs might struggle.
Accordingly I've changed the movement in tundra and snow tiles so that units can only move one tile at a time, and created a promotion that I can give to units of this new civ to negate that change. This can be given to units by a trait, so that is fine. However I also want to change the food tile yield and worker build modifier of tundra to be the same as grasslands (ie 2 food and no time penalty on building improvements).
Here is what I have so far, which are just general changes to the game:
Terrain movement cost change
The new promotion:
The yield changes and build modifier
Now what I'm having trouble with is how to implement the change of the tile yield / build modifier as a trait to only this one specific civ.
This is my trait so far, as you can see the promotion is easy to implement:
Any ideas on how to get this working?
The idea is that this civ comes from the cold northern regions, and abides in the tundra / snowy areas of the world. Therefore I want them to have certain benefits to be able to live in that terrain quite comfortably, where other civs might struggle.
Accordingly I've changed the movement in tundra and snow tiles so that units can only move one tile at a time, and created a promotion that I can give to units of this new civ to negate that change. This can be given to units by a trait, so that is fine. However I also want to change the food tile yield and worker build modifier of tundra to be the same as grasslands (ie 2 food and no time penalty on building improvements).
Here is what I have so far, which are just general changes to the game:
Spoiler :
Terrain movement cost change
Code:
<Terrains>
<Update>
<Set Movement="2" />
<Where Type="TERRAIN_TUNDRA" />
</Update>
<Update>
<Set Movement="2" />
<Where Type="TERRAIN_SNOW" />
</Update>
</Terrains>
The new promotion:
Code:
<UnitPromotions>
<Row>
<Type>PROMOTION_WINTER_TRAINING</Type>
<Description>TXT_KEY_PROMOTION_WINTER_TRAINING</Description>
<Help>TXT_KEY_PROMOTION_WINTER_TRAINING_HELP</Help>
<Sound>AS2D_IF_LEVELUP</Sound>
<CannotBeChosen>true</CannotBeChosen>
<PortraitIndex>44</PortraitIndex>
<IconAtlas>PROMOTION_ATLAS</IconAtlas>
<PediaType>PEDIA_TERRAIN</PediaType>
<PediaEntry>TXT_KEY_PROMOTION_WINTER_TRAINING</PediaEntry>
</Row>
</UnitPromotions>
<UnitPromotions_Terrains>
<Row>
<PromotionType>PROMOTION_WINTER_TRAINING</PromotionType>
<TerrainType>TERRAIN_TUNDRA</TerrainType>
<DoubleMove>true</DoubleMove>
</Row>
<Row>
<PromotionType>PROMOTION_WINTER_TRAINING</PromotionType>
<TerrainType>TERRAIN_SNOW</TerrainType>
<DoubleMove>true</DoubleMove>
</Row>
</UnitPromotions_Terrains>
<UnitPromotions_UnitCombats>
<Row>
<PromotionType>PROMOTION_WINTER_TRAINING</PromotionType>
<UnitCombatType>UNITCOMBAT_MELEE</UnitCombatType>
</Row>
</UnitPromotions_UnitCombats>
The yield changes and build modifier
Code:
<Terrains>
<Update>
<Set BuildModifier="0" />
<Where TerrainType="TERRAIN_TUNDRA" />
</Update>
<Update>
<Set BuildModifier="0" />
<Where TerrainType="TERRAIN_SNOW" />
</Update>
</Terrains>
<Terrain_Yields>
<Update>
<Set Yield="2" />
<Where TerrainType="TERRAIN_TUNDRA" YieldType="YIELD_FOOD" />
</Update>
</Terrain_Yields>
This is my trait so far, as you can see the promotion is easy to implement:
Spoiler :
Code:
<Traits>
<Row>
<Type>TRAIT_THE_FAR_NORTH</Type>
<Description>TXT_KEY_TRAIT_THE_FAR_NORTH</Description>
<ShortDescription>TXT_KEY_TRAIT_THE_FAR_NORTH</ShortDescription>
</Row>
</Traits>
<Trait_FreePromotionUnitCombats>
<Row>
<TraitType>TRAIT_THE_FAR_NORTH</TraitType>
<UnitCombatType>UNITCOMBAT_MELEE</UnitCombatType>
<PromotionType>PROMOTION_WINTER_TRAINING</PromotionType>
</Row>
</Trait_FreePromotionUnitCombats>