Page 1 of 1

AI scripting ideas

Posted: Wed Jun 13, 2018 6:00 am
by captainjack
If the AI scripting is anything like the Panzer Corps one, the following could be useful extras.

First, any unit with 0 ammo will resupply if possible, otherwise move away from enemy units it is in contact with. I've had 0 ammo guns march up to my troops when they could have resupplied.

Second, some add ons.
Hold (retire) X, Y. Same as hold (fire) except that when an enemy unit is in spotting range, the unit retires X hexes from the enemy. Where possible, the unit moves towards Zone Y (which can be left blank). This represents pickets and outposts not really intended to fight.

Patrol (retire) X, Y and Random Patrol (retire) X, Y. This represents scouting where combat is not intended.

Advance X, Y Unit moves X in direction of Zone Y. This is an alternative to the current instruction to move at full pace. This would allow some formation to be maintained while advancing with different paced units and to control the pace of attacks. It would behave as hold (attack) if enemy spotted.

Retreat X, Y. Much as advance, but the unit moves away from the enemy in a controlled manner. If attacked, it behaves as hold (fire) on the enemy turn.

Allow change of AI scripts (and deployment) by Unit name as well as by zone.
Eg name 4 tanks 4th Panzer, and you can deploy 4th Panzer on turn X, then later change the script for 4th Panzer from hold (fire) to attack.

Of course I'd like this for Panzer Corps too.

Re: AI scripting ideas

Posted: Fri Jun 15, 2018 8:42 pm
by sn0wball
I would love some random component. Part of the ease by which an experienced player can beat the AI is its predictability. It will always run into the same trap - unless it is scripted to do something different. But even unscripted units should do something unexpected from time to time. There should be a chance that it does not attack the weak unit you have set out as bait, but resupply instead or move somewhere else. Or it moves on a different path from time to time.

Re: AI scripting ideas

Posted: Fri Jun 15, 2018 9:48 pm
by Retributarr
"sn0wball" would love some random component. Part of the ease by which an experienced player can beat the AI is its predictability.
Marvelous Idea!!!...This would definitely add intense excitement into the Game!.

Re: AI scripting ideas

Posted: Fri Jun 15, 2018 9:56 pm
by captainjack
Maybe a setting a bit like combat roll randomness (obedience?) to have no deviation, minor (sometimes moves a different way or attacks a second choice target), major (about 20% chance of doing something different).

The idea behind changing AI instructions by unit name instead of by zone include making it a bit easier to script more variation
The current zone system means that you can't change unit instructions once it moves;
It's easier to write scripts that make more credible changes - eg 4th Panzer loses 3 units and then retreats, 4th Panzer deploys either to the North or Nrth West, and independently 5th Panzer could deploy to the East or North East.

In conjunction with the proposed move order changes divisions can advance and retreat and move in some kind of coherent order, which can be changed during the game based on time or by events or purely at random.

Some extras that would be nice.
Ability to create a list of tags to set at the start.
Ability to check for combinations of tags/conditions (any two of..., all of). this could be used to simplify creation of a wider range of victory options (eg meet any two of these four objectives for a victry, all four for a DV).
Ability to count items. Eg count number of fuel dumps and add 2 fuel per dump to each unit. Count number of ammo supplies and add one per dump to units, remove 10 prestige for each enemy unit in zone X.

Together these would add a bit more realistic behaviour, and make it easier to add varety for in-game rewards or penalties and for victory conditions, and improve the ability to create in game changes that would improve responsiveness.
of randomised deployments.