combined condition attachment for triggers
-
Hi all,
<attachment name="conditionAttachmentXYZ" attachTo="Germans:Italians:Japanese" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
does not work
<attachment name="conditionAttachmentXYZ" attachTo="Germans"
plus one for Italians plus one for Japanese might work but looks ugly and doesn't seem sophisticatedand <attachment name="conditionAttachmentXYZ" attachTo="Axis" may not fit to type="player", as the Axis are an Alliance not a single player.
What is the correct solution to this problem?
-
second question:
is it possible to make a count condition?
Let's say a national objective, where e.g. US gets as many IPC as the Chinese have countries with each country is worth 1 IPC.
Is this possible?
-
Hi all,
<attachment name="conditionAttachmentXYZ" attachTo="Germans:Italians:Japanese" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
does not work
<attachment name="conditionAttachmentXYZ" attachTo="Germans"
plus one for Italians plus one for Japanese might work but looks ugly and doesn't seem sophisticatedand <attachment name="conditionAttachmentXYZ" attachTo="Axis" may not fit to type="player", as the Axis are an Alliance not a single player.
What is the correct solution to this problem?
Add in:
<option name="players" value="Germans:Italians:Japanese"/>
This option makes the condition effect all the players in an OR relationship.
second question:
is it possible to make a count condition?
Let's say a national objective, where e.g. US gets as many IPC as the Chinese have countries with each country is worth 1 IPC.
Is this possible?
Im not sure on how/if you could do this elegantly in a single objectiveAttachment.
If you want some future help, I found that browsing the XML browser can be really useful.
-
@zaroph said in combined condition attachment for triggers:
<option name="players" value="Germans:Italians:Japanese"/>
Thanks, tested - it works, had to remove the ..attach to.. of course
I check the http://www.starlords3k.com/XOB.html
out frequently, however sometimes the examples are not clear enough or too unspecific. despite that a very fine site. -
strange, it worked but now there is an error.
<attachment name="conditionAttachmentVichyFrancecaptured" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="players" value="Germans:Italians:Japanese"/>
<option name="directOwnershipTerritories" value="Vishy France"/>
</attachment>is it correct that way?
Is it correct to remove the
attachTo="..." -
@numetalfan said in combined condition attachment for triggers:
<option name="directOwnershipTerritories" value="Vishy France"/>
Your problem may stem from how you spelt "Vichy" at the end of that trigger
-
good point,
but it is
<territory name="Vishy France"/>that fits to
<option name="directOwnershipTerritories" value="Vishy France"/>so this is not the reason
-
-
You still need 'attachTo'.
When you use 'players', 'attachTo' will be added:
<attachment name="conditionAttachmentVichyFrancecaptured" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="players" value="Germans:Italians:Japanese"/> <option name="directOwnershipTerritories" value="Vishy France"/> </attachment>
will work the same as:
<attachment name="conditionAttachmentVichyFrancecaptured" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="players" value="Italians:Japanese"/> <option name="directOwnershipTerritories" value="Vishy France"/> </attachment>
Cheers...