Difference between revisions of "SEQ & Animation info page"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
Line 1: Line 1:
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.
+
This is a list of the currently discovered SEQ information and quirks, particularly for woosh effects, weapons, and units. Currently, ability effects are unexplored.
 
+
 
+
0x80094364: Change of animation (Animation - 1 (if away from camera) / 2)
Leading Byte:
+
0x00 + weapon type * 3: Low swing animation
0xff -> triggers alternate instructions:
+
0x01 + weapon type * 3: Same-height swing animation
      0xbe -> clears some unused data. for no reason.
+
0x02 + weapon type * 3: high swing animation
      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.
+
SEQ data layout:
      0xc1 -> no idea. clears some positional/map data, maybe? 4 bytes long.
+
0x00 - Start of attacking graphic frames (load from second half of spritesheet)
      0xc2 -> queues next command immediately. no other known purpose.
+
        0x04 - unsure
      0xc3 -> saves 0 to item display (clears?). 2 bytes long
+
0x08 - Pointers to animations (+ Animation * 4)
      0xc4 -> similarly no idea. saves some data related to items. 4 bytes long.
+
      0xc5 -> saves 1 to item display (item?). 2 bytes long
+
TYPE1 : 0x800afa30
      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.
+
TYPE2 : unsure
      0xc7, 0xc8, 0xc9, 0xe6, 0xe7, 0xe8, 0xea, 0xf1, 0xf8, 0xfb -> 3 bytes long, no known effect.
+
CYOKO : unsure
      0xca, 0xd7, 0xe3, 0xe4, 0xe9, 0xed -> increments r17 by 1. no other known effect.
+
MON  : unsure
      0xcb -> lifts the unit into the air by 2 units. MoveUp2()
+
RUKA  : unsure
      0xcc -> lifts the unit into the air by 1 unit. MoveUp1()
+
ARUTE : unsure
      0xcd -> moves the unit backward of facing by 2 units. MoveBackward2()
+
KANZEN: unsure
      0xce -> moves the unit backward of facing by 1 unit. MoveBackward1()
+
      0xcf -> lowers the unit by 2 units. MoveDown2()
+
TYPE1 animations: 800a1c84
      0xd0 -> lowers the unit by 1 unit. MoveDown1()
+
      0xd1 -> moves the unit forward of facing by 2 units. MoveForward2()
+
SEQ data for weapons/effects layout:
      0xd2 -> moves the unit forward of facing by 1 unit. MoveForward1()
+
0x00 - Weapon frame start
      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(##)
+
0x40 - Animation pointers
      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()
+
WEP1  : unsure
      0xd6 -> queues a check for the animation continuing. repeats last (input) number of bytes if sheathe check value is not 0. WeaponSheatheCheck2(##)
+
WEP2  : unsure
      0xf0, 0xf1, 0xf3, 0xf4, 0xf5 -> increments r17 by 1. no other known effect.
+
EFF1  : unsure
      0xd8 -> saves the value in (input) to weapon rotation byte (misc unit data). SaveRotation(##)
+
  EFF2  : unsure
      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.
+
  [[Weapon Animations]]: 800a69d0
      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()
+
     Known SEQ Commands
      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($$,##)
 
     0x$$##      -> LoadFrameWait($$,##)
 +
    - Loads a particular frame of animation from SHP, and waits to execute the next command by the designated number of frames.
 +
- For units, there are certain frames that will switch loading between the first half and the second half of the spritesheet, and likewise trigger riding/swimming sprites.
 +
- for weapons, the weapon type will dictate the 0-frame of animation, and count from there with the input.
 +
    0xffcb      -> MoveUp2()
 +
- Moves the unit upwards by 2 units.
 +
    0xffcc      -> MoveUp1()
 +
- Moves the unit upwards by 1 unit.
 
     0xffcd      -> MoveBackward2()
 
     0xffcd      -> MoveBackward2()
 +
- Moves the unit backwards by 2 units.
 +
- Many weapon strikes use this to save on space, as opposed to 0xffee##, or 0xfffa%%$$##.
 
     0xffce      -> MoveBackward1()
 
     0xffce      -> MoveBackward1()
 +
- Moves the unit backwards by 1 unit.
 
     0xffcf      -> MoveDown2()
 
     0xffcf      -> MoveDown2()
 +
- Moves the unit downwards by 2 units.
 
     0xffd0      -> MoveDown1()
 
     0xffd0      -> MoveDown1()
 +
- Moves the unit downwards by 1 unit.
 
     0xffd1      -> MoveForward2()
 
     0xffd1      -> MoveForward2()
 +
- Moves the unit forward by 2 units.
 +
- Used in conjunction with 0xffcd
 
     0xffd2      -> MoveForward1()
 
     0xffd2      -> MoveForward1()
 +
- Moves the unit forward by 1 unit.
 
     0xffd3##    -> WeaponSheatheCheck1(##)
 
     0xffd3##    -> WeaponSheatheCheck1(##)
     0xffd4       -> ReturnErrorFinishAnim1()
+
- Used by units, but 'functions' for weapons.
 +
- If used before 0xffde, will loop the last ## command bytes if the target blocks with a shield.
 +
- If used after 0xffde, will loop the last ## command bytes until damage numbers fade.
 +
     0xffd4##    -> PlayAttackSound(##)
 +
- Plays an appropriate attack sound when called.
 +
- 0x00 calls woosh sound, 0x01 calls hit sound.
 +
- Use for weapons or effects returns an error and deactivates the animation.
 
     0xffd5      -> IncrementLoop()
 
     0xffd5      -> IncrementLoop()
 +
- Used by animations that loop. Will increment some debug counter by 1, and loop the animation indefinitely.
 
     0xffd6##    -> WeaponSheatheCheck2(##)
 
     0xffd6##    -> WeaponSheatheCheck2(##)
 +
- Used by weapons.
 +
- Loops last ## command bytes until damage numbers fade.
 
     0xffd8##    -> SaveRotation(##)
 
     0xffd8##    -> SaveRotation(##)
 +
- Sets a constant value to graphic rotation.
 
     0xffd9####  -> QueueThrowAnimation(####)
 
     0xffd9####  -> QueueThrowAnimation(####)
     0xffda      -> ReturnErrorFinishAnim2()
+
- Queues a hardcoded routine that saves thrown Item ID.
 +
     0xffda      -> ReturnErrorFinishAnim()
 +
- returns an error. likely not for use with weapons, effects, or units.
 
     0xffdb      -> ResetWait1()
 
     0xffdb      -> ResetWait1()
 +
- Sets wait to a certain value from SEQ data. probably don't touch this.
 
     0xffdc      -> ReloadAnimation()
 
     0xffdc      -> ReloadAnimation()
 +
- Reloads previously saved information about the last animation (prior to executing 0xffdd##)
 
     0xffdd##    -> OverrideAnimation(##)
 
     0xffdd##    -> OverrideAnimation(##)
 +
- Saves all information about the current animation to graphic data, and overrides the current animation.
 
     0xffde      -> PostGenericAttack()
 
     0xffde      -> PostGenericAttack()
 +
- Queues damage numbers to appear at the end of an animation
 +
- Saves appropriate dodge/block animations to target, if necessary
 +
- Allows 0xffd3## and 0xffd6## to continue animation.
 +
- Also hardcoded to set attack woosh colour based on weapon element, only for specific abilities.
 +
- Unit only
 
     0xffdf      -> SetYRotation0()
 
     0xffdf      -> SetYRotation0()
     0xffe2       -> ResetWait2()
+
- Resets graphic rotation to 0.
 +
     0xffe2##    -> ResetWait2(##)
 +
- For weapons, resets current wait value based on something in SHP data. does not utilize its input.
 +
- For units, sets a layer priority before the animation starts.
 
     0xffe5####  -> SaveYSpin(####)
 
     0xffe5####  -> SaveYSpin(####)
 +
- Saves a value directly to spin.
 
     0xffeb      -> FlipHorizontal()
 
     0xffeb      -> FlipHorizontal()
 +
- Flips the graphic horizontally.
 
     0xffec      -> FlipVertical()
 
     0xffec      -> FlipVertical()
 +
- Flips the graphic vertically.
 
     0xffee##    -> MoveUnitFB(##)
 
     0xffee##    -> MoveUnitFB(##)
 +
- Moves the unit forward or backward by ## units.
 
     0xffef##    -> MoveUnitDU(##)
 
     0xffef##    -> MoveUnitDU(##)
 +
- Moves the unit up or down by ## units.
 
     0xfff0##    -> MoveUnitRL(##)
 
     0xfff0##    -> MoveUnitRL(##)
 +
- Moves the unit right or left by ## units.
 
     0xfff2$$##  -> QueueSpriteAnim($$,##)
 
     0xfff2$$##  -> QueueSpriteAnim($$,##)
 +
- Prepares weapon or effect for animation.
 +
- The graphic to be prepared is the first input, the animation is the second input. Only graphic values of 0x01 or 0x02 are accepted, others return an error.
 
     0xfffa%%$$## -> MoveUnit(%%,$$,##)
 
     0xfffa%%$$## -> MoveUnit(%%,$$,##)
 +
- Moves the unit in any 3 directions by the inputs. Left/right are the first input, up/down are the second, and forward/backward are the third.
 
     0xfffc$$##  -> Wait($$,##)
 
     0xfffc$$##  -> Wait($$,##)
 +
- Repeats last $$ command bytes until ## frames have past.
 
     0xfffd##    -> HoldWeapon(##)
 
     0xfffd##    -> HoldWeapon(##)
 +
- Has the same looping effect as 0xffd3## or 0xffd6##, but without checking if the animation should continue.
 
     0xfffe      -> EndAnimation()
 
     0xfffe      -> EndAnimation()
 +
- Finishes the animation, deactivating the graphic and setting most values to 0.
 
     0xffff      -> PauseAnimation()
 
     0xffff      -> PauseAnimation()
 +
- (Weapons) Sets wait to 0, without deactivating the graphic, pausing the animation until it's ended by another process.
 +
- (Units) Ends the animation, allowing another process to give a new animation unto the unit without deactivating the graphic.
 +
 +
    Unknown SEQ commands
 +
    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, 0xca, 0xe3, 0xe4, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xed, 0xd7, 0xf0, 0xf1, 0xf3, 0xf4, 0xf5, 0xf8, 0xfb -> skips over input value. no other known effect.
 +
    0xda -> unused command, ends animation early by deactivating graphic, potentially just unwritten.
 +
    0xe0, 0xe1 -> likely unwritten commands, or used for another purpose. no-op.
 +
    0xf6 -> currently unsure. does something really technical with button inputs.
 +
    0xf7 -> skips 3 input values. other effects are unknown.
 +
    0xf9 -> does something vectory. seems to slide the unit rapidly to the right of the screen.

Revision as of 01:22, 27 October 2021

This is a list of the currently discovered SEQ information and quirks, particularly for woosh effects, weapons, and units. Currently, ability effects are unexplored.

0x80094364: Change of animation (Animation - 1 (if away from camera) / 2)
	0x00 + weapon type * 3: Low swing animation
	0x01 + weapon type * 3: Same-height swing animation
	0x02 + weapon type * 3: high swing animation

SEQ data layout:
	0x00 - Start of attacking graphic frames (load from second half of spritesheet)
       0x04 - unsure
	0x08 - Pointers to animations (+ Animation * 4)

TYPE1 : 0x800afa30
TYPE2 : unsure
CYOKO : unsure
MON   : unsure
RUKA  : unsure
ARUTE : unsure
KANZEN: unsure

TYPE1 animations: 800a1c84

SEQ data for weapons/effects layout:
	0x00 - Weapon frame start
	0x40 - Animation pointers

WEP1  : unsure
WEP2  : unsure
EFF1  : unsure
EFF2  : unsure

Weapon Animations: 800a69d0

   Known SEQ Commands
   0x$$##       -> LoadFrameWait($$,##)
   			- Loads a particular frame of animation from SHP, and waits to execute the next command by the designated number of frames.
			- For units, there are certain frames that will switch loading between the first half and the second half of the spritesheet, and likewise trigger riding/swimming sprites.
			- for weapons, the weapon type will dictate the 0-frame of animation, and count from there with the input.
   0xffcb       -> MoveUp2()
			- Moves the unit upwards by 2 units.
   0xffcc       -> MoveUp1()
			- Moves the unit upwards by 1 unit.
   0xffcd       -> MoveBackward2()
			- Moves the unit backwards by 2 units. 
			- Many weapon strikes use this to save on space, as opposed to 0xffee##, or 0xfffa%%$$##.
   0xffce       -> MoveBackward1()
			- Moves the unit backwards by 1 unit.
   0xffcf       -> MoveDown2()
			- Moves the unit downwards by 2 units.
   0xffd0       -> MoveDown1()
			- Moves the unit downwards by 1 unit.
   0xffd1       -> MoveForward2()
			- Moves the unit forward by 2 units. 
			- Used in conjunction with 0xffcd
   0xffd2       -> MoveForward1()
			- Moves the unit forward by 1 unit.
   0xffd3##     -> WeaponSheatheCheck1(##)
			- Used by units, but 'functions' for weapons.
			- If used before 0xffde, will loop the last ## command bytes if the target blocks with a shield.
			- If used after 0xffde, will loop the last ## command bytes until damage numbers fade.
   0xffd4##     -> PlayAttackSound(##)
			- Plays an appropriate attack sound when called.
			- 0x00 calls woosh sound, 0x01 calls hit sound.
			- Use for weapons or effects returns an error and deactivates the animation.
   0xffd5       -> IncrementLoop()
			- Used by animations that loop. Will increment some debug counter by 1, and loop the animation indefinitely.
   0xffd6##     -> WeaponSheatheCheck2(##)
			- Used by weapons.
			- Loops last ## command bytes until damage numbers fade.
   0xffd8##     -> SaveRotation(##)
			- Sets a constant value to graphic rotation. 
   0xffd9####   -> QueueThrowAnimation(####)
			- Queues a hardcoded routine that saves thrown Item ID.
   0xffda       -> ReturnErrorFinishAnim()
			- returns an error. likely not for use with weapons, effects, or units.
   0xffdb       -> ResetWait1()
			- Sets wait to a certain value from SEQ data. probably don't touch this.
   0xffdc       -> ReloadAnimation()
			- Reloads previously saved information about the last animation (prior to executing 0xffdd##)
   0xffdd##     -> OverrideAnimation(##)
			- Saves all information about the current animation to graphic data, and overrides the current animation.
   0xffde       -> PostGenericAttack()
			- Queues damage numbers to appear at the end of an animation
			- Saves appropriate dodge/block animations to target, if necessary
			- Allows 0xffd3## and 0xffd6## to continue animation.
			- Also hardcoded to set attack woosh colour based on weapon element, only for specific abilities.
			- Unit only
   0xffdf       -> SetYRotation0()
			- Resets graphic rotation to 0.
   0xffe2##     -> ResetWait2(##)
			- For weapons, resets current wait value based on something in SHP data. does not utilize its input.
			- For units, sets a layer priority before the animation starts.
   0xffe5####   -> SaveYSpin(####)
			- Saves a value directly to spin.
   0xffeb       -> FlipHorizontal()
			- Flips the graphic horizontally.
   0xffec       -> FlipVertical()
			- Flips the graphic vertically.
   0xffee##     -> MoveUnitFB(##)
			- Moves the unit forward or backward by ## units.
   0xffef##     -> MoveUnitDU(##)
			- Moves the unit up or down by ## units.
   0xfff0##     -> MoveUnitRL(##)
			- Moves the unit right or left by ## units.
   0xfff2$$##   -> QueueSpriteAnim($$,##)
			- Prepares weapon or effect for animation.
			- The graphic to be prepared is the first input, the animation is the second input. Only graphic values of 0x01 or 0x02 are accepted, others return an error.
   0xfffa%%$$## -> MoveUnit(%%,$$,##)
			- Moves the unit in any 3 directions by the inputs. Left/right are the first input, up/down are the second, and forward/backward are the third.
   0xfffc$$##   -> Wait($$,##)
			- Repeats last $$ command bytes until ## frames have past.
   0xfffd##     -> HoldWeapon(##)
			- Has the same looping effect as 0xffd3## or 0xffd6##, but without checking if the animation should continue.
   0xfffe       -> EndAnimation()
			- Finishes the animation, deactivating the graphic and setting most values to 0.
   0xffff       -> PauseAnimation()
			- (Weapons) Sets wait to 0, without deactivating the graphic, pausing the animation until it's ended by another process.
			- (Units) Ends the animation, allowing another process to give a new animation unto the unit without deactivating the graphic.

   Unknown SEQ commands
   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, 0xca, 0xe3, 0xe4, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xed, 0xd7, 0xf0, 0xf1, 0xf3, 0xf4, 0xf5, 0xf8, 0xfb -> skips over input value. no other known effect.
   0xda -> unused command, ends animation early by deactivating graphic, potentially just unwritten.
   0xe0, 0xe1 -> likely unwritten commands, or used for another purpose. no-op.
   0xf6 -> currently unsure. does something really technical with button inputs.
   0xf7 -> skips 3 input values. other effects are unknown.
   0xf9 -> does something vectory. seems to slide the unit rapidly to the right of the screen.