I'm modifying NWO, trying to find a way to get a neutral country (for example Greece and S.Greece make up the country of 'Greece', all the territories that made up pre-war Yugoslavia would make up the country of 'Yugoslavia'), if attacked by one alliance, to join the opposing alliance. Basically for example, if italians captured Kroatia, then Bosnia, Serbia and Macedonia would switch from Neutral to British control and the neutral infantry would be removed and an equivalent number of British infantry would be placed. On the other hand if Allies attacked first, the German player would get the other territories/units. I want to make it less attractive to attack neutral countries, at least unless the attacker is willing to come with overwhelming strength.
This is the XML:
<attachment name="conditionAttachmentGreeceWillJoinAxis" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="directExclusionTerritories" value="Greece" count="1"/>
<option name="alliedExclusionTerritories" value="Greece" count="1"/>
<option name="enemyExclusionTerritories" value="Greece" count="1"/>
<option name="enemyPresenceTerritories" value="S.Greece" count="1"/>
</attachment>
<attachment name="conditionAttachmentGreeceWillJoinAllies" attachTo="British" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="directExclusionTerritories" value="Greece" count="1"/>
<option name="alliedExclusionTerritories" value="Greece" count="1"/>
<option name="enemyExclusionTerritories" value="Greece" count="1"/>
<option name="enemyPresenceTerritories" value="S.Greece" count="1"/>
</attachment>
<attachment name="conditionAttachmentS.GreeceWillJoinAxis" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="directExclusionTerritories" value="S.Greece" count="1"/>
<option name="alliedExclusionTerritories" value="S.Greece" count="1"/>
<option name="enemyExclusionTerritories" value="S.Greece" count="1"/>
<option name="enemyPresenceTerritories" value="Greece" count="1"/>
</attachment>
<attachment name="conditionAttachmentS.GreeceWillJoinAllies" attachTo="British" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="directExclusionTerritories" value="S.Greece" count="1"/>
<option name="alliedExclusionTerritories" value="S.Greece" count="1"/>
<option name="enemyExclusionTerritories" value="S.Greece" count="1"/>
<option name="enemyPresenceTerritories" value="Greece" count="1"/>
</attachment>
<attachment name="triggerAttachmentGermansGreeceJoinsAxis" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
<option name="trigger" value="conditionAttachmentGreeceWillJoinAxis"/>
<option name='changeOwnership' value="Greece:Neutral:Germans:false"/>
<option name="removeUnits" value="Greece:all"/>
<option name="placement" value="Greece:Infantry:8"/>
</attachment>
<attachment name="triggerAttachmentBritishGreeceJoinsAllies" attachTo="British" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
<option name="trigger" value="conditionAttachmentGreeceWillJoinAllies"/>
<option name='changeOwnership' value='Greece:Neutral:British:false'/>
<option name="removeUnits" value="Greece:all"/>
<option name="placement" value="Greece:Infantry:8"/>
</attachment>
<attachment name="triggerAttachmentGermansS.GreeceJoinsAxis" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
<option name="trigger" value="conditionAttachmentS.GreeceWillJoinAxis"/>
<option name='changeOwnership' value="S.Greece:Neutral:Germans:false"/>
<option name="removeUnits" value="S.Greece:all"/>
<option name="placement" value="S.Greece:Infantry:1"/>
</attachment>
<attachment name="triggerAttachmentBritishS.GreeceJoinsAllies" attachTo="British" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
<option name="trigger" value="conditionAttachmentS.GreeceWillJoinAllies"/>
<option name='changeOwnership' value='S.Greece:Neutral:British:false'/>
<option name="removeUnits" value="S.Greece:all"/>
<option name="placement" value="S.Greece:Infantry:1"/>
</attachment>
When I try to run the mod I get the following error:
GameParseException: map name: 'file:/C:/Users/Linda/triplea/downloadedMaps/nwo_one_round_combat/map/games/nwo_one_round_combat.xml', game name: 'nwo_one_round_combat', Unexpected Exception while setting values for attachment: TriggerAttachment attached to: PlayerId named:Germans with name: triggerAttachment_GermansGreeceJoinsAxis
I have no other conditions or triggers named the same as these. I have Use Triggers set to "true".
There is probably something with politics I am supposed to do but I don't yet understand politics very well and I thought I could just do something simple where if any one of a colon-delineated list becomes conquered by one side and a given territory is still neutral it would be transfered to the control of the other side.
Thanks for any help