Miscellaneous Unit Data

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search

In addition to the Battle Stats, there's a whole section of data used for units that are currently active on the field. While the Battle Stats mostly cover, well, stats, the Misc Unit Data covers quite a lot of the stuff that isn't directly tied to that, such as the size or transparency of sprites.

Since these are not the Battle Stats, the unit order here is not the same as it is with them. Battle Stats store the stats even of ENTD or deployed units that aren't currently present, but the Misc Unit Data fills up in order as units become present. This is why there are only 16 slots here as opposed to the 21 in Battle Stats; there can only ever be a maximum of 16 units present at any one time.

Miscellaneous Unit Data Addresses

  • Misc Unit Data Slot #1 - 0x800B7308
  • Misc Unit Data Slot #2 - 0x800B7748
  • Misc Unit Data Slot #3 - 0x800B7B88
  • Misc Unit Data Slot #4 - 0x800B7FC8
  • Misc Unit Data Slot #5 - 0x800B8408
  • Misc Unit Data Slot #6 - 0x800B8848
  • Misc Unit Data Slot #7 - 0x800B8C88
  • Misc Unit Data Slot #8 - 0x800B90C8
  • Misc Unit Data Slot #9 - 0x800B9508
  • Misc Unit Data Slot #10 - 0x800B9948
  • Misc Unit Data Slot #11 - 0x800B9D88
  • Misc Unit Data Slot #12 - 0x800BA1C8
  • Misc Unit Data Slot #13 - 0x800BA608
  • Misc Unit Data Slot #14 - 0x800BAA48
  • Misc Unit Data Slot #15 - 0x800BAE88
  • Misc Unit Data Slot #16 - 0x800BB2C8

Stats List

0x000 - Pointer to previous unit's misc data (00000000 means this is the first)
0x004 - Unit Misc ID?
0x005 - Spritesheet VRAM slot
0x006 - Spritesheet ID
0x007 - Stored Palette? (Xif)
0x008 - ? (less than 31 skips Unit ID check?) (halfword)
		incremented on ability display

0x00a - set to 1 when using ability

0x00c (half) -Change of animation (set when changing animation) 
	animation = unit animation(see video in important links) + 01
	
0x0e - (half) - VRAM Spritesheet ID?
		0x14 - First Unit Spritesheet
		0x1c - Last Unit Spritesheet
		0x1e - Wep sheet? item.bin?
		0x1f - Frame.bin
		0x3f - Item.bin
0x10 - (half) - VRAM palette ID

0x012 - sprite display bytes
	0x80 - no notable effect
	0x40 - if transparent, the unit is darkened considerably.
	0x20 - if transparent, the unit is lit up considerably.
	0x10 - no notable effect
	0x08 - no notable effect
	0x04 - flip sprite vertically (lol when would you need this)
	0x02 - flip sprite horizontally
	0x01 - transparent sprite

0x018 - X Mod * 4096
0x01c - Height Mod * 4096
0x020 - Y Mod * 4096

0x038 - half, initialized to 0x2000 special movement flags?

-----These values used to create vectors for effects processing
0x040 - X Mod (X * 28 + some value) - X Location on screen
0x042 - Height Mod (negative) - Z Location on screen
0x044 - Y Mod (Y * 28 + some value) - Y Location on Screen
0x050 - X ?(halfword)
0x052 - Height? ?(halfword)
0x054 - Y ?(halfword)

0x060 - X ?(halfword)
0x062 - Height? ?(halfword)
0x064 - Y ?(halfword)
-----

0x070 - Current Facing? (/ 0x400 = facing)
	0xc00 - Facing East
	0x800 - Facing North
	0x400 - Facing West
	0x000 - Facing South
0x072 - Attack Facing? (FFFF = no facing change; this is the facing after attack)
	NOTE: Counter sets 0x72 to 0x70, 0x70 gets changed to facing towards
	attacker, then 0x70 is set back to 0x72 and 0x72 set to FFFF (end)
0x074 - (gets added to depth * 12 before subtracting from height)(halfword)
0x076 - (added to final height value)(halfword)(if riding)

0x7a - chicken/frog/crystal/treasure graphic Y offset
	0x30 - frog
	0x60 - crystal
	Otherwise, 0x00.
0x07c - Unit's X Coordinate initialized to ENTD (current location?)
0x07d - Unit's Y Coordinate
0x07e - Unit's Map Level (0 = Floor 1, 1 = Floor 2)
0x07f - Unit's offset from normal position on tile? (e.g. When moving, how far off the center of the tile the unit is as it moves to the next tile)?
first to be changed
0x080 - Unit's X Coordinate (While moving)
0x081 - Unit's Y Coordinate (While moving)
0x082 - Unit's Map Level + flags (While moving) (with 0x83 byte)
0x083 - Motion Flags
	0x10 - Float
	0x20 - Currently dragoon jumping upward (not set on way down (removed after set))
	
0x084 - Unit's X Coordinate (Previous Location?) (saved location until move confirmed)
0x085 - Unit's Y Coordinate
0x86 - Units map level
0x98 - Number of tiles moved so far in current movement     //cleared when knocked back
       0x9c - Number of tiles in movement?                         //List of tiles to move to?
       0x9d - 0x9d + (Number at 0x9c) - 1:
           0x00 = Move east
           0x40 = Move west
           0x80 = Move south
           0xc0 = Move north
           0x20 flag = Higher Elevation
           0x01 to 0x11 = Number of tiles to jump over
   
       // Not sure about these...
0x9d - Unit's X Coordinate (Current location?)
0x9e - Unit's Y Coordinate
0x9f -  Unit's Map Level 

0x11b - (allows 0x9d flags to get 0x10 to set 0x11e, if != 0)
                only ever saw this variable set to 0, so it may not work
    0x11c - (some flags stored to 0x9621c, stored here from 0x9d list)  // (Current movement value?)
 
    0x11e - 0x18a Unit ID + 1 (not sure what unit though)
    0x11f - Previous 0x11e
0x120 - Position relative to the camera, unsure which one is which direction though. 2 halfwords at 0x120, another at 0x128.
0x12c


0x130 - Mount/Rider Value
                0x00 = N/A
                0x01 = Riding 0x131
                0x02 = Mount for 0x131
0x131 - Mount/Rider ID
0x132 - Previous Mount/Rider Value?
0x133 - Previous Mount/Rider ID?
0x134 - Pointer to Unit's Data
0x138 - Used Ability ID
0x13a - used Item/Weapon ID
0x13b - Equipped weapon type (determines unit animation)

0x13c - set to 0 when ability CT resolves / mimic ability used
0x13d - ENTD flags from Unit data

0x13e - (skips 0x822bc code if != 0)(byte) - modified palette byte
0x13f - (byte)
0x140 - Status Flags 1
	0x80 - Confusion
	0x40 - Sleep
	0x20 - Petrify
	0x10 - Stop
	0x08 - Critical
	0x04 - Dead
	0x02 - (disabled if 0x130 = 1)
	0x01 - 
0x141 - Status Flags 2
	0x80 - Faith
	0x40 - Berserk
	0x20 - Cursed
	0x10 - Haste
	0x08 - Slow
	0x04 - Defending
	0x02 - Charging
	0x01 - Performing
0x142 - Status Flags 3
	0x80 - Oil
	0x40 - Poison
	0x20 - Protect
	0x10 - Shell
	0x08 - Don't Act
	0x04 - Don't Move
	0x02 - Blood Suck
	0x01 - Innocent
0x143 - Status Flags 4
	0x80 - (Originally Reflect?)
	0x40 - Undead
	0x20 - Regen
	0x10 - Reraise
	0x08 - Darkness
	0x04 - Death Sentence
	0x02 - Silence
	0x01 - Charm
0x144 - Status Flags 5 (word)
	0x80 - Poached
	0x40 - Jump
	0x20 - Float
	0x10 - Transparent
	0x08 - Treasure (Enabling only)
	0x04 - Frog
	0x02 - Chicken/Crystal (removal only)
	0x01 - Crystal
0x145 - Status Flags 6
	0x80 -
	0x40 -
	0x20 -
	0x10 -
	0x08 -
	0x04 -
	0x02 -
	0x01 - Morbol virus'd
NOTE: Unused, Invite, Wall and Reflect aren't set
0x148 - Statuses to Add 1
0x14c - Statuses to Add 5
0x150 - Statuses to Remove 1
0x154 - Statuses to Remove 5
0x158 - Word. Used in AI auto battle routines - 
        0x00 : Acting Unit will move - Coordinates are stored at misc 0x15c (X) / 0x15e (Elevation) / 0x160 (Y) 
        0x01 : Acting Unit will act - Action data are stored from misc 0x15c to misc 0x16e (same data than Battle 0x16e data)
        0x02 : End of Turn (or invalid data) 

0x15c - Target ID                         // Destination's X coordinates (halfword)
0x15d - Skillset used ID
0x15e - Ability used ID                   // Destination's Elevation (halfword)

0x160 - Calculator type abiltiy ID        // Destination's Y coordinates (halfword)
0x162 - Calculator Multiplier abiltiy ID
0x164 - used Item ID
0x165 - 
0x166 - reaction ID?
	0x05 - Tile-Specific Ability?
	0x06 - Target-Specific Ability?
0x167 - Target ID? 

0x168 - X target panel coordinate (half)
0x16a - Target map level
0x16c - Y target panel coordinate
0x16e - 0x180 in unit data
0x16f - 0x181 in unit data
0x174 - ability range? (return value from 0x17a8c0
0x17c - some word checked before action phase routines
0x180 - (word) 0xff if target ID = 0xff
	skips movement stuff if 0
0x184 - X Coordinate to move to?
0x186 - (byte)
0x188 - Y Coordinate to move to?
	Current action data?
0x18c - Reaction ID / Attacking unit ID? - Used Ability ID
0x18d - Limit for 0x18e data (Targets Hit Counter)
0x18e - Target list - Ends when 0xff is reached
	0x00 - Target unit ID?
	
	
0x19e/0x12 - set to 1 when animate on miss is not true, cleared when units are hit
0x19f/0x13 - control value
	0x01 - math skill 
0x1a0/0x14 - last attack used ID (half)
0x1a2/0x16 - ability formula? can poach?
0x1a3/0x17 - ?? control value? set to 1 if reaction occurred
0x1a4/0x18 - Continue attack byte?
	0x01 - continue
	0x00 - end
0x1a5/0x19 - Current Hit number
0x1a6/0x1a - reaction ID?
0x1a7/0x1b -
0x1a8/0x1c - target new X coordinate
0x1a9/0x1d - Target new Y coordinate(for post action knockback?)
0x1aa/0x1e - target map level
0x1ab/0x1f - used weapon ID
0x1ac/0x20 -
0x1ad/0x21 -
0x1ae/0x22 - can poach flag?
0x1af - can earn experience	
0x1b0 - Earned Experience (For Display?)
0x1b1 - Earned JP
0x1b2 - Level (For Level UP! event?)
0x1b3 - Job Level (stored if level changed)
0x1b4 - ? (byte)
0x1b5 - 

0x1b7 - Inflicted/Removed Status Counter (max of 0x1b)
0x1b8 - Display Flags 1
	0x80 - CT Bonus
	0x40 - CT Damage
	0x20 - SP Bonus
	0x10 - SP Damage
	0x08 - MP Healing
	0x04 - MP Damage
	0x02 - HP Healing
	0x01 - HP Damage
0x1b9 - Display Flags 2
	0x80 - MA Bonus
	0x40 - MA Damage
	0x20 - PA Bonus
	0x10 - PA Damage
	0x08 - Faith Bonus
	0x04 - Faith Damage
	0x02 - Brave Bonus
	0x01 - Brave Damage
0x1ba - Display Flags 3
	0x80 - "Guarded"
	0x40 - "Missed!"
	0x20 - "CT0"
	0x10 - "Quick"
	0x08 - "Broken"
	0x04 - "Stolen"
	0x02 - +"1Lv."
	0x01 - -"1Lv."
0x1bb - Display Flags 4
	0x20 - "No MP"
	0x10 - "Silenced"
	0x08 - "No Target"
	0x04 - Gained JP
	0x02 - Gained Exp
	0x01 - "Caught"
	

	
0x1bc - End of Inflicted/Removed Status ID List (0x1b long, counts backwards)
	0x80 - Removal Flag
0x01d8 - Unit Sprite Data
	0x1d8 - Graphic trigger
	0x1da - 
	0x1dc - Current animation (halfword)
	0x1de - frame command byte counter (unit)
	0x1e0 - Frame
	0x1e2 - Wait time (in frames)
	0x1e4 - Loop counter
	0x1e6 - Unit animation
	0x1ea - Slow down amount
	0x1ec - Frame offset (jarring)
	0x1ee - Wait command: frames left to wait
	0x1f0 - rotation bytes
		0x01 - transparent
		0x02 - Flip horizontally
		0x04 - flip vertically
		
	0x1f4 - SHP Data Pointer
	0x1f8 - SEQ Data Pointer
	0x1fc - SHP Data Pointer
	0x200 - SEQ Data Pointer
	0x204 - Sprite Display Section Pointer in Misc Data
	
0x208 - WEP Sprite Data? (0x362) (seems to be 'current' weapon animation data.)
	0x208 - Graphic trigger (1 is on screen, 0 is not on screen)
	0x20a - Graphic type (1 = Weapon, 2 = Effect) (Halfword)
	0x20c - Weapon Animation (Halfword)
	0x20e - frame command byte counter (weapon) (Halfword)
	0x210 - Frame (Halfword)
	0x212 - amount of frames to stay unmoving
	0x214 - loop counter
	0x216 - Weapon animation (saved)
	0x21a - Frame Delay (halfword)
	0x21c - Another Frame offset? math works out in favour of making 1 here look like a low strike.
	0x21e - Frame offset
	
	0x220 - Rotation bytes
 	0x01 - transparent
		0x02 - Flip horizontally
		0x04 - flip vertically
	0x224 - SHP Data pointer (Word)
	0x228 - SEQ Data pointer (Word)
	0x22c - ? Display data pointer (with the 3 bytes of info and 1 byte of padding. Word)
0x238 - EFF Sprite Data? (0x3e6)
	0x238 - graphic trigger?
	0x23a - graphic type? (1 = weapon, 2 = effect) (halfword)
	0x23d - effect animation (halfword)
	0x23e - frame command byte counter (effect) (Halfword)
	0x240 - Frame? (Halfword)=
	0x242 - Frame + Frame delay + frame command byte (halfword)
	0x244 - 
	0x246 - Effect animation?
	0x24a - Frame delay (basically always 0) (halfword)
	0x24c - Effect rotation? (halfword)
	0x24e - Wait command: Frames left to wait

	0x220 - Rotation bytes
 		0x01 - transparent
		0x02 - Flip horizontally
		0x04 - flip vertically
	
	0x254 - SHP Data pointer?
	0x258 - SEQ Data pointer?
	0x25c - ? Display data pointer(?)
0x268 - Numerical Display Data? (0x3aa)
0x298 - Shadow (0x3ce)
0x2a0 - When Unit is stationary, 24 + Y * 28 (half word)
0x2a4 - When Unit is stationary, 24 + X * 28 (half word)
0x2bc - Activation flag for Numerical Display/Status text
~	0x2be - Display Type
	0x0200 - (uses 0x18e list?)
	0x0100 - "No MP"
	0x00f0 - "Silenced"
	0x00e0 - "No Target"
	0x00d0 - "CT0"
	0x00c0 - "Quick"
	0x00b0 - "Broken"
	0x00a0 - "Stolen"
	0x0090 - +"1Lv."
	0x0080 - -"1Lv."
	0x0070 - Status Removal
	0x0060 - Status Infliction
	0x0050 - Gained JP
	0x0040 - Gained Exp
	0x0030 - "Caught"
	0x0020 - "Guarded"
	0x0010 - "Missed!"
	0x000f - MA Bonus
	0x000e - MA Damage
	0x000d - PA Bonus
	0x000c - PA Damage
	0x000b - Faith Bonus
	0x000a - Faith Damage
	0x0009 - Brave Bonus
	0x0008 - Brave Damage
	0x0007 - CT Bonus
	0x0006 - CT Damage
	0x0005 - SP Bonus
	0x0004 - SP Damage
	0x0003 - MP Healing
	0x0002 - MP Damage
	0x0001 - HP Healing
	0x0000 - HP Damage
`
0x2c0 - Number to Display (JP/EXP/HP/MP/CT/SP/PA/MA/Br/Fa)
	NOTE: the way they go about doing it is messy; you could get the same
	result by dividing by 10 each pass through a loop (with the limit = # of
	digits to display), storing the remainder as the digit, and sending the
	remaining value through the next pass.
0x2c2 - Display Type (set to 0 if 0x2bc = 0, capped at 0x15; gets 0x45980 added to it)
	(some frame/animation thing? used for loading 0x67bac data)
0x2c4 - Numerical Display Pointer 1
0x2c8 - Numerical Display Pointer 2
0x2cc - Numerical Display Pointer 3

0x2d0 - something with display for item abilities?
0x2d8 - Item/Equip Display Pointer
0x2dc - Activation byte for Status Bubble
0x2dd - Which status bubble to show
0x2de - X location of status bubble
0x2df - Y location of status bubble
0x2e0 - Timer (word)
0x2e4 - ? Pointer to 0x410 data - Status Bubble

0x2e8 - Unused Section
*Display*
0x31c - Sprite Display Section (8 graphical sections) (0x46 each) - Main Sprite
	0x00 - Red Shading
	0x01 - Green Shading
	0x02 - Blue Shading
	0x03 - number of graphics to be loaded (max = 7 (7 + 1 graphics))
	0x04 - VRAM Spritesheet ID
		0x00 - screen
		0x01 - screen
		0x02 - screen
		0x03 - screen
		0x04 - active unit SP2 & EVTCHR1
		0x05 - Formation screen (leftover from attack.out), target unit SP2 & EVTCHR2
		0x06 - Last loaded Menus
		0x07 - unit billboard
		0x08 - EFF & TRAP
		0x09 - WEP
		0x0a - ZODIAC.BIN
		0x0b - frog/chicken/crystals + some parts of zodiac.bin
		0x0c - none (not none?)
		0x0d - map textures
		0x0e - map textures
		0x0f - map textures
		0x10 - 0x13 - bottom screen + vram palettes.
		0x14 - First Unit Spritesheet
		0x1c - Global Portrait list?
		0x1d - in battle portraits + random spritesheet stuff
		0x1e - item.bin
		0x1f - Frame.bin
		0x80 - erroneous flags, ignored when parsing to GPU. may mark some debug information, but not necessarily.
		0x40 - 
		0x20 - 
		
	0x06 - VRAM Palette ID
	0x08 - X Size (stretches sprite to this size)
	0x0a - Y Size (stretches sprite to this size)
	0x0c - upper bit, Spin on Y axis (direction sprite is facing)
	0x0d - lower bit, Spin on Y axis (direction sprite is facing)

	Sprite data (duplicate occurances per graphic loaded for this sprite)
	0x0e - X Shift on screen
	0x0f - Y Shift on screen
	0x10 - Image Width
	0x11 - Image Height
	0x12 - X Load Location from spritesheet
	0x13 - Y Load Location
	0x14 - x/y reverse and VRAM flags
		0x80 - only hard-set flag? if error computing size of graphic
		0x40 - related to which SPR is loaded? set based on frame ID being loaded
		0x20 - related to which SPR is loaded? set based on frame ID being loaded
		0x10 - 
		0x08 - 
		0x04 - vertical flip
		0x02 - horizontal flip
		0x01 - transparent
0x362 - WEP1 Display Data
	0x362 + 0x00 - Red shading
		0x01 - Green shading
		0x02 - Blue shading
		0x03 - how many graphics to load
		0x04 - VRAM Spritesheet ID and some other nonsense (halfword)
		0x06 - VRAM Palette ID and some other nonsense (Halfword)
		0x08 - image stretch (horizontal, halfword but only the lower byte is considered)
		0x0a - image stretch (vertical, and ditto)
		0x0c - spin on Y axis? (halfword)
		0x0e - X shift
		0x0f - Y shift
		
		Graphic data (duplicated per weapon graphic loaded)
		0x10 - Image Width
		0x11 - Image Height
		0x12 - X Load location (In pixels)
		0x13 - Y Load location (In Pixels)
		0x14 - VRAM flags?
			0x1 - 
			0x2 - 
			0x4 - 
			0x8 - 

0x386 - EFF Display data
	0x362 + 0x00 - Red shading
		0x01 - Green shading
		0x02 - Blue shading
		0x03 - how many graphics to load
		0x04 - VRAM Spritesheet ID and some other nonsense (halfword)
		0x06 - VRAM Palette ID and some other nonsense (Halfword)
		0x08 - image stretch (horizontal, halfword but only the lower byte is considered)
		0x0a - image stretch (vertical, and ditto)
		0x0c - spin on Y axis? (halfword)
		0x0e - X shift
		0x0f - Y shift
 
		Graphic data (duplicated per effect graphic loaded)
		0x10 - Image Width
		0x11 - Image Height
		0x12 - X Load location (In pixels)
		0x13 - Y Load location (In Pixels)
		0x14 - VRAM flags
			0x1 - 
			0x2 - 
			0x4 - 
			0x8 - 

0x3aa - ? Display (3 Sprite Data Sections, plus 1 byte padding?)


0x3ce - Numerical Display Section 1 (these have 1 Sprite Data section) (0x16 bytes each) 
	0x00 - Red
	0x01 - Green
	0x02 - Blue
	0x03 - Image type
	0x04 - VRam Spritesheet ID
	0x05 - 
	0x06 - half - initialized to 0x10 in misc data + 0x0100
	0x08 - X stretch (half)
	0x0a - Y stretch (half)
	
	0x14 - initialized to 0 (VRAM flags?)
	
0x3e4 - Numerical Display Section 2
	0x00 - X Shift
	0x01 - Y Shift
	0x02 - Image Width
	0x03 - Image Height
	0x04 - X Load Location
	0x05 - Y Load Loaction (2 bytes?)
0x3fa - Numerical Display Section 3
	0x00 - X Shift
	0x01 - Y Shift
	0x02 - Image Width
	0x03 - Image Height
	0x04 - X Load Location
	0x05 - Y Load Loaction (2 bytes?)
	
0x410 - Status Text/Bubbles Display Section (1 Sprite Data Section)
	0x00 - Red Shading
	0x01 - Green Shading
	0x02 - Blue Shading
~		0x03 - Sprite Type?
		0x00 - None
		0x01 - Text?
		0x02 - Monster? (Panther)
		0x03 - Type 1? (Units and Goblin)
`			0x04 - ? (one frame in chanting/riding chocobo)
		0x06 - Chocobo?
~		0x04 - VRAM Spritesheet ID
		0x00 - Map
		0x01 - Map?
		0x02 - Map?
		0x03 - Map? (had height) (upper right screen
		0x04 - active unit SPR2? EVTCHR1?
		0x05 - Formation screen (active unit SPR3 +? EVTCHR2?)
		0x06 - Last loaded Menus
		0x07 - unit billboard
		0x08 - Wep2, Wep3
		0x09 - Wep1
		0x0a - some background
		0x0b - frog/chicken/crystals
		0x0c - none
		0x0d - some checkerboard with fonts?
		0x0e - checkerboard with fronts + random stuff
		0x0f - more checkerboard + random
		0x10 - 0x13 - maps again
		0x14 - First Unit Spritesheet
		0x1c - Global Portrait list?
		0x1d - in battle portraits + random spritesheet stuff
		0x1e - Wep sheet? item.bin?
		0x1f - Frame.bin
		0x3f - Item.bin
		0x80 - some flag
		0x40 - ??
`			0x20 - some flag, does nothing?
		
	0x06 - VRAM Palette ID
	0x08 - X Size (stretches sprite to this size)
	0x0a - Y Size (stretches sprite to this size)
	0x0c - Spin on Y axis (direction sprite is facing)
	0x0d - 
		
	*Sprite Data (7 bytes each)*
	0x0e - X Shift on screen
	0x0f - Y Shift on screen
	0x10 - Image Width
	0x11 - Image Height
	0x12 - X Load Location from spritesheet
	0x13 - Y Load Loaction (2 bytes?)
	0x14 - VRAM flags?
0x426 - Item/Equip Display Section (1 Sprite Data Section)

0x43c - initialization byte