Author Topic: Attack Animation Indexes (FFVII)  (Read 34016 times)

nfitc1

  • *
  • Posts: 3010
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Attack Animation Indexes (FFVII)
« on: 2009-02-02 20:16:17 »
As per Tsetra's request, I've just made a listing of all the used attack animations (byte 0x0D of attack data) and put it here: http://www.mediafire.com/?yoynjegujn1
(Yes, I know Silence is listed twice after number 13, ignore that. There's also more than one of "Escape", "Sewer Tsunami", etc. as well; That's why there are multiple listings)

It occurs to me now, about six-and-a-half months after writing this that it needs re-writing. It was enough explanation for the people that were helping me develop WM (and thereby understanding parts of the inner workings of the FFVII), but it's not enough for people who are coming in to the scene. So, because I've gotten 50 requests or more (actually, it's been more like 5, but I don't want it to GET to 50) I've decided to revisit this and re-explain how the animation index works.

If you're starting out using WallMarket/Proud Clod and want to change animations of attacks you'll quickly realize that some of the values don't make sense. Different attacks can have the same animation index and still look very different. The reason is simple. There are more than 256 animations for attacks even though the animation value itself is only one byte. Therefore, it is offset based on the attack index. Specific ranges of attack indexes will add a fixed amount to the animation index supplied in the attack information. This value can then exceed 256 will then select that specific animation (all animations are found in magic.lgp in the PC version and I think there are just about 300 or so). This value I will call "absolute animation index" and the value supplied by the attack information will be called "relative animation index".

So then the question becomes: "What do I need to change the relative animation index to to get a specific absolute animation index?"
Since WM and PrC display this information in Hexadecimal, I'll do the math in that mode. Most calculators can do calculations in hexadecimal including the calc.exe that comes with all Windows versions. Switch it to Scientific mode and you can switch between Decimal and Hexadecimal at any time.
First, I need to explain what ranges of attack index add what value to the relative animation index. Here's the list:

Bosola has provided information to indicate that these values might not be correct for certain PSX versions

Code: [Select]
Index range        increase (PC)   increase (PSX)   description
000-037              0              0                Player-accessible Magics
038-047, 060-061     [not sure]     4E               Summons
048-05F              36             36               E.Skills
062-0FF              EC             [not sure]       Limit Breaks
100~FFF              4E             60               Enemy-exclusive Attacks
(replace 'FFF' with whatever the upper limit for attack indexes is)

In short, to get the absolute animation index from an attack's supplied relative animation index:
  • For Player-accessible magics, do not increase
  • For Summon attacks, increase by [currently unknown amount]
  • For E.Skill attacks, increase by 36h
  • For Limit Breaks, increase by ECh
  • For Enemy-exclusive attacks, increase by 4Eh

Since this value is stored as a byte, there are limits to what certain attacks can look like. For instance, Player-accessible magics can't look like any of Yuffie's Limit Breaks because those absolute indexes cannot be achieved without increasing the relative indexes.

Let's look at an example:

The easiest thing would be to look at relative animation index 00h. The attacks Light Shell, Frog Song, Pyramid, Reanimagic, Cure, Capsule, and Right Arm Revive use this. They don't all look alike, but some of them do. Their attack indexes are:

Cure: 000
Frog Song: 048
Light Shell: 26A
Pyramid: 15D, 15E, 15F (these are three separate attacks for reasons I won't go into, but they all look the same)
Reanimagic: 18E
Capsule: 38B, 38C (same as Pyramid)
Right Arm Revive: 38F

Now we have to add the fixed values to find what animation index to use. Since the relative index of all these is 0, we add the fixed increase to 0 (remember, these values are in Hexadecimal).

Cure: 0 + 0 = 0
Frog Song: 0 + 36 = 36
Light Shell: 0 + 4E = 4E
etc.

If we want Cure to look like Light Shell we need to change it's relative animation index to produce the absolute index 4E. Since this is a Player-accessible magic, that means making the relative animation index 4E.
For Frog Song, we'll need to do a little algebra:
rel + inc = abs
x + 36 = 4E
x = 4E - 36
x = 18
so changing Frog Song's relative animation index to 18h will make it look like Light Shell.

IMPORTANT NOTE: animation indexes can not go "backwards". ie, Light Shell cannot look like Cure because Cure's absolute animation index is less than the increase Light Shell's index gives. Light Shell's absolute animation index limits are 04E-14D inclusive.
I also don't believe it's possible to get an enemy attack to look like a summon. Better just give them the summon attack instead.

Interesting note: Increasing an enemy attack's relative animation index past ED (beyond the Limit Breaks' animations) makes them look like they're throwing Cloud's weapons. :D

Warning: Changing the Limit's animation indexes is dangerous. Most of them contain animations the "caster" is supposed to perform. I'm not sure which one's would be safe to change so I can't say.
« Last Edit: 2009-11-02 14:13:47 by NFITC1 »

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Re: Attack Animation Indexes (FFVII)
« Reply #1 on: 2009-02-02 21:19:52 »
I can confirm that they do work the way NFITC1 has described, as I found when I used enemy skills and enemy only attacks as animations for wind water and darkness spells (that's right, I never miss a chance to advertise  :-P )

And on a related topic, I have updated my FF7 attack data file, which I think is the most complete of its kind (I say my; 99% is the work of other people on qhimm). It can be downloaded in .doc, .odt and .txt formats here.
« Last Edit: 2009-08-28 05:24:47 by Kudistos Megistos »

Tsetra

  • *
  • Posts: 329
    • View Profile
Re: Attack Animation Indexes (FFVII)
« Reply #2 on: 2009-02-02 21:21:33 »
Big thanks dude, and I think Leighos Kudistos Megistos is going to like this as well. You should include that with the next WallMarket release so people wanting to do their own projects can make use of it.

EDIT - Whoops, too slow on the reply haha.

Also, semi-related, I wrote a textfile of my own showing the hex numbers of all the materia in the game if there's any interest in that. It's not much, but if anyone wants to place materia in the game through Meteor after messing around in WallMarket or whatever it can speed things up. It's pretty easy, it's almost always like: SMTRA [0,0,32,0,0,0] where "32" is the hex number for the materia.

On that note, and a bit of a tangent, the Qhimm Wiki says materia can be added by using a different method with that opcode, but I have yet to see it. The above method is a lot easier anyhow.

nfitc1

  • *
  • Posts: 3010
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Attack Animation Indexes (FFVII)
« Reply #3 on: 2009-02-02 21:57:57 »
I can confirm that they do work the way NFITC1 has described, as I found when I used enemy skills and enemy only attacks as animations for wind water and darkness spells (that's right, I never miss a chance to advertise  :-P )

And on a related topic, I have updated my FF7 attack data file, which I think is the most complete of its kind (I say my; 99% is the work of other people on qhimm). It can be downloaded in .doc, .odt and .txt formats here.

Wow! Totally going to steal that attack list! :D Best thing I've found yet!
Thanks for confirming the animations for me. How do you determine what monsters use which attacks in a given scene without reading the scripts? Is that even possible?
I don't mind you "advertising" your WM-created mods in my topics. ;)

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Re: Attack Animation Indexes (FFVII)
« Reply #4 on: 2009-02-02 22:35:35 »
Well, as I said, hardly any of it is my work  :-P. I found an attack list for all enemy attacks somewhere in these forums and I found one with all the player attacks and decided to merge them and add some info on how attack data works.

Quote from: NFITC1
How do you determine what monsters use which attacks in a given scene without reading the scripts? Is that even possible?

I'm not sure what you mean here. Are you asking how the person who put together the enemy attack list got all the info right? Or something else?

nfitc1

  • *
  • Posts: 3010
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Attack Animation Indexes (FFVII)
« Reply #5 on: 2009-02-03 03:14:05 »
Well, as I said, hardly any of it is my work  :-P. I found an attack list for all enemy attacks somewhere in these forums and I found one with all the player attacks and decided to merge them and add some info on how attack data works.

Quote from: NFITC1
How do you determine what monsters use which attacks in a given scene without reading the scripts? Is that even possible?

I'm not sure what you mean here. Are you asking how the person who put together the enemy attack list got all the info right? Or something else?

Still, it's a good find. ;)
Yes, but I want to know how that person knew that those attacks went with those monsters. I could go through all the monsters' scripts and look at the attack IDs they perform, but that's a very lengthy process. I guess it's the only way....

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Re: Attack Animation Indexes (FFVII)
« Reply #6 on: 2009-02-03 09:13:29 »
Well, I suppose one could look at the attack data in the scene files, since all the attacks are in order.

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
Re: Attack Animation Indexes (FFVII)
« Reply #7 on: 2009-07-13 03:36:05 »
I know this is an old topic but...

Does anyone know then, how it's possible for Safer Sephi to use the "Wall" animation? I tweaked his "Wall" Attack and found that even if I changed it's properties, the attack stayed the same (was the attack HARD CODED into the game?). Only when I completely changed the Attack ID did my modifications work, but then the animation changed and I can't seem to get it to be Big Guard or Wall or anything useful.  Wierd, huh? Give it a whirl yourself and and see what happens.

EDIT: btw, the link seems to be down.
« Last Edit: 2009-07-13 03:45:00 by titeguy3 »

Xelane

  • *
  • Posts: 477
    • View Profile
Re: Attack Animation Indexes (FFVII)
« Reply #8 on: 2009-07-13 03:59:20 »
Did you change the animation ID? that's the important thing to do when changing how an ability looks and to an extent the animation Id can be very important (like multiple hit animations)

and i don't mind that you posted on an old topic BUT others might, what would be better is if you either made a new topic or simply sent NFIT a message.


Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Re: Attack Animation Indexes (FFVII)
« Reply #9 on: 2009-07-13 04:00:52 »
Does anyone know then, how it's possible for Safer Sephi to use the "Wall" animation? I tweaked his "Wall" Attack and found that even if I changed it's properties, the attack stayed the same (was the attack HARD CODED into the game?). Only when I completely changed the Attack ID did my modifications work, but then the animation changed and I can't seem to get it to be Big Guard or Wall or anything useful.  Wierd, huh? Give it a whirl yourself and and see what happens.

When an enemy uses an attack that is in the kernel.bin file, the game gets the data from there; even if you change the data in the scene.bin with Proud Clod, it will use the kernel.bin data and be the same as the player attack with the same ID. The only way to change Sephiroth's Wall attack is to give it a new ID that doesn't start with 00 and adjust all the references to the ID elsewhere in Sephiroth's data accordingly.

EDIT: btw, the link seems to be down.

Which link? The one to my file front account? They took my files down automatically because I forgot to log into the email account I used when registering with them and didn't reply to their warning mail. I'll try to get them re-uploaded this week.

nfitc1

  • *
  • Posts: 3010
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Attack Animation Indexes (FFVII)
« Reply #10 on: 2009-07-13 13:17:40 »
btw, the link seems to be down.

Filefront took it down because it wasn't being downloaded. It's on Mediafire and it has been linked in the first post now.

I know this is a fairly old topic (which is why I'm not necro-bumping it) so I'll just add a little addendum that caught my eye:

When an enemy uses an attack that is in the kernel.bin file, the game gets the data from there; even if you change the data in the scene.bin with Proud Clod, it will use the kernel.bin data and be the same as the player attack with the same ID. The only way to change Sephiroth's Wall attack is to give it a new ID that doesn't start with 00 and adjust all the references to the ID elsewhere in Sephiroth's data accordingly.

It's more accurate to say that if an attack's index is less than 256 it will attempt to get from the KERNEL.BIN/limit data. More recent "delving" into the code as led me to believe that all attacks with IDs greater than 255 are considered "temporary" and are only in memory when the battle begins while the ones in the KERNEL.BIN are practically constants that can be accessed at any time. This is likely for out-of-battle casting purposes. That said, when an enemy references attack ID less than 256, it just pulls info from this constant array of "attack" type.
« Last Edit: 2009-08-31 05:22:38 by NFITC1 »

SwornEnemy

  • *
  • Posts: 77
    • View Profile
Re: Attack Animation Indexes (FFVII)
« Reply #11 on: 2009-08-30 20:59:02 »
F'ing hell, thats a damn good tutorial  :-o,,, thank u this will be very helpful   :-D

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Re: Attack Animation Indexes (FFVII)
« Reply #12 on: 2009-08-30 22:14:38 »
the ones in the KERNEL.BIN are practically constants that can be accessed at any time. This is likely for out-of-battle casting purposes

This wonder about a few things. Do we know yet what allows/stops magic from being used in the menu? And AFAIK the only thing from the kernel.bin that effects magic when used in the menu is the MP cost; changing elements, strength and damage modifiers doesn't seem to do anything. Are the effects of magic in the menu hard coded into the game like the effects of items? (since changes in the kernel.bin aren't reflected when they are used in the menu)

nfitc1

  • *
  • Posts: 3010
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Attack Animation Indexes (FFVII)
« Reply #13 on: 2009-08-31 05:27:33 »
This wonder about a few things. Do we know yet what allows/stops magic from being used in the menu? And AFAIK the only thing from the kernel.bin that effects magic when used in the menu is the MP cost; changing elements, strength and damage modifiers doesn't seem to do anything. Are the effects of magic in the menu hard coded into the game like the effects of items? (since changes in the kernel.bin aren't reflected when they are used in the menu)

I've been looking for this data for a while and I have no idea where it might be. There does seem to be an "out-of-battle" data set for, if nothing else, the magics/items that are usable in the menu. It's likely a much smaller set of values because you won't need things like animations, target reaction, camera, etc. There is no in-battle data for the Source items either so I'm certain a menu set exists, but I haven't found it yet. If I do find it, I might create a menu effect editor as well. Why change Cure in battle when it doesn't change the way it behaves out of battle?

Myrmedus

  • Guest
Re: Attack Animation Indexes (FFVII)
« Reply #14 on: 2009-09-27 20:54:36 »
So I'm guessing, as of yet, it's impossible to give a spell an animation that goes over 255? That's a pain because I'm trying my heart out to give a new spell I made the animation from Vincent's Chaos' Satan Slam - it looks perfect for the spell I'm making (it's death/dark based) but unfortunately goes way beyond the two-byte limitation.

Having said that I've been quite lucky that alot of Aeris' Limit animations are within the 255 limit so if you ever want to create new restorative spells you've got a nice stock of animations there to choose, especially since she kicks the bucket later on!

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Re: Attack Animation Indexes (FFVII)
« Reply #15 on: 2009-09-27 21:00:54 »
You might be able to use a few limit breaks as animations (in theory), just not all of them. Satan Slam comes quite early in the limit list as well. However, that limit break has another complication. It's a two parter; there are two "Satan Slam" attacks, and the first one has an attack modifier that makes the game use the second one right afterwards (so it looks like one attack).

Myrmedus

  • Guest
Re: Attack Animation Indexes (FFVII)
« Reply #16 on: 2009-09-27 21:04:27 »
Sigh...

Ye I've already successfully used Aerith's Breath of the Earth for a Curaja spell, looks pretty nice sans the slight delay at the beginning but that can't be helped since the Limit animations inherently have that delay for the character animations.

Do you think the attack modifier would work when used with a spell? ie. if I use the first part in the spell it would activate the second part in the same way that the limit break does? Having said that I still don't think Vincent's Limits are soon enough in the listings - you basically hit 255 at Pulse of Life and that's it from there on.... I would need to find an actual way to INJECT an additional byte or two of data into the spell information and I can't see that happening since the game no doubt only looks for two bytes when it identifies a spell's animation.

It's annoying because there's an abhorrent lack of good animations for higher-scale death-based spells which is basically the spell I'm trying to make called 'Reaping'.
« Last Edit: 2009-09-27 21:07:33 by Myrmedus »

Kudistos Megistos

  • Banned
  • *
  • Posts: 3929
    • View Profile
Re: Attack Animation Indexes (FFVII)
« Reply #17 on: 2009-09-27 21:17:22 »
Having said that I still don't think Vincent's Limits are soon enough in the listings - you basically hit 255 at Pulse of Life and that's it from there on....

I think you're right. But in theory

Do you think the attack modifier would work when used with a spell? ie. if I use the first part in the spell it would activate the second part in the same way that the limit break does?

This might work if you made two spells and changed the effect modifier to reflect the different animation ID, but I've never tried anything like this.

Myrmedus

  • Guest
Re: Attack Animation Indexes (FFVII)
« Reply #18 on: 2009-09-27 21:21:37 »
Aw sucks - ah well thanks for the feedback I'm probably going to have to give up that animation :(

Evan Lee

  • *
  • Posts: 96
  • "I don't kill I eliminate"
    • View Profile
Re: Attack Animation Indexes (FFVII)
« Reply #19 on: 2009-09-28 06:00:20 »
hey do you know how to fix the attack animation of vincent and barret?

i hate the way vincent attack's coz' ihe always acts like his holding a shotgun even though he's holding a pistol



titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
Re: Attack Animation Indexes (FFVII)
« Reply #20 on: 2009-09-28 09:00:05 »
I'd say it's more like he holds his shotguns like pistols...

Some guns typically require both hands...and the spinning is unnecessary and unsightly IMO.

it's definitely possible... it just requires some knowledge of what files contain the animation data and how to modify them.

Unfortunately, that much I wouldn't know.

Evan Lee

  • *
  • Posts: 96
  • "I don't kill I eliminate"
    • View Profile
Re: Attack Animation Indexes (FFVII)
« Reply #21 on: 2009-09-28 13:07:08 »
oh man.................

i don't even have the knowledge to do that.

LostWingx

  • *
  • Posts: 21
    • View Profile
Re: Attack Animation Indexes (FFVII)
« Reply #22 on: 2010-09-21 20:16:41 »
"Cure: 000
Frog Song: 048
Light Shell: 26A
Pyramid: 15D, 15E, 15F (these are three separate attacks for reasons I won't go into, but they all look the same)
Reanimagic: 18E
Capsule: 38B, 38C (same as Pyramid)
Right Arm Revive: 38F

Now we have to add the fixed values to find what animation index to use. Since the relative index of all these is 0, we add the fixed increase to 0 (remember, these values are in Hexadecimal).

Cure: 0 + 0 = 0
Frog Song: 0 + 36 = 36
Light Shell: 0 + 4E = 4E
etc."


So...this produces the Light Shell animation, how do you produce Capsule, Pyramid, Reanimagic, or Right Arm Revive?  These are all enemy exclusive attacks so wouldn't they all have the same value after the calculations?  Pardon me if I am missing somthing.

Bosola

  • Fire hazard!
  • *
  • Posts: 1749
    • View Profile
    • My YouTube Channel
Re: Attack Animation Indexes (FFVII)
« Reply #23 on: 2010-09-21 20:36:35 »
Please see here

nfitc1

  • *
  • Posts: 3010
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Attack Animation Indexes (FFVII)
« Reply #24 on: 2010-09-21 21:09:18 »
So...this produces the Light Shell animation, how do you produce Capsule, Pyramid, Reanimagic, or Right Arm Revive?  These are all enemy exclusive attacks so wouldn't they all have the same value after the calculations?

They would and do. Those five attacks use the same animation.