Navigation

    TripleA Logo

    TripleA Forum

    • Register
    • Login
    • Search
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags

    Triggered Victory on Specific Turn

    Map Making
    4
    12
    143
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • RogerCooper
      RogerCooper last edited by

      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 1 Reply Last reply Reply Quote 2
      • RogerCooper
        RogerCooper @RogerCooper last edited by

        @rogercooper I corrected the last condition attachment to attachto "Germans" but that does not solve the problem.

        RogerCooper 1 Reply Last reply Reply Quote 2
        • RogerCooper
          RogerCooper @RogerCooper last edited by

          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>
          
          
          W 1 Reply Last reply Reply Quote 2
          • B
            beelee last edited by beelee

            @rogercooper

            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.

            RogerCooper 1 Reply Last reply Reply Quote 1
            • RogerCooper
              RogerCooper @beelee last edited by

              @beelee Yes, I did try playing another round and tried setting the round to 1.

              TheDog 1 Reply Last reply Reply Quote 2
              • TheDog
                TheDog @RogerCooper last edited by

                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?

                1 Reply Last reply Reply Quote 1
                • W
                  wc_sumpton @RogerCooper last edited by

                  @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...

                  RogerCooper 1 Reply Last reply Reply Quote 2
                  • RogerCooper
                    RogerCooper @wc_sumpton last edited by

                    @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.

                    W 1 Reply Last reply Reply Quote 1
                    • W
                      wc_sumpton @RogerCooper last edited by

                      @rogercooper

                      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...

                      RogerCooper 1 Reply Last reply Reply Quote 1
                      • RogerCooper
                        RogerCooper @wc_sumpton last edited by

                        @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.

                        W 2 Replies Last reply Reply Quote 2
                        • W
                          wc_sumpton @RogerCooper last edited by

                          @rogercooper
                          Food catch. Never thought to ask.

                          Cheers...

                          1 Reply Last reply Reply Quote 1
                          • W
                            wc_sumpton @RogerCooper last edited by

                            @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...

                            1 Reply Last reply Reply Quote 2
                            • 1 / 1
                            • First post
                              Last post
                            Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums