WW2 Oil and Snow (1st ed.) NEW MAP RELEASE
-
@schulz also nice way: but could AI handle that? with a fuel usage scenario for example I doubt that AI really wants to compensate for running out of oil.....
-
@ebbe If upkeep rates aren't very high, it is really AI compatible feature, I'am not sure how would it impact combining with oil. Even if AI fails badly they should be still tough opponent if they are given enough bonus incomes.
-
so this is working but still a lot of code: if anyone sees a better idea how to connect the trigger with each player / faction / victory city and even the opposite sitaution of invaders getting isloated in enemies VC?? you are very welcome.... my MAP is drowning in triggers..... @hepps --> yes , I seem to be trigger-happy for a hippy... I am on the highway to coding-hell...

attachment name="unitAttachment" attachTo="ration" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="isInfrastructure" value="true"/><option name="canBeDamaged" value="false"/> <option name="isConstruction" value="true"/> <option name="constructionType" value="rationing"/> <option name="constructionsPerTerrPerTypePerTurn" value="1"/> <option name="maxConstructionsPerTypePerTerr" value="1"/> <option name="createsResourcesList" value="-1:PUs"/> <option name="destroyedWhenCapturedBy" value="BY:Germans:Italians:Vichy-French:Japanese:Russians:Chinese:British:Canadians:ANZAC:Americans:French"/> <option name="destroyedWhenCapturedBy" value="FROM:Germans:Italians:Vichy-French:Japanese:Russians:Chinese:British:Canadians:ANZAC:Americans:French"/> </attachment> <attachment name="unitAttachment" attachTo="out_of_supply" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="isInfrastructure" value="true"/><option name="canBeDamaged" value="false"/><option name="consumesUnits" value="1:ration"/> <option name="createsResourcesList" value="-2:PUs"/> <option name="destroyedWhenCapturedBy" value="BY:Germans:Italians:Vichy-French:Japanese:Russians:Chinese:British:Canadians:ANZAC:Americans:French"/> <option name="destroyedWhenCapturedBy" value="FROM:Germans:Italians:Vichy-French:Japanese:Russians:Chinese:British:Canadians:ANZAC:Americans:French"/> </attachment> <attachment name="supportAttachmentOut_of_Supply" attachTo="out_of_supply" javaClass="UnitSupportAttachment" type="unitType"> <option name="unitType" value="bla bla all units"/> <option name="faction" value="allied"/> <option name="side" value="offence:defence"/> <option name="dice" value="strength"/> <option name="bonus" value="-1"/> <option name="number" value="99"/> <option name="bonusType" value="out_of_supply_penalty"/> <option name="impArtTech" value="false"/> <option name="players" value="Germans:Italians:Japanese:Vichy-French:Russians:Chinese:British:Canadians:ANZAC:Americans:French"/> </attachment> <attachment name="unitAttachment" attachTo="supply" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="isInfrastructure" value="true"/><option name="canBeDamaged" value="false"/><option name="consumesUnits" value="1:out_of_supply"/><option name="whenCapturedChangesInto" value="any:any:false:supply:1"/> <option name="isAirTransportable" value="true"/><option name="isLandTransportable" value="true"/><option name="transportCost" value="1"/> <option name="requiresUnits" value="barracks"/><option name="requiresUnits" value="factory"/><option name="requiresUnits" value="factory_major"/> </attachment><!-- OUT OF SUPPLY TESTT--> <!-- STALINGRAD STEP1 RATION STEP 2 OUT OF SUPPLY + ADD NOTIFICATIONS--> <attachment name="conditionStalingradBesiegedByAxis" attachTo="Russians" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="players" value="Americans:Russians:Chinese:British:Canadians:ANZAC:French"/> <option name="enemyPresenceTerritories" value="Rostov:Volgograd:West Kazakhstan" count="3"/><option name="alliedOwnershipTerritories" value="Stalingrad" count="1"/></attachment> <attachment name="triggerAttachmentPlaceRationStalingradbyAxis" attachTo="Russians" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionStalingradBesiegedByAxis"/> <option name="placement" value="Stalingrad:ration"/> <option name="notification" value="StalingradBesieged"/> <option name="when" value="after:frenchNonCombatMove"/> </attachment> <attachment name="conditionStalingradBesieged2byAxis" attachTo="Russians" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="players" value="Americans:Russians:Chinese:British:Canadians:ANZAC:French"/> <option name="directPresenceTerritories" value="Stalingrad" count="1"/><option name="unitPresence" value="ration" count="1"/><option name="alliedOwnershipTerritories" value="Stalingrad" count="1"/></attachment> <attachment name="triggerAttachmentPlaceOut_of_SupplyStalingradByAxis" attachTo="Russians" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionStalingradBesieged2byAxis"/> <option name="placement" value="Stalingrad:out_of_supply"/><option name="removeUnits" value="Stalingrad:ration" count="1"/> <option name="notification" value="StalingradBesieged2"/> <option name="when" value="after:frenchNonCombatMove"/> </attachment> <attachment name="conditionStalingradBesiegedByAllies" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="players" value="Germans:Japanese:Italians:Vichy-French"/> <option name="enemyPresenceTerritories" value="Rostov:Volgograd:West Kazakhstan" count="3"/><option name="alliedOwnershipTerritories" value="Stalingrad" count="1"/></attachment> <attachment name="triggerAttachmentPlaceRationStalingradbyAllies" attachTo="Russians" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionStalingradBesiegedByAllies"/> <option name="placement" value="Stalingrad:ration"/> <option name="notification" value="StalingradBesieged"/> <option name="when" value="after:japaneseNonCombatMove"/> </attachment> <attachment name="conditionStalingradBesieged2byAllies" attachTo="Russians" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="players" value="Germans:Japanese:Italians:Vichy-French"/> <option name="directPresenceTerritories" value="Stalingrad" count="1"/><option name="unitPresence" value="ration" count="1"/><option name="alliedOwnershipTerritories" value="Stalingrad" count="1"/></attachment> <attachment name="triggerAttachmentPlaceOut_of_SupplyStalingradByAllies" attachTo="Russians" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionStalingradBesieged2byAllies"/> <option name="placement" value="Stalingrad:out_of_supply"/><option name="removeUnits" value="Stalingrad:ration" count="1"/> <option name="notification" value="StalingradBesieged2"/> <option name="when" value="after:japaneseNonCombatMove"/> </attachment>and this means I should repeat this final piece of code for every Victory city...... wholy Moses..... maybe soon I am gonna ask some experienced coders a huge favor to look through my Game.XML before starting next project... somehow I have the feeling I code things not smart enough creating massive amount of coding.. ...
-
Lots of things can be done with for each loops. For example in AAZ.xml, Zombies are randomly generated by a small amount of code. In WW2v4-Maintenance.xml the Americans receive bonus income equal to the turn#. Big World Logistics Mod has supply lines (without loops).
If you want to have higher upkeep in certain territories, all you need to do is to create list of these territories and have a series of events that take PU's if a certain threshold is reached by counting units in those territories.
-
@general_zod Your suggestion of handling the economical impact of isolation/being besieged with Convoys Routes works excellent!
great idea... thanks... will be implemented for all capitals/urban terr's...... -
@ebbe Just to share: VARIABLES !! so usefull!
thanks to VERQUINS excellent explaining & sharing...
I found these interesting options I was not aware of...
(ofcourse most of you Code Wizards know allready so nothing new there...)as seen in PACT OF STEEL 2...
(and partly in SCHULZ's AGGRESSION 1941...)
but not seen being used so often in general it seems.....I still need some more time to understand the
"nested foreach loop" // using the '^' character....
that really goes beyond my stoneage coding-understanding , haha...
anyway....
first variables incl. in my map now and yes it saves a sh*tload of
repeating unit- naming and so in my game.xml...!great! thanks for your detailed sharing @VERQUIN
<!-- variableList provides a way to define "variables" which represent a list of elements in order to manage that list in a single place and avoid copying-pasting it multiple times. Whenever the variable name is specified in attachments using : $nameOfVariable$, its replaced with a colon delimited string of the elements (ex. "$russianAntiAirTargets$" would be replaced by "russianFighter:russianTacticalBomber". They can be used in attachment "foreach" attributes as well to allow having an attachment "template" which then generates multiple attachments by looping over the elements and replacing each element into @nameOfVariable@. This is particularly useful for repetitive attachments where only a few values change across them (see "foreach" below in attachments for more detail/examples). --> <!--<variableList> <variable name="AntiTankTargets"> <element name="germanMech.Infantry"/> <element name="germanTank"/> <element name="germanHeavyTank"/> <element name="germanHeavyTank-damaged"/> <element name="russianMech.Infantry"/> </variable> <variable name="Infantry"> <element name="germanInfantry"/> <element name="russianInfantry"/> </variable> <variable name="Barracks"> <element name="germanBarracks"/> <element name="russianBarracks"/> </variable> <variable name="TriggerPlayers"> <element name="Germany"/> <element name="Brazil"/> </variable> <variable name="Phases"> <element name="germanyBattle"/> <element name="brazilBattle"/> </variable>--> <!-- This shows how variables can be chained together to combine lists of elements --> <!--<variable name="russianAntiAirTargets"> <element name="russianFighter"/> <element name="russianTacticalBomber"/> </variable> <variable name="americanAntiAirTargets"> <element name="americanFighter"/> <element name="americanTacticalBomber"/> </variable> <variable name="AntiAirTargets"> <element name="$russianAntiAirTargets$"/> <element name="$americanAntiAirTargets$"/> </variable>--> <!-- Having an element that is empty ("") means that whatever option that is referenced by in a foreach using @nameOfVariable@ will skip that option (see attachment "foreach" for more details) --> <!--<variable name="Players"> <element name="Germany"/> <element name=""/> </variable> </variableList>-->see for more in Pact of Steel 2....
-
@ebbe I was wondering if you were aware of this or requesting an even more capable solution. Also I was certain you've been reviewing POS2 xml as reference.
-
@general_zod Yes a more capable solution ( to NoAirlanding... you mean? ) or hints / direction of solution is still very welcome... even if it will be overtaken in time by a new terrain feature option....
-
@ebbe so now cleaning up the game.xml-code....
like a living room after a wild party.. what a mess ,
and adding more Propaganda...
hej , ww2 propaganda ... even if it is just for the "flavour"....
I really like this element...
to get in the right "sphere"
( or do I sound tooo hippie ? )
anyway future posts will be more practical.... -
@ebbe HOW TO CHECK AMOUNT OF AVAILABLE RESOURCES ?
of a player... another question from me *
(realizing I burried you allready with them since I washed up the tripleA beach...)*Is there a possibility (or even example) of how to check the amount of a resource ..... (like PU's or Fuel) a player has? *
( to use for a trigger)*purpose in my case: to take care AI players run out of the black gold!
I have a purchase option that AI not allways uses , so I want
to make a forced emergency shopping chart. ..
-
@ebbe There is no event trigger based upon resource amount. It would be a good feature with a variety of uses and would not be hard to implement.
For now, the best you can do is to create AI-playable version of the mod which uses no resources other than PU's or have some PU-only unit types so the AI can always buy.
-
@ebbe So @RogerCooper is absolutely correct there is no dedicated option/attribute to add to a condition or trigger to get a result back with minimal effort.
I can comfortably say, we would all appreciate if there was further progress made in this area. We did get something however.
It only applies to userAttachments and politicalAttachments currently.
"costResources" value: amount of resources an action requires and will be removed from the player if action is attempted.
<option name="costResources" value="10:PUs"/>
<option name="costResources" value="2:Iron"/>
<option name="costResources" value="1:Fuel"/>This works for any resource, and with some creativity and can make them count for you. Lets say by simply subtracting from another known number of resources that are somewhere or represented by units that are somewhere who create said resource. But I think you get the gist of the concept.
There is another somewhat awesome accounting method but so unfortunate that it only allows PUs currently, "objectiveValue".
"objectiveValue" values: any integer number of PUs to be given (example: value="4").
These are POS2.xml descriptions, they could use more detail, anywho....
It can be used if you create a new monetary resource to buy with. And dedicate PUs as an accounting resource.
I've got a couple more ideas, that involve accounting resources, units, etc.. It all depends how much effort you're willing to invest and is the goal worth it.
-
@general_zod That is really great!!!!! thanks for sharing.....!
-
@ebbe I know you make good use of it. Nice work so far.
-
@bel246
I think I solved the issue of stuck Units when partisan activity occured in a territory:I added a <option name="canBeMovedThroughByEnemies" value="true"/> to the partisans....
(also found in POS2: which is a true treassure box
)
seems to work fine now....this is another element not yet listed in the XOB-list....
so I wonder if it was forgotten or not considered to be reliable ? -
Okej, a way to get Supply and out of Supply in besieged Cities:

-If a city will get besieged it will be slowly consuming its supply stocks:
if running out of them they get a battle penalty of -1.Good thing:
-one can prepare for siege by buying goods.....in advance....
to prepare if the enemies are coming close....- one can airdrop supplies with airtransport to keep besieged city well supplied.
-Once liberated the city doesn't receive any out of supply tokens any more consuming supplies, so remaining unused supplies can be used later in the game...
-Even enemies can get stuck besieged in a enemy city with similair supply consequences..
a kind of Stalingrad scenario
Still to solve:
-A player shouldn't be allowed to buy supplies in a besieged city
-The nr of supplies needed is symbolically...: if one has 1 unit there or 20... it still needs 1 supply per turn, as I do not see how to count nr of units stationed in there....
-Still puzzling ho to get the "getting besieged" trigger -reset- for
occasions the city is freed, but later in the game besieged again....
if I use <option name="uses" value="1"/> it will be triggered only
once in the whole game..
if I leave out <option name="uses" value="1"/> it will repeat each besieged turn, neither what I wanted...any ideas anyone?
<!-- OUT OF SUPPLY TEST STALINGRAD--> <attachment name="CA_StalingradBesiegedByAxis" attachTo="Germans" javaClass="RulesAttachment" type="player"> <option name="Players" value="$AllAxis$"/> <option name="alliedOwnershipTerritories" value="Rostov:Volgograd:West Kazakhstan" count="3"/><option name="enemyPresenceTerritories" value="Stalingrad" count="1"/> </attachment> <attachment name="TA_PlaceOutOfSupplyStalingradbyAxis" attachTo="Russians" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="CA_StalingradBesiegedByAxis"/> <option name="placement" value="Stalingrad:out_of_supply" count="1"/> <option name="notification" value="StalingradBesieged"/> <option name="uses" value="1"/> <option name="when" value="after:frenchNonCombatMove"/> </attachment> <attachment name="TA_PlaceOutOfSupplyStalingradbyAxis" attachTo="Russians" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="CA_StalingradBesiegedByAxis"/> <option name="removeUnits" value="Stalingrad:supply" count="1"/> <option name="when" value="after:frenchNonCombatMove"/> </attachment> <!-- Siege lifted--> <attachment name="CA_StalingradNoLongerBesiegedByAxis" attachTo="Russians" javaClass="RulesAttachment" type="player"> <option name="Players" value="$AllAllies$"/> <option name="alliedOwnershipTerritories" value="Rostov:Volgograd:West Kazakhstan" count="1"/><option name="alliedPresenceTerritories" value="Stalingrad" count="1"/> </attachment> <attachment name="TA_RemoveOutOfSupply_StalingradbyAxis" attachTo="Russians" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="CA_StalingradNoLongerBesiegedByAxis"/> <!-- <option name="uses" value="1"/>--> <option name="removeUnits" value="Stalingrad:out_of_supply" count="99"/> <option name="notification" value="StalingradSiegeLifted"/> <option name="when" value="after:germansNonCombatMove"/><!--should be japanese--> </attachment>and then same for Axis side
besides , if the siege is not lifted within All Allied
( of the besieged player) players turn, the city will loose its PU income.... ( fixed now with Convoy route concept: thanks to general zod )
Which sounds tough .. I might make a penalty on the PU fot that....it would be great to have production limited or
stopped also when under siege... let's see...do I hate cities? no no.. but the way some terr's with high PU and factory function now, makes that often like Stack-piled islands,
keeping building up waiting for counterattack.. which for me personally is not too realistic.... the help for besieged cities is mostly expected from outside?
or is there a more simple way to get this idea? I have allready a total of 556 trigger ingame which I am not very proud..maybe I want too much..
( or code it too complicated
) Halelujah! - one can airdrop supplies with airtransport to keep besieged city well supplied.
-
Shouldn't there be a penalty to attemp encircling Stalingrad due to Volga river?
-
@ebbe you don't want the notification trigger to fire every time it's under siege ? Just once on the turn it goes under siege and then repeat only if free and under siege again ?
-
@beelee Indeed, not just the notification but the whole trigger:
With my knowledge I see only 2 options:
-It will repeat every turn the conditions are met
or If set use="uses" value="1" and then with a second siege it doesn't trigger anymore... which I would like it too do... -
@schulz well If the Terr. incl. the east Volga bank isn't occupied,
than the city is not completely encircled and can still be supplied... so no consequences in the scenario I sketch....
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