Static script attacks
PostPosted: 02 Jan 2014, 13:52
I just tested TNL 7, and something odd occured and it took me a while to figure out what it was.
I use these attacks in the script for player A:
At the start of the mission, nothing happens. Quite early in the mission, this player (A) gets attacked. And after the attack, somehow these two attacks got triggered. The AI had only 26 units on defence positions with importance 1 so that seemed impossible to me. However, after/during the attack on player A, he apparently swapped the defence position of a group of 5 knights with a group of 15 knights, and that counts up to exactly 36 units.
Now here is the thing: as it is now, TOTAL_AMOUNT is the total amount of units on defence positions with importance 1. What TOTAL_AMOUNT should be is the total amount of units that attack. So with the first attack, the AI should attack with 36 soldiers spread out over 2 groups of anti-cavalry units and 1 group of melee. Whether that's 35 pikemen and 1 sword fighter doesn't matter, but it must be 36 units. What happens in the Remake is that the AI attacks with 16 units (4 crossbowmen, 8 pikemen, 4 sword fighters, both attacks get triggered).
I use these attacks in the script for player A:
- Code:
!SET_AI_ATTACK TYPE 0 !SET_AI_ATTACK TOTAL_AMOUNT 36 !SET_AI_ATTACK TROUP_AMOUNT 0 1 !SET_AI_ATTACK TROUP_AMOUNT 1 2 !SET_AI_ATTACK TROUP_AMOUNT 2 0 !SET_AI_ATTACK TROUP_AMOUNT 3 0 !SET_AI_ATTACK TARGET 2 SET_AI_ATTACK POSITION 133 35 !COPY_AI_ATTACK 0 !SET_AI_ATTACK TYPE 0 !SET_AI_ATTACK TOTAL_AMOUNT 36 !SET_AI_ATTACK TROUP_AMOUNT 0 1 !SET_AI_ATTACK TROUP_AMOUNT 1 1 !SET_AI_ATTACK TROUP_AMOUNT 2 1 !SET_AI_ATTACK TROUP_AMOUNT 3 0 !SET_AI_ATTACK TARGET 2 SET_AI_ATTACK POSITION 133 35 !COPY_AI_ATTACK 1
Now here is the thing: as it is now, TOTAL_AMOUNT is the total amount of units on defence positions with importance 1. What TOTAL_AMOUNT should be is the total amount of units that attack. So with the first attack, the AI should attack with 36 soldiers spread out over 2 groups of anti-cavalry units and 1 group of melee. Whether that's 35 pikemen and 1 sword fighter doesn't matter, but it must be 36 units. What happens in the Remake is that the AI attacks with 16 units (4 crossbowmen, 8 pikemen, 4 sword fighters, both attacks get triggered).