This may be useful information for you Brevan as I believe you have added this AI to a number of enemies and you might want to fine tune them.
Since ancient AI (WW) now works for all units I started working out exactly what each parameter does for the AI.
This AI will begin closing in on the target by default.
Once within Par1 range it will begin rolling Par2 once per AI delay.
If Par2 rolls true, it will aim Par4 distance beyond the target and use Skill1.
If Par2 does not roll true by the time the unit is in melee range of the target, it will roll Par3 once.
If Par3 also fails, it will roll Par2 again and repeat the process
Par1 = Minimum distance from target to start rolling Par2
Par2 = Chance to use Skill1
Par3 = Chance of melee attack (when in melee range and Par2 has not rolled true) (Randomly uses A1 and A2 even if A2 has no damage or animation)
Par4 = Distance beyond the target to aim Skill1
Note: Because Par3 randomly chooses between A1 and A2, if the unit has no A2 animation, it is best to set Par2 to 100, or Par3 to a very low value to avoid blinking animations.
Here are Talics parameters as an example:
Code:
Par1 = 15
Par2 = 33
Par3 = 75
Par4 = 8
So he will close in on the target until within 15 subtiles (5 subtiles per tile)
He then has a 33% chance of using WW (aiming 8 subtiles past the target) each frame until he reaches melee range.
If he reaches melee range, he will then alternate rolling Par2 and Par3 (33% chance to WW, 75% chance to melee if he doesn't WW > repeat).
_________________
Bron wrote:
There's no cure for being a cunt.