Russian Revolution
-
That's unfortunate because I need "alliedOwnershipTerritories"+"invert" to get "enemyOwnershipTerritories" because I need to check if Moscow is not under Central Power control.
-
"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...
-
@wc_sumpton said in Russian Revolution:
"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.
-
@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...
-
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?
-
RL interference. I am working on something but want to test it first. Will get back to you in about 30 minutes.
Cheers...
-
Here's a Trigger with multiple conditions



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.

And you can also put multiple conditions into one condition.

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
-
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".
-
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
-
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> -
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...
-
I am getting this error:

I added the UserAction as a step to the sequence but I apparently did it incorrectly?
-
@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?



-
You will need to create a actionstext.properties file as a text file, with something like:
Russian_Revolution.BUTTON=[Begin] Begin the Russian Revolution Russian_Revolution.DESCRIPTION=The Russian have revolted, will you allow this. Russian_Revolution.NOTIFICATION_SUCCESS=The Russian Revolution has begon. Russian_Revolution.OTHER_NOTIFICATION_SUCCESS=The Russians are in a revolution. Russian_Revolution.NOTIFICATION_FAILURE=You have chosen to stop the revolution! Russian_Revolution.OTHER_NOTIFICATION_FAILURE=Germany has not allowed the Russian to revolt! Russian_Revolution.ACCEPT_QUESTION=Do you agree with Germany to begin your revolution?And it should me save in you "map" directory like "map.properties"
Cheers...
-
Ah so that's how you edit that text! Thank you very much @wc_sumpton!
Heh heh I love this
I didn't know this was possible 


Thank you for the suggestion @beelee it works perfectly!
-
-
heh heh you did the heavy lifting

-
I realized my conditions for triggering the revolution don't work for all cases. To list the rules once again:
All of the following needs to be accomplished by the Central Powers:
- 3 or more territories adjacent to Moscow controlled (NOT contested)
- 1 more original Russian territory controlled/contested
- Moscow is controlled by Russia or contested (NOT controlled by Central Powers)
This is my code:
<attachment name="conditionAttachmentBorderTerritories" 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"/> </attachment> <attachment name="conditionAttachmentOtherTerritory" attachTo="Germans" javaClass="games.strategy.triplea.attachment.RulesAttachment" type="player"> <option name="rounds" value="1-+"/> <option name="alliedPresenceTerritories" value="Poland:Sevastopol:Kazakhstan:Finland" count="1"/> </attachment> <attachment name="conditionAttachmentMoscowRussianControlled" attachTo="Russians" javaClass="games.strategy.triplea.attachment.RulesAttachment" type="player"> <option name="rounds" value="1-+"/> <option name="alliedOwnershipTerritories" value="Moscow" count="1"/> </attachment>The message to trigger the revolution incorrectly shows up in this situation:

It might be because my way of checking if the territory is contested is a bit weird, but I can't think of any other way. Any ideas on how to do that in a way that will work?
-
So for "conditionAttachmentBorderTerritories" I somehow need to be able to check BOTH for allied ownership as well as enemy exclusion, for all territories because that essentially means territories are controlled and also not contested. Now the conditions are separately and will checks things independently.
-
so in your shot, Livonia is German controlled but contested by Russia ? It needs to be uncontested ? as in no Russians present ?
If so, try a separate condition for enemyExclusion and add units to it set to zero.

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
