(PSX) FF7 - Battle animation index for playable characters?

  • Thread starter Thread starter Lazy Bastard
  • Start date Start date
Status
Not open for further replies.
L

Lazy Bastard

Guest
Whilst making custom playable characters, I'm faced with the hassle of battle animations. The animations themselves, in this case at least, are not the problem (I'm harvesting them in entirety from other models). The problem is that if I replace an existing playable character's battle model with a custom model that has unique bones, parts, and animations, the original character's animation index (for lack of a better term) still says, "When Steal is initiated, play animation 4B".

A simple, if crude, workaround for this is to identify every animation for the original model, identify every animation for the custom model, then swap the correct animations, leaving the total number of animations intact since the original model, and using a null value (30 1A 00 00) for everything that won't be used.

This works to an extent, but when the original character performs several animations for a particular action and the custom character will only perform one (or less than the original, in any case), I'm forced to jam several animations together and try to still make it look fluid and natural. Moreover, if I intend to use the same animation for more than one action (and the original character didn't also use only one animation for these exact actions), I must duplicate it entirely within the model, wasting space and cluttering the file needlessly.

I've no clue where this data is stored (KERNEL.BIN?), but does anyone have a clue as to where each action of each playable character is assigned an animation number?
 
Whilst making custom playable characters, I'm faced with the hassle of battle animations. The animations themselves, in this case at least, are not the problem (I'm harvesting them in entirety from other models). The problem is that if I replace an existing playable character's battle model with a custom model that has unique bones, parts, and animations, the original character's animation index (for lack of a better term) still says, "When Steal is initiated, play animation 4B".

A simple, if crude, workaround for this is to identify every animation for the original model, identify every animation for the custom model, then swap the correct animations, leaving the total number of animations intact since the original model, and using a null value (30 1A 00 00) for everything that won't be used.

This works to an extent, but when the original character performs several animations for a particular action and the custom character will only perform one (or less than the original, in any case), I'm forced to jam several animations together and try to still make it look fluid and natural. Moreover, if I intend to use the same animation for more than one action (and the original character didn't also use only one animation for these exact actions), I must duplicate it entirely within the model, wasting space and cluttering the file needlessly.

I've no clue where this data is stored (KERNEL.BIN?), but does anyone have a clue as to where each action of each playable character is assigned an animation number?
On the playstation the animation data is included with the model. ALSO the weapon is a bone in the character model.
It should be very similiar in the PC data (perhaps located differently). The index of each animation that the character has is the same and the same number of animations. Break limits I think were handled seperately.
There are several sub files on the playstation first came the bone structure data then the vertices and polygons. The next came the animation data. Although most was very short (the index list is at the begining of the file ).

Anyhow anything past the TIM image was the weapon model bones (which had no textures in them). The animations where between the HRC data bones and model data.
The format was outlined a while ago which I probably have a copy of somewhere (heh).
Looks like the data in the wiki is somewhat incomplete (as in not much has been updated it since I added too it).

anyhow the animations for the PC are outlined here the PS1 is fairly similiar but the packaging is the trick.  Your biggest challenge will be associating the correct animation with the correct file section.

Also compressing the animation data will be a bit interesting. The data I believe is identical between PC and PS1 (raw data).  The PS1 battle model stuff looks to need a bit of clean up in the wiki but it's mostly their.
As I said the hard part is knowing which section is what animation. I believe the movement animations are just cycled and the attack animation is just fired for the weapon if it's a hand weapon, otherwise if it's a distance weapon (Yuffie Barret Vincent) I think their is just an attack animation that's fired.

Anyhow ... I digress what was I babbling about? :D

Cyb
 
You misunderstand...I'm fully acquainted with the model format; I'm the one that wrote the breakdowns on the wiki page you linked to :)

I know where the individual animations are. I want to know where it is delineated as to which action corresponds to which animation. As in the example I made above, when the player tells Playable Character 1 to Steal, Character 1's animation 2B initiates. If the player tells Playable Character 2 to Steal, Character 2's animation 3A initiates.

Proud Clod seems to have the ability to affect the animation index of the various enemies ("If enemy does BrainBlast, do animation 09", etc). But I haven't seen any reference to doing the same with playable characters.

The end result would be the following: if I replace Barret with Zemzelett (which I'm not really going to do, in case you were wondering), I'll need to migrate Zemzelett's animations in place of Barret's (I can't simply swap files, as Model Settings Data is different between playable characters and enemies, and texture data is in the wrong place...not to mention weapon bone data being limited in enemies, etc). When the player tells Barret to throw a potion, the game somehow decides what animation to use for this. This does not appear to be contained in the model file itself. Thus if Zemzelett only has 0x2A animations, and Barret's "item use" animation is animation 0x3C, I can't simply replace Barret's animations en mass - I'll need to not only keep the total number of animations the same, but I'll also have to match up which animations I'd like to be performed for which actions, by fully mapping all animations and their actions. However, if I could modify the animation index itself (what animation each action calls), I could re-map the entire index to only utilize the 0x2A animations, and point each action to the corresponding animation with ease.

Point in fact, however, I'm not really familiar with the fine details of what Akari called Model Settings Data in his reversing work for QGears (and what I've continued to call that same name for consistency). If somewhere therein lies the animation index, please do point it out. Simply swapping the Model Settings data, even if animations are also swapped, results in a crash.
 
Do you replace Zemzelett fot Barret? Replace the lzs file? If you replace the lzs file, this file contains all animation of the model, in your case Barret. I replaced the Cloud model and discovered ID animations thanks to Proud Clod:
17= Magic animation (only work with magic materia)
14= Attack animation
15= Slash anmation
16= double slash (don´t work very well)
18=double slash (don´t work well)
1B= Deathblow animation
1C= Flash anmation
1D= Magic animation (this work with all attacks)
1E= E. skill animation
1F= Summon animation
Also i use the original Sephiroth model like in this video (
) but the Masamune model not appears, why? Is possible repair this?  thanks
 
Pretty sure this data is in the **AB script files on the PC version, not sure exactly what that corresponds to in the PSX version. Either way the format is not really known, I know Akari did some work on it and so did I but not enough to be able to edit it or even decode it really.
 
The animation indexes to use are hard-coded in the exe. Give it command 13 and it will do animation 2D (or something like that). I made a table a long time ago and posted it here (I think), but I'm not searching through nearly 2000 messages to find it right now.

You'd have to change this for each command, but that'd screw up all the other characters as well.

EDIT:
OK, not quite. Aali's got the closest answer to this. I do have a list of commands with scripts to play, but the animations are in chunks that the game will determine which to play for how long before doing the next one.

Ex.
The Item command initiates animation script 21h. This does at least three things: 1. Hop forward (animation 3) 2. Throw the item upward (animation 9) 3. Hop back to starting position (animation 4).

Here's how Cloud's animation script 21h looks like:

E8 FC 03 ED D8 06 15 00 09 EA EB F4 0A F3 04 FA E5 EE
Those are the animations he takes  at certain times. The 03 is the hop forward, the 09 is the throw item, the 04 is the hop back.
 
Last edited:
The animation indexes to use are hard-coded in the exe. Give it command 13 and it will do animation 2D (or something like that). I made a table a long time ago and posted it here (I think), but I'm not searching through nearly 2000 messages to find it right now.

You'd have to change this for each command, but that'd screw up all the other characters as well.

EDIT:
OK, not quite. Aali's got the closest answer to this. I do have a list of commands with scripts to play, but the animations are in chunks that the game will determine which to play for how long before doing the next one.

Ex.
The Item command initiates animation script 21h. This does at least three things: 1. Hop forward (animation 3) 2. Throw the item upward (animation 9) 3. Hop back to starting position (animation 4).

Here's how Cloud's animation script 21h looks like:

Those are the animations he takes  at certain times. The 03 is the hop forward, the 09 is the throw item, the 04 is the hop back.
Awesome; that's exactly what I was looking for. As I half-guessed above, that data is within what Akari called Model Settings Data, within the LZS model file itself. I'll do some testing later. Thanks :)
 
Last edited:
I did change that highlighted 03 to a 09 and Cloud did the throw animation twice. After the first throw he teleported forward from where he was to the position on the battle field where he WOULD have ended up if he had hopped forward. The actual action happened after the second throw. I've got his whole file parsed into scripts, pointers, and where the data ends up. I just don't know what much of it does.
 
I did change that highlighted 03 to a 09 and Cloud did the throw animation twice. After the first throw he teleported forward from where he was to the position on the battle field where he WOULD have ended up if he had hopped forward. The actual action happened after the second throw. I've got his whole file parsed into scripts, pointers, and where the data ends up. I just don't know what much of it does.
Cool; sounds like a hack-job waiting to be done (and I'm just the one to break everything systematically and identify what does what) :)  To save me some time, any chance you could share that data?
 
Also, two things:

1. Nitpicking, but the script you referenced is specifically "Using an item on yourself/your teammates"; using an item on an enemy, even if it's a Potion, is slightly different in that the item is thrown forward rather than up, hence it will have its own separate script.

2. Glancing at adjacent data, I think the preceding two bytes of zeroes (at least, in the LZS for PSX...though I doubt it's different on PC) are part of the script, hence what you posted above should be:

Code: [Select]
Code:
00 00 E8 FC 03 ED D8 06 15 00 09 EA EB F4 0A F3 04 FA E5 EE
 
I was just preparing that, actually. This is Cloud's rtab file and the addresses that everything goes to:

Code: [Select]
Code:
0000 (0xBE1178)0080 (Death Anim)0190 (0xBE118A)0a00 (0xBE1180)0a00 (0xBE1182)0000 (0xBE1184)0000 (0xBF23E6)fce0 (0xBF23E8)fc7c (0xBF23EA)02 (0xBE11A3)00 (0xBE11A4)00 (0xBE11A5)00 (0xBE11A6)00 (0xBE11A7)00 (0xBE11A8)0d (0xBE11A9)08 (0xBE11AA)03 (0xBE11AB)00 (0xBE11AC)03 (0xBE11AD)17 (0xBE11AE)12 (0xBE11AF)00 (0xBE11B0)00 (0xBE11B1)00 (0xBE11B2)0000 (align?)Related to Camera Scripts? File size; Not stored elsewhere38 04 00 0038 04 00 0038 04 00 0038 04 00 0038 04 00 0038 04 00 0038 04 00 0038 04 00 000180 (0xBF23C4)0132 (0xBF23C6)0180 (0xBF23C8)0000 (0xBF23CA)0399 (0xBF23CE)fda8 (0xBF23D0)f9ff (0xBF23D2)0000 (0xBF23D4)fddc (0xBF23D6)0000 (0xBF23D8)fd01 (0xBF23DA)ff58 (0xBF23DC)f9ab (0xBF23DE)0000 (0xBF23E0)fe30 (0xBF23E2)0000 (0xBF23E4)012c (0xBF23F0)0000 (align?)DWord pointers (Max 74)00: 19001: 19402: 19c03: 1a004: 1b005: 1c006: 1c407: 1cc08: 1d009: 1d40A: 1e40B: 1e80C: 1ec0D: 1f00E: 1f40F: 20010: 1fc11: 21012: 20413: 19814: 26c15: 28416: 31817: 32c18: 35819: 36c1A: 3781B: 3841C: 3381D: 2101E: 2201F: 23020: 24421: 25822: 29023: 29024: 26c25: 28426: 2ec27: 2fc28: 2c829: 2c82A: 2b02B: 2b02C: 30c2D: 30c2E: 1902F: 19030: 19031: 19032: 19033: 19034: 19035: 19036: 19037: 19038: 19039: 1903A: 1903B: 1903C: 3943D: 3b83E: 3d83F: 3e840: 40c41: 41842: 42843: 42444: 3e445: 39446: 19047: 19048: 19049: 190Scripts*190: 00 fe c0 00*194: 01 fe c0 00*198: 10 fe c0 00*19C: e5 06 f1 00*1A0: b3 f9 03 ed e3 ee b2 f9 03 b1 03 b1 e3 ee 00 00*1B0: b3 f9 04 e4 e3 ee b2 f9 04 b0 04 b0 e3 ee 00 00*1C0: 0f f2 e5 ee*1C4: 10 11 f2 e5 ee 00 00 00*1CC: 12 f2 e5 ee*1D0: 05 e5 ee 00*1D4: ab 90 01 00 00 08 f4 0f f3 fa e5 a6 ee 00 00 00*1E4: 13 e5 ee 00*1E8: 18 19 e5 ee*1EC: b4 02 f1 00*1F0: 95 07 fe c0*1F4: c4 90 01 06 07 fe c0 00*1FC: 04 fa e5 ee*200: e7 00 f1 00*204: e5 c4 90 01 06 12 e7 00 f1 00 00 00*210: e8 fc 03 ed e6 ea 0c 0d ec 0e 04 fa e5 ee 00 00*220: e8 fc 03 ed a4 ea 0c 0d ec 0e 04 fa e5 ee 00 00*230: e8 fc 03 ed a5 ea 0c 0d ec f4 0f f3 0e 04 fa e5 ee 00 00 00*244: e8 fc 03 ed d8 06 15 00 09 ea eb f4 0a f3 04 fa e5 ee 00 00*258: e8 fc 03 ed d8 06 15 00 0a ea eb f4 0a f3 04 fa e5 ee 00 00 *26C: fc f0 d8 00 1a 00 1a d1 b0 04 00 00 04 f0 1b f7 01 1e 1c fa f0 1d e5 ee*284: fc 03 ed f7 10 1f 04 fa e5 ee 00 00*290: fc f0 d8 00 1a 00 1a d1 b0 04 00 00 04 f0 1b f7 01 d8 01 d6 02 16 f4 06 f3 26 fa f0 1d e5 ee 00*2B0: fc f0 d8 00 1a 00 1a d1 b0 04 00 00 04 f0 1b f7 10 21 28 fa f0 1d e5 ee*2C8: fc f0 d8 00 1a 00 1a d1 b0 04 00 00 04 f0 1b f7 10 20 27 fa f0 1d e5 ee?2E0: fc 03 ed f7 01 20 04 fa e5 ee 00 00*2EC: fc 03 ed f7 01 14 f4 3c f3 04 fa e5 ee 00 00 00*2FC: fc 03 ed f7 01 14 f4 5a f3 04 fa e5 ee 00 00 00*30C: fc 03 ed f7 13 15 04 fa e5 ee 00 00*318: fc f0 d8 00 1a 00 1a d1 b0 04 00 00 04 f0 1b f7 01 1e 9e 00*32C: f7 01 22 23 fa f0 1d e5 ee 00 00 00*338: fc f0 d8 00 1a 00 1a cc 04 cb ff e8 03 fe fe 00 08 08 f0 1b 1e f7 03 f4 06 f3 1c fa f0 1d e5 ee*358: fc f0 d8 00 1a 00 1a d1 b0 04 00 00 04 f0 1b f7 01 1e 9e 00*36C: e5 bd b0 04 00 00 f0 f7 03 22 9e 00*378: e5 bd b0 04 00 00 f0 f7 03 24 9e 00*384: e5 bd b0 04 00 00 f0 f7 03 29 1c fa f0 1d e5 ee*394: e8 fc 00 e0 ea f4 19 f3 ec f0 d8 00 1a 00 2c d1 b0 04 00 00 04 f0 2d d8 06 30 00 2e fa f0 2f e5 ee 00 00 00*3B8: e8 fc 00 e0 ea f4 19 f3 ec f0 d8 00 1a 00 2c d1 b0 04 00 00 04 f0 2d 2e fa f0 2f e5 ee 00 00 00*3D8: e8 fc 00 e0 ea f4 19 f3 ec 2c 9e 00*3E4: ec 2d e5 ee *3E8: e8 fc 00 e0 ea f4 19 f3 ec f0 2c d8 00 1a 00 fb 40 06 00 00 f0 2d d8 19 30 00 a8 26 08 2e fa f0 e5 ee 00 00*40C: e8 fc 00 e0 ea f4 19 f3 ec 2c e5 ee*418: e8 fc 00 e0 ea f4 19 f3 ec 2c e5 ee*424: ec e5 ee 00*428: e8 fc 00 e0 ea f4 19 f3 ec 2c 2d 2d 2e fa e5 ee
I'm not sure what all those addresses do, but they're parts of per-character arrays (two groups of them, actually).
2E0 looks like an unlinked script.
 
Also, two things:

1. Nitpicking, but the script you referenced is specifically "Using an item on yourself/your teammates"; using an item on an enemy, even if it's a Potion, is slightly different in that the item is thrown forward rather than up, hence it will have its own separate script.
That's possible.

2. Glancing at adjacent data, I think the preceding two bytes of zeroes (at least, in the LZS for PSX...though I doubt it's different on PC) are part of the script, hence what you posted above should be:

Code: [Select]
Code:
00 00 E8 FC 03 ED D8 06 15 00 09 EA EB F4 0A F3 04 FA E5 EE
That is not. The script pointer points to the E8 as the beginning of the script. The extra 00s are alignment bytes from the previous script.
 
Ack, I just saw that in your data above. It's really:

Code: [Select]
Code:
E8 FC 03 ED D8 06 15 00 09 EA EB F4 0A F3 04 FA E5 EE 00 00
Though that doesn't matter from a reverse-engineering standpoint (it doesn't do anything), it's critical from a reconstruction standpoint (if it's excluded, the result won't work).
 
It's interesting to note that the section you refer to as:

Code: [Select]
Code:
Related to Camera Scripts? File size; Not stored elsewhere38 04 00 0038 04 00 0038 04 00 0038 04 00 0038 04 00 0038 04 00 0038 04 00 0038 04 00 00
...effectively points to the first byte after this Model Settings Data (the first byte of the first actual animation data). This is the animation for doing "nothing" (standing/bouncing around while awaiting the next turn or attack from an enemy).

Edit: This may be of no importance, since as you mention, this is also the "file" size of this data, irrespective of what's "next" in the model data.
 
it's critical from a reconstruction standpoint (if it's excluded, the result won't work).
Depends on how you pack it. Just deleting those bytes would throw off the other pointers and break the other animations. I suspect the EE code just means "Return to idle animation".

I haven't found where they're handled yet, but this is more info than we've had before.
 
2E0 looks like an unlinked script.
Is it possible that it's simply part of 2C8? Or, have you worked out more of the format than you've specified above?
 
It's an assumption on my part. Since 2C8 looks nearly identical to 2B0 then I assumed that 2C8 was a complete script. 2E0 is not linked to, but 2EC is. Logically, a script starts at 2C8 and the next one starts at 2EC. Since 2C8 has an EE command (my assumed "end of script") then 2E0 would be the beginning of a new script which is just not referenced.
 
Ah.

Still, 1A0 has more than one EE command:

b3 f9 03 ed e3 ee b2 f9 03 b1 03 b1 e3 ee 00 00
 
I noticed that too, but that's likely an argument to another previous command. ED, for instance, may take 2 or more byte-sized arguments. The problem is it's currently unclear because I haven't found the handler to these scripts yet. I'm working on the assumption that they're like the camera scripts, but I should probably stop that.

I've been staring at 1st Ray's animation (because it has only one attack) and its 3rd animation looks like this:

Code: [Select]
Code:
e8 00 fc 02 c9 03 ca 04 ec 05 e5 ee
I can tell from the animations in kimera that it plays all these animations back to back.
 
Interesting.

I've broken down the ENEMY338 (Goblin)'s Model Settings Data as an example:

Model Settings Section [at offset 0x00005A2C]:


Unknown:

Code: [Select]
Code:
00 00 00 00 5E 01 78 05 78 05 C4 FF C8 00 D0 FD54 FC 02 00 00 00 00 00 1D 18 02 00 05 13 0E 0000 00 00 00 94 01 00 00 98 01 00 00 9C 01 00 00A0 01 00 00 A4 01 00 00 A8 01 00 00 AC 01 00 00B0 01 00 00 19 01 19 01 19 01 00 00 C0 0B B9 FD8E 05 00 00 90 FF 00 00 63 FD 39 FE 9D 08 00 0070 FF 00 00 2C 01 00 00

Relative offsets (from the beginning of Model Settings Data) to animation scripts:

Code: [Select]
Code:
E8 00 00 00EC 00 00 00F0 00 00 00F4 00 00 0008 01 00 001C 01 00 002C 01 00 0030 01 00 0034 01 00 0038 01 00 003C 01 00 0044 01 00 0050 01 00 005C 01 00 0064 01 00 006C 01 00 0074 01 00 007C 01 00 0084 01 00 008C 01 00 0040 01 00 004C 01 00 0058 01 00 0060 01 00 0068 01 00 0070 01 00 0078 01 00 0080 01 00 0088 01 00 0090 01 00 0048 01 00 0054 01 00 00

Animation scripts:

Code: [Select]
Code:
-A9 C9 00 C1-01 F6 E5 EE-0E E5 EE 00-FC F0 02 D1 4C 04 00 00 08 F0 F7 08 03 04 FA F0 05 E5 EE 00-E8 FC EA F0 06 D1 F4 01 00 00 08 F0 07 EC 08 FA F0 09 E5 EE-E8 B6 00 AA FC EA 0A C9 0B CA 0C EC 0D E5 EE 0A-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00
Note: The last referenced offset above is 0190, but the size of that script, whether four bytes, two bytes, eight bytes, or larger, isn’t apparent. Whatever’s left over after that script, if anything, is likely filler (as is that script itself, and those “empty” ones preceding it).

It's interesting that the remaining data after 0x11C-0x12B is just padding utilizing zeroes, rather than "null" animation scripts via a null command or something similar. Also, 0x11C ends with EE 0A, and unless there's another "end script" command we haven't stumbled upon yet, this doesn't seem to be a valid script followed by a dummied script or something.


Edit: Looking back at my "Unknown" section:

Code: [Select]
Code:
00 00 00 00 5E 01 78 05 78 05 C4 FF C8 00 D0 FD54 FC 02 00 00 00 00 00 1D 18 02 00 05 13 0E 0000 00 00 00 94 01 00 00 98 01 00 00 9C 01 00 00A0 01 00 00 A4 01 00 00 A8 01 00 00 AC 01 00 00B0 01 00 00 19 01 19 01 19 01 00 00 C0 0B B9 FD8E 05 00 00 90 FF 00 00 63 FD 39 FE 9D 08 00 0070 FF 00 00 2C 01 00 00
...it becomes apparent that my "missing" references to four-byte zeroed-out animation scripts after 0x190 are sitting right in the middle of that section:

00 00 00 00 5E 01 78 05 78 05 C4 FF C8 00 D0 FD
54 FC 02 00 00 00 00 00 1D 18 02 00 05 13 0E 00
00 00 00 00 94 01 00 00 98 01 00 00 9C 01 00 00
A0 01 00 00 A4 01 00 00 A8 01 00 00 AC 01 00 00
B0 01 00 00
19 01 19 01 19 01 00 00 C0 0B B9 FD
8E 05 00 00 90 FF 00 00 63 FD 39 FE 9D 08 00 00
70 FF 00 00 2C 01 00 00
0x1B0 references the last four bytes of the Model Settings Data section of the LZS. As for the bold offsets above, I've no clue what the data before and after them references.
 
Last edited:
Status
Not open for further replies.
Back
Top