objectiveAttachment neutral countries
-
Hi,
let's say the countries A and B are neutral, but can be invaded by any side.
I want to create an objectiveAttachment that checks if those countries remained neutral
<attachment name="objectiveAttachment4" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="objectiveValue" value="3"/>
<option name="alliedExclusionTerritories" value="A:B" count="2"/>
<option name="enemyExclusionTerritories" value="A:B" count="2"/>
</attachment>but it does not work.
what would be correct?
-
@numetalfan maybe try "unitPresence" and "battle" . battle would show an attack, which makes them non neutral and unitPresence which side they're on.
Although if the battle results in a loss and everybody dead, that might be an issue. Maybe a trigger for each Alliance and require a unit presence allied or their own.
-
so if I code it like this:
<attachment name="objectiveAttachment4" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="objectiveValue" value="3"/>
<option name="directPresenceTerritories" value="A:B" count="2"/>
<option name="unitPresence" value="any" count='1'/>
<option name="players" value="Germans:Italians:Japanese:British:USA:Russians"/>
</attachment>will this work?
will
<option name="players" value="Germans:Italians:Japanese:British:USA:Russians"/>
check the unit presenceor will it provide the
<option name="objectiveValue" value="3"/>
to all that players?
This would absolutely be wrong, should be a German objective -
@numetalfan that might work. The objective is attached to the Germans so I think you'd be ok there.
-
I found out:
<attachment name="objectiveAttachment4" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="objectiveValue" value="3"/>
<option name="alliedExclusionTerritories" value="A:B" count="2"/>
</attachment>works
but:
<attachment name="objectiveAttachment4" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="objectiveValue" value="3"/>
<option name="alliedExclusionTerritories" value="A:B" count="2"/>
<option name="enemyExclusionTerritories" value="A:B" count="2"/>
</attachment>does not work
the neutral units seem also to count as an "enemy".
I hopedenemyExclusionTerritories
will check only the Allies as enemies as this is an objective for Germany which is part of the Axis, but it doesn't
-
@numetalfan So A and B are True Neutrals and if either one gets conquered by anyone, Germany gets the Bonus ?
If so, maybe change it to a trigger/condition instead of an Objective.
So you could try a "directOwnershipTerritories" condition for each player and then have that activate the trigger ( which are actually conditions these days too )
-
a trigger worked.
unfortunately it does not display the objective result for the player in the game, that is the only disadvantage of that solution.
finally the developper should create a new XOB "checkneutrality" which means a country is not owned by Allies or Axis.
-
@numetalfan said in objectiveAttachment neutral countries:
unfortunately it does not display the objective result for the player in the game, ...
You mean it doesn't show up in the Objectives tab with the other Objectives ? If so you need to add it to the "objectives.properties"
Also, when you collect income, it will mention it and record it in History