Navigation

    TripleA Logo

    TripleA Forum

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

    Russian Revolution

    Map Making
    3
    48
    2675
    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.
    • VictoryFirst
      VictoryFirst last edited by VictoryFirst

      I am having trouble coding the Russian Revolution from A&A WW1 1914. I was able to make the condition attachment, but I don't know how to do the trigger.

      The things that should happen are:

      • All Russian units on the board need to be removed (including naval units).
      • All original Russian territories under Russian control become impassable.
      • All non-original Russian territories revert to the original owner.
      • All Russian territories that are contested come under the control of the power "Contested".
      • Russia leaves the game and has no turns anymore. Its original territories are considered to be not originally owned by anyone.

      ec2461f2-32e4-43f3-9acc-478f3941ea2d-image.png

      So in this case, what should be happening is this:

      b3fff92a-82e9-4b1b-8539-be82f56cde9b-image.png

      W 1 Reply Last reply Reply Quote 1
      • VictoryFirst
        VictoryFirst last edited by VictoryFirst

        I was able to do some of it:

        <!-- Russian Revolution -->
        <attachment name="conditionAttachmentRussianRevolution" attachTo="Germans" javaClass="games.strategy.triplea.attachment.RulesAttachment" type="player">
        	<option name="rounds" value="1-+"/>
        	<option name="alliedOwnershipTerritories" value="Livonia:Karelia:Belarus:Ukraine:Tatarstan" count="3"/>
        	<option name="enemyExclusionTerritories" value="Livonia:Karelia:Belarus:Ukraine:Tatarstan" count="3"/>
        	<option name="alliedOwnershipTerritories" value="Poland:Sevastopol:Kazakhstan:Finland" count="1"/>
        	<option name="enemyPresenceTerritories" value="Moscow" count="1"/>
        </attachment>
        
        <attachment name="triggerAttachmentRussianRevolution" attachTo="Russians" javaClass="games.strategy.triplea.attachment.TriggerAttachment" type="player">
        	<option name="conditions" value="conditionAttachmentRussianRevolution"/>
        	<option name="notification" value="RussianRevolution"/>
        	<option name="changeOwnership" value="Moscow:Russians:Neutral_Central:false"/>
        	<option name="changeOwnership" value="Tatarstan:Russians:Neutral_Central:false"/>
        	<option name="changeOwnership" value="Sevastopol:Russians:Neutral_Central:false"/>
        	<option name="changeOwnership" value="Kazakhstan:Russians:Neutral_Central:false"/>
        	<option name="changeOwnership" value="Karelia:Russians:Neutral_Central:false"/>
        	<option name="changeOwnership" value="Finland:Russians:Neutral_Central:false"/>
        	<option name="changeOwnership" value="Ukraine:Russians:Neutral_Central:false"/>
        	<option name="changeOwnership" value="Livonia:Russians:Neutral_Central:false"/>
        	<option name="changeOwnership" value="Belarus:Russians:Neutral_Central:false"/>
        	<option name="removeUnits" value="Moscow:ALL" count="99"/>
        	<option name="removeUnits" value="Tatarstan:ALL" count="99"/>
        	<option name="removeUnits" value="Sevastopol:ALL" count="99"/>
        	<option name="removeUnits" value="Kazakhstan:ALL" count="99"/>
        	<option name="removeUnits" value="Karelia:ALL" count="99"/>
        	<option name="removeUnits" value="Finland:ALL" count="99"/>
        	<option name="removeUnits" value="Ukraine:ALL" count="99"/>
        	<option name="removeUnits" value="Livonia:ALL" count="99"/>
        	<option name="removeUnits" value="Belarus:ALL" count="99"/>
        	<option name="when" value="before:germansPurchase"/>
        </attachment>
        

        This checks if the revolution kicks in and then removes all Russian units and changes all Russian territories to neutral_central (it should not be going to neutral central, but its color is distinct from the rest so I choose to go with that one for now.

        <option name="rounds" value="1-+"/>
        This was just to quickly check if the trigger works. It should be Round 4 when it's done.

        Not sure if there is a maximum to count? I picked 99 so that all units would be removed, but in some cases there might be more than 99 Russians in a territory.

        1 Reply Last reply Reply Quote 0
        • VictoryFirst
          VictoryFirst last edited by VictoryFirst

          So the things that are still missing:

          • Russian territories that are contested will either go to the central powers or the neutral_central, depending on which power controlled the territory before it became contested. They should be controlled by a separate power called "Contested".

          • The Russian naval units are not removed

          • Territories captured by Russia don't revert to the power who originally controlled it.

          1 Reply Last reply Reply Quote 0
          • VictoryFirst
            VictoryFirst last edited by

            What's also important, is that the trigger should not fire automatically, but be an option. A notification to the German player should be sent at the start of his turn, where he can click "yes" or "no". If "no", nothing happens. If "yes", triggerAttachmentRussianRevolution should be triggered. How do you do that?

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

              @victoryfirst said in Russian Revolution:

              All Russian units on the board need to be removed (including naval units).

              One thing at a time:

                <option name="removeUnits" value="all:all" count="9999"/>
              

              Cheers...

              1 Reply Last reply Reply Quote 2
              • VictoryFirst
                VictoryFirst last edited by VictoryFirst

                I discovered another error. The revolution kicks in when 2 territories adjacent to Moscow are controlled, and 1 adjacent to Moscow is contested, while this is incorrect. 3 territories adjacent to Moscow need to be controlled. When one of them is contested, it should not trigger.

                This is my code for the condition:

                <attachment name="conditionAttachmentRussianRevolution" attachTo="Germans" javaClass="games.strategy.triplea.attachment.RulesAttachment" type="player">
                	<option name="rounds" value="1-+"/>
                	<option name="alliedOwnershipTerritories" value="Livonia:Karelia:Belarus:Ukraine:Tatarstan" count="3"/>
                	<option name="enemyExclusionTerritories" value="Livonia:Karelia:Belarus:Ukraine:Tatarstan" count="3"/>
                	<option name="alliedOwnershipTerritories" value="Poland:Sevastopol:Kazakhstan:Finland" count="1"/>
                	<option name="alliedOwnershipTerritories" value="Moscow" count="1"/>
                		<option name="invert" value="true"/>
                

                Does this have to do with the invert?

                B W 2 Replies Last reply Reply Quote 1
                • B
                  beelee @VictoryFirst last edited by

                  @victoryfirst

                  if invert is true, it basically just does the opposite of what you have

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

                    @beelee

                    That's unfortunate because I need "alliedOwnershipTerritories"+"invert" to get "enemyOwnershipTerritories" because I need to check if Moscow is not under Central Power control.

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

                      @victoryfirst

                      "invert" control the whole condition.

                      So how does the Russian Revolution start?

                      Allies should not be in control of 3 of these 5 territories, "Livonia:Karelia:Belarus:Ukraine:Tatarstan". This means the enemy controls 3.
                      Allies should not be in control of 1 of these 5 territories, "Poland:Sevastopol:Kazakhstan:Finland" This means that the enemy must control one of these territories.

                      Cheers...

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

                        @wc_sumpton said in Russian Revolution:

                        @victoryfirst

                        "invert" control the whole condition.

                        So how does the Russian Revolution start?

                        Allies should not be in control of 3 of these 5 territories, "Livonia:Karelia:Belarus:Ukraine:Tatarstan". This means the enemy controls 3.
                        Allies should not be in control of 1 of these 5 territories, "Poland:Sevastopol:Kazakhstan:Finland" This means that the enemy must control one of these territories.

                        Cheers...

                        Thanks for clearing this up. In this situation, because the condition is attached to Germany, the numbers you mention should indeed be different. Germany and its allies should control at least 3 of the Moscow border territories, so the enemy (Russia) should control 2 or fewer. Germany and its allies should control 1 or more non-border territories, so the enemy must control 3 or fewer.

                        Although not sure how to do this. It was easier without the invert, then it worked correctly.

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

                          @victoryfirst said in Russian Revolution:

                          Although not sure how to do this. It was easier without the invert, then it worked correctly.

                          LoL :)!

                          Let's take each condition separately.

                          @victoryfirst said in Russian Revolution:

                          Germany and its allies should control at least 3 of the Moscow border territories, so the enemy (Russia) should control 2 or fewer.

                          This does not make since. If Germany controls 3 then Russia controls 2 or fewer. I think you ment to say 2 or more?

                          The problem here is you are putting to many statements inside you condition. For a condition to be true all statements inside that condition must be true.
                          Statement "alliedOwnershipTerritories" 3 of 5 "Livonia:Karelia:Belarus:Ukraine:Tatarstan" will be true if Russia own 3 of these territories.
                          Statement "alliedOwnershipTerritories" 5 of 5 "Poland:Sevastopol:Kazakhstan:Finland" will be true if Russia owns all 5 of these territories.
                          If both statements are true, the condition is true. Invert the condition and it will be false. If one of these statements are false, Germany owns Finland, then the condition is false. Invert the condition will make it true. This is not what you want. So, each statement should be in its own condition.

                          Cheers...

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

                            @wc_sumpton

                            Thank you. Yeah I mean 2 or fewer. Germany needs to control 3 or more border territories out of 5. That means Russia should control 2 or fewer. If it controls more than 2 than Germany controls fewer than 3, and the Revolutoin should not kick in then. Unless of course you want to make the final statement false so that the invert makes it true.

                            How do I put each statement in its own condition?

                            W B 3 Replies Last reply Reply Quote 0
                            • W
                              wc_sumpton @VictoryFirst last edited by

                              @victoryfirst

                              RL interference. I am working on something but want to test it first. Will get back to you in about 30 minutes.

                              Cheers...

                              1 Reply Last reply Reply Quote 2
                              • B
                                beelee @VictoryFirst last edited by beelee

                                @victoryfirst

                                Here's a Trigger with multiple conditions

                                Screenshot from 2024-07-21 10-36-57.png

                                Screenshot from 2024-07-21 10-34-53.png

                                Screenshot from 2024-07-21 10-35-41.png

                                So it will default to "AND" meaning both conditions need to be true for the trigger to fire.

                                You can also have "OR" which means only one of the conditions needs to be true.

                                Screenshot from 2024-07-21 10-38-57.png

                                And you can also put multiple conditions into one condition.

                                Screenshot from 2024-07-21 10-42-40.png

                                Edit
                                Also, you need to list the conditions in the order they come in the xml. The first condition needs to be the first one in the xml and so on.

                                Unless this has changed, but I don't think it has

                                1 Reply Last reply Reply Quote 2
                                • VictoryFirst
                                  VictoryFirst last edited by VictoryFirst

                                  Ah ok I see, so you use ":" to separate the multiple conditions, and then you can use conditionType to change it to AND or OR. Awesome!

                                  I just went for a walk and I got a bright idea to make the trigger optional. I was thinking about creating two separate territories called "YES" and "NO", somewhere on the edge of the map, where there is a Russian infantry located in the territory "NO". Before the Russian player ends his turn, he quickly looks if the conditions for the revolution have been met. Then they ask the Central Powers player if he accepts the Revolution and if yes, the Russian player moves his infantry from "NO" to "YES". I can then add a condition for the trigger that there needs to be a Russian infantry in "YES".

                                  B 1 Reply Last reply Reply Quote 1
                                  • B
                                    beelee @VictoryFirst last edited by beelee

                                    @victoryfirst

                                    Yea, I think Total World War has something similar. You may want to check it out

                                    Edit
                                    You should be able to use "userAction" to also make it optional

                                    Screenshot from 2024-07-21 11-04-56.png

                                    1 Reply Last reply Reply Quote 1
                                    • VictoryFirst
                                      VictoryFirst last edited by VictoryFirst

                                      @beelee

                                      So like this?

                                      <attachment name="userActionAttachmentRussianRevolution" attachTo="Germans" javaClass="games.strategy.triplea.attachment.UserActionAttachment" type="player">
                                      	<option name="conditions" value="conditionAttachmentRussianRevolution"/>
                                      	<option name="text" value="Russian_Revolution"/>
                                      	<option name="chance" value="6:6"/>
                                      	<option name="activateTrigger" value="triggerAttachmentRussianRevolution:1:true:false:false:false"/>
                                      	<option name="actionAccept" value="Germans"/>
                                      </attachment>
                                      1 Reply Last reply Reply Quote 1
                                      • W
                                        wc_sumpton @VictoryFirst last edited by

                                        @victoryfirst

                                        Ok, I'm going back to the original condition, but will include some extra comments to show what going on.

                                        <!-- Germans check for Russian Revolution -->
                                        <!-- In the absents of "players" conditions use "attachTo" -->
                                        <attachment name="conditionAttachmentRussianRevolution" attachTo="Germans" javaClass="RulesAttachment" type="player">
                                                <!-- The same as saying "always do this" and is not needed -->
                                        	<option name="rounds" value="1-+"/>
                                        	<option name="alliedOwnershipTerritories" value="Livonia:Karelia:Belarus:Ukraine:Tatarstan" count="3"/>
                                                <!-- Allied to whom? In the absents of "players", "attachTo" is used -->
                                                <!-- So, Germany and its allies will need to own 3 or more of the listed territories -->
                                        	<option name="enemyExclusionTerritories" value="Livonia:Karelia:Belarus:Ukraine:Tatarstan" count="3"/>
                                                <!-- Enemies to Germany must not be present in 3 or 5 of the listed territories -->
                                        	<option name="alliedOwnershipTerritories" value="Poland:Sevastopol:Kazakhstan:Finland" count="1"/>
                                                <!-- Germany or its allies will need to own 1 or more of the listed territories -->
                                        	<option name="alliedOwnershipTerritories" value="Moscow" count="1"/>
                                                <!-- Germany or its allies will need to own Moscow -->
                                        	<!-- Oops No <option name="invert" value="true"/> -->
                                        </attachments>
                                        

                                        @VictoryFirst is looking through Germany, where I was looking through Russia. Perspective counts!!

                                        Cheers...

                                        1 Reply Last reply Reply Quote 2
                                        • VictoryFirst
                                          VictoryFirst last edited by

                                          @beelee

                                          I am getting this error:
                                          7c13d194-a2d5-4269-b6ad-067f52447235-image.png

                                          I added the UserAction as a step to the sequence but I apparently did it incorrectly?

                                          1 Reply Last reply Reply Quote 0
                                          • VictoryFirst
                                            VictoryFirst last edited by

                                            @beelee I got it to work 🙂 It had to be UserActions lol, an extra -s.

                                            Can you, or someone please explain what all these messages mean?

                                            f100fc6a-1987-43dd-9e59-c6203f6b174b-image.png

                                            df45ad0c-e41d-4867-ac8b-b015a07713c4-image.png

                                            ea9064ea-2142-41c6-aef4-fc593b5f1e3c-image.png

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