Thanks Bosola !
About the one that I am unsure, I mostly haven't try putting stuff in here, and all monster files I've been working on had it empty.
Well, what should be added...
Stats
you can increase/decrease your monster stats.
Best example for that is Jelleye, that monster who change its characteristics. If you analyse its ai script, you'll see a lot of those :
25 [some value] 28 00 [some value] 28 02 [some value] 28 01 [some value] 28 03 [some value]
don't bother with 25 [some value], this will just add the specified line of text to the scan. 25 01 add the second line of text to the scan, and so on.
Normal Defense Morph : 28 00 0a 28 02 0a 28 01 0a 28 03 0a
Complete Defense Morph : 28 00 0a 28 02 0a 28 01 28 28 03 28
Magic Defense Morph : 28 00 05 28 02 14 28 01 03 28 03 64
Physical Defense Morph : 28 00 14 28 02 05 28 01 64 28 03 03
stats : 00=strength, 02=magic, 01=physical defense, 03=magic defense. There is also 04=speed, 05=evasion.
value : 0a = 10 in decimal, that means the monster normal stat. 28 would be 40, so four time the normal stat, and 64 10 times the normal stat. 03 or 05 will decrease its stat.
Items
You can award items to the player at the end of the combat in the ai script as well. For example, in Elvoret original code, 38 b2 will give you the march weapon magazine.
Auto-status
You can give some auto-status to your enemies. For example, the two Iguion have a permanent reflect on them as long as you haven't stolen Carbunkl from them. It's a bit buggy, and it cannot be remove with dispel spell. The command to remove this auto-reflect is 27 17 00. 27 17 01 would set it up.
Removing/Adding monsters.
We have an example in Wedge or Biggs code :
1d 00 1d 01 1f 02 = remove monster n°1, remove monster n°2, launch monster n°3 (Elvoret).
There can be up to 8 monsters in one battle, but there can be only 4 present at the same time.
(In the time compression sorcerers fight, there are actually 6 monsters, that are resurrected with different characteristics to fight you again)
An enemy can be launched or not, visible or not, targetable or not - I won't detail it today.
Target & Attack
04 ... is the simple way to target something.
00->07 : Squall -> Edea (it should work up to Laguna, Kiros and Ward as well but I haven't check those)
00 : Squall
01 : Zell
02 : Irvine
03 : Quistis
04 : Linoa
05 : Selphie
06 : Seifer
07 : Edea
c8 : self
c9 : random enemy
cc : all enemies
cd : all allies
cf : random ally
there are other values I'm not totally sure about.
Usually the target code is followed with a move command, in the Edea1 example I had given previously you had 04 c8 0c 06, 0c 06 being move n°7 (the move are listed in the section before, myst6re wrote about those). In this case move n°7 was the safe spell, so the code was simply : if(self hasn't got safe status) cast safe on self.
The target can be set way before the actual move command, and in some cases it seems the programmer forgot he had already set a target, because he wrotes the target code again - you might have notice it : some monsters first turn to one of your character, but then attack another one... that's why.
There are more complex target code. For example, still in Edea1's code :
02 05 c8 00 17 __ 17__ [26 __ c8 00 17 02 02 04 03 __ __ 05__ [0c 07 23 02 __] 0c 00 23 c8__]
move 07 is dispel magic and move 00 is her (weak) physical attack, so you can translate it in pseudo-C++ by :
if(an enemy has got reflect status) { target the enemy with reflect status;
if(some probability) cast dispel; else astral punch; }
The whole target code is 26 00 c8 00 17.
You can also target a specific monster : 26 00 57 00 09 targets a wounded galbadian. (the most wounded?)
Raijin or the red galbadian use this code to cure them. Totally useless in the original game, considering galbadian soldiers had so few HP you'd kill them in one hit. 02 01 57 01 05 __ 0c__[26 __ 57__ 09...
I've explained an attack code just before, but there are some other things you could add : let's take the final part of the first example I had taken from Edea1 : 04 c9 0b 01 02 03 23 06 __
so that's "target a random enemy; 0b=chose one of those three moves: move 2,3 or 4; skip 6 bytes".
You can use some moves not listed in the moves section. However, it will only be some graphical or sound stuff, no damage will be calculated and no status applied. For example, in my edited Elvoret I've used 04 cd 1e 5f to sort-of summon Siren, or in Biggs or Wedge code, 04 cd 1e 6e is the Wind attack that make them fly away.
Well, I don't know what else I could tell for now. Any questions?... Or would someone want to add anything?