The other critical part I had suggested investigating in some thread over at the ORG was infantry skirmish units that have a small range, i.e. javelin, hand gunners and naffatun units. There's something not quite right about the way they're set up in the default battle_ai file and when the AI uses them, they more often than not get stuck in a seesawing motion between skirmishing and trying to get within range for shooting. I also found that a well placed unit of cav, i.e. just in front of your front line missile troops, can effectively render these units in the hands of the AI completely useless!
The questionable value seemed to be this entry:
Code:
<!-- don't skirmish until attackers are within this fraction of the missile range -->
<range-factor>
<moving>1.1</moving>
The fact this value is higher than 1 seems to be the root cause. As far as I can tell this means that if the unit is moving and attackers come within 1.1 x their range, they'll skirmish. If this is the case, then no wonder they never seem to get settled to fire. Now, I have made other changes like increasing their standard range, and increasing their "stop at this distance..." value, but the main change which seemed to help prevent this AI seesawing motion was setting this value to lower than 1 like so:
Code:
<!-- don't skirmish until attackers are within this fraction of the missile range -->
<range-factor>
<moving>0.8</moving>
The complete file is attached if you're interested. Like I said above, I also increased the default range of all javelin, hand gunners and naffatun. This is now 70.