Author Topic: Battle model not dissapear later death  (Read 5356 times)

cloudiar

  • *
  • Posts: 202
    • View Profile
Battle model not dissapear later death
« on: 2016-09-11 01:55:49 »
Hello guys !!

I have a very advanced battle with one serious problem, fighting has 3 different enemies, everything seems to work fine, but Rufus model does not disappear when he dies. (not possible site for helicopter)

If he dies (Rufus) maintained normal animation, not disappear with "red" effect, or other, this be a serious problem, looking all own animations, and magic animations, but none do this !!

Also try OPCODES enemies like Rufus case (Sample H0512...), but these seem to have a condition itself to disappear :(


Somebody know solution?

In any case if someone can give me information to find solution I will be very grateful.

Thanks in advanced

Ansem

  • *
  • Posts: 136
    • View Profile
Re: Battle model not dissapear later death
« Reply #1 on: 2016-09-11 02:54:03 »
You can change the death animation by hex editing the battle model's AB file. From the top of my head, I think it was the third byte.

DLPB once listed the values in one of his posts. Use the search function to find it.

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: Battle model not dissapear later death
« Reply #2 on: 2016-09-11 06:25:35 »
You can change the death animation by hex editing the battle model's AB file. From the top of my head, I think it was the third byte.

DLPB once listed the values in one of his posts. Use the search function to find it.

Ansem's solution is the only way to do it as far as I know; the death animation for certain enemies is hard-coded in the model files themselves. But there might be a simpler solution than hex-editing the actual file:

http://forums.qhimm.com/index.php?topic=13357.10;wap2

It seems from this thread that DLPB swapped the AB files of two models around. So I'm guessing if you gave Rufus a boss enemy's AB file he should gain the red flash death animation. However, he also mentions that AB contains some other bits of info that the enemy uses so this might not be 100% safe for every enemy.

The hex-editing info from the linked thread:

Code: [Select]
DLPB
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.


--- Code: ---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
--- End code ---

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.

Be nice if we could get useful info like this and other bits & pieces archived or something  :-D

Edit: Was just reading through it again, I don't know if Safer's death animation is actually tied to his AB byte. The shatter thing is achieved through an attack (two types, one for on the ground and another for flying in the air). If killed without these set, he just dies to a red flash as normal. Maybe 12 is something else or a copy of 11 that was going to do the shatter thing before they realised they needed two death anims to handle his two different idles or something.
« Last Edit: 2016-09-11 06:29:33 by Sega Chief »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Battle model not dissapear later death
« Reply #3 on: 2016-09-11 09:02:26 »
It isn't in the AB thing that I recall.  It's hard coded.  It is given a unique identifier (12) but it seems to do jack. I can't remember.  Also, NFITC1 went into all this further on same thread?

cloudiar

  • *
  • Posts: 202
    • View Profile
Re: Battle model not dissapear later death
« Reply #4 on: 2016-09-11 14:02:46 »
FRIENDS ITS RUN!!!!! HEHEHE

Like to all, thanks, I promise epic battle  :)

In this .ab file can change the animations for attack in battle? Rufus not have magic effect, dont see anything animation :/
« Last Edit: 2016-09-11 14:14:43 by cloudiar »

Ansem

  • *
  • Posts: 136
    • View Profile
Re: Battle model not dissapear later death
« Reply #5 on: 2016-09-11 22:24:16 »
Yes, AB files also contain all of the model's animation sequences. Although, if you wish to add an entire new sequence you'll need to do more than edit a single byte here and there.

If you feel you're up to it, you can use this table to identify which does what. Generally, I have found Animation Scripts will only start at bytes in multiples of 4, but I don't know whether or not it would work on every byte. I have no further understanding of the file structure itself. In fact, I'd appreciate it if someone could tell me if there are pointers to each script in the file, or are the scripts just picked up on the fly?

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Battle model not dissapear later death
« Reply #6 on: 2016-09-13 22:03:36 »
In fact, I'd appreciate it if someone could tell me if there are pointers to each script in the file, or are the scripts just picked up on the fly?
I started a reply to this but didn't finish. The absolute address script pointers are four bytes long and start at 0x68 in each ab file. I don't believe there's a count of how many there are in a file. It just starts a pointer at a specific spot and runs from there until it gets to a "end script" code or continually repeats (like an idle animation). When the parsing routine gets to the beginning of the first script it stops parsing for scripts.