øAslickproductions.org/forum/index.php?PHPSESSID=a93jpvqe9jutne9agvqo8ht1r1&topic=1328.15e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index2bfd-2.htmlslickproductions.org/forum/index.php?board=17.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index2bfd-2.html.zxÄ8h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ °V»*OKtext/htmlISO-8859-1gzip@øÕ»*ÿÿÿÿÿÿÿÿWed, 11 Mar 2020 01:19:24 GMT0ó°° ®0®P®€§²ð®Ã8h^ÿÿÿÿÿÿÿÿ03»* Spell Animation Guide v0.85

Author Topic: Spell Animation Guide v0.85  (Read 8764 times)

LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 130
    • View Profile
Spell Animation Guide v0.8
« Reply #15 on: October 24, 2010, 11:18:16 PM »
At long last, the eighth version of the animation guide!  I have removed a lot of stuff to other files; they will be uploaded here and to the site over the next week or so once they're cleaned up.

There will probably only be three more updates to the guide.  I don't want to promise a date, but my plan is to have one per month.  They will cover (in rough order): documenting the special functions (F5/F6/Effect Byte 4), a final pass on the main list to clarify some stuff (esp. f-ing Meteo functions), and a few odds and ends I want to add.

The original purpose of the guide was to share information I learned while modding FF5 classes/abilities.  As such, after I finish it up I'll be moving on to other projects.  Namely, actually modding FF5.  Unless an update is really warranted, once it hits v1.0 I won't be updating it any more.  I'll still be doing research, and posting stuff here, but I've had my fill of animation-related assembly.
« Last Edit: December 08, 2014, 04:46:03 AM by Jorgur »

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: Spell Animation Guide v0.8
« Reply #16 on: October 27, 2010, 04:46:23 PM »
As always, good to see people are still alive and making progress.  :cycle:

Namely, actually modding FF5.
This caught my interest. Anything specific in mind?

LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 130
    • View Profile
Re: Spell Animation Guide v0.8
« Reply #17 on: October 28, 2010, 12:57:29 PM »
Since the first time I played FF5 many years ago, I've always had a problem with the classes.  I love the class system, but the classes themselves are terribly balanced, and many of them are totally useless.  I'd like to revamp the class system to provide more balance and utility. 

The guide was the first step - learning how abilities were displayed on the screen.  That's also how I stumbled on the event system - I was looking to figure out how classes are added to the player inventory.
Ultimately, I'd like to add some new abilities (and a few spells).  I've just started investigating expanding the ROM to allow for this.  The information is, for the most part, all there.  There's still some fairly in depth assembly hacking involved though.

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: Spell Animation Guide v0.8
« Reply #18 on: November 14, 2010, 07:05:30 AM »
These documents are the successors of the Battle Animation Guide version 0.7, right? If you don't mind, I'd like to merge the old topic into this one to clean up the forum page.

LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 130
    • View Profile
Re: Spell Animation Guide v0.8
« Reply #19 on: November 14, 2010, 09:54:36 AM »
Yeah, no problem!

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: Battle Animation Guide (Updated 5/4/10)
« Reply #20 on: November 14, 2010, 01:55:14 PM »
Topics merged. If you want to to change the topic name, change the title in the first post.   :wink:
I would also suggest updating the first post with the newest material.

 :edit:
I smacked all three topics together into one. :tongue:

I felt they were all about the same thing and I want to avoid too many outdated topics on the forum page. A slight problem is that the first post now is a really lengthy one, so modifying it means either losing a good deal of text, or making a mixture of new and old information in one post. Alternatively, I could take out one of your older posts from the Battle System topic and insert it, giving you a new top post to modify. As a last resort I could split the new topic back into two parts.

What do you think?
« Last Edit: November 14, 2010, 02:43:55 PM by Jorgur »

LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 130
    • View Profile
Re: Spell Animation Guide v0.85
« Reply #21 on: December 01, 2010, 05:51:03 PM »
While the first post is (IMO) a good intro to how to go about with hacking the game, a lot of the information in the original post was incorrect.  I've quoted some sections below for posterity.

Quote
I've made some significant breakthroughs with understanding how magic graphics work.  I'll be posting a more detailed breakdown when I finish everything up, but I thought this was important to share.

How does FF5 decide what magic animations to display?  Logic would dictate it's linked to the Spell Number (S#), which can be found in Jorgur's Hacking Guide here on the site.  As it turns out, this is indeed the case.  It also makes sense that it'd be some sort of lookup table, and this is also the case.

I started my search by tracing a variable I came across during my examinations of C1 Fxn A; $2722.  This variable, during the magic routine, holds S# ($2723 holds the Effect Number).  It's important to note $2722 is not dedicated; this variable holds other animation values when not being used by the magic system.  I followed this value backwards to the menu selection and forwards to a function around C1/A847, which led me to the lookup table for spell animations.

The table starts at D8/38EC, and each set of data is five bytes:

Code: [Select]
00 10 19 00 0c Fire
17 12 21 00 0d Ice
09 11 e4 00 0e Bolt
21 18 0f 00 0f Venom
21 19 0f 00 0f Sleep
21 17 0f 00 33 Toad
01 10 1a 00 19 Fire 2
17 12 6f 0d 1c Ice 2
09 11 e5 00 0e Bolt 2
05 10 1c 8e 1b Drain
2b 24 24 00 47 Break
11 15 20 00 10 Bio
04 10 1b 80 36 Fire 3
14 12 23 00 11 Ice 3
09 11 e6 00 0e Bolt 3
05 10 1d 88 1d Flare
0d 13 1f 00 1a Doom
05 12 1c 8e 1b Psych

As I mentioned, for the first 256 data sets, this follows the S# from the Hacking Guide.  There are some groups that get special handling; Sword Magic and Summons being the main two.

After this, there's a set of seven animations, 100h through 106h, for the casting animation.  That is, the burst for Black, the sparkles for White, and so on.  This is calculated from the S#, starting at C1/B54D; it's relatively straight-forward.  Otherwise, these act just like other animations; you can change any of the five bytes.  For example, setting the data at 102h (Black) from 1C 28 02 80 48 to 1C (10) 02 80 48 will make the burst red.  Changing it to (42) 28 (00) 80 48 will give it the Sword Magic animation.

This should provide an excellent start for people looking to play around with the magic system.  I hope to have a full catalog of the data up soon; I will post it when done.

Dana Crysalis

  • Ymir
  • *
  • Posts: 16
    • View Profile
Re: Spell Animation Guide v0.85
« Reply #22 on: August 03, 2013, 02:56:00 AM »
Hiya, I have a question.

v0.8    - Moved Weapon information to separate file


I can't seem to find this separate file, i checked the sticky for hacking docs, but I might be blind and have missed it.  I could definitely use info on the weapon animations, is it still lurking around? 

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: Spell Animation Guide v0.85
« Reply #23 on: August 03, 2013, 03:55:10 AM »
Quote
I wanted a break from deciphering the animation scripts, and since you asked about weapon animations, I decided to look into that.  As it turns out, those are included in the Master Table as well.  I haven't figured it all out yet, but I'll give you what I have since I know you're interested.  I located a series of scripts that corresponded to weapons; the table referencing these is at D9/9E34.  This table is loaded at C1/A12B, where X is obtained from $F586.
Quote
The weapon script is run separately from the magic scripts; there's different code for parsing, and it looks like the commands might be different.  I'll know more as I look into it more.
Quote
At long last, the eighth version of the animation guide!  I have removed a lot of stuff to other files; they will be uploaded here and to the site over the next week or so once they're cleaned up.
Sadly, I don't seem to have the files from version v0.6-0.7 which include weapon animation info (I only have v0.5). Apparently he wanted to upload more as separate documents, but never got around to it.  :sad:

I will send him a PM and hope for a reply. If anyone reading this has the file(s) from v0.6 or v0.7, please upload!

LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 130
    • View Profile
Re: Spell Animation Guide v0.85
« Reply #24 on: August 03, 2013, 12:31:22 PM »
Hey,

I do have the older versions as well as the moved info.  I'm not sure how complete it is offhand; it's been quite some time since I've looked at it, to be honest.  They're all on my laptop, so give me a couple of hours and I can get them uploaded here.  Also, if you have any questions, feel free to ask, I usually scan the board on the weekends when I'm looking at FF5 stuff (right now trying to figure out if/how I can add Life3 to the game).

[EDIT] Okay, I've attached the weapon stuff I have.  It's pretty far from complete, and doesn't talk about anything in the C1 bank at all.  However, the C1 stuff isn't really necessary for basic editing.  For the sake of completeness, most of the C1 code handles animation for characters (especially non-spell abilities).  As a couple of examples, it makes the character do the casting pose, or jump to an enemy.  Again, it's not strictly necessary for basic animation editing.

[EDIT2] And for total completeness, I've attached the older versions of the animation guide as well.  No guarantees anything in them is up to date or correct - use the newest one.
« Last Edit: December 08, 2014, 04:46:48 AM by Jorgur »

Dana Crysalis

  • Ymir
  • *
  • Posts: 16
    • View Profile
Re: Spell Animation Guide v0.85
« Reply #25 on: August 03, 2013, 10:53:20 PM »
Huge thanks for this, LightPhoenix, my programming friend will  be very grateful.

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: Spell Animation Guide v0.85
« Reply #26 on: June 27, 2016, 01:39:55 PM »
I'd like people who read through to comment on anything confusing or unclear.  If there's any issues, I can try to clarify or fix anything.
TBH I've read like 2-3 times the guide on wiki trying to understand 'whats all about', it just doesnt click, doesnt ring a bell ... nothing. Its like you read an answer, but it doesn't make any sense unless you know the question.

Now I'm reading old topics, trying to find hidden gems and found this:
Quote
How does FF5 decide what magic animations to display?  Logic would dictate it's linked to the Spell Number (S#), which can be found in Jorgur's Hacking Guide here on the site.  As it turns out, this is indeed the case.  It also makes sense that it'd be some sort of lookup table, and this is also the case.

I started my search by tracing a variable I came across during my examinations of C1 Fxn A; $2722.  This variable, during the magic routine, holds S# ($2723 holds the Effect Number).  It's important to note $2722 is not dedicated; this variable holds other animation values when not being used by the magic system.  I followed this value backwards to the menu selection and forwards to a function around C1/A847, which led me to the lookup table for spell animations.

The table starts at D8/38EC, and each set of data is five bytes:

And suddenly it all started to make a sense, pieces started to click to each other - I knew the question :)

But seriously that is a great intro for your guide, it really gives a goal and purpose not just bunch of knowledge piled around. If it is one thing that I learned in my MA study, it will be: 'asking the right question is more important then having the answer'

Now on the topic:
Quote
I've done a lot of work on understanding how sprites are accessed
I'm very interesting in your finding. I'm particularly interested in monsters, but anything is good.
I strongly believe that Square had used other instruments given to artists that know a little or no asm to create scripts, graphic, animation, battle system data, monster data, music, ... Let say something like 'RPG Maker'. The things is that in order to give flexibility to artists, you must create complex system behind that feeds with their work. Thats why we often see a complicated system coded, while in the game we barely touch the surface of it. TBH I expect that we will see the same with organizing Sprites (as part of animation or static picture)

Xardas

  • Siren
  • *
  • Posts: 75
    • View Profile
Re: Spell Animation Guide v0.85
« Reply #27 on: April 04, 2018, 05:05:01 PM »
OMG, necro posting! LYNCH THIS GUY!  :laugh:

So, since I want to change many weapons for my hack (not just the stats), I was referring to LightPhoenix's Weapon Animation Guide a lot. I researched by fiddling with the 9 bytes of the master table to find out what they do, and what the effects of each value are. First, I will tell you what I found out about the bytes themselves:

Quote
This table is located at D9/9855, and contains general information
used in playing weapon animations.  Each entry is nine bytes long.

Byte 1: Weapon Sprite This is true, BUT the sprite itself is also heavily influenced by Byte 3 as well. You don't have much freedom here, as most results end up in displaying garbage, some even crash the game. As far as I tested, only the combinations of Byte 1 and 3 which are actually used by existing weapons lead into acceptable results.
Byte 2: Weapon Color (see color table) I tested all values from 00 to FF - my results can be found in the attached txt, although it's not too detailed as I just noted down about 2 colors. CAPS mean that I don't recommend this colorset because it looks just awful. Some colorsets are used more than once.
Byte 3: Weapon Routine (see below) See Byte 1 (partially).
Byte 4: Weapon Flags? Together with byte 6, this does alter the "cut" animated on the target. Eg. if both byte 4 and 6 are 00, you'll get the cut animation usually done by normal swords, if both are 02 you'll get the knife/spear cut. So far, I didn't find any other esthetically acceptable combinations of byte 4 and 6 other than those used by existing weapons, but I haven't researched these 2 bytes much.
Byte 5: Weapon Sound This is NOT the weapon sound byte. This is another color byte, but not for the weapon sprite. This one is for the "cut" animation.
Byte 6: Unknown, sent to $F582 See byte 4.
Byte 7: Unknown, #20 forces knife animation Still a mystery to me - the appropriate value however is very crucial for katanas.
Byte 8: Weapon Type? This one is the byte responsible for the attack sound (except for the katanas, which are still a mystery to me).
Byte 9: UnknownStill a mystery to me - the appropriate value however is very crucial for katanas.
Credits to LightPhoenix - without his work I wouldn't have been able to do this.

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: Spell Animation Guide v0.85
« Reply #28 on: April 05, 2018, 02:44:25 AM »
This is what I have in my ROM map:
Code: [Select]
Items weapon effects 1B [9Bytes * 128?]:
 Byte 1 - Weapon graphics
 Byte 2 - weapon graphics palette
 Byte 3 - the user of the movement?
 Byte 4 - attack graphic
 Byte 5 - attack graphics palette
 Byte 6 - animation?
 Byte 7 - flag
 Byte 8 - sound effects
 Byte 9 - sound effect at the time of critical?
Keep in mind that is a google translation from a ROM map I found in a Japanese site!!!

Although it is google translation actually these names make sense:
B1, B2 - Weapon gfx ID / Palette ID
B3 - Let me try to explain, that determine where the animation will be placed - some animation are forwarded to a single target, others multiple targets, some time you have same animation regardless who in the praty you hit, sometimes the animation hit a specific targer ...
B4, B5, B6 - Animation - tiles, palette, routine ID
B7 - ???
B8, B9 Sounds.  Crit can be done by Katanas and fist,  thats we have values only there
* although I call them IDs, most likely it is simply an index (you multiply by something and add a constant, to get the actual address)

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: Spell Animation Guide v0.85
« Reply #29 on: April 05, 2018, 03:05:06 AM »
BTW, I'm not sure are you aware of, but I'm making a new tool for graphics ripping/mapping. Here is what I manage to make:

You may try different Width to assemble different Sprites. I hope that will help you in understanding B1 and B4

P.S. we don't have disassembly of D9 bank. noisercross, are you willing to make one? Your C1 is the best disassembly I have used - so easy to read!