Trait: Bonus for any resource

TyrionL

Chieftain
Joined
Apr 2, 2017
Messages
6
Im trying to create a trait that gives plots with a resource a +1 production and food bonus for every bordering resource tiles.
I tried to copy and paste the code of the Chateau because is gives bonus for bordering luxury resources (with some changes). It worked but when I want to add the same for bonus resources i cant start the game anymore. When i change luxury for bonus it works but it doesnt when i have both in the code.

Code:
<TraitModifiers>
<Row TraitType="TRAIT_CIVILIZATION_TRAIT_ONE" ModifierId="TRAIT_LUXURY_BONUS_FOOD_YIELD" />
<Row TraitType="TRAIT_CIVILIZATION_TRAIT_ONE" ModifierId="TRAIT_LUXURY_BONUS_PRODUCTION_YIELD" />
<Row TraitType="TRAIT_CIVILIZATION_TRAIT_ONE" ModifierId="TRAIT_BONUS_BONUS_FOOD_YIELD" />
<Row TraitType="TRAIT_CIVILIZATION_TRAIT_ONE" ModifierId="TRAIT_BONUS_BONUS_PRODUCTION_YIELD" />

</TraitModifiers>

<Modifiers>
<Row ModifierId="TRAIT_LUXURY_BONUS_FOOD_YIELD" ModifierType="MODIFIER_PLAYER_ADJUST_PLOT_YIELD"
SubjectRequirementSetId="PLOT_ADJACENT_TO_LUXURY_REQUIREMENTS"

/>
<Row ModifierId="TRAIT_LUXURY_BONUS_PRODUCTION_YIELD" ModifierType="MODIFIER_PLAYER_ADJUST_PLOT_YIELD"
SubjectRequirementSetId="PLOT_ADJACENT_TO_LUXURY_REQUIREMENTS"

/>
<Row ModifierId="TRAIT_BONUS_BONUS_FOOD_YIELD" ModifierType="MODIFIER_PLAYER_ADJUST_PLOT_YIELD"
SubjectRequirementSetId="PLOT_ADJACENT_TO_BONUS_REQUIREMENTS"

/>

<Row ModifierId="TRAIT_BONUS_BONUS_PRODUCTION_YIELD" ModifierType="MODIFIER_PLAYER_ADJUST_PLOT_YIELD"
SubjectRequirementSetId="PLOT_ADJACENT_TO_BONUS_REQUIREMENTS"

/>
</Modifiers>

<ModifierArguments>
<Row ModifierId="TRAIT_LUXURY_BONUS_FOOD_YIELD" Name="YieldType" Value="YIELD_FOOD" />
<Row ModifierId="TRAIT_LUXURY_BONUS_FOOD_YIELD" Name="Amount" Value="1" />
<Row ModifierId="TRAIT_LUXURY_BONUS_PRODUCTION_YIELD" Name="YieldType" Value="YIELD_PRODUCTION" />
<Row ModifierId="TRAIT_LUXURY_BONUS_PRODUCTION_YIELD" Name="Amount" Value="1" />
<Row ModifierId="TRAIT_BONUS_BONUS_FOOD_YIELD" Name="YieldType" Value="YIELD_FOOD" />
<Row ModifierId="TRAIT_BONUS_BONUS_FOOD_YIELD" Name="Amount" Value="1" />
<Row ModifierId="TRAIT_BONUS_BONUS_PRODUCTION_YIELD" Name="YieldType" Value="YIELD_PRODUCTION" />
<Row ModifierId="TRAIT_BONUS_BONUS_PRODUCTION_YIELD" Name="Amount" Value="1" />

</ModifierArguments>
<RequirementSets>
<Row>
<RequirementSetId>PLOT_ADJACENT_TO_LUXURY_REQUIREMENTS</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
<RequirementSetId>PLOT_ADJACENT_TO_BONUS_REQUIREMENTS</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>


</Row>
</RequirementSets>
<Requirements>
<Row>
<RequirementId>REQUIRES_PLOT_ADJACENT_TO_LUXURY</RequirementId>
<RequirementType>REQUIREMENT_PLOT_ADJACENT_RESOURCE_CLASS_TYPE_MATCHES</RequirementType>
<RequirementId>REQUIRES_PLOT_ADJACENT_TO_BONUS</RequirementId>
<RequirementType>REQUIREMENT_PLOT_ADJACENT_RESOURCE_CLASS_TYPE_MATCHES</RequirementType>



</Row>
</Requirements>
<RequirementArguments>
<Row>
<RequirementId>REQUIRES_PLOT_ADJACENT_TO_LUXURY</RequirementId>
<Name>ResourceClassType</Name>
<Value>RESOURCECLASS_LUXURY</Value>

<RequirementId>REQUIRES_PLOT_ADJACENT_TO_BONUS</RequirementId>
<Name>ResourceClassType</Name>
<Value>RESOURCECLASS_BONUS</Value>


</Row>
</RequirementArguments>
<RequirementSetRequirements>
<Row>
<RequirementSetId>PLOT_ADJACENT_TO_LUXURY_REQUIREMENTS</RequirementSetId>
<RequirementId>REQUIRES_PLOT_ADJACENT_TO_LUXURY</RequirementId>


</Row>
<Row>
<RequirementSetId>PLOT_ADJACENT_TO_BONUS_REQUIREMENTS</RequirementSetId>
<RequirementId>REQUIRES_PLOT_ADJACENT_TO_BONUS</RequirementId>


</Row>
</RequirementSetRequirements>


Also i wonder how i can apply the bonus only for tiles that have a resource. Any idea?
 
I found out that I forgot <Row> and </Row> sometimes.
But it still does not work..
 
Back
Top Bottom