TripleA Logo TripleA Forum
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    • Register
    • Login

    Changing Mongolia to Russian when Japan Declares war on Russia

    Scheduled Pinned Locked Moved Map Making
    10 Posts 3 Posters 1.3k Views 3 Watching
    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.
    • Joe GJ Offline
      Joe G
      last edited by

      Hi there. The latest issue on our 1940 map.

      We are discarding all the Global diplomacy rules regarding Japan attacking Mongolia-border territories, etc.

      Instead we'd like to replace it with this simple rule: If Japan declares war on Russia, Mongolia and her units turn Russian. If Russia declares war on Japan, they never do.

      Here is the code I have so far:

      First the condition:

      <attachment name="conditionAttachment_Russians_Provoked_War_With_Japan_1" attachTo="Russians" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
      <option name="relationship" value="Russians:Japanese:War"/>
      </attachment>

      Now the trigger:

      <attachment name="triggerAttachment_Japanese_Declare_War_on_Russia_Mongolia" attachTo="Japanese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
      <option name="when" value="after:japanesePolitics"/>
      <option name="uses" value="1"/>
      <option name="conditions" value="conditionAttachment_Russians_Provoked_War_With_Japan_1"/>
      <option name="changeOwnership" value="Olgiy:Mongolians:Russians:true"/>
      <option name="changeOwnership" value="Dzavhan:Mongolians:Russians:true"/>
      <option name="changeOwnership" value="Tsagaan Olom:Mongolians:Russians:true"/>
      <option name="changeOwnership" value="Central Mongolia:Mongolians:Russians:true"/>
      <option name="changeOwnership" value="Buyant-Uhaa:Mongolians:Russians:true"/>
      <option name="changeOwnership" value="Ulaanbaatar:Mongolians:Russians:true"/>
      </attachment>

      I realize that this does not address the Mongolian units, only the territories. Thats ok for now. I just want to get the territories to turn. Tested it numerous times, and the territories still aren't turning after Japan declares war on Russia. Any help would be greatly appreciated. THanks 🙂

      HeppsH 1 Reply Last reply Reply Quote 0
      • HeppsH Offline
        Hepps Moderators @Joe G
        last edited by

        @Joe-G You can look at TWW... Look at how Thailand changes to a Japanese Minor immediately at the start of the game.

        "A joyous heart sours with the burden of expectation"
        Hepster

        1 Reply Last reply Reply Quote 0
        • Joe GJ Offline
          Joe G
          last edited by

          thanks i will look at that!

          1 Reply Last reply Reply Quote 0
          • Joe GJ Offline
            Joe G
            last edited by

            Hi Hepp. I looked in the Total World War xml and didn't see any triggers pertaining to Thailand changing ownership upon DOW. Am I blind? Probably.

            HeppsH 1 Reply Last reply Reply Quote 0
            • HeppsH Offline
              Hepps Moderators @Joe G
              last edited by

              @Joe-G There is no DOW but everything you need to switch an entire country units and all is there. You may just have to add a politics specific condition.

              "A joyous heart sours with the burden of expectation"
              Hepster

              1 Reply Last reply Reply Quote 0
              • Joe GJ Offline
                Joe G
                last edited by

                i'm being dense. what is the name of the trigger please. I searched everything with "thailand" and didn't see anything about changing ownership. oof

                HeppsH 1 Reply Last reply Reply Quote 0
                • HeppsH Offline
                  Hepps Moderators @Joe G
                  last edited by

                  @Joe-G Here is the mechanism that removes the (Neutral) Thia units and replaces them with Japanese Thia units.

                  <attachment name="triggerAttachmentThailand2" attachTo="Thailand" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                  <option name="conditions" value="conditionAttachmentDummyCondition"/>
                  <option name="removeUnits" value="Thailand:thaiInfantry" count="3"/>
                  <option name="removeUnits" value="Thailand:thaiArtillery" count="1"/>
                  <option name="removeUnits" value="Thailand:thaiAntiAirGun" count="1"/>
                  <option name="removeUnits" value="Southern Thailand:thaiInfantry" count="2"/>
                  <option name="when" value="before:japanCombatMove"/>
                  <option name="uses" value="1"/>
                  </attachment>
                  <attachment name="triggerAttachmentThailand3" attachTo="Japan" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                  <option name="conditions" value="conditionAttachmentDummyCondition"/>
                  <option name="placement" value="Thailand:japaneseInfantry" count="2"/>
                  <option name="placement" value="Thailand:japaneseCombatEngineer"/>
                  <option name="placement" value="Thailand:japaneseAntiAirGun"/>
                  <option name="placement" value="Southern Thailand:japaneseInfantry" count="2"/>
                  <option name="when" value="before:japanCombatMove"/>
                  <option name="uses" value="1"/>
                  </attachment>

                  "A joyous heart sours with the burden of expectation"
                  Hepster

                  Joe GJ 1 Reply Last reply Reply Quote 0
                  • Joe GJ Offline
                    Joe G @Hepps
                    last edited by

                    @Hepps thanks. I just want to get the territories to change ownership tho. And no matter what i code, it doesn't happen. Here is the current code

                    <attachment name="conditionAttachment_Russians_Provoked_War_With_Japan_1" attachTo="Russians" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
                      <option name="relationship" value="Russians:Japanese:War"/>
                    </attachment>
                    

                    <attachment name="triggerAttachment_Japanese_Declare_War_on_Russia_Mongolia" attachTo="Russians" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                    <option name="when" value="after:japanesePolitics"/>
                    <option name="uses" value="1"/>
                    <option name="conditions" value="conditionAttachment_Russians_Provoked_War_With_Japan_1"/>
                    <option name="changeOwnership" value="Olgiy:Mongolians:Russians:true"/>
                    <option name="changeOwnership" value="Dzavhan:Mongolians:Russians:true"/>
                    <option name="changeOwnership" value="Tsagaan Olom:Mongolians:Russians:true"/>
                    <option name="changeOwnership" value="Central Mongolia:Mongolians:Russians:true"/>
                    <option name="changeOwnership" value="Buyant-Uhaa:Mongolians:Russians:true"/>
                    <option name="changeOwnership" value="Ulaanbaatar:Mongolians:Russians:true"/>
                    </attachment>

                    Why isn't this working? Thanks again.

                    RogerCooperR 1 Reply Last reply Reply Quote 0
                    • RogerCooperR Offline
                      RogerCooper @Joe G
                      last edited by

                      @Joe-G I have had trouble using multiple changeOwnership in the same trigger. Try just doing 1 and see what happens.

                      1 Reply Last reply Reply Quote 0
                      • Joe GJ Offline
                        Joe G
                        last edited by

                        I figured it out thanks to Hepp's help in private chat. Here was the solution: changeOwnership only seems to work if the players changing ownership are at WAR with each other. So the trigger now has 3 steps. First it changes relationship to WAR. then another trigger does the change in ownership. And then a third trigger changes the relationship back to Allied. 🙂

                        1 Reply Last reply Reply Quote 1

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • 1 / 1
                        • First post
                          Last post
                        Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums