Aslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2367.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index0ebd.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=17.20e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index0ebd.html.zx9h^ OKtext/htmlISO-8859-1gzip@Wed, 11 Mar 2020 01:20:44 GMT0 0P9h^ Speeding up shield animation

Author Topic: Speeding up shield animation  (Read 429 times)

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Speeding up shield animation
« on: June 04, 2017, 06:58:36 AM »
I just managed to fix my problem with the death animation, now I'm looking to shorten the shield animation; namely, the length of time spent standing with a shield up. I think I have found the relevant code, so if anyone wants to try fiddling around with that, go ahead.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Speeding up shield animation
« Reply #1 on: June 04, 2017, 08:22:50 PM »
After some further digging, I think I have the definitive solution. The code file in the OP seems to have something to do with running various animation scripts (includes hits from monsters, various weapons, shields, cape dodges etc.). Here is the location of the shield block animation script:

Code: [Select]
D9/9F68: F0 02 92 05 93 02 82 C6 97 78 78 78 78 93 00 FF

The FF at the end tells the script to terminate. I think similar to the animation scripts in FF6, these bytes are assigned to various animation effects (e.g. 93 00 seems to be the "reset" from shield block pose or other poses, 93 02 might be for getting into a pose, etc.). 78 seems to just be "wait". If I remove some of those 78s from the script, I get a shorter animation. That seems to be all there is to it.

At some point, if it doesn't already exist, someone should start a document on FF5 animation script bytes.

EDIT: After even further investigation, I notice a bunch of scripts with quadruplets of 7X bytes near the end, which seems to indicate wait commands of varying length. So an alternative would be to change the 78s to something more appropriate, like 74s.

EDIT 2: Never mind, those are not varying degrees of wait time, there are different sprite IDs. In other words, 78 is a shield. So yeah, just change the number of occurrences.
« Last Edit: June 04, 2017, 08:37:56 PM by 13375K31C43R »
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: Speeding up shield animation
« Reply #2 on: June 05, 2017, 03:01:34 AM »
Hey 13375K31C43R, nice finding, because I'm very, VERY interested in what you call animation scripts. Unfortunately this topic is blank for FF5 (as far as I know). Could you give me overview how this work? If you know better - maybe how FF6 animation scripts works ... and hopefully they are similar :)

Its been a strong desire of me to add a new tab in my Viewer that shows all animations in the game :)

P.S. LightPhoenix in the near past had made an intensive digging in what he call Battle/Spell animation. I think you both talk about the same. If I find the thread I will link it for you here, because it contain a lot of animation function.

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Speeding up shield animation
« Reply #3 on: June 08, 2017, 02:21:16 PM »
Basically, the way it works is, the event you want to add into an animation script is specified by one byte. The game reads in that byte and determines what function to call to run that event. Depending on the event, some number of parameters may be required; these are populated by the next few bytes. After that event is fully processed and displayed, the animation handler then reads the next byte for the next event.

So, for instance, you could have an animation that runs on events like "show this sprite here" followed by "move it X steps in this direction" followed by "change its palette to show these colours" followed by "show this other sprite next to it", etc.

It works the same way in FF6, and storyboard event scripts use the same principles as well. I know LightPhoenix has a partial list of the storyboard event scripts, for instance DB means "refresh player" (see also: Two Galufs).
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: Speeding up shield animation
« Reply #4 on: June 09, 2017, 02:41:53 AM »
Thank you for the explanation 13375K31C43R!

Its funny how a cut-scene will require just couple of bytes to be scripted, while in contemporary games you may need GBs for FMV :)

Praetarius5018

  • Vargas
  • *
  • Posts: 88
    • View Profile
Re: Speeding up shield animation
« Reply #5 on: June 09, 2017, 10:52:19 AM »
Its funny how a cut-scene will require just couple of bytes to be scripted, while in contemporary games you may need GBs for FMV :)
Considering this whole game is about 2MB and today one asset is bigger than that, cutscene efficiency has gone down a lot over the years :d