@Pawel
What do you mean?
@Lewin
Yes, in r2623.
My plan was to place groups of 4 soldiers on every defense position and make some additional groups that don't have a defense position and are free to attack so I can let them attack the human players any moment I want.
I'll paste a piece of my script to explain (in reality there are more defense positions but that doesn't really add anything so I left them out):
!SET_GROUP 15 174 68 0 4 4
!SET_AI_DEFENSE 174 68 0 0 60 0
!SET_GROUP 19 169 61 0 4 4
!SET_AI_DEFENSE 169 61 0 1 50 0
!SET_GROUP 17 174 65 0 4 4
!SET_AI_DEFENSE 174 65 0 2 60 0
!SET_GROUP 21 164 61 0 4 4
!SET_AI_DEFENSE 164 61 0 3 50 0
!SET_GROUP 15 148 81 6 4 4
!SET_AI_DEFENSE 148 81 6 0 20 1
!SET_GROUP 15 161 94 6 4 4
!SET_AI_DEFENSE 161 94 6 0 20 1
!SET_GROUP 15 173 12 6 4 4
!SET_AI_DEFENSE 173 12 6 0 20 1
!SET_GROUP 15 169 12 6 4 4
!SET_AI_DEFENSE 169 12 6 0 20 1
!SET_GROUP 15 177 12 6 4 4
!SET_AI_DEFENSE 177 12 6 0 20 1
!SET_GROUP 14 158 5 6 8 32
!SET_GROUP 17 167 3 6 3 9
!SET_GROUP 17 163 7 6 3 9
!SET_GROUP 15 163 3 6 3 9
As you can see, every defense position has already been taken by a group. This means the last four groups can spend their spare time with some annoying humans!
When the AI recruits soldiers, he will start 'filling' the groups with importance 0 at the top first and then move on to the ones with importance 0 below them, then the ones with importance 1, etc. If I would set the last group (!SET_GROUP 15 163 3 6 3 9, lets call it 'Group A') at the top of the script, Group A will take the first defense position (!SET_AI_DEFENSE 174 68 0 0 60 0), and the group on 174 68, which was already at the correct position, will move on to the second defense position, etcetera.
The AI in Remake hates groups that have no defense position (the last four groups as I explained) and uses them to fill up the other groups. I agree that it makes perfect sense, but especially at the start of a mission it could be useful to have some troops that aren't bound to a defense position. Apparantly, the original KaM's AI handles recruited soldiers differently than soldiers that it got from the start.
Also, the AI in Remake does not fill up the groups with importance 0 that are at the top of the script, it seems to select the closest groups.
Anyway, this interferes with my plans because obviously I also want the AI to attack when he has a certain amount of (certain) units available. But I think I'll just have to use a second player for this (although that will look pretty clumsy as the description claims you fight one enemy + the colours will be different too I guess).
I hope I clarified the situation a bit (you probably knew most of this already - if not everything).