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

  • Thread starter Thread starter Lazy Bastard
  • Start date Start date
Status
Not open for further replies.
These are file location pointers that, after loaded in memory, get transformed into memory location pointers. I'm not sure what their function is, exactly. They might have some special function in some rare cases like Midgar Zolom.

I have now found where these scripts are handled. I don't know the formatting of any of it, but the opcodes range from 8E - FE and their functions are defined at 0x4248C2 and are called from 0x41FDDB. More coming later...
 
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 :)
Ahh I see said the blind man! :D
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.
that I did understand the fact is literally ALL of those indices are animations (so their are quite a few) and zeroth ones I suspect are not available or special I remember that discussion with Micky eons back.
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.
If you wanted to 'swap' things like that you would likely need to expand the indexes and number of animations in the file. For reference I would recomend going from cloud to aireth tifa or cid. As these all have similiar animation.  It should include the victory animation also. You likely can find that when the battle ends normally. Prod Clod I remember being helpful as it abused each character (heh). Erstwhile I'm sure you can figure it out faster than I can. Apart from playing each animation after decoding the data in Q-gears on the character in battle I'm not sure what else you could do.  That is once nice thing, about Q-gears as it can let you do just what I suggested as you have complete control via LUA scripting to do just that.

Granted it's an incredibly boring way to do it ... but that's just me. I believe the battle results are also scripted as part of the battles.  You may wish to examine that for your plans. Although it might be more or less work with a tool you are potentially unfamiliar with. If so hopefully you have a better route.

Cyb
 
[...] the opcodes range from 8E - FE and their functions are defined at 0x4248C2 and are called from 0x41FDDB. More coming later...
Are these offsets in the PC version executable? Or the PSX ELF (SxxS file)? Or something else?


If you wanted to 'swap' things like that you would likely need to expand the indexes and number of animations in the file. For reference I would recomend going from cloud to aireth tifa or cid. As these all have similiar animation.  It should include the victory animation also. You likely can find that when the battle ends normally. Prod Clod I remember being helpful as it abused each character (heh). Erstwhile I'm sure you can figure it out faster than I can. Apart from playing each animation after decoding the data in Q-gears on the character in battle I'm not sure what else you could do.  That is once nice thing, about Q-gears as it can let you do just what I suggested as you have complete control via LUA scripting to do just that.

Granted it's an incredibly boring way to do it ... but that's just me. I believe the battle results are also scripted as part of the battles.  You may wish to examine that for your plans. Although it might be more or less work with a tool you are potentially unfamiliar with. If so hopefully you have a better route.

Cyb
Actually, I've already made functional custom models; I'm just handling a few annoying animation transitions. For example, as NFITC1 mentioned above, some actions call a series of animations, in sequence (jump forward, throw an item, jump back, for example). If I want to replace these three actions with a relevant animation for the new custom character, and I only want to use a single animation rather than three, I'll need to change the index NFITC1 pointed me to earlier in this thread. Otherwise, I'll have to try to fill two of the three animations with animations that flow smoothly with the animation I really want to use, which is quite difficult, if not impossible in most cases. The character still functions, but looks glitchy during certain animation sequences.
 
Actually, I've already made functional custom models; I'm just handling a few annoying animation transitions. For example, as NFITC1 mentioned above, some actions call a series of animations, in sequence (jump forward, throw an item, jump back, for example). If I want to replace these three actions with a relevant animation for the new custom character, and I only want to use a single animation rather than three, I'll need to change the index NFITC1 pointed me to earlier in this thread. Otherwise, I'll have to try to fill two of the three animations with animations that flow smoothly with the animation I really want to use, which is quite difficult, if not impossible in most cases. The character still functions, but looks glitchy during certain animation sequences.
My memory is a bit hazy but don't the battle scripts fire of a series of animations for each script? IE 'walk' a step and move for example. I was thinking that it takes several activations of an animation for example for it to run to anywhere then throw something. I am trying to remember battle scenese with unique sequences in them (palmer fight prod clod the mysterious ninja fight etc.)

I remember someone complaining about how they fired a sequence of animations for attacking as being annoying or something. Anyhow, the animations are I believe dependant on the battle scene scripting correct? The battle engine has it's own script engine, I'm not sure it matters too much unless you plan on duping the battle scenes from FF7 itself.  I digress a bit I guess.

I suppose you might wish to work on the combat system first? Hmmm I remember Akari discussing the scripting a few years back.

The attack limit is what 9999? or something (heh).

Cyb
 
I finally managed to spend at least a few minutes taking a look at another battle model (TIFA.LZS), though I still haven't had any time to modify anything and test the results. For interest's sake, here's Tifa's "Model Settings Data":


Model Settings Section [at offset 0x000073DC]:


Note: The byte size of the first (Unknown) sub-section of this section seems to be consistently 0x68 bytes.


Model Settings [at offset 0x000073DC]:


Unknown:

Code: [Select]
Code:
02 00 80 00 2C 01 00 07 00 07 00 00 00 00 E0 FC 7C FC 01 00 00 00 00 00 20 1B 03 00 03 16 0F 00 00 00 00 00 FC 03 00 00 FC 03 00 00 FC 03 00 00 FC 03 00 00 FC 03 00 00 FC 03 00 00 FC 03 00 00 FC 03 00 00 80 01 32 01 80 01 00 00 89 03 98 FC 77 FC 00 00 12 FE 00 00 7D 00 58 FD 06 FB 00 00 D2 FD 00 00 2C 01 00 00

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

Code: [Select]
Code:
90 01 00 0094 01 00 009C 01 00 00A0 01 00 00B0 01 00 00C0 01 00 00C4 01 00 00CC 01 00 00D0 01 00 00D4 01 00 00E4 01 00 00E8 01 00 00EC 01 00 00F0 01 00 00F4 01 00 0000 02 00 00FC 01 00 0010 02 00 0004 02 00 0098 01 00 006C 02 00 0088 02 00 006C 03 00 0084 03 00 0010 03 00 0024 03 00 0030 03 00 003C 03 00 004C 03 00 0010 02 00 0020 02 00 0030 02 00 0044 02 00 0058 02 00 0094 02 00 0094 02 00 006C 02 00 0088 02 00 00B4 02 00 00C4 02 00 00D4 02 00 00D4 02 00 00EC 02 00 00EC 02 00 0004 03 00 0004 03 00 0090 01 00 0090 01 00 0090 01 00 0090 01 00 0090 01 00 0090 01 00 0090 01 00 0090 01 00 0090 01 00 0090 01 00 0090 01 00 0090 01 00 0090 01 00 0090 01 00 009C 03 00 00B4 03 00 00C0 03 00 00CC 03 00 00D8 03 00 00E4 03 00 00F0 03 00 0000 04 00 0004 04 00 00FC 03 00 0090 01 00 0094 03 00 0090 01 00 0090 01 00 00

Animation scripts:

Code: [Select]
Code:
-00 FE C0 00-01 FE C0 00-10 FE C0 00-06 F1 00 00-B3 F9 03 ED E3 EE B2 F9 03 B1 03 B1 E3 EE 00 00-B3 F9 04 E4 E3 EE B2 F9 04 B0 04 B0 E3 EE 00 00-0F F2 E5 EE-10 11 F2 E5 EE 00 00 00-12 F2 E5 EE-05 E5 EE 00-AB 90 01 00 00 08 F4 0F F3 FA E5 A6 EE 00 00 00-13 E5 EE 00-18 19 E5 EE-B4 02 F1 00-95 07 FE C0-C4 90 01 06 07 FE C0 00-04 FA E5 EE-E7 00 F1 00-E5 C4 90 01 06 12 E7 00 F1 00 00 00-E8 FC 03 ED E6 EA 0C 0D EC 0E 04 FA E5 EE 00 00-E8 FC 03 ED A4 EA 0C 0D EC 0E 04 FA E5 EE 00 00-E8 FC 03 ED A5 EA 0C 0D EC F4 0F F3 0E 04 FA E5 EE 00 00 00-E8 FC 03 ED D8 06 15 00 09 EA EB F4 0A F3 04 FA E5 EE 00 00-E8 FC 03 ED D8 06 15 00 0A EA EB F4 0A F3 04 FA E5 EE 00 00-FC F0 D8 00 1A 00 1A D1 2C 01 00 00 06 F0 1B BE 02 BE 08 C2 08 1E 1C FA F0 1D E5 EE-FC 03 ED F7 12 22 04 FA E5 EE 00 00-FC F0 D8 00 1A 00 1A D1 2C 01 00 00 06 F0 1B F7 04 D8 04 D6 02 16 F4 06 F3 1C FA F0 1D E5 EE 00-E8 FC 03 ED F7 12 14 F4 3C F3 04 FA E5 EE 00 00-E8 FC 03 ED F7 12 14 F4 5A F3 04 FA E5 EE 00 00-FC F0 D8 00 1A 00 1A D1 2C 01 00 00 06 F0 1B F7 04 17 1C FA F0 1D E5 EE-FC F0 D8 00 1A 00 1A D1 2C 01 00 00 06 F0 1B F7 08 1F 1C FA F0 1D E5 EE-FC 03 ED 15 F7 01 04 FA E5 EE 00 00-FC F0 D8 00 1A 00 1A D1 2C 01 00 00 04 F0 1B F7 02 1E 9E 00-E5 BD 2C 01 00 00 F0 F7 06 20 9E 00-E5 BD 2C 01 00 00 F0 F7 08 21 9E 00-E5 BD 2C 01 00 00 F0 F7 02 1E 1C FA F0 1D E5 EE-FC F0 D8 00 1A 00 1A CC 06 CB FF E8 03 FE FE 00 08 08 F0 1B 1E F7 03 F4 06 F3 1C FA F0 1D E5 EE-FC F0 D8 00 1A 00 1A D1 2C 01 00 00 04 F0 1B BE 02 BE 08 C2 08 1E 9E 00-BE 02 BE 08 C2 08 20 1C FA F0 1D E5 EE 00 00 00-FA F0 1D E5 EE 00 00 00-E8 FC 00 E0 EA F4 19 F3 EC 1A D1 2C 01 00 00 06 F0 1B 9D 00 2C 9E 00 00-EA E5 BD 2C 01 00 00 F0 9D 01 2D 9E-EA E5 BD 2C 01 00 00 F0 9D 02 2E 9E-EA E5 BD 2C 01 00 00 F0 9D 03 2F 9E-EA E5 BD 2C 01 00 00 F0 9D 04 30 9E-EA E5 BD 2C 01 00 00 F0 9D 05 31 9E-EA E5 BD 2C 01 00 00 F0 9D 06 32 9E-00 00 00 00-00 00 00 00-00 00 00 00
 
Note: The byte size of the first (Unknown) sub-section of this section seems to be consistently 0x68 bytes.
It is always 68h bytes.

I see a lot of opcodes that I recognize as per the topic I recently created. I was going to go in depth with some of it but I can't figure out a lot of the nuances of them so I'll have to go with vague interpretations of their effects.

C9 is a loop label
CA loops back to C9 while the magic effect thread is running.
C1 always loops back to the C9
E8 is of note as it is what loads the magic effect handler, but another code runs it later (I think)
EC (I think) is what runs the visual effect on the target after the initial animation.

The animate handlers are just all over the place, too. The game takes the index it's given and just goes wacky with it. They each have an independent visual and an effect visual. If I had my code in front of me I'd give some details.
 
 
Last edited:
Thanks for that, Akari. That adds to my notes nicely. Still a lot of unknowns. Here's a few more things:

Some codes share implementations:
9A & FB
B2 & C9 (B2 isn't a loop pointer though. I haven't found any indication that it's used)
BB, C0, CD, D2, D3, D9 & EF all run the same code that any value less than 8E would run as if they were animations.
EE & FF

I think Christopher's script might prove enlightening, too.
 
Status
Not open for further replies.
Back
Top