OnlyHeStandsHere
Chieftain
- Joined
- May 4, 2018
- Messages
- 46
Hey there, I've got another question that I just can't seem to figure out on my own. I've got a leader agenda working for the most part, but I haven't been able to make the bonuses or penalties (for complying or breaking the agenda) reset back to zero. I'm not sure if it's an issue with the diplomacy modifier arguments itself or maybe the requirements that I've set up.
The agenda, Armed Neutrality, likes neighbors that are peaceful, and dislikes neighbors that are at war. The agenda shouldn't care about war/peace of a civilization that's far away. The problem is that the diplo bonus for being peaceful doesn't go away when the player declares war, and vise-versa with the penalty staying even after making peace. So the player will get +8 for being peaceful and then -8 for being warlike which really isn't exactly what I had in mind.
I tried looking at a similar agenda in Gandhi's "Peacekeeper" stuff, but I couldn't glean any differences that would make the bonus decay. Which leads me to think that it's an issue with my requirements. Perhaps there's something about "REQUIREMENT_PLAYER_IS_AT_PEACE_WITH_ALL_MAJORS" that keeps it flagged even after war is declared? Either way, I've hit a wall as of now.
Here's the relevant xml code:
The agenda otherwise works fine. It triggers properly when the player is settled close enough, and it shows up just fine in the relationship interface.
The agenda, Armed Neutrality, likes neighbors that are peaceful, and dislikes neighbors that are at war. The agenda shouldn't care about war/peace of a civilization that's far away. The problem is that the diplo bonus for being peaceful doesn't go away when the player declares war, and vise-versa with the penalty staying even after making peace. So the player will get +8 for being peaceful and then -8 for being warlike which really isn't exactly what I had in mind.
I tried looking at a similar agenda in Gandhi's "Peacekeeper" stuff, but I couldn't glean any differences that would make the bonus decay. Which leads me to think that it's an issue with my requirements. Perhaps there's something about "REQUIREMENT_PLAYER_IS_AT_PEACE_WITH_ALL_MAJORS" that keeps it flagged even after war is declared? Either way, I've hit a wall as of now.
Here's the relevant xml code:
Code:
<Types>
<!--TRAITS-->
<Row Type="TRAIT_AGENDA_ARMED_NEUTRALITY" Kind="KIND_TRAIT"/>
<!--MODIFIERS-->
<Row Type="AGENDA_ARMED_NEUTRALITY_PEACE_NEIGHBORS" Kind="KIND_MODIFIER"/>
<Row Type="AGENDA_ARMED_NEUTRALITY_WAR_NEIGHBORS" Kind="KIND_MODIFIER"/>
Kind="KIND_MODIFIER"/>
<!--REQUIREMENTS & REQUIREMENTSETS-->
<Row Type="PLAYER_IS_PEACEFUL_NEIGHBOR" Kind="KIND_REQUIREMENTSET"/>
<Row Type="PLAYER_IS_NOT_PEACEFUL_NEIGHBOR" Kind="KIND_REQUIREMENTSET"/>
<Row Type="REQUIRES_SWISS_AT_PEACE" Kind="KIND_REQUIREMENT"/>
<Row Type="REQUIRES_SWISS_AT_WAR" Kind="KIND_REQUIREMENT"/>
<Row Type="REQUIRES_SWISS_NEIGHBOR" Kind="KIND_REQUIREMENT"/>
</Types>
<TypeTags>
<Row Type="AGENDA_ARMED_NEUTRALITY_PEACE_NEIGHBORS" Tag="DIPLOMACY_MODIFIER"/>
<Row Type="AGENDA_ARMED_NEUTRALITY_WAR_NEIGHBORS" Tag="DIPLOMACY_MODIFIER"/>
</TypeTags>
<Traits>
<Row TraitType="TRAIT_AGENDA_ARMED_NEUTRALITY"/>
</Traits>
<AgendaTraits>
<Row AgendaType="AGENDA_ARMED_NEUTRALITY" TraitType="TRAIT_AGENDA_ARMED_NEUTRALITY"/>
</AgendaTraits>
<TraitModifiers>
<Row TraitType="TRAIT_AGENDA_ARMED_NEUTRALITY" ModifierId="AGENDA_ARMED_NEUTRALITY_PEACE_NEIGHBORS"/>
<Row TraitType="TRAIT_AGENDA_ARMED_NEUTRALITY" ModifierId="AGENDA_ARMED_NEUTRALITY_WAR_NEIGHBORS"/>
</TraitModifiers>
<RequirementSets>
<Row>
<RequirementSetId>PLAYER_IS_PEACEFUL_NEIGHBOR</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
<Row>
<RequirementSetId>PLAYER_IS_NOT_PEACEFUL_NEIGHBOR</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
</RequirementSets>
<Requirements>
<Row>
<RequirementId>REQUIRES_SWISS_AT_PEACE</RequirementId>
<RequirementType>REQUIREMENT_PLAYER_IS_AT_PEACE_WITH_ALL_MAJORS</RequirementType>
</Row>
<Row>
<RequirementId>REQUIRES_SWISS_AT_WAR</RequirementId>
<RequirementType>REQUIREMENT_PLAYER_AT_WAR_AND_HAS_MET</RequirementType>
</Row>
<Row>
<RequirementId>REQUIRES_SWISS_NEIGHBOR</RequirementId>
<RequirementType>REQUIREMENT_REQUIREMENTSET_IS_MET</RequirementType>
</Row>
</Requirements>
<RequirementSetRequirements>
<!--Requirement sets for peaceful neighbor-->
<Row>
<RequirementSetId>PLAYER_IS_PEACEFUL_NEIGHBOR</RequirementSetId>
<RequirementId>REQUIRES_SWISS_AT_PEACE</RequirementId>
</Row>
<Row>
<RequirementSetId>PLAYER_IS_PEACEFUL_NEIGHBOR</RequirementSetId>
<RequirementId>REQUIRES_SWISS_NEIGHBOR</RequirementId>
</Row>
<!--Requirement sets for a non-peaceful neighbor-->
<Row>
<RequirementSetId>PLAYER_IS_NOT_PEACEFUL_NEIGHBOR</RequirementSetId>
<RequirementId>REQUIRES_SWISS_AT_WAR</RequirementId>
</Row>
<Row>
<RequirementSetId>PLAYER_IS_NOT_PEACEFUL_NEIGHBOR</RequirementSetId>
<RequirementId>REQUIRES_SWISS_NEIGHBOR</RequirementId>
</Row>
</RequirementSetRequirements>
<RequirementArguments>
<!--Checks for neighbor using requirement set from Chandragupta-->
<Row>
<RequirementId>REQUIRES_SWISS_NEIGHBOR</RequirementId>
<Name>RequirementSetId</Name>
<Value>PLAYERS_ARE_NEIGHBORS</Value>
</Row>
</RequirementArguments>
<Modifiers>
<Row>
<ModifierId>AGENDA_ARMED_NEUTRALITY_PEACE_NEIGHBORS</ModifierId>
<ModifierType>MODIFIER_PLAYER_DIPLOMACY_SIMPLE_MODIFIER</ModifierType>
<SubjectRequirementSetId>PLAYER_IS_PEACEFUL_NEIGHBOR</SubjectRequirementSetId>-
</Row>
<Row>
<ModifierId>AGENDA_ARMED_NEUTRALITY_WAR_NEIGHBORS</ModifierId>
<ModifierType>MODIFIER_PLAYER_DIPLOMACY_SIMPLE_MODIFIER</ModifierType>
<SubjectRequirementSetId>PLAYER_IS_NOT_PEACEFUL_NEIGHBOR</SubjectRequirementSetId>
</Row>
</Modifiers>
<ModifierArguments>
<!--Diplomacy bonus for being a peaceful neighbor-->
<Row>
<ModifierId>AGENDA_ARMED_NEUTRALITY_PEACE_NEIGHBORS</ModifierId>
<Name>InitialValue</Name>
<Value>8</Value>
</Row>
<Row>
<ModifierId>AGENDA_ARMED_NEUTRALITY_PEACE_NEIGHBORS</ModifierId>
<Name>StatementKey</Name>
<Value>LOC_DIPLO_KUDO_LEADER_DUFOUR_REASON_ANY</Value>
</Row>
<Row>
<ModifierId>AGENDA_ARMED_NEUTRALITY_PEACE_NEIGHBORS</ModifierId>
<Name>SimpleModifierDescription</Name>
<Value>LOC_DIPLO_MODIFIER_ARMED_NEUTRALITY_PEACEFUL</Value>
</Row>
<Row>
<ModifierId>AGENDA_ARMED_NEUTRALITY_PEACE_NEIGHBORS</ModifierId>
<Name>HiddenAgenda</Name>
<Value>false</Value>
</Row>
<!--Diplomacy penalty for being a warlike neighbor-->
<Row>
<ModifierId>AGENDA_ARMED_NEUTRALITY_WAR_NEIGHBORS</ModifierId>
<Name>InitialValue</Name>
<Value>-8</Value>
</Row>
<Row>
<ModifierId>AGENDA_ARMED_NEUTRALITY_WAR_NEIGHBORS</ModifierId>
<Name>StatementKey</Name>
<Value>LOC_DIPLO_WARNING_LEADER_DUFOUR_REASON_ANY</Value>
</Row>
<Row>
<ModifierId>AGENDA_ARMED_NEUTRALITY_WAR_NEIGHBORS</ModifierId>
<Name>SimpleModifierDescription</Name>
<Value>LOC_DIPLO_MODIFIER_ARMED_NEUTRALITY_WARLIKE</Value>
</Row>
<Row>
<ModifierId>AGENDA_ARMED_NEUTRALITY_WAR_NEIGHBORS</ModifierId>
<Name>HiddenAgenda</Name>
<Value>false</Value>
</Row>
<ModifierStrings>
<Row ModifierId="AGENDA_ARMED_NEUTRALITY_PEACE_NEIGHBORS" Context="Sample" Text="LOC_TOOLTIP_SAMPLE_DIPLOMACY_ALL"/>
<Row ModifierId="AGENDA_ARMED_NEUTRALITY_WAR_NEIGHBORS" Context="Sample" Text="LOC_TOOLTIP_SAMPLE_DIPLOMACY_ALL"/>
</ModifierStrings>
The agenda otherwise works fine. It triggers properly when the player is settled close enough, and it shows up just fine in the relationship interface.