I have something in testing now, that replaces the original code completely. Will see if it works.
1) Unloaded unarmed APC and trucks want to retire out of the conflict zone (say 20 hexes from enemy) so will retire if necessary to keep the 20 hex separation. (This could be off map - so if you try to chase empty trucks they may frustrate your attempt to get the kill points by running off the end zone
!
That was the initial module grafted on - originally unloaded unarmed APC and trucks had no 20 hex separation rule and just did a "Brave Sir Robin" towards the baseline and hence eventually off-map
!
then I messed about with an experimental APC load-up routine:
2) If an APC or truck is unloaded and is >20 hexes from enemy, it will select a candidate grunt within 20 hexes (will fit load capacity, is not running away etc), who is himself also outside 20 hexes from enemy, and motor towards him to pick up. First candidate grunt is one of own platoon, next in priority are those outside the transports platoon.
This rule
should allow AI reserve mech inf and truck formations in the delay or defend to mount up grunts (if far enough away from the action when the counter-attack flag is set).
3) Once loaded, normal rules apply. (there is no sophisticated loading to capacity etc, just pick 1 grunt or team and go).
4) On unloading of grunts the APC, assuming it has some MP left, may retire a few hexes (using reverse sometimes, and I may get it to pop smoke before it reverses, working on that). Unarmed trucks and APC will continue then to retire to a safe 1KM distance from the firefight. Armed APC and trucks will support the infantry as usual.
5)If a human player puts such a formation under local AI control through the HQ menu, the above applies. (That may well be a useful technique for a reserve mech platoon/coy to let it get on with the mounting of the troops itself and start off towards the battle, before returning it to human control ??)
All in test at the moment - so it may go horribly wrong and need deleting if it breaks something in the spaghetti, but initial testing looks promising. (I cannot think of any scenario that relies on kamikaze unarmed trucks or APC?).
Andy