Changing Mongolia to Russian when Japan Declares war on Russia



  • 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 🙂


  • Moderators

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



  • thanks i will look at that!



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


  • Moderators

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



  • 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


  • Moderators

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



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



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



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


Log in to reply