WW2 Oil and Snow (1st ed.) NEW MAP RELEASE
-
@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.... -
I would like to suggest a simpler approach. You don't need to track complete encirclement or total supplies. Just figure 1 or 2 supporting areas for area for each nation. If they are enemy-controlled drop a suicide unit that launches an AA-style attack against every unit in the cut-off area.
-
@ebbe
You could try this
Set Stalingrad as a<option name="blockadeZone" value="true" />
Set every unit as
<option name="blockade" value="1"/>
or maybe just the Engineers/Assault Guns? I have not played your map.
The above two lines do not error
But will blockade work on land?
It would would be really good if it did, but at the mo I dont have time to test it.
. -
@thedog nice idea... I try it out , but with convoy route that economical impact is solved... and with Block the PU's might go to occupying player?
@RogerCooper yes, that was a plan B... to make Out of Supply create hits somehow.... even created a dummy Player for that... the idea of few main supporting areas is good idea.... every player has some main zones...
okej but the question about how to have -Reset- a trigger as if
"uses" value="1" has not happened that game before, is still open -
In the mean time a "special"-unit I wanted allready for long time:
German Flaktower....
Not that they were very:
-Common: only few build in germany and one in Vienna
-Succesful: I read their impact against allied bombing was minimal
-Sustainable: they costed a shit load of material and building timeBut still: I just wanted to have one standing in the game...
3 Hit points offcourse, theses things were very very Bomb-proof...
AA offcourse but then in a amazing shell of concrete..
Makes conquering/bombing Berlin just that bit more extra challenging...
@Hepps *...is this the first Flaktower around in TripleA or
did you have a bunch allready ? -
@ebbe hmm...still not 100% certain of what all is going on here but maybe try a "activateTrigger" with the trigger that lifts the siege with the same conditions ? Just name it different. Let em all be uses 1.
Might need a half dozen or so, depending on how likely it is to reoccur. If it even works. I could be way off base lol
-
Maybe try a switch and a condition:
<!-- The switch --> <attachment name="CA_StalingradBesiegedByAxisSwitch" attachTo="Germans" javaClass="RulesAttachment" type="player"> <option name="switch" value="true" /> </attachment> <!-- The inverted condition --> <attachment name="CA_StalingradBesiegedByAxisInvert" attachTo="Germans" javaClass="RulesAttachment" type="player"> <option name="conditions" value="CA_StalingradBesiegedByAxisSwitch"/> <option name="invert" value="true" /> </attachment>
When 'CA_StalingradBesiegedByAxisSwitch' is "true", 'CA_StalingradBesiegedByAxisInvert' will be "false", and vice versa.
Add the switch to the check condition, with the ability to change the switch:
<attachment name="TA_PlaceOutOfSupplyStalingradbyAxis" attachTo="Russians" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="CA_StalingradBesiegedByAxis:CA_StalingradBesiegedByAxisSwitch"/> <option name="placement" value="Stalingrad:out_of_supply" count="1"/> <option name="notification" value="StalingradBesieged"/> <option name="players" value="Gremans"/> <option name="playerAttachmentName" value="RulesAttachment" count="CA_StalingradBesiegedByAxisSwitch"/> <option name="playerProperty" value="switch" count="false"/> <option name="when" value="after:frenchNonCombatMove"/> </attachment> <!-- Add the invert to the reset --> <attachment name="TA_RemoveOutOfSupply_StalingradbyAxis" attachTo="Russians" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="CA_StalingradNoLongerBesiegedByAxis:CA_StalingradBesiegedByAxisInvert"/> <option name="removeUnits" value="Stalingrad:out_of_supply" count="99"/> <option name="notification" value="StalingradSiegeLifted"/> <option name="players" value="Gremans"/> <option name="playerAttachmentName" value="RulesAttachment" count="CA_StalingradBesiegedByAxisSwitch"/> <option name="playerProperty" value="switch" count="true"/> <option name="when" value="after:germansNonCombatMove"/> </attachment>
Also I would also think about using an invert condition to check the lifted logic:
<attachment name="CA_StalingradNoLongerBesiegedByAxis" attachTo="Russians" javaClass="RulesAttachment" type="player"> <option name="conditions" value="CA_StalingradBesiegedByAxis"/> <option name="invert" value="true"/> </attachment>
Just some thoughts.
Cheers...
-
@wc_sumpton Hej man, thanks again for thinking along;
yes, sometimes it is confronting when I want to implement something
but still lack the coding skills and knowledge to fix it... tried hard to get a grip on your suggestion, the switch element gave an error...
I tried for 3 hours but unfortunately without the hoped result..
till I wanne give it another try.... **anyone sees a way out? **-What doesn't work yet:
-the supplies should be 1 less each turn if Stalingrad is besieged..
( now it only uses 1 supply 1 time and next turn stops) - -
and I want the out of supply Token and disabled factory to be
placed only after last supplies are used... for this I thought to use a check with <option name="unitPresence" value="supply" count='0'/> but that
doesn't seem to do the job.... hmmmmmanyone a sharp eye on this? ( yes I am asking a lot of you all )
<attachment name="CA_StalingradSurroundedByAxis" attachTo="Russians" javaClass="RulesAttachment" type="player"> <option name="Players" value="$AllAllies$"/> <option name="alliedOwnershipTerritories" value="Rostov:Volgograd:West Kazakhstan" count="0"/> <option name="uses" value="99"/> <option name="invert" value="true"/> </attachment> <attachment name="CA_StalingradAlliedControlled" attachTo="Russians" javaClass="RulesAttachment" type="player"> <option name="Players" value="$AllAllies$"/> <option name="alliedOwnershipTerritories" value="Stalingrad" count="1"/> <!--<option name="invert" value="true"/>--> </attachment> <!-- Run out of supplies check --> <attachment name="CA_StalingradRunOutOfSupplies" attachTo="Russians" javaClass="RulesAttachment" type="player"> <!--<option name="Players" value="$AllAllies$"/>--> <option name="unitPresence" value="supply" count='0'/><!-- Run out of supplies check Doesn 't seem to work--> </attachment> <!-- remove 1 supply per turn--> <attachment name="TA_UseSupplyStalingradIfSurroundedByAxis" attachTo="Russians" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="CA_StalingradSurroundedByAxis"/> <option name="removeUnits" value="Stalingrad:supply" count="1"/> <option name="uses" value="99"/> <option name="when" value="after:russiansNonCombatMove"/> </attachment> <!-- disable factory and place Outof supply penalty--> <attachment name="TA_BesiegedStalingrad" attachTo="Russians" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="CA_StalingradSurroundedByAxis"/> <option name="placement" value="Stalingrad:out_of_supply" count="1"/><option name="placement" value="Stalingrad:factory_disabled" count="1"/><option name="removeUnits" value="Stalingrad:factory" count="1"/> <option name="notification" value="StalingradBesieged"/> <option name="when" value="after:frenchNonCombatMove"/> </attachment>
-
@ebbe Is there a reason your not using an option to declare what territories are being checked for following.
<attachment name="CA_StalingradRunOutOfSupplies" attachTo="Russians" javaClass="RulesAttachment" type="player">
<option name="unitPresence" value="supply" count='0'/>
</attachment>
Try adding this line above or below unitPresence line.
<option name="alliedOwnershipTerritories" value="Stalingrad" count="1"/>
Post the error if no luck.
-
@ebbe @wc_sumpton Just a side note, which may not be an issue with new releases etc.. And perhaps someone can verify and or clarify further.
It is in regards to skipping the type of attachment in <attachment name=.
ie: triggerAttachment, conditionAttachmnet, objectiveAttachment, politicalActionAttachmnet, userActionAttachment. playerAttachment.
All attachment types apply in this case as long as your providing an original name. I have definitely experienced failed code when using other prefixes than the ones listed in xml.
I have used other names and think they are great. Like the ones I see here, TAxxxx and CAxxxx. I wish they were free of issues, but like I said they don't always function. Usually with political and user actions that utilize these formats somewhere within its code structure.
Just a heads up.