Russian Revolution
-
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.
-
@victoryfirst said in Russian Revolution:
3 or more territories adjacent to Moscow controlled (NOT contested)
This is the problem, you want the same area as being controlled and also not contested.
<!-- This will check for control 3 of 5 --> <option name="alliedOwnershipTerritories" value="Livonia:Karelia:Belarus:Ukraine:Tatarstan" count="3"/> <!-- This will check for enemy in 3 of 5, but those 3 may not be the same as controlled --> <option name="enemyExclusionTerritories" value="Livonia:Karelia:Belarus:Ukraine:Tatarstan" count="3"/>
To do what you want to do you will need 5 separated conditions
<attachment name="conditionAttachmentControlOfKarelia" attachTo="Germans" javaClass="RulesAttachment" type="player"> <option name="alliedOwnershipTerritories" value="Karelia" count="1"/> <option name="enemyExclusionTerritories" value="Karelia" count="1"/> </attachment> <attachment name="conditionAttachmentControlOfLivonia" attachTo="Germans" javaClass="RulesAttachment" type="player"> <option name="alliedOwnershipTerritories" value="Livonia" count="1"/> <option name="enemyExclusionTerritories" value="Livonia" count="1"/> </attachment> ... ... ... <!-- Now a 6th condition to bring these 5 together --> <attachment name="conditionAttachmentControl3Of5" attachTo="Germans" javaClass="RulesAttachment" type="player"> <option name="conditions" value="conditionAttachmentControlOfLivonia:conditionAttachmentControlOfKarelia:etc..."/> <!-- conditionType 3-5 means 3 or more conditions must be true for the condition to be true --> <option name="conditionType" value="3-5"/> </attachment>
There would also need to be separate conditions for 1 of 4.
Cheers...
P.S. count was removed from "conditionType" on edit. Sorry!!
-
this post is deleted
-
this post is deleted
-
this post is deleted
-
@wc_sumpton Awesome, I didn't know you could do all that stuff with conditions!
Your idea was excellent and I think it should definitely work, but after I wrote it in the XML and tested it out, the revolution didn't trigger in the situation posted above, so I am wondering what I did wrong now...
-
@wc_sumpton
Never mind, I found the error. I had to specify the round in each condition for it to work!Thank you so much! You are a genius! I will test every possibility to make sure everything works, but I think these conditions will do it!
-
<attachment name="conditionAttachmentControlOrContestedPoland" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="alliedOwnershipTerritories" value="Poland" count="1"/> <option name="alliedPresenceTerritories" value="Poland" count="1"/> <!-- This is not needed and should be removed <option name="conditionType" value="1-2"/> --> </attachment>
Also you don't need to check for control/contested for the last four, so that was my mistake, sorry!
Cheers...
-
So your first 5 conditions should look like:
<attachment name="conditionAttachmentControlOfTatarstan" attachTo="Germans" javaClass="RulesAttachment" type="player"> <option name="alliedOwnershipTerritories" value="Tatarstan" count="1"/> <option name="enemyExclusionTerritories" value="Tatarstan" count="1"/> </attachment> <attachment name="conditionAttachmentControlOfUkraine" attachTo="Germans" javaClass="RulesAttachment" type="player"> <option name="alliedOwnershipTerritories" value="Ukraine" count="1"/> <option name="enemyExclusionTerritories" value="Ukraine" count="1"/> </attachment> <attachment name="conditionAttachmentControlOfBelarus" attachTo="Germans" javaClass="RulesAttachment" type="player"> <option name="alliedOwnershipTerritories" value="Belarus" count="1"/> <option name="enemyExclusionTerritories" value="Belarus" count="1"/> </attachment> <attachment name="conditionAttachmentControlOfKarelia" attachTo="Germans" javaClass="RulesAttachment" type="player"> <option name="alliedOwnershipTerritories" value="Karelia" count="1"/> <option name="enemyExclusionTerritories" value="Karelia" count="1"/> </attachment> <attachment name="conditionAttachmentControlOfLivonia" attachTo="Germans" javaClass="RulesAttachment" type="player"> <option name="alliedOwnershipTerritories" value="Livonia" count="1"/> <option name="enemyExclusionTerritories" value="Livonia" count="1"/> </attachment>
But your last condition could look like:
<!-- For this last condition I'm going to use "players" but Russia could be the "attachTo" --> <attachment name="conditionAttachmentRussianRevolution" attachTo="Germans" javaClass="RulesAttachment" type="player"> <option name="conditions" value="conditionAttachmentControlOfLivonia:conditionAttachmentControlOfKarelia:conditionAttachmentControlOfBelarus:conditionAttachmentControlOfUkraine:conditionAttachmentControlOfTatarstan"/> <!-- conditionType 3-5 means 3 or more conditions must be true for the condition to be true --> <option name="conditionType" value="3-5"/> <!-- "players" will override "attachTo" to use in statements --> <option name="players" value="Russians"/> <!-- The Russians must own all 4 --> <option name="alliedOwnershipTerritories" value="Poland:Sevastopol:Kazakhstan:Finland" count="4"/> <!-- and Moscow --> <option name="alliedOwnershipTerritories" value="Moscow" count="1"/> </attachment>
Cheers...
P.S. "Control" removed from last attachment name "conditionAttachmentRussianRevolution"
Cheers...
-
@wc_sumpton Everything works correctly! Again, I cannot thank you enough!
I only have one more question, and that is about the trigger.
Suppose you have the following situation:
-
The revolution triggers. This is what currently happens:
-
But this is what I want to happen:
-
So in other words, is it possible to make all contested territories go to Neutral_Central (the beige color)?
<!-- Trigger for revolution --> <attachment name="triggerAttachmentRussianRevolution" attachTo="Russians" javaClass="games.strategy.triplea.attachment.TriggerAttachment" type="player"> <option name="removeUnits" value="ALL:ALL" count="9999"/> <!-- Removes all Russian units --> <!-- Gives back to original owners --> <option name="changeOwnership" value="Serbia:Russians:Neutral_True:false"/> <option name="changeOwnership" value="Romania:Russians:Neutral_True:false"/> <option name="changeOwnership" value="Prussia:Russians:Germans:false"/> <option name="changeOwnership" value="Silesia:Russians:Germans:false"/> <option name="changeOwnership" value="Galicia:Russians:AustroHungarians:false"/> <option name="changeOwnership" value="Budapest:Russians:AustroHungarians:false"/> <option name="changeOwnership" value="Trieste:Russians:AustroHungarians:false"/> <option name="changeOwnership" value="Bohemia:Russians:AustroHungarians:false"/> <option name="changeOwnership" value="Vienna:Russians:AustroHungarians:false"/> <option name="changeOwnership" value="Bulgaria:Russians:Ottomans:false"/> <option name="changeOwnership" value="Mesopotamia:Russians:Ottomans:false"/> <option name="changeOwnership" value="Constantinople:Russians:Ottomans:false"/> <option name="changeOwnership" value="Persia:Russians:Neutral_True:false"/> <option name="changeOwnership" value="Afghanistan:Russians:Neutral_True:false"/> <!-- Makes Russian territories impassable --> <option name="changeOwnership" value="ALL:Russians:Contested:false"/> <option name="when" value="before:germansPurchase"/> <!-- To make sure shared territories work properly --> <option name="relationshipChange" value="AustroHungarians:Neutral_Central:Friendly_Neutral:Allied"/> <option name="relationshipChange" value="Germans:Neutral_Central:Friendly_Neutral:Allied"/> <option name="relationshipChange" value="Ottomans:Neutral_Central:Friendly_Neutral:Allied"/> <option name="uses" value="1"/> </attachment>
Currently, all Russian units are removed and all Russian territories come under the control of the power "Contested" (the orange color). Is there a way to check during the trigger if a territory is contested and change the territory control to Neutral Central?
So what essentially happens is that the contested territories become "Shared", so to reflect this I set them to Neutral Central (so that there is a color difference with "Contested") and then I set the relationship to Alied (because per the rules Central Power units can move freely between shared territories, but can't capture them. The only neutral central on the board [Bulgaria] will be captured anyway so Neutral Central would serve no game purpose, that's why I decided to use them for shared territories.
-
The problem here is with the use of "changeOwnerShip". Setting the value to "false" means treat this territory as if the New Owner owned that territory since the beginning of the turn. This is ok for territories Russia owns now and is not the original owner. But this does not work for contested territories that Russian originally owned but may not own now. This is why Finland and Karelia change orange, Russia owns those territories, and they are being given to Contested. Tatarstan on the other hand is German owned and is not affected.
Just like before, when check for the Russian Revolution, each Russian territory needs to be check for enemy units as well as their own units prior to changing their condition status. Because of this the removal of all Russian unit would be the last thing done.
Cheers...