SEQ & Animation info page

From Final Fantasy Hacktics Wiki
Revision as of 08:39, 23 October 2021 by Talcall (talk | contribs)
Jump to navigation Jump to search

The routine: Load WEP graphic from WEP1 Sheet references this table to load a series of commands (otherwise named 'frame commands') that vary in width depending on various inputs - but they seem mostly independent as commands. This page is an attempt to catalogue their effects. The pointer to these commands is located in SEQ Data, at address 0x800be74c + Weapon animation * 4.


Leading Byte:
0xff -> triggers alternate instructions:
     0xbe -> clears some unused data. for no reason.
     0xbf -> jumps to somewhere with no routine recorded on the wiki.
     0xc0 -> some kind of conditional wait command? unsure what the condition is. 3 bytes long.
     0xc1 -> no idea. clears some positional/map data, maybe? 4 bytes long.
     0xc2 -> queues next command immediately. no other known purpose.
     0xc3 -> saves 0 to item display (clears?). 2 bytes long
     0xc4 -> similarly no idea. saves some data related to items. 4 bytes long.
     0xc5 -> saves 1 to item display (item?). 2 bytes long
     0xc6 -> triggers a check for the animation continuing. if post action has completed, repeat last few frames of animation until it is engaged again. unit anim only.
     0xc7, 0xc8, 0xc9, 0xe6, 0xe7, 0xe8, 0xea, 0xf1, 0xf8, 0xfb -> 3 bytes long, no known effect.
     0xca, 0xd7, 0xe3, 0xe4, 0xe9, 0xed -> increments r17 by 1. no other known effect.
     0xcb -> lifts the unit into the air by 2 units. MoveUp2()
     0xcc -> lifts the unit into the air by 1 unit. MoveUp1()
     0xcd -> moves the unit backward of facing by 2 units. MoveBackward2()
     0xce -> moves the unit backward of facing by 1 unit. MoveBackward1()
     0xcf -> lowers the unit by 2 units. MoveDown2()
     0xd0 -> lowers the unit by 1 unit. MoveDown1()
     0xd1 -> moves the unit forward of facing by 2 units. MoveForward2()
     0xd2 -> moves the unit forward of facing by 1 unit. MoveForward1()
     0xd3 -> triggers a check for the animation continuing. only repeats last (input) number of bytes if animation check is 1, otherwise continues next command. WeaponSheatheCheck1(##)
     0xd4 -> plays an appropriate sound. if third byte is 0, plays woosh sound. if third byte is 1, plays hit sound. may also have additional sounds for critical hits and knockback? PlayAttackSound(##)
     0xd5 -> increments loop count by 1 and loops animation indefinitely. the counter serves no purpose, but, very useful for walking anims. IncrementLoop()
     0xd6 -> queues a check for the animation continuing. repeats last (input) number of bytes if sheathe check value is not 0. WeaponSheatheCheck2(##)
     0xf0, 0xf1, 0xf3, 0xf4, 0xf5 -> increments r17 by 1. no other known effect.
     0xd8 -> saves the value in (input) to weapon rotation byte (misc unit data). SaveRotation(##)
     0xd9 -> jumps directly to Set evade type data, item and throw stone hardcoding, and continues next command from the top. QueueThrowAnim(##)
     0xda -> unused command, ends animation early by deactivating graphic, potentially just unwritten.
     0xdb -> Resets frame delay based on SEQ data. ResetWait1()
     0xdc -> Loads last saved animation number and byte pointer from Sprite data, and continues from where it was last saved. ReloadAnimation()
     0xdd -> Saves animation number and byte pointer to Sprite data, then queues the animation in the third byte. OverrideAnimation(##)
     0xde -> after any attack, frog attack, sharpshoot, charge, or jump command (hardcoded to ability ID slots), manually set target hurt/block/dodge animation, and weapon element effect data if display data turns up not erroneous? only works as a unit animation command, not a weapon or effect command. PostGenericAttack()
     0xdf -> Sets graphic's Y rotation to 0. SetYRotation0()
     0xe0, 0xe1 -> likely unwritten commands, or used for another purpose. no-op.
     0xe2 -> Resets frame delay based on SEQ data. ResetWait2(). for units, this sets... something layery? behaves really weirdly if not the intended value. may not load unit graphic, text graphics, weapon graphic, or the animation itself.
     0xe5 -> saves a new spin on the Y axis into sprite, byte 3 is in the lower byte, and byte 4 is in the upper byte. SaveYSpin(####)
     0xeb -> flips horizontal bitflag in sprite data. FlipHorizontal()
     0xec -> flips vertical bitflag in sprite data. FlipVertical()
     0xee -> moves unit backwards (negative) or forwards (positive) of facing by (input) units. unit only. MoveUnitFB(##)
     0xef -> moves unit up or down by the value of (input). unit only. MoveUnitDU(##)
     0xf0 -> moves unit left (negative) or right (positive) of facing by (input) inputs. unit only. MoveUnitRL(##)
     0xf2 -> resets to 0, and prepares weapon, effect, or unit ($$) graphics for frame 1 of their appropriate animation (##). QueueSpriteAnimation($$,##) 00 - Unit, 01 - Weapon, 02 - Effect
     0xf6 -> currently unsure. does something really technical with button inputs.
     0xf7 -> increments r17 by 3, skipping over a whole command's worth of bytes. other effects are unknown.
     0xf9 -> does something vectory. seems to slide the unit rapidly to the right of the screen.
     0xfa -> unit animation trigger only, moves the unit left (negative) or right (positive) of facing (input 1) units, moves them up (negative) or down (positive) by (input 2) units, and move the unit backwards (negative) or forwards (positive) by (input 3) units. MoveUnit(%%,$$,##)
     0xfc -> 4 bytes long, seems to be some sort of timed counter. repeats last (input) bytes until (input2) counts down to 0. useful for bows? wait($$,##)
     0xfd -> identical secondary effects to d6, however the effects are guaranteed, and do not need the sheathe check. repeats last few commands of attack animation. HoldWeapon()
     0xfe -> clears graphic trigger and sets delay to 0, ending animation. EndAnimation()
     0xff -> Sets delay to 0, without clearing the graphic trigger, pausing the animation indefinitely. PauseAnimation() 
if the lead byte is NOT 0xff, then it performs a basic 2 byte command loading the appropriate frame of animation. LoadFrameWait($$,##)
for units, the generic 2 byte command is functionally identical.
additional notes:
this command loads the hardcoded number of graphics to load per any given frame/SHP, and loads and displays the graphic on screen based on data somewhere in ram, such as the size of the graphic on the sheet, and where on the sheet the graphic is.
   psuedo commands?
   0x$$##       -> LoadFrameWait($$,##)
   0xffcd       -> MoveBackward2()
   0xffce       -> MoveBackward1()
   0xffcf       -> MoveDown2()
   0xffd0       -> MoveDown1()
   0xffd1       -> MoveForward2()
   0xffd2       -> MoveForward1()
   0xffd3##     -> WeaponSheatheCheck1(##)
   0xffd4       -> ReturnErrorFinishAnim1()
   0xffd5       -> IncrementLoop()
   0xffd6##     -> WeaponSheatheCheck2(##)
   0xffd8##     -> SaveRotation(##)
   0xffd9####   -> QueueThrowAnimation(####)
   0xffda       -> ReturnErrorFinishAnim2()
   0xffdb       -> ResetWait1()
   0xffdc       -> ReloadAnimation()
   0xffdd##     -> OverrideAnimation(##)
   0xffde       -> PostGenericAttack()
   0xffdf       -> SetYRotation0()
   0xffe2       -> ResetWait2()
   0xffe5####   -> SaveYSpin(####)
   0xffeb       -> FlipHorizontal()
   0xffec       -> FlipVertical()
   0xffee##     -> MoveUnitFB(##)
   0xffef##     -> MoveUnitDU(##)
   0xfff0##     -> MoveUnitRL(##)
   0xfff2$$##   -> QueueSpriteAnim($$,##)
   0xfffa%%$$## -> MoveUnit(%%,$$,##)
   0xfffc$$##   -> Wait($$,##)
   0xfffd##     -> HoldWeapon(##)
   0xfffe       -> EndAnimation()
   0xffff       -> PauseAnimation()