OK so this is what I get.
First 2 bytes are an identifier for the enemy. The file is more than just death code.. it has a part to play in a few aspects of an enemy. If you replace MZ with Sephiroth (very last boss) ab file, the MZ will attack repeatedly and completely ignore AI. The ab files seem to also include camera angles during death animation (at least I think so!). If you want to change the enemy's death animation you only need change 1 byte for its ab file.
The 3rd byte is the death type value.
The values used in **ab files are 00,01,02,03,10,11,12,80,90
Only the above values are used for normal deaths, the other values listed below
(like 07) are used because of actions in battle, like using morph on an enemy).
If you want to make an enemy do a morph animation even when morph has not
been used, set the battle **ab file value to 07 (for example).
12 is the highest value for use in normal animations. See more detailed explanation
in code break down further down this thread.
00: Normal
01: Disintegrate (Think mechanical things)
02: Melt (Think 8-eye or flans)
03: Disintegrate 2
04-06: No death animation, enemy will remain as battle ends.
07: Morph
08: Flash death (Flash animation where enemy floats to sky. Translated Iainuki)
09: No death animation, enemy will remain as battle ends.
0A: Disintegrate
0B-10: No death animation, enemy will remain as battle ends.
11: Boss death
12: Break apart (Sepher Sephiroth uses this)
80: Unknown, see below
90: Unknown, see below
80 and 90: If you use 80 or 90 on ab files without copying across the models other data, the game will crash. Yuffie uses 90 in the battle you have with her, whereas normal user characters (like Cloud) use 80.
The enemy MP (and other of this type) is using 80 for an unknown reason (see aqab) . The use of 80 and 90 and exactly what they do is unknown. It could be that it is an indicator of a type of skeleton (given these are all humans).
Using 12 on normal enemies will only show a normal boss death. There is more to the death animations than the ab files (possibly other files and information used depending on the death animation value). Sepher Sephiroth's death animation is most likely hard coded in ff7.exe.
The game itself limits the normal animation values from 01-12 and limits the max value used to 63 before wrapping around. Therefore 80 becomes 16 and 90 becomes 24. There is more to this 80 and 90 than meets the eye. I will try to work this out later in the thread.
The values are passed into code at 0042BC7a memory
and so:
I want Eagle Gun to die like a boss instead of a normal enemy. Can this be done?
Yes, it can. Use ulgp in tools section to dump files from battle.lgp, then open the file
**ab in a hex editor, move to the 3rd byte along and change it to 11 (originally it is 00) . Save the file again by encode and it will be done. Word of warning, don't mix ab up with ba. Only a tit would do that.
Edit. you have overwritten Guard Scorpion files, so the file would be
awab