WW2 Oil and Snow (1st ed.) NEW MAP RELEASE
-
@general_zod said in WW2 Oil and Snow (1st ed.) NEW MAP RELEASE:
TAxxxx and CAxx
Hej there, thanks for your feedback once more... it is so quiet at the forum lately I thought everyone is laying on the beach, or working hard for their job deadline to be able to..
on attachment naming: Yes I just tried to replace triggerAttachment, and conditionAttachment with TA_ and CA_ to keep the code as clear and as short as possible.. I couldn't find any info whether this could give trouble, but testing in my setting seemd ok... which is no guarantee ofcourse... I am curious what the other code wizards think of this?
supply value="0" yes, I tried that one too... was not sure if it was working, could be other part of the code that fails...
still struggling with wc_sumptions suggestion for resetting a trigger, somehow I still don't get it... makes me feel slightly stupid -
Thank you for your answer to @General_Zod. Personally, I use the whole wording as @General_Zod has suggested, but when helping others I try to keep what they have and add to it without trying to change the structure to much.
If I understand, this is what is trying to be accomplished. When a city is surrounded a message is displayed and "out_of_supply" tokens are placed. On the following turns, as long as the city remains surrounded, the message is not to be displayed but another token is placed.
Once the city is liberated the tokens are removed, and reset for the message to be displayed.
Going to use 'Stalingrad' with 'Russians' as owner:
<!-- The conditions --> <!-- Checking to see if Russians still own Stalingrad --> <attachment name="CA_StalingradOwnedByAllies" attachTo="Russians" javaClass="RulesAttachment" type="player"> <!-- Only checking for the ownership of Stalingrad --> <!-- So checking for unit presence is unnecessary --> <option name="directOwnershipTerritories" value="Stalingrad"/> </attachment> <!-- Next check to see if Russians or their allies control any of the surrounding territories --> <attachment name="CA_StalingradNotBesiegedByAxis" attachTo="Russians" javaClass="RulesAttachment" type="player"> <!-- Only need 1 of 3, so count can be left off or set to 1 --> <option name="alliedOwnershipTerritories" value="Rostov:Volgograd:West Kazakhstan"/> </attachment> <!-- The invert/opposite of 'CA_StalingradNotBesiegedByAxis' will tell if Russians or their allies do not control those surrounding territories --> <attachment name="CA_StalingradBesiegedByAxis" attachTo="Russians" javaClass="RulesAttachment" type="player"> <!-- Checking the ownership of the surrounding territories --> <option name="conditions" value="CA_StalingradNotBesiegedByAxis"/> <!-- Will always be the opposite --> <option name="invert" value="true"/> </attachment> <!-- The messages --> <!-- To display the message, set a display switch --> <attachment name="CA_StalingradBesiegedByAxisMessage" attachTo="Russians" javaClass="RulesAttachment" type="player"> <option name="switch" value="true"/> </attachment> <!-- To not display the message use the opposite of when to display --> <!-- To display the message, set a display switch --> <attachment name="CA_StalingradBesiegedByAxisNoMessage" attachTo="Russians" javaClass="RulesAttachment" type="player"> <option name="conditions" value="CA_StalingradBesiegedByAxisMessage"/> <option name="invert" value="true"/> </attachment> <!-- End conditions -->
So those are the five conditions for checking the surrounding of Stalingrad.
Cheers...
-
@wc_sumpton Thanks a lot for sharing and explaining these essential switch and invert -coding tricks to me.. they are very usefull!
Another thing that was on my mind! To have more possibilities
to pimp and empower A.I. players:A trigger that only pulls off when a player is A.I.
It is used a lot in civ5 WW2 RED Mod.. ofcourse one cannot expect completely different game-bases to have similair functions... but you guys think it would be possible, relatively easy to get this done in Triple A...? if so I can make another Request..
so For example....
In Stalingrad script there is a trigger Uranus Offensive:
set by date, enemyOwnershipTerritories or whatever:-- URANUS [19421119] = CivID = USSR, AI = true,
Group = {RU_INFANTRY, RU_INFANTRY, RU_BT7, RU_T26, RU_T34, RU_T34_76, RU_KV1},So triggers that only work if the player attached to it is A.I. that game?
With the right "hidden" bunch of triggers , it could make A.I. more strtegical/controllable? If there a multiple triggers with a Chance-element still unpredictable?
I wonder even how hard it i to give them a "InitialObjective" as target.?
Just thinking loud here without the burden of coding experience
your humble opinions on this?
-
@ebbe An isAI condition is not currently supported but I have requested it as a feature.
There are workarounds. You could have the human player place a special unit for themselves that the AI would not choose which could then be used for conditions.
-
A core design/architecture behind TripleA is that every player is interchangeable between human or AI. This is very deeply baked in and is part of the core code design. We are unlikely to be able to support such triggers.
-
@ebbe Determining the current AI value assignment mechanism would get there partly. I'm pretty sure they value capitals and victory cities and and production of PU. Once you determine a few of their main priorities you can via a set of chance conditions and triggers add a another element to the AI behavoirs specific to your map.
-
@wc_sumpton Your examples are very informative, nicely done.
-
@ebbe Take a peek at feudal japan xml. He does some stuff that might help you out with AI triggering related code. Mostly for setup.
-
@general_zod @LaFayette thanks for all feedback and suggestions once more.... I will surch for a workaround in that direction then... good to realize the about the border of the core code...
-
@general_zod said in WW2 Oil and Snow (1st ed.) NEW MAP RELEASE:
@ebbe Determining the current AI value assignment mechanism would get there partly. I'm pretty sure they value capitals and victory cities and and production of PU. Once you determine a few of their main priorities you can via a set of chance conditions and triggers add a another element to the AI behavoirs specific to your map.
The AI does not value victory cities, just capitals, production and units.
-
@rogercooper @wc_sumpton @General_Zod
okej: it almost became my own Stalingrad but ..it worked out..
as planned: the proposed restictions/ features / behaviour for (Victory) Cities
-It looses its PU,s when completely surrounded
( thanks to land convoy route idea @General_Zod )
-It stops factory/barracks production after one turn if surrounded
( I think it is more realistic: its final resources used for one more production and 2nd turn of siege factory/barracks it turns into temporary disabled)
If only 1 route is open again from besieged city ... so 1 surrounding terr. is liberated than factory may produce again and PU's are restored.-there appears a siege message everytime city is besieged
during the game and trigger is reset by invert and switch
( thanks wc sumption for teaching me how to )-When a Siege starts every turn 1 supply is taken.
1 Turn in my game is 2 month.
When there are more than 4 defenders it takes 2 supply.
All cities start with 3 supply standerd. I might differentiate a bit due to economical and logistical circumstances-One can gather supply by purchase allready when you
feel a siege situation is coming.-Supply can be transported and airtransported into a besieged town by transport plane.
-If opponents (like say the germans take for example Stalingrad) get be surrounded in a city they have conquered they may also get besieged. Though they may/ do not use the factory in there for production they also may run out of supplies.
When running out of supply all units in a city get a -1 penalty on attack and defense.
OKEJ, HOW MUCH CODE CAN ONE HAVE FOR THIS FEATURE?
it sure is a sh*tload for a relatively small effect.... but I love the bit of realism it brings. Together with limitation on mas producing cheap units nd mass stacking I guess this will stop some high valuabe terr's ,from becoming too much of horrifying surreal stockpiled islands..I guess/hope checking triggers might not take as much Processor energy as for exampe making strategic calculations for units?**
any: the code:
PLEASE SHOOT AT IT IF YOU THINK I CAN SIMPLIFY OR IMPROVE IT>.. and then I like to move on to multiplying it for the 15! urban terr's ingame and do some prayers the amount of triggers (>600) don't sufficate the game play
the code so far:
<!-- BESIEGE AND SUPPLY SYSTEM FOR A SINGLE TOWN --> <!-- with thanks to WC SUMPTION for the invert and switch examples--> <!-- Checking to see if Russians still own Stalingrad --> <!--<attachment name="CA_StalingradOwnedByAllies" attachTo="Russians" javaClass="RulesAttachment" type="player"><option name="directOwnershipTerritories" value="Stalingrad"/></attachment>--> <attachment name="CA_StalingradNotBesiegedByAxis" attachTo="Russians" javaClass="RulesAttachment" type="player"><option name="alliedOwnershipTerritories" value="Rostov:Volgograd:West Kazakhstan" count="1"/><!-- Only need 1 of 3, so count can be left off or set to 1 --></attachment> <attachment name="CA_StalingradBesiegedByAxis" attachTo="Russians" javaClass="RulesAttachment" type="player"><!-- The invert/opposite of 'CA_StalingradNotBesiegedByAxis' will tell if Russians or their allies do not control those surrounding territories --> <option name="conditions" value="CA_StalingradNotBesiegedByAxis"/> <option name="alliedOwnershipTerritories" value="Rostov:Volgograd:West Kazakhstan" count="0"/> <!-- added myself--> <option name="invert" value="true"/> <!-- Will always be the opposite --> </attachment> <!-- State of factory check --> <attachment name="CA_StalingradFactoryPresence" attachTo="Russians" javaClass="RulesAttachment" type="player"><option name="directPresenceTerritories" value="Stalingrad" count="1"/><option name="unitPresence" value="factory" count="1"/></attachment> <attachment name="CA_StalingradDisabledFactoryPresence" attachTo="Russians" javaClass="RulesAttachment" type="player"><option name="directPresenceTerritories" value="Stalingrad" count="1"/><option name="unitPresence" value="factory_disabled" count="1"/></attachment> <!-- Still supplied or out of supply check --> <attachment name="CA_StalingradSuppliesCheck" attachTo="Russians" javaClass="RulesAttachment" type="player"> <option name="Players" value="$AllAllies$"/> <option name="directExclusionTerritories" value="Stalingrad" count="1"/><option name="unitPresence" value="supply" count="0"/><option name="unitPresence" value="out_of_supply" count="0"/> </attachment> <!-- More than 4 defenders than double supply needed --> <attachment name="CA_StalingradMoreThan4Defenders" attachTo="Russians" javaClass="RulesAttachment" type="player"> <option name="Players" value="$AllAllies$"/> <option name="directPresenceTerritories" value="Stalingrad" count="1"/><option name="unitPresence" value="$AllUnits$" count="5"/><option name="unitPresence" value="out_of_supply" count="0"/> </attachment> <!-- switch factory Stalingrad to disabled when surrounded after Russians place--> <attachment name="TA_StalingradBesieged" attachTo="Russians" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="CA_StalingradOwnedByAllies:CA_StalingradBesiegedByAxis:CA_StalingradFactoryPresence"/> <option name="removeUnits" value="Stalingrad:factory" count="1"/><option name="placement" value="Stalingrad:factory_disabled" count="1"/> <option name="notification" value="StalingradBesieged"/> <option name="when" value="after:russiansPlace"/> </attachment> <!-- restore factory when at least 1 surrounding terr. is allied owned--> <attachment name="TA_StalingradNotBesieged" attachTo="Russians" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="CA_StalingradOwnedByAllies:CA_StalingradNotBesiegedByAxis:CA_StalingradDisabledFactoryPresence"/> <option name="removeUnits" value="Stalingrad:out_of_supply" count="1"/><option name="removeUnits" value="Stalingrad:factory_disabled" count="1"/><option name="placement" value="Stalingrad:factory" count="1"/> <option name="when" value="after:russiansPlace"/> </attachment> <!-- Remove 1 supply per turn if besieged--> <attachment name="TA_StalingradBesiegedUseSupply" attachTo="Russians" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="CA_StalingradOwnedByAllies:CA_StalingradBesiegedByAxis"/> <option name="removeUnits" value="Stalingrad:supply" count="1"/> <option name="uses" value="999"/><!-- how to make this infinite? --> <option name="when" value="before:russiansPlace"/> </attachment> <!-- Remove 1 extra supply per turn if more than 4 units besieged --> <attachment name="TA_StalingradBesiegedExtraUseSupply" attachTo="Russians" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="CA_StalingradOwnedByAllies:CA_StalingradBesiegedByAxis:CA_StalingradMoreThan4Defenders"/> <option name="removeUnits" value="Stalingrad:supply" count="1"/> <option name="uses" value="999"/><!-- how to make this infinite? --> <option name="when" value="before:russiansPlace"/> </attachment> <!-- a -1 penalty on fighting ability defenders in besieged town when out of supply --> <attachment name="TA_StalingradPlaceOutOfSupplies" attachTo="Russians" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="CA_StalingradOwnedByAllies:CA_StalingradBesiegedByAxis:CA_StalingradSuppliesCheck"/> <option name="placement" value="Stalingrad:out_of_supply" count="1"/> <option name="when" value="after:russiansPurchase"/> </attachment> <!-- IF AXIS HOLD SUPPLY CONSEQUENCE ONLY --> <!-- Checking to see if Axis own Stalingrad --> <attachment name="CA_StalingradOwnedByAxis" attachTo="Germans" javaClass="RulesAttachment" type="player"><option name="Players" value="$AllAxis$"/><option name="directOwnershipTerritories" value="Stalingrad"/></attachment> <attachment name="CA_StalingradNotBesiegedByAllies" attachTo="Germans" javaClass="RulesAttachment" type="player"><option name="alliedOwnershipTerritories" value="Rostov:Volgograd:West Kazakhstan" count="1"/><!-- Only need 1 of 3, so count can be left off or set to 1 --></attachment> <attachment name="CA_StalingradBesiegedByAllies" attachTo="Germans" javaClass="RulesAttachment" type="player"><!-- The invert/opposite of 'CA_StalingradNotBesiegedByAxis' will tell if Germans or their allies do not control those surrounding territories --> <option name="conditions" value="CA_StalingradNotBesiegedByAllies"/> <option name="alliedOwnershipTerritories" value="Rostov:Volgograd:West Kazakhstan" count="0"/> <!-- added myself--> <option name="invert" value="true"/> <!-- Will always be the opposite --> </attachment> <!-- Still supplied or out of supply check --> <attachment name="CA_StalingradSuppliesCheck" attachTo="Germans" javaClass="RulesAttachment" type="player"> <option name="Players" value="$AllAxis$"/> <option name="directExclusionTerritories" value="Stalingrad" count="1"/><option name="unitPresence" value="supply" count="0"/><option name="unitPresence" value="out_of_supply" count="0"/> </attachment> <attachment name="CA_StalingradMoreThan4Defenders" attachTo="Germans" javaClass="RulesAttachment" type="player"> <option name="Players" value="$AllAxis$"/> <option name="directPresenceTerritories" value="Stalingrad" count="1"/><option name="unitPresence" value="$AllUnits$" count="5"/><option name="unitPresence" value="out_of_supply" count="0"/> </attachment> <!-- Remove 1 supply per turn if isolated--> <attachment name="TA_StalingradBesiegedUseSupply" attachTo="Germans" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="CA_StalingradOwnedByAxis:CA_StalingradBesiegedByAllies"/> <option name="removeUnits" value="Stalingrad:supply" count="1"/> <option name="uses" value="999"/><!-- how to make this infinite? --> <option name="when" value="before:germansPlace"/> </attachment> <!-- Remove 1 extra supply per turn if more than 4 units besieged --> <attachment name="TA_StalingradBesiegedExtraUseSupply" attachTo="Germans" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="CA_StalingradOwnedByAxis:CA_StalingradBesiegedByAllies:CA_StalingradMoreThan4Defenders"/> <option name="removeUnits" value="Stalingrad:supply" count="1"/> <option name="uses" value="999"/><!-- how to make this infinite? --> <option name="when" value="before:germansPlace"/> </attachment> <!-- minus 1 penalty on fighting ability defenders in besieged town when out of supply --> <attachment name="TA_StalingradPlaceOutOfSupplies" attachTo="Germans" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="CA_StalingradOwnedByAllies:CA_StalingradBesiegedByAxis:CA_StalingradSuppliesCheck"/> <option name="placement" value="Stalingrad:out_of_supply" count="1"/> <option name="when" value="after:germansPurchase"/> </attachment>
and thanks to General_Zodd for City land Convoy route solution for limiting city Pu when surrounded/besieged:
<attachment name="territoryAttachment" attachTo="Chongqing" javaClass="TerritoryAttachment" type="territory"> <option name="territoryEffect" value="Urban"/> <option name="production" value="1"/><option name="capital" value="Chinese"/> <option name="convoyRoute" value="true"/> <option name="convoyAttached" value="Gansu:Guizhou:Sichuan"/> </attachment>
Moving on: still on the list:
-Some AI player only triggers and bonus placement
-some more sound effects
-No air landing zones
-and Fog of War... ( yes yes , I know a fata morgana I suppose )\Amen enjoy the weekend
-
@ebbe said in WW2 Oil and Snow (1st ed.) NEW MAP RELEASE:
-Some AI player only triggers and bonus placement
There are some workarounds. The AI does not answer Player Action questions, etc... (There is a isAI method as part of the GamePlayer Class, but it is not used for testing conditions.)
@ebbe said in WW2 Oil and Snow (1st ed.) NEW MAP RELEASE:
-No air landing zones
Besides the Snow effect way, I don't see this happening soon. Sorry
Cheers...
-
@wc_sumpton @General_Zod for some AI influence?... I got tipped by General_Zod about the Feudal Japan-map that might have a way to have little control.. but still haven't got time to understand "the trick" :
<attachment name="conditionAttachmentMoriHumanCheck" attachTo="GameSetup" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="directPresenceTerritories" value="SZ2" count="1"/> <option name="unitPresence" value="HumanMori" count="1"/> </attachment> <attachment name="triggerAttachmentMoriHumanSet1" attachTo="Mori" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentMoriHumanCheck"/> <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentMoriHuman"/> <option name="playerProperty" value="switch" count="true"/> <option name="players" value="Mori"/> <option name="uses" value="1"/> <option name="when" value="after:gameSetupBidPlace"/> </attachment> <attachment name="triggerAttachmentMoriHumanSet2" attachTo="Mori" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentMoriHumanCheck"/> <option name="playerAttachmentName" value="RulesAttachment" count="conditionAttachmentMoriNonHuman"/> <option name="playerProperty" value="switch" count="false"/> <option name="players" value="Mori"/> <option name="uses" value="1"/> <option name="when" value="after:gameSetupBidPlace"/> </attachment>
-
talking about avoiding mass stacks... a subject I am interested in...
(see my previous posts of other attempts on my quest to counter this feature )anyway: you both are delighted by fixing this issue with
UPKEEP/MAINTENANCE... I am interested in that solution:Just few questions:
-Does A.I. handle upkeep well?
-What happens when a unit runs out of upkeep?
( is it like out of fuel : no movement ? As I like to combine it with fuel usage))
-Do you know an example Map here on TripA where it is used
so I can see how it works out?and what is the actual difference between
<option name="upkeepCost" value="1"/> or
<option name="upkeepCost" value="flat" count="1"/>thanks !
I
-
@ebbe
There are a few ways to enable "Upkeep"- upkeepCost used in relationshipTypeAttachment
- createsResourcesList used in unitAttachment
I can only advise on the last one.
As its used by each unit, you put this line in say armour
<option name="createsResourcesList" value="-2:PUs"/>
It will deduct 2pu every turn for every unit that is armour.
If you have it positive as opposed to negative it can give PU to your nation for every unit that you have. You could think of this as a form of a manufacturing plant or mining resources.So in my games I have used 1, 0, -1, -2 and -3 for an aircraft carrier.
See my futurewar game, that is the closest to your WW2 game here.
https://forums.triplea-game.org/topic/2779/future-wars-fallen-empire-official-threadIf you dont attack and just defend, you will reach a point where you cannot buy anything using PU, because your income will = your upkeep costs.
The AI does not appear to take createsResourcesList into account, when purchasing units. But it does do the maths every turn, so it sort of handles it.
-
@ebbe I still cant get your map to play in the lobby. Makes it hard for those that want to try it.
You might want ask a lobby/dev controller how to make it available, so people can actually play it.You spent a year on it, seems it should be available.
-
@beelee Probably because maps are not frequently updated in lobby.
-
@schulz yea it's just kind of a bummer it's not even an option after him spending all that time. Can't really promote it.
-
Oh yes, summer is ending but still working on 3,0...
Yes I planned to start on other project allready but still stuck to a major upgrade.... on the oil and snow map:as I personally find the concept of urban strongholds interesting I am adding some more essential Key Cities in the map...
to do so I have to upsize the map... takes a whileFor now Cities will have supply... once totally surrounded they run slowly out of it , depending on the seize of the army inside.
Once out of supply they get a battle penalty... worked fine.. a lot of code but worth it for me...As in ww2-history cities often were surrounded, besieged, and proved to be good natural strongholds to hang on to...
leningrad, stalingrad, so on....Every city has a URBAN terrain feature...I will also divide this into MAJOR URBAN AREA and MINOR... as fighting in MOSCOW should be a bit more tough than f.e. in BATAVIA
Also I am considering giving the cities extra hitpoints in the form of "Buildings" that take in the first hits and then turn into rubble...
besides I have a 6 unit placement spots for each city , instead of 1, before dropping units into the top City boxes...So for all players and their minors I selected and added essential key cities:
There is never enough space to add all main cities so I had to make choice:I checked a list of the 100 most populated cities in 1940,
with cities that were key production hubs and cities that became famous for long sieges and battles.... so even some smaller cities got on the map due to this ( like Helsinki f.e.)anyway: this is the list so far:
66 KEY CITIES -->GERMANY: (6)
BERLIN-HAMBURG-VIENNA-
KΓΆNIGSBURG ( strategic fortress city)
WARSZAWA-PARIS ( occupied)GERMAN MINORS:(3)
HELSINKI-BUDAPEST-BUCHARESTITALY:(3)
ROME-MILAN-
TRIPOLI ( "colonial capital")VICHY FRENCH:(2)
MARSEILLE-DAKAR ( key harbours)
(I decided not to add Vichy as city due to size and lack of space)JAPAN:(7)
TOKYO-NAGASAKI-(key production)
OSAKA ( big town )occupied from China:
BEJING-SHANGHAI-NANKINGMUKDEN (big city and capital minor Mandsjoekwo puppets state)
CHINA:(2)
CHONGQING (improv. capital)
KUNMINGUSSR:
MOSCOW-LENINGRAD-STALINGRAD
MINSK-KIEV
RIGA (occupied)
CHELYABINSK ( future key production center)UK:(9)
LONDON - LIVERPOOL -GLASGOW
BOMBAY-MOMBASA-(essentiel harbour)
DELHI-CALCUTTA ( population)
HONGKONG-SINGAPORE (harbour-economical)USA(9)
WASHINGTON-NEW YORK ( other main east coast cities like Boston not possible , would be too many too close )
DETROIT (incl chicago: production)
ST LOUIS (big city in 1940)
NEW ORLEANS
LOS ANGELES
SAN FRANCISCO-SAN DIEGO ( key w-coast harbours)
MANILLA ( colonial capital)ANZAC:(2)
SYDNEY-MELBOURNECANADA:(2)
OTTAWA -VANCOUVERFRENCH:(1)
BRAZZAVILLE ( main center of Free french )ALLIED MINORS:
CAPETOWN
CAIRO
BATAVIA (at java..dutch)
RIO DE JANEIRO
MEXICO CITYAXIS MINORS:
BUENOS AIRES
TEHERAN
BANGKOKINDEPENDED AT START:
MADRID
LISSABON
ISTANBUL ( prefered over capital ANKARA due to strategic location and size)
STOCKHOLM
europe would look somehow like this then: (with basic graphics for the moment )
any feedback? -
Not sure if this is because of the recent reply or not, but I'm unable to play this map mod as the only one in the experimental tab is the 2nd edition but the map refuses to launch because it's missing the 1st edition