SEQ & Animation info page

From Final Fantasy Hacktics Wiki
Revision as of 09:55, 8 March 2022 by Talcall (talk | contribs)
Jump to navigation Jump to search

SEQ (Sequence) files contain the information to animate a unit. While SHP files contain the breakdown of each frame, Sequence files describe how they are strung together, plus some additional commands that dictate sound, loading graphics related to the unit, and sliding the unit graphic on the screen, among others.

Section 1

Using Type 1 SEQ as an example:

          AA AA BB BB
00000000: 78 00 FF 00

These first few bytes dictate some specifics regarding unit interactions. In RAM, they are expanded to take up a word of space each.

  • AA - This number describes the animation ID before which there is now expected to be a Target of the animation in question. For type 1 units, this animation is 0x78 (0x79 is the first attacking animation, high mod bare handed.)
  • BB - Currently, I am unsure what exactly this number is for. my best guess is it describes the animation before the unit starts loading swimming (half) graphics.

Section 2

          Animation 1|Animation 2|Animation 3|Animation 4|...
00000004: 00 00 00 00 02 00 00 00 04 00 00 00 06 00 00 00 ...

These are all pointers to animations. The end of this section is marked with a series of 0x10 bytes of Meta Data (0xFF) and a halfword that describes how long the full list of animation commands are. the pointers point to where this Meta data stops.

Section 3

          Anim0|Anim1|Anim2|Anim3|Anim4|Anim5|Animation 6 ...
00000406: 00 00 03 00 02 00 01 00 08 00 07 00 0B 06 0A 08 ...

This section contains the animation commands themselves. it stretches on until the end of the file.


Noteworthy RAM locations

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
0x800a1c84: Location of First loaded section 3 in RAM
0x800bfa30: Location of First loaded section 1 & 2 in RAM

Known SEQ Commands

  • LoadFrameAndWait (Frame, Wait)
		- Frame
			- Loads the frame of animation from SHP Data
			- for weapons, the weapon type will dictate the 0-frame of animation, and count from there with the value.
			- For units, above a certain value, the second half of the spritesheet is loaded from. Above another value, swimming top half sprites, and then swimming bottom half sprites.

		- Wait
			- Waits to execute the next command by the designated number of frames.
  • UnloadMFItem (ffc3)
		- clears Move Find Item graphic trigger

		- Is also used for Chests and Crystals
  • MFItemPos (ffc4, XX, YY)
		- X Pos (XX)
			- Sets front/back (+/-) position of item, relative to unit centre

		- Y Pos (YY)
			- Sets Down/Up (+/-) position of item, relative to feet of unit

		- Is also used for Chests and Crystals
  • LoadMFItem (ffc5)
		- Sets Move Find Item trigger

		- Is also used for Chests and Crystals
  • WaitForInput (ffc6, ##)
		- No. Bytes (##)
			- waits for controller confirmation while looping last ## bytes of animation. Signed.
  • MoveUp2 (ffcb)
		- Moves the unit upwards by 2 units.
  • MoveUp1 (ffcc)
		- Moves the unit upwards by 1 unit.
  • MoveBackward2 (ffcd)
		- Moves the unit backwards by 2 units. 
  • MoveBackward1 (ffce)
		- Moves the unit backwards by 1 unit.
  • MoveDown2 (ffcf)
		- Moves the unit downwards by 2 units.
  • MoveDown1 (ffd0)
		- Moves the unit downwards by 1 unit.
  • MoveForward2 (ffd1)
		- Moves the unit forward by 2 units.
  • MoveForward1 (ffd2)
		- Moves the unit forward by 1 unit.
  • WeaponSheatheCheck1 (ffd3, ##)
		- No. Bytes (##)
			- Loops the last few command bytes until damage numbers fade. Signed.
  • PlayAttackSound (ffd4, SoundID)
		- Sound ID
			- 0x00 calls woosh sound, 0x01 calls hit sound.

		- Use for weapons or effects returns an error and deactivates the animation.
  • IncrementLoop (ffd5)
		- Used by animations that loop. Will increment a loop counter on trigger, and loop the animation indefinitely.
  • WeaponSheatheCheck2 (ffd6, ##)
		- No. Bytes (##)
			- Loops last ## command bytes until damage numbers fade. Signed
  • SetRotation (ffd8, Rotation)
		- Rotation
			- Sets a constant value to weapon/effect graphic rotation.

			- for units, saves the input in misc unit data 0x14. Most values tend to be erroneous, or do nothing.
  • QueueThrowAnimation (ffd9, ####)
		- Queues a hardcoded routine that saves thrown Item ID.
  • ReturnErrorFinishAnim (ffda)
		- returns an error. likely no use.
  • SetSlowdown (ffdb, Wait)
		- Wait
			- Sets constant slow down amount in frames. Does not persist between animations.
  • ReloadAnimation (ffdc)
		- Reloads previously saved information about the last animation (prior to executing OverrideAnimation(ID))
  • OverrideAnimation (ID)
		- ID
			- Saves all information about the current animation to graphic data, and overrides the current animation.
  • PostGenericAttack (ffde)
		- Calculates damage numbers to appear at the end of an animation

		- Saves appropriate dodge/block animations to target, if necessary

		- Allows Sheathe Checks to continue animation.

		- Also sets attack woosh colour based on weapon element, unless ability has a secondary particle effect (Break equipment, Aim, Snipe, or jump)
  • SetYRotation0 (ffdf)
		- Resets graphic rotation to 0.
  • SetFrameOffset (ffe2, Frame)
		- For weapons, sets current frame offset value based on something in SHP data. Does not utilize its input.

		- Frame
			- For units, sets a 0 frame, for animations who's frames may exceed the byte limit imposed by LoadFrameWait()
  • SaveYSpin (ffe5, Spin)
		- Spin (halfword)
			- Saves a value directly to Y spin.
  • FlipVertical (ffeb)
		- Flips the graphic vertically.
  • FlipHorizontal (ffec)
		- Flips the graphic horizontally.


  • MoveUnitFB (ffee, XX)
		- Movement in pixels (XX)
			- Moves the unit forward (+) or backward (-) by XX units, relative to how they're facing.
  • MoveUnitDU (ffef, YY)
		- Movement in pixels (YY)
			- Moves the unit down (+) or up (-) by YY units.
  • MoveUnitRL (fff0, ZZ)
		- Movement in Pixels (ZZ)
			- Moves the unit right (+) or left (-) by ZZ units.
  • QueueSpriteAnim (fff2, Graphic, ID)
		- Graphic
			- Prepares weapon (01) or effect (02) for animation.

		- ID
			- The Animation of the Graphic being called.
  • MoveUnit (fffa, ZZ, YY, XX)
		- Movement in Pixels (ZZ, YY, XX)
			- Moves the unit in any/all 3 perpendicular directions. Right(+)/Left(-) by ZZ, Down(+)/Up(-) by YY, and forward(+)/backward(-) by XX.
  • Wait (fffc, ##, Loops)
		- No. Bytes (##)
			- Loops last ## command bytes.

		- Loops
			- The number of times to repeat those bytes.
  • HoldWeapon (fffd, ##)
		- No. Bytes (##)
			- Has the same looping effect as the Sheathe checks, but without checking if the damage numbers have faded.
  • EndAnimation (fffe)
		- Finishes the animation, deactivating the graphic.
  • PauseAnimation(ffff)
		- Sets wait to 0, without deactivating the graphic, pausing the animation until it's ended by another process.

Unknown SEQ commands

   0xbe -> clears some unused data?
   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.
   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.