Can the AI embark units across the sea without being scripted?

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

Moderator: Panzer Corps 2 Moderators

Post Reply
koopanique
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 133
Joined: Sat Dec 31, 2016 8:41 pm

Can the AI embark units across the sea without being scripted?

Post by koopanique »

Hi,

I am making a simple scenario where the player (Allies) and the AI (Axis) are both on a different landmass, and must invade each other.

I have added naval transports to the transport pool for both players. As the human player, I can embark my units at a port and land them on the enemy landmass without any issue.

However, the AI captures all the Victory Hexes on its landmass, but doesn't try to embark its units on a harbor. Sometimes it does move its units on a harbor hex by chance, but doesn't embark them.

Is it possible to make the AI embark without scripting it? Maybe there's a special hex parameter to apply to a harbor hex to make the AI able to use it?

Just to be clear, I would like to not script the AI, because the joy of the editor for me is precisely to not know exactly what the AI will do. I am not unfamiliar with lua scripting, but this would defeat the point for me.

Thanks for any idea/info!

Koopanique
Grondel
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1863
Joined: Mon Aug 04, 2014 10:07 pm

Re: Can the AI embark units across the sea without being scripted?

Post by Grondel »

koopanique wrote: Fri Apr 28, 2023 11:26 pm Hi,
I am making a simple scenario where the player (Allies) and the AI (Axis) are both on a different landmass, and must invade each other.
I have added naval transports to the transport pool for both players. As the human player, I can embark my units at a port and land them on the enemy landmass without any issue.
However, the AI captures all the Victory Hexes on its landmass, but doesn't try to embark its units on a harbor. Sometimes it does move its units on a harbor hex by chance, but doesn't embark them.
Is it possible to make the AI embark without scripting it? Maybe there's a special hex parameter to apply to a harbor hex to make the AI able to use it?
Just to be clear, I would like to not script the AI, because the joy of the editor for me is precisely to not know exactly what the AI will do. I am not unfamiliar with lua scripting, but this would defeat the point for me.
Thanks for any idea/info!
Koopanique
AI currently will only embark/disembark when scripted to do so.
To get around ur dilemma u could set more than one Embark/disembark order for the AI units and then randomize then with the LUA.

sers,
Thomas
koopanique
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 133
Joined: Sat Dec 31, 2016 8:41 pm

Re: Can the AI embark units across the sea without being scripted?

Post by koopanique »

Grondel wrote: Fri Apr 28, 2023 11:44 pm AI currently will only embark/disembark when scripted to do so.
Ah ok! Thank you for the information.
Grondel wrote: Fri Apr 28, 2023 11:44 pm To get around ur dilemma u could set more than one Embark/disembark order for the AI units and then randomize then with the LUA.
That could be a good workaround! I've actually never scripted for PzC2, but it doesn't scare me. I was willing to randomize some stuff anyway (like which units the player and the AI gets each turn, rather than allowing to purchase, to spice things up).

Thanks for the very fast answer!

Koopanique
Post Reply

Return to “Panzer Corps 2 Scenario Design”