Triggered Victory on Specific Turn
-
I am trying to a get a game to end at the end of turn 6 (or start of turn 7) based upon who has the most victory cities.
My code is
<property name="Triggered Victory" value="true" editable="false"> <boolean/> </property> <property name="Use Triggers" value="true" editable="false"> <boolean/> </property>
and
<attachment name="conditionAttachmentAxisVictory1" attachTo="Russians" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="alliedOwnershipTerritories" value="United Kingdom:Russia:Germany:Japan:France:Italy:Karelia S.S.R.:India:Kiangsu:Philippine Islands:Hawaiian Islands:Western United States" count="7"/> <option name="rounds" value="7" /> </attachment> <attachment name="conditionAttachmentAlliesVictory1" attachTo="Russians" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="alliedOwnershipTerritories" value="United Kingdom:Russia:Germany:Japan:France:Italy:Karelia S.S.R.:India:Kiangsu:Philippine Islands:Hawaiian Islands:Western United States" count="7"/> <option name="rounds" value="7" /> </attachment>
However the game continues regardless of the territories held. (This uses the World War II v5 map).
What am I missing?
-
@rogercooper I corrected the last condition attachment to attachto "Germans" but that does not solve the problem.
-
I tried this code without success.
<attachment name="conditionAttachmentAxisVictory1" attachTo="Russians" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="alliedOwnershipTerritories" value="United Kingdom:Russia:Germany:Japan:France:Italy:Karelia S.S.R.:India:Kiangsu:Philippine Islands:Hawaiian Islands:Western United States" count="7"/> <option name="rounds" value="6" /> </attachment> <attachment name="conditionAttachmentAlliesVictory1" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="alliedOwnershipTerritories" value="United Kingdom:Russia:Germany:Japan:France:Italy:Karelia S.S.R.:India:Kiangsu:Philippine Islands:Hawaiian Islands:Western United States" count="7"/> <option name="rounds" value="6" /> </attachment> <attachment name="triggerAttachmentAxisVictory1" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentAxisVictory1"/> <option name="when" value="after:americansEndTurn"/>--> <option name="victory" value="AXIS_VICTORY"/> <option name="players" value="Germans:Japanese"/> </attachment> <attachment name="triggerAttachmentAlliesVictory1" attachTo="Russians" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentAlliesVictory1"/> <option name="when" value="after:americansEndTurn"/> <option name="victory" value="ALLIES_VICTORY"/> <option name="players" value="Russians:British:Americans"/> </attachment>
-
hmm ... should the conditions be swapped ? Germans for Axis and Russians for Allies ? conditionAttachmentAxisVictory1 is attached to Russians so when Russia and it's Allies control 7 of the TTys listed it should fire the trigger AxisVictory1 after the end of the Americans turn.
The triggers should still fire once the conditions are met though.
Did you try and play through another rd and see if it triggers later ?
Can always set to rd 2 or whatever for test purposes.
Edit
I also can't remember if count=7 is an exact number or 7 or more. I guess just test with 7 which is probably what you're doing anyway. -
@beelee Yes, I did try playing another round and tried setting the round to 1.
-
I have never managed to get the xml to end on a specific turn.
For testing, I have used economic victory to end the game at approximately the point I want to.
Maybe @wc_sumpton can help?
-
@rogercooper, @beelee, @TheDog
The conditions needs to be swapped. Germans for "conditionAttachmentAxisVictory1" and Russians for "conditionAttachmentAlliesVictory1". "rounds" should be "6-+".
"when" should be "americanEndTurn", no "s".Victories default to continue/true, so an AI player/game will not end.
Once a "victory" is triggered, no more victories will pop-up, but they are recorded in the history.
Cheers...
-
@wc_sumpton I corrected the code as follows.
<attachment name="conditionAttachmentAxisVictory1" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="alliedOwnershipTerritories" value="United Kingdom:Russia:Germany:Japan:France:Italy:Karelia S.S.R.:India:Kiangsu:Philippine Islands:Hawaiian Islands:Western United States" count="7"/> <option name="rounds" value="6-+" /> </attachment> <attachment name="conditionAttachmentAlliesVictory1" attachTo="Americans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="alliedOwnershipTerritories" value="United Kingdom:Russia:Germany:Japan:France:Italy:Karelia S.S.R.:India:Kiangsu:Philippine Islands:Hawaiian Islands:Western United States" count="7"/> <option name="rounds" value="6-+" /> </attachment> <attachment name="triggerAttachmentAxisVictory1" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentAxisVictory1"/> <option name="when" value="after:americanEndTurn"/>--> <option name="victory" value="AXIS_VICTORY"/> <option name="players" value="Germans:Japanese"/> </attachment> <attachment name="triggerAttachmentAlliesVictory1" attachTo="Russians" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentAlliesVictory1"/> <option name="when" value="after:americanEndTurn"/> <option name="victory" value="ALLIES_VICTORY"/> <option name="players" value="Russians:British:Americans"/> </attachment>
However the game still does not end. @TheDog said he couldn't get this to work.
The statement "Victories default to continue/true, so an AI player/game will not end." is curious. Victories based on victory and economic victory do stop with a popup even in all AI play. Why does triggered victory behave differently? A triggered victory which does not contain a victory popup seems strange.
-
You have 12 listed. 6 Axis and 6 Allies. "Eastern United States" is not in the list. If one of the listed territories changes, on or after turn 6, then the game will have a victor. Otherwise, they are tied.
Cheers...
-
@wc_sumpton Thanks for catching that. However it still that did not fix it.
What fixed it was creating a notifications.properties file.
AXIS_VICTORY=The Axis achieve a Triggered Victory, by controlling 7 victory at the end of turn 6. ALLIES_VICTORY=The Allies achieve a Triggered Victory, by controlling 7 victories cities at end of turn 6.
When I tested it on all AI play, I got quite a game, with the Germans taking Russia on turn 6, but the Allies winning by taking France & Italy while holding India.
We should update Pact of Steel 2 to reflect that notifications.properties is mandatory.
-
@rogercooper
Food catch. Never thought to ask.Cheers...
-
@rogercooper said in Triggered Victory on Specific Turn:
We should update Pact of Steel 2 to reflect that notifications.properties is mandatory.
<!-- Support Attachments -->
number values:how many units to be supportedhow much support can be given. All support can be given to a single unit, or spread too multiple units depending on bonusType.There are many other mistakes in the PoS2.
Cheers...