WW2 Oil and Snow (1st ed.) NEW MAP RELEASE
-
Nice one, thanks! Wasn't sure on the specific commands but had worked out a trigger to activate before each noncombatmove. Was going to reset it afterwards.
Good to know there might be some pointers in GCD as what I was trying wasn't working. Like, at all!!
Thanks again!

#H
-
These are the GCD triggers:
<!-- reset military units that have pu -1 --> <attachment name="triggerAttachment_Reset_PUs-1" attachTo="Germany" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Always_True"/> <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/> <option name="unitType" value="$All-Air$:$All-Sea$:$All-Move1Land$:$All-Move2Land$:Bunker"/> <option name="unitProperty" value="createsResourcesList" count="-reset--1:PUs"/> <option name="when" value="before:Germany0EndTurn"/> <option name="when" value="before:USSR0EndTurn"/> <option name="when" value="before:China0EndTurn"/> <option name="when" value="before:Italy0EndTurn"/> <option name="when" value="before:Britain0EndTurn"/> <option name="when" value="before:Japan0EndTurn"/> <option name="when" value="before:USA0EndTurn"/> <option name="when" value="before:Pacific-Allies0EndTurn"/> </attachment> <!-- reset Industry-Hvy -9 --> <attachment name="triggerAttachment_Reset_PUs9" attachTo="Germany" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Always_True"/> <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/> <option name="unitType" value="Industry-Hvy"/> <option name="unitProperty" value="createsResourcesList" count="-reset-9:PUs"/> <option name="when" value="before:Germany0EndTurn"/> <option name="when" value="before:USSR0EndTurn"/> <option name="when" value="before:China0EndTurn"/> <option name="when" value="before:Italy0EndTurn"/> <option name="when" value="before:Britain0EndTurn"/> <option name="when" value="before:Japan0EndTurn"/> <option name="when" value="before:USA0EndTurn"/> <option name="when" value="before:Pacific-Allies0EndTurn"/> </attachment> <!-- reset Industry-Med -7 --> <attachment name="triggerAttachment_Reset_PUs7" attachTo="Germany" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Always_True"/> <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/> <option name="unitType" value="Industry-Med"/> <option name="unitProperty" value="createsResourcesList" count="-reset-7:PUs"/> <option name="when" value="before:Germany0EndTurn"/> <option name="when" value="before:USSR0EndTurn"/> <option name="when" value="before:China0EndTurn"/> <option name="when" value="before:Italy0EndTurn"/> <option name="when" value="before:Britain0EndTurn"/> <option name="when" value="before:Japan0EndTurn"/> <option name="when" value="before:USA0EndTurn"/> <option name="when" value="before:Pacific-Allies0EndTurn"/> </attachment> <!-- reset Industry-Lgt -5 --> <attachment name="triggerAttachment_Reset_PUs5" attachTo="Germany" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Always_True"/> <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/> <option name="unitType" value="Industry-Lgt"/> <option name="unitProperty" value="createsResourcesList" count="-reset-5:PUs"/> <option name="when" value="before:Germany0EndTurn"/> <option name="when" value="before:USSR0EndTurn"/> <option name="when" value="before:China0EndTurn"/> <option name="when" value="before:Italy0EndTurn"/> <option name="when" value="before:Britain0EndTurn"/> <option name="when" value="before:Japan0EndTurn"/> <option name="when" value="before:USA0EndTurn"/> <option name="when" value="before:Pacific-Allies0EndTurn"/> </attachment> <!-- reset Oil-Field:Lend-Lease-Depot -1 --> <attachment name="triggerAttachment_Reset_PUs1" attachTo="Germany" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Always_True"/> <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/> <option name="unitType" value="Oil-Field"/> <option name="unitProperty" value="createsResourcesList" count="-reset-1:PUs"/> <option name="when" value="before:Germany0EndTurn"/> <option name="when" value="before:USSR0EndTurn"/> <option name="when" value="before:China0EndTurn"/> <option name="when" value="before:Italy0EndTurn"/> <option name="when" value="before:Britain0EndTurn"/> <option name="when" value="before:Japan0EndTurn"/> <option name="when" value="before:USA0EndTurn"/> <option name="when" value="before:Pacific-Allies0EndTurn"/> </attachment> <!-- Only 1 trigger is needed to set ALL to 0 after endTurn lets the AI player know that maintenance has been paid--> <attachment name="triggerAttachment_Set_PUs0" attachTo="Germany" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Always_True"/> <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/> <option name="unitType" value="$All-Air$:$All-Sea$:$All-Move1Land$:$All-Move2Land$:Bunker:Industry-Hvy:Industry-Med:Industry-Lgt:Oil-Field:Lend-Lease-Depot"/> <option name="unitProperty" value="createsResourcesList" count="-reset-0:PUs"/> <option name="when" value="after:Germany0EndTurn"/> <option name="when" value="after:USSR0EndTurn"/> <option name="when" value="after:China0EndTurn"/> <option name="when" value="after:Italy0EndTurn"/> <option name="when" value="after:Britain0EndTurn"/> <option name="when" value="after:Japan0EndTurn"/> <option name="when" value="after:USA0EndTurn"/> <option name="when" value="after:Pacific-Allies0EndTurn"/> </attachment> <!-- ============================================= END GO 0ENDTURN RESET PU TO 0 ============================================= -->Please note that it is "-reset-" with the "-" included. So it would look something like this: <option name="unitProperty" value="fuelCost" count="-reset-0:Fuel"/>.
Cheers,,,
-
@wc_sumpton
Got it working, non-combat move, all planes fuel use goes to 0.
However, I need to choose a value to revert back - which works too. I'm not sure if there's a command to go back to its original fuelcost definition?If not, I'll split them up!

Edit. I just split them up and defined three variables for light, medium and heavy air. Working great, but it would be good to know if there was an easier way to revert!

Thanks again
-
@hostilian said in WW2 Oil and Snow (1st ed.) NEW MAP RELEASE:
However, I need to choose a value to revert back - which works too. I'm not sure if there's a command to go back to its original fuelcost definition?
No there is no "revert back to", because these commands actually "overwrite" what is in the xml. As seen posted above in GCD each differential value would need to be set separately. Also, because fuelCost stack, I would still use "-reset-". So <option name="unitProperty" value="fuelCost" count="-reset-3:Fuel"/> will set a fuelCost to 3 not -3.
Cheers...
-
@wc_sumpton
Thanks. Yep, edited last comment as you were typing I guess. I've explicitly defined them, so all working great! -
Hej Hostilian, thanks again for all the input, suggestions and feedback! I do not know where to start .... for now the plan will be this:
I restart slowly working again on the 3rd version of Oil and Snow ...around 75% is done now.... it is playable allready... most of the game mechanics will be the same... ( will be adding some more isAi player triggers to get better opponent ) so most things you encounter in your current games are likely needing to be solved in this new V3,0 version... so let me know anything you find out....If you like: I can send you the latest version by wetransf. , it will be a completely revised map.... ( for example much more space for city -terr. units to be placed )

-
@hostilian that is a good one, I assumed the final used Prod. frontier would remain...
so adapted! ( German example)
<attachment name="CA_T3GerHeavyHouwProd" attachTo="Germans" javaClass="RulesAttachment" type="player"><option name="turns" value="3"/></attachment> <attachment name="CA_T4GerFlakTowerProd" attachTo="Germans" javaClass="RulesAttachment" type="player"><option name="turns" value="4-9"/></attachment> <attachment name="CA_T10GerHeavyArmProd" attachTo="Germans" javaClass="RulesAttachment" type="player"><option name="turns" value="10-19"/></attachment> <attachment name="CA_T20GerSupersubProd" attachTo="Germans" javaClass="RulesAttachment" type="player"><option name="turns" value="20"/></attachment> <attachment name="CA_T21GerV1-rocketProd" attachTo="Germans" javaClass="RulesAttachment" type="player"><option name="turns" value="21"/></attachment> <attachment name="CA_T22GerJetFighterProd" attachTo="Germans" javaClass="RulesAttachment" type="player"><option name="turns" value="22-+"/></attachment> -
@hostilian said in WW2 Oil and Snow (1st ed.) NEW MAP RELEASE:
triggerAttachmentReplaceHullBattleship
useless floating around Hulls- bug Fixed! great input thanks! -
Yes, feel free with uploading the fixes you made for this version,
I keep focussed on the V3.0 and take as stated all fixes along with it...nice idea about the fuel for inactive planes...
I do not see a way to inckude that.... but remind me if there are possibilities...and indeed the Oils stress for some countries is a bit nerve wrecking sometimes, especially for countries like Japan..
( which historically was ) if you feel it has too much negative impact on Player or Ai-player performance in current ballance let me know.. I might throw in another bunch of extra barrels...
-
@beelee yes, good one..... I have to update game notes once all is done... feedback from objective new players is welcome as I do not filter well what is allready common for me , and essential info for the Notes..
-
@hostilian that is a very cool feature.... goes beyond my coding understanding limits....
if you can use your solution I would be honoured to insert it in the V3.0 project ... so that we can be more thrifty with oil spendings
by getting these non flying planes switch off their engines...
( it does save some essential barrles indeed)what would be best place in the code to add it ?
great contribution!
-
@ebbe said in WW2 Oil and Snow (1st ed.) NEW MAP RELEASE:
@hostilian that is a good one, I assumed the final used Prod. frontier would remain...
so adapted! ( German example)
<attachment name="CA_T3GerHeavyHouwProd" attachTo="Germans" javaClass="RulesAttachment" type="player"><option name="turns" value="3"/></attachment> <attachment name="CA_T4GerFlakTowerProd" attachTo="Germans" javaClass="RulesAttachment" type="player"><option name="turns" value="4-9"/></attachment> <attachment name="CA_T10GerHeavyArmProd" attachTo="Germans" javaClass="RulesAttachment" type="player"><option name="turns" value="10-19"/></attachment> <attachment name="CA_T20GerSupersubProd" attachTo="Germans" javaClass="RulesAttachment" type="player"><option name="turns" value="20"/></attachment> <attachment name="CA_T21GerV1-rocketProd" attachTo="Germans" javaClass="RulesAttachment" type="player"><option name="turns" value="21"/></attachment> <attachment name="CA_T22GerJetFighterProd" attachTo="Germans" javaClass="RulesAttachment" type="player"><option name="turns" value="22-+"/></attachment>Yep. Looks right. Bear it in mind that it will fire each of the Triggers, every round - so unless you add an option (for the bonus unit adds) so it only fires once, you'll end up with a free unit each turn.
-
@ebbe said in WW2 Oil and Snow (1st ed.) NEW MAP RELEASE:
@hostilian that is a very cool feature.... goes beyond my coding understanding limits....
if you can use your solution I would be honoured to insert it in the V3.0 project ... so that we can be more thrifty with oil spendings
by getting these non flying planes switch off their engines...
( it does save some essential barrles indeed)what would be best place in the code to add it ?
great contribution!
I'm away for a few days, will check when back, but you define the variables right at the start (well, just about). For HeavyAir, MediumAir and LightAir etc.
I created a AlwaysActive condition.
Then one trigger to set fuel-use to zero at start of combat move.
Then three sets of triggers for the 3 types of air (heavy, medium, light) at end of combat move. To reset the fuel use to what they are for the different aircraft types.Aircraft don't get refueled in the middle of a mission. I wasn't a fan of planes (effectively) running out of fuel mid-mission (before the planes get a chance to return). This is a way to fix that, I guess.

-
Defining variables (put it right above <map>)
<!-- Variables --> <variableList> <variable name="All-Air"> <!-- not Kamikaze-Plane --> <element name="fighter"/> <element name="fighterP38"/> <element name="fighterLight"/> <element name="fighterLightTur"/> <element name="fighterLightRum"/> <element name="fighterLightArg"/> <element name="fighterLightSAfr"/> <element name="fighterLightMex"/> <element name="jetFighter"/> <element name="airTransport"/> <element name="bomber"/> <element name="heavyBomber"/> <element name="v1-rocket"/> </variable> <variable name="Light-Air"> <element name="fighterLight"/> <element name="fighterLightTur"/> <element name="fighterLightRum"/> <element name="fighterLightArg"/> <element name="fighterLightSAfr"/> <element name="fighterLightMex"/> </variable> <variable name="Medium-Air"> <element name="fighter"/> <element name="fighterP38"/> <element name="airTransport"/> </variable> <variable name="Heavy-Air"> <element name="jetFighter"/> <element name="bomber"/> <element name="heavyBomber"/> </variable> </variableList>Always true switch
<!-- Always True switch --> <attachment name="conditionAttachment_Always_True" attachTo="Germans" javaClass="RulesAttachment" type="player"> <option name="switch" value="true"/> </attachment>Attachment to set to zero and 3 more attachments to change it back again..
<attachment name="triggerAttachment_noncombatfuel" attachTo="Germans" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Always_True"/> <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/> <option name="unitType" value="$All-Air$"/> <option name="unitProperty" value="fuelCost" count="-reset-0:Fuel"/> <option name="when" value="before:americansNonCombatMove"/> <option name="when" value="before:germansNonCombatMove"/> <option name="when" value="before:japaneseNonCombatMove"/> <option name="when" value="before:chineseNonCombatMove"/> <option name="when" value="before:britishNonCombatMove"/> <option name="when" value="before:italiansNonCombatMove"/> <option name="when" value="before:anzacNonCombatMove"/> <option name="when" value="before:russiansNonCombatMove"/> <option name="when" value="before:frenchNonCombatMove"/> </attachment> <attachment name="triggerAttachment_revertnoncombatfuelheavy" attachTo="Germans" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Always_True"/> <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/> <option name="unitType" value="$Heavy-Air$"/> <option name="unitProperty" value="fuelCost" count="-reset-3:Fuel"/> <option name="when" value="after:americansNonCombatMove"/> <option name="when" value="after:germansNonCombatMove"/> <option name="when" value="after:japaneseNonCombatMove"/> <option name="when" value="after:chineseNonCombatMove"/> <option name="when" value="after:britishNonCombatMove"/> <option name="when" value="after:italiansNonCombatMove"/> <option name="when" value="after:anzacNonCombatMove"/> <option name="when" value="after:russiansNonCombatMove"/> <option name="when" value="after:frenchNonCombatMove"/> </attachment> <attachment name="triggerAttachment_revertnoncombatmedium" attachTo="Germans" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Always_True"/> <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/> <option name="unitType" value="$Medium-Air$"/> <option name="unitProperty" value="fuelCost" count="-reset-2:Fuel"/> <option name="when" value="after:americansNonCombatMove"/> <option name="when" value="after:germansNonCombatMove"/> <option name="when" value="after:japaneseNonCombatMove"/> <option name="when" value="after:chineseNonCombatMove"/> <option name="when" value="after:britishNonCombatMove"/> <option name="when" value="after:italiansNonCombatMove"/> <option name="when" value="after:anzacNonCombatMove"/> <option name="when" value="after:russiansNonCombatMove"/> <option name="when" value="after:frenchNonCombatMove"/> </attachment> <attachment name="triggerAttachment_revertnoncombatfuellight" attachTo="Germans" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Always_True"/> <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/> <option name="unitType" value="$Light-Air$"/> <option name="unitProperty" value="fuelCost" count="-reset-1:Fuel"/> <option name="when" value="after:americansNonCombatMove"/> <option name="when" value="after:germansNonCombatMove"/> <option name="when" value="after:japaneseNonCombatMove"/> <option name="when" value="after:chineseNonCombatMove"/> <option name="when" value="after:britishNonCombatMove"/> <option name="when" value="after:italiansNonCombatMove"/> <option name="when" value="after:anzacNonCombatMove"/> <option name="when" value="after:russiansNonCombatMove"/> <option name="when" value="after:frenchNonCombatMove"/> </attachment>Note, I didn't do every single nation - just the main ones. Didn't bother with Vichy france as they don't have much air/usable navy anyway..
-
When using <variableList> and <variable> it is always easier to create the small lists first:
<!-- Variables --> <variableList> <!-- Creating small lists first --> <variable name="Light-Air"> <element name="fighterLight"/> <element name="fighterLightTur"/> <element name="fighterLightRum"/> <element name="fighterLightArg"/> <element name="fighterLightSAfr"/> <element name="fighterLightMex"/> </variable> <variable name="Medium-Air"> <element name="fighter"/> <element name="fighterP38"/> <element name="airTransport"/> </variable> <variable name="Heavy-Air"> <element name="jetFighter"/> <element name="bomber"/> <element name="heavyBomber"/> </variable>Then add those small lists to the big list:
<variable name="All-Air"> <!-- not Kamikaze-Plane --> <element name="$Light-Air$"/> <element name="$Medium-Air$"/> <element name="$Heavy-Air$"/> <element name="v1-rocket"/> <!-- Added because not in any list --> </variable> </variableList>Now if you wanted to add another Light-Air, just add it to the Light-Air list. Same if you were to remove a Heavy-Air, you would only need to remove it from one list. Helps a lot when adding and removing units.
Cheers...
-
@wc_sumpton
Nice one. Was a bit of a rush job before I went away; but good to know, thanks!
-
-
@wc_sumpton
I'll add the V1 to the light air list. Need to doublecheck the fuel use..edit. It doesn't look like it has a fueluse set (when defining the unit). Maybe why I didn't bother re-adding it. If it's only representing a single v1 then that's possibly why.
-
Didn't see the V1, but it was a good example showing how lists and non-listed items can be merged together.
Cheers...
-
@hostilian So about the issue with Train movement in the Ussr....
it was due to an incorrect -reset- after winter in a TerritoryAttachment"actually this sytem was a big compromise: what I really wanted is a railroad unit that can be attacked by strategic bombing so it could be taken out and repaired like Industry... would be realistic, but I did not manage to connect this feature with changing TerritoryAttachment for the Winter-effect and or No railroad (or construction option ) ....
now the presence of a no_railroad-unit triggers a Ter's TerritoryAttachment"... allowing or disallowing trains.
<attachment name="CA_RailroadSichuan" attachTo="Chinese" javaClass="RulesAttachment" type="player"><option name="Players" value="$AllPlayers$"/><option name="directPresenceTerritories" value="Sichuan" count="1"/><option name="unitPresence" value="railroad" count="1"/></attachment> <attachment name="TA_SichuanRailroad" attachTo="Chinese" javaClass="TriggerAttachment" type="player"><option name="conditions" value="CA_RailroadSichuan"/><option name="territories" value="Sichuan"/><option name="territoryAttachmentName" value="TerritoryAttachment" count="territoryAttachment"/><option name="territoryProperty" value="territoryEffect" count="-reset-Hills"/><option name="uses" value="1"/><option name="when" value="after:frenchPlace"/></attachment>hereby also including the terr's other terr. effect, in this example Hills.
maybe anyone knows a way to combine these features?
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