Demo: getting the AI to use strategic transport

A forum to discuss custom scenarios, campaigns and modding in general.

Moderators: Slitherine Core, Panzer Corps Design, Panzer Corps Moderators

Post Reply
sbpc1
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 94
Joined: Tue May 03, 2022 1:10 pm

Demo: getting the AI to use strategic transport

Post by sbpc1 »

by strategic transport i mean trains and air transport (classes 17 and 15)
install as a custom scenario - no other files needed besides the two files in this zip - its not a mod.
play as the allies - AI is axis
no win/lose just position your allied units so their spotting allows you to see what the AI units are doing.
the air transport was difficult to get to work - i could only use paratroopers - other units refused to disembark
might be useful to mod makers.
if you a VERY nice to me i'll upload a demo with "teleporting" in it. beam me up, scotty.
Attachments
entrain.zip
(1.4 KiB) Downloaded 50 times
PeteMitchell
Major-General - Tiger I
Major-General - Tiger I
Posts: 2483
Joined: Tue Jul 10, 2018 1:18 pm

Re: Demo: getting the AI to use strategic transport

Post by PeteMitchell »

Could this be of value for BE?
Comprehensive Battlefield Europe AAR:
http://www.slitherine.com/forum/viewtopic.php?f=145&t=86481
sbpc1
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 94
Joined: Tue May 03, 2022 1:10 pm

Re: Demo: getting the AI to use strategic transport

Post by sbpc1 »

i was thinking it could be used to reassign a unit from one location to another based on a trigger that "detects" danger in one zone and a lack of danger in another. stay tuned i'm going to upload another demo that uses "unit action : change: transport type" which is more flexible. spoiler alert:there is a weird bug when using air transport (Ju 52 etc) that i'm 10 years too late to report to the developers. trains and landing craft work fine.
sbpc1
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 94
Joined: Tue May 03, 2022 1:10 pm

Re: Demo: getting the AI to use strategic transport

Post by sbpc1 »

further notes on this subject:
tt.png
tt.png (45.74 KiB) Viewed 1518 times
what parameter: transport type does

it attaches a transport unit - most useful for trains, air transport and landing craft. the "value" part is the unit id# from your equipment file - so for german units 121 = train, 161 = air transport 183 = landing craft. i don't think you even need to have those transports setup in the transports section of scenario params.

here's what you do modmakers: set trigger conditions (up to you) then set transport type of the unit you want to move then edit AI action to tell the unit to move from the zone it is in to the zone you want it to go to. the unit will "disembark" from the strategic transport at the start of it's next turn automatically - just like it would if it was using a truck as attached transport.
make sure it has a path to the destination i.e. a city (for train) or port (for landing craft).
unfortunatley using air transport for this has a really weird bug in it so it does not work.

what value can you set in transport type? well its intended for classes 14, 15 16 and 17. class 15 is bugged though, see above.
class 14 is land transport like trucks. you might as well just attach a truck as "organic transport" when placing the units in a scenario for that.

one interesting thing with transport type and other organic transports, such as trucks, is this - if you set transport type to the value of -1 (minus one) after the unit has moved to it's destination zone it REMOVES/UNATTACHES the transport! remember if a unit buys reinforcements and has a truck attached it has to pay more prestige because of its attached transports. think about that.

i would see these methods/scripts being used by the AI side in a scenario (strategic forces reassignment - i'm looking at you - battlefield europe) but you could script it/trigger it for the player side if you are creative.
you could even create your own transport unit with 99 movement points so the unit you are moving always gets there in one turn (if not blocked by the enemy). think about that. move from anywhere to anywhere on the map in one turn.

also this - the id# you use under transport type, set can be ANY unit. why don't you try using a tank as a transport?
i dare you to scipt that. (you won't be wasting your time - it does work with some issues but i'll let you find out)

this is NEARLY teleporting. but i'll tell how to get that to work in the next installment. stay tuned.
Locarnus
1st Lieutenant - 15 cm sFH 18
1st Lieutenant - 15 cm sFH 18
Posts: 834
Joined: Tue Jul 19, 2011 8:14 pm

Re: Demo: getting the AI to use strategic transport

Post by Locarnus »

PeteMitchell wrote: Sat Jul 09, 2022 8:11 pm Could this be of value for BE?
I have no time for testing at the moment, but I took a quick look at it and it seems that this method can make use of more than 32 zones with patch 1.32.
The additional patch 1.32 zones are still broken, since they can not be addressed by most the drop down editor menues.
But it seems that this transport method only needs drop down editor menues which can address those additional zones.
Which would make this method very possible even for mods that are at the 32 zone limit!
sbpc1 wrote: Mon Jul 11, 2022 10:15 am one interesting thing with transport type and other organic transports, such as trucks, is this - if you set transport type to the value of -1 (minus one) after the unit has moved to it's destination zone it REMOVES/UNATTACHES the transport! remember if a unit buys reinforcements and has a truck attached it has to pay more prestige because of its attached transports. think about that.
That could be very useful to simulate the enemy shipping units to the front, but then "sending the trucks back for more troops" rather than staying with the units at the front line!
Nice find!
longer, alternative "PG" like Campaign new version 0.34 from 2011.08.02 (another bugfix & now in zip format)
fgiannet
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 131
Joined: Wed Mar 11, 2020 1:31 am

Re: Demo: getting the AI to use strategic transport

Post by fgiannet »

That is incredible and would make a huge scenario so much better. Then the AI could respond to the player’s strategy without the designer having to place units, ahead of time, in expectation of every possible axis of attack. No longer would the enemies territory be simply a succession of defensive rings. A huge scenario, like the Eastern Front, could have units appear on their historical dates (far from the front lines in their historical factories) and ship by train to threatened locations (based on how many enemy or friendly units are in a zone?). Then holes could also open up based on the player’s strategy (allowing for even more analysis/strategy/thought). Or you ship some units straight to one area for an offensive like Bagration. Why ship them? Because it feels silly when a tank army magically appears somewhere. Then control of rail lines becomes important again.

Now you have a fluid front instead of that clunky WW 1 grind through immovable enemy defenses. I can not believe no one ever discovered this before. THIS IS GENIUS.

This is really exciting to contemplate. The constant flow of reinforcements from the rear changing with the circumstances at the front! It makes giant map scenarios so much better.

Part of the reason you could not play Akkula’s Big Soviet scenario from the Wehrmacht’s side was due to the AI not being able to use strategic transport. You just blew that concept apart many years later. Ha, ha, ha. Crazy!

I have not touched the game in a while now but this is fascinating to contemplate.

Outstanding work!
sbpc1
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 94
Joined: Tue May 03, 2022 1:10 pm

Re: Demo: getting the AI to use strategic transport

Post by sbpc1 »

yes control of the rail lines becomes important if that is how your armies are reinforced or how new armies arrive - not by magic spammming. so if you surround/outflank and cut those links..

get to work modders/scenario designers!

i've also got and idea that involves assigning rail routes into a key city to a zone/zones and using unit action to reduce fuel/ammo/strength of units in that "cut off" city if that link is cut (# of enemy units in that rail zone).

thanks for you kind words, fgiannet. prehaps you'd like to contibute to some of the existing wip mod projects. or get busy with the scenario editor yourself!
fgiannet
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 131
Joined: Wed Mar 11, 2020 1:31 am

Re: Demo: getting the AI to use strategic transport

Post by fgiannet »

Took me a little bit to shake the cobwebs off my brain but I added a new city with rail line to your example. I modified your script so the AI moves the entrained unit to zone 2 (1st city) if zone 8 had more than 2 enemy units. Added a new script moving unit to zone 6 (2nd/newly added city) if 3 enemy units were in zone 5.

Worked without problems. Unit moved, detrained, and even attacked. It seems it executes the first script if both conditions are true.

This really is genius. I am contemplating opening Akkula’s incomparable big Eastern Front scenario. Assigning zones to land that would fall under Army groups North, Central, and South. Then setting Soviet reinforcements based off historical production schedules to arrive in the rear (Tankograd for instance) and use the railways to deploy to zones under threat (by counting # of enemy land units in zone).

There would be reinforcements hastily rushed to the front and units stockpiled for specific offensives (such as Uranus). The key change is they will transfer just like the player’s units.

It would take some careful planning but could lead to a scenario that plays/responds differently based on your actions. A brilliant expansion of the AI’s deployment capabilities, a much more fluid battlefield, and much more fun to see as well (instead of line after line of wagon wheel enemy positions in all directions). It has the potential to be a great historical model.

This could be an incredible addition to any large scale scenario. Absolutely brilliant!
faos333
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1465
Joined: Sat Feb 16, 2019 9:04 pm

Re: Demo: getting the AI to use strategic transport

Post by faos333 »

This is genius !!!
Battlefield Europe get the most from Panzer Corps 8)
Download the new 2.4 Mod here http://www.slitherine.com/forum/viewtopic.php?f=147&t=47985
sbpc1
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 94
Joined: Tue May 03, 2022 1:10 pm

Re: Demo: getting the AI to use strategic transport

Post by sbpc1 »

i want to redo transport altogether. "attached" transport just giving +1 or +2 extra move hexes with strategic transport being used for moving longer distances. it's about the AI really - dumb with trucks but can be scripted to move strategically with trains.

i'll do some more work with trucks for the AI. set transport type, ai action move to (zone) set transport type to -1 on arrival.

the mystery is why has no one used this feature in 10 years of PzC modding??
faos333
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1465
Joined: Sat Feb 16, 2019 9:04 pm

Re: Demo: getting the AI to use strategic transport

Post by faos333 »

That is a good question!
Battlefield Europe get the most from Panzer Corps 8)
Download the new 2.4 Mod here http://www.slitherine.com/forum/viewtopic.php?f=147&t=47985
captainjack
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1912
Joined: Thu Sep 13, 2012 7:42 am

Re: Demo: getting the AI to use strategic transport

Post by captainjack »

Very interesting work.

As for the question about why hasn't it been done before, perhaps because nobody thought to try it out.
I've been playing for roughly 10 years now, and only last week discovered that you can put an armoured train on a train transport. This was actually very handy because armoured trains usually have 10 move and use fuel and I needed to get a train with almost no fuel about half way across the board. It was pure luck it happened to be at a station at the time and I noticed that I had a transport option available.
Post Reply

Return to “Panzer Corps : Scenario Design”