place where they meet
So you need to parse structure I named s_LevelData.
This structure with size 0xBB8 bytes. And can be get from
1. Game resources during new game starting (for example resource 117 is the first human mission)
2. From a save file (starting from 0x5AA)
To find AttackAi data you need go to offset 0xdc of this structure (0x5AA+0xDC=0x686 in save file). This is common heap for different arrays.
The first one is Palette animation. You should skip it with next pattern: if the first byte is not 0, you should take 3 bytes. Repeat until value will be 0.
For example, if you have data 0a 72 77 0a 79 7e 00 46 00 05, you should skip first value (0a 72 77), second value (0a 79 7e), and one byte 00. So your offset is 7.
Now you are in AttackAi data block. It consist of two arrays. The first one is different routes for attack. The second array is route points.
So the first array members are quite simple, they have only two fields, like this:
Int16 Percent;
UInt16 Offset;
The first field is a chance that new unit will chose this route. The second is Offset for points array, starting from AttackAi data.
If Percent is -1, this mean that the first section is over, and now you are in points section.
Each point has three fields:
Int16 UnitsCnt;
Int16 PosX;
Int16 PosY;
PosX, PosY - x, y coordinates of this point. UnitsCnt - is the number of Ai units on this point right now (0 - in the data.war)
If the first field (UnitsCnt) is -1, the current array is finished and you are starting the next array for the next route. Double -1, -1 means that AttackAi data is over.
So, now you have all the possible routes for Ai.
Now you need a field 0xA2 from s_LevelData (0x5AA+0xA2=0x686 in save file). This is simple UInt16 number, which indicate current units count for each Ai attack group. As soon as UnitsCnt at one point will be equals or bigger than this number, the group will go to the next point.
Field 0xA2 can grow during the game, up to field 0xC0 value (0x5AA+0xC0=0x686) This is also UInt16 number and it is the maximum limit per group for AI attack.
If you want, I can give you timer values to understand how quickly AI increases groups limit.