Trait Mod Help

Cagarustus

Prince
Joined
Mar 9, 2017
Messages
386
Hi All,

I'm wanting to add a Trait to Brazil, where all their cities have 20% faster border growth if next to a Jungle Feature. I've got the Culture Bomb working, just not the Border Growth.


<GameData>

<TraitModifiers>
<Row TraitType="TRAIT_CIVILIZATION_AMAZON" ModifierId="TRAIT_GROWTH_NEAR_JUNGLE"/>
<Row TraitType="TRAIT_CIVILIZATION_AMAZON" ModifierId="TRAIT_CULTURE_BOMB_ENTERTAINMENT"/>
</TraitModifiers>

<Modifiers>
<Row>
<ModifierId>TRAIT_GROWTH_NEAR_JUNGLE</ModifierId>
<ModifierType>MODIFIER_ALL_CITIES_CULTURE_BORDER_EXPANSION</ModifierType>
<OwnerRequirementSetId>CITY_IS_ADJACENT_JUNGLE</OwnerRequirementSetId>
<RunOnce>true</RunOnce>
<Permanent>true</Permanent>
</Row>
<Row>
<ModifierId>TRAIT_CULTURE_BOMB_ENTERTAINMENT</ModifierId>
<ModifierType>MODIFIER_PLAYER_ADD_CULTURE_BOMB_TRIGGER</ModifierType>
</Row>
</Modifiers>

<ModifierArguments>
<Row>
<ModifierId>TRAIT_GROWTH_NEAR_JUNGLE</ModifierId>
<Name>Amount</Name>
<Value>20</Value>
</Row>
<Row>
<ModifierId>TRAIT_CULTURE_BOMB_ENTERTAINMENT</ModifierId>
<Name>DistrictType</Name>
<Value>DISTRICT_STREET_CARNIVAL</Value>
</Row>
</ModifierArguments>

<RequirementSets>
<Row>
<RequirementSetId>CITY_IS_ADJACENT_JUNGLE</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
</RequirementSets>

<RequirementSetRequirements>
<Row>
<RequirementSetId>CITY_IS_ADJACENT_JUNGLE</RequirementSetId>
<RequirementId>REQUIRES_CITY_ADJACENT_JUNGLE</RequirementId>
</Row>
</RequirementSetRequirements>

<Requirements>
<Row>
<RequirementId>REQUIRES_CITY_ADJACENT_JUNGLE</RequirementId>
<RequirementType>REQUIREMENT_PLOT_ADJACENT_FEATURE_TYPE_MATCHES</RequirementType>
</Row>
</Requirements>

<RequirementArguments>
<Row>
<RequirementId>REQUIRES_CITY_ADJACENT_JUNGLE</RequirementId>
<Name>FeatureType</Name>
<Value>FEATURE_JUNGLE</Value>
</Row>
</RequirementArguments>

</GameData>
--

Cheers
 
MODIFIER_ALL_CITIES_CULTURE_BORDER_EXPANSION
This one is attached to ALL cities, from all Civs. I believe you need one that attaches to Player's Cities. You need to create a new dynamic modifier.

Also, how do you test that is the modifier is working? How do you know that it's not?
 
Last edited:
Hi, thanks for the reply.

Yes, you're right, I overlooked that. I wonder if the Requirements are correct though? For example, under Modifiers, should I put "OwnerRequirementSetId" or "SubjectRequirementSetId"?

In answer the second part, I don't really know how to test mods other than loading the game and trying it out. In the case of the faster border growth, I increased the Value to 500 to see if there was a noticeable difference in border growth between a city adjacent to a Jungle and another founded city not next to a Jungle. Both growth turns were the same, and based on the city's culture value.
 
Back
Top Bottom