Effect Data

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search

Miscellaneous effect data

80096110 - cleared in ability effect routines
80098dbc - some effect address
80098d70 - points to available scratchpad address Calculate_Available_RAM_Address; for effect data?
800bdd24 - some effect coordinate address?

Active effect data

801b48d0 - table of effect file start locations
	
801b53e8 - start of data (8 bytes each, by effect ID)
801b63e8 - Effect running state 
   0 = Not running
   1 = Started
   (2 and 3 are intermediate steps between Started and Playing)    // set to 0x03 after getting palette data
   4 = Playing
   
801b63f0 - Ability Effect (2 bytes each, 0x1c6 total)
801b677c - Event & non-ability Effects (2 bytes each, 0x25 total)
801b84ac - table for secondary effect anims per 1st ability animation byte
801b8544 - 

801b8874 - a gravity value? (0x53a)
801b8878 - "Gravity" Mod (0xa8000, constant? loaded with map?) (word)
           28 (X/Y Mod mult) * 12 (tile height mult) * 2048 = 0xa8000
           not really sure what it is exactly yet
801b8ba4 - Start of some data (0x54 bytes each, by effect ID)
	0x00 - set to 0x03 when used?
801b8b60 - Acting Unit's ID (Word)
801b8b64 - Target's ID (Word)
801b8b68 - Attack's Current X (for checking targets)
801b8b6a - Attack's Current Map Level
801b8b6c - Attack's Current Y
801b8b70 - ArcTan Angle Mod (may be for other angle mods too)
801b8b74 - ??? Related to trajectory (see stored in arc weapon trajectory validation)
801b8b7c - Attack's X Mod Difference (Current X Mod - Previous X Mod)
801b8b80 - Attack's Z Mod Difference ()
801b8b84 - Attack's Y Mod Difference
801b8b88 - ??? Stored (not seen set) in arc weapon trajectory routine
801b8b8c - Attack's Current X Mod
801b8b8e - Attack's Current Z Mod
801b8b90 - Attack's Current Y Mod
801b8b94 - Target Tile's 0x06 byte's 0x10-0x40 flags stored as 0x01 0x02 0x04(on hitting a tile) 
 
801b8b9c - (byte, start/part of chunk with 84 byte long sections?)
                (replaces 0x1b9134)
                (replaced by 0x1b9130)
801b8bc0 - used weapon ID? (Word)


801b8ba4 - set to 1 after storing data
801b9144 - Effect instruct. 0x6: pointer to arg. 2's file by ID? could have up to 0xe pointers
801b925c - Acting Unit's X/Y/Z Mods Pointer
        0x00/0x5c - X Mod
        0x02/0x5e - Z Mod (-Height)
        0x04/0x60 - Y Mod
 
801b9264 - Target's X/Y/Z Mods Pointer
        0x00/0x64 - X Mod
        0x02/0x66 - Z Mod (-Height)
        0x04/0x68 - Y Mod
801bbf3c - 3D Step Counter / 4 (number of passes needed for 3D attack?)
           (can also store 3D Distance / 512)
 
		
801bbf64 - check for different abilities
801c24c8 - 
801c24d0 - loaded ability effect (half)
801b48d0 - Per effect ID, start of effect data; will be different from 0x801c2500 if the file has any assembly/extraneous data to accompany it
801b53e8 - List of data by Effect ID (0x08 bytes each, goes to 801b63e8)
	0x04 - LBA value (word) [Blank effects get routed to E0511, 71150
	0x08 - Byte length rounded up to the nearest multiple of 0x800


801b63e8 - Effect running state 
   0 = Not running
   1 = Started
   (2 and 3 are intermediate steps between Started and Playing)    // set to 0x03 after getting palette data
   4 = Playing
801b67c8 - list of effect code instruction return addresses
			001b67c8: 801a2238     0x00
			001b67cc: 801a225c     0x01
			001b67d0: 801a2280     0x02
			001b67d4: 801a22f8     0x03
			001b67d8: 801a236c     0x04
			001b67dc: 801a2374     0x05
			001b67e0: 801a23a8     0x06
			001b67e4: 801a2414     0x07
			001b67e8: 801a2488     0x08
			001b67ec: 801a2524     0x09
			001b67f0: 801a2560     0x0a
			001b67f4: 801a259c     0x0b
			001b67f8: 801a262c     0x0c
			001b67fc: 801a2668     0x0d
			001b6800: 801a26a4     0x0e
			001b6804: 801a2734     0x0f
			001b6808: 801a2770     0x10
			001b680c: 801a27b0     0x11
			001b6810: 801a2810     0x12
			001b6814: 801a2870     0x13
			001b6818: 801a28d4     0x14
			001b681c: 801a2938     0x15
			001b6820: 801a2998     0x16
			001b6824: 801a29e0     0x17
			001b6828: 801a2a2c     0x18
			001b682c: 801a2a7c     0x19
			001b6830: 801a2b18     0x1a
			001b6834: 801a2b70     0x1b
			001b6838: 801a2bc8     0x1c
			001b683c: 801a2c28     0x1d
			001b6840: 801a2c7c     0x1e
			001b6844: 801a2cfc     0x1f
			001b6848: 801a2d48     0x20
			001b684c: 801a2d94     0x21
			001b6850: 801a2de0     0x22
			001b6854: 801a2e2c     0x23
			001b6858: 801a2e78     0x24
			001b685c: 801a2eb4     0x25
			001b6860: 801a30ec     0x26
			001b6864: 801a3148     0x27
			001b6868: 801a3408     0x28
			001b686c: 801a4838     0x29
			001b6870: 801a4c44     0x2a
			001b6874: 801a4c84     0x2b
			001b6878: 801a4cc0     0x2c
			001b687c: 801a4cd8     0x2d
			001b6880 - 001b69a4: 801a2214    0x2e - 0x??


801b69a8 - effect palette address
801b69cc - check this half! used in enormous determination routine
801b84dc - Table of Extra particle effect flags?
			  AA BB CC DD
	0x00 Nothing	: 00 00 00 00
	0x01 Bow Arrow	: 08 00 00 01
	0x02 Spell chrg : 00 00 00 04
	0x03 X-bow Bolt	: 08 00 00 14 
	0x04 Spell chrg : 00 01 00 04 
	0x05 Smn Chrg	: 00 00 00 16 
	0x06 Throw Stone: 08 01 00 14 
	0x07 Glowing Tar: 00 00 00 02 
	0x08 Glowing Tar: 00 00 00 02 
	0x09 Falling far: 00 00 00 08 
	0x0a Reflect	: 0c 02 00 12 
	0x0b Zodiac Poof: 00 00 00 11 
	0x0c Death Poof	: 00 00 00 0f
	0x0d Level Up	: 00 00 00 0d
	0x0e Venom trap	: 00 00 00 0c
	0x0f Splash	: 00 00 00 09
	0x10 Throw Item	: ff ff 00 14
	0x11 red orbs	: 00 00 00 06
	0x12 equip Break: 00 00 00 15
	0x13 teleport	: 00 00 00 13
	0x14 Golem	: 00 00 00 03
	0x15 Erroneous? : 00 00 00 05
it's remarkable this isn't all hard coded, there's actually some wriggle room here if you know what you're doing.
AA - no idea, seems to have very little effect. it's only set on empty set particles, and reflect, which is never read from.
BB - for animation types 0x1 and 0x14, this is the model used for the projectile of the attack. ff is simply no model, or the item.bin graphic for the used weapon.
	Model data can be found Secondary Effect 0x1b69dc Table here, 0x801b69dc is the model data of an arrow, 0x801b6d00 for a stone, 0x801b6f00 for the reflect barrier.
Not sure yet what spell charge is doing with a BB, but it is the only other instance of this being a non-0 value, and also the only other routine that reads the value.
CC - zero
DD - the actual function of the particles. 
801b8900 - call addresses per secondary animation effect type Effect Related (0x1b47e0)
	0x00 Nothing	: 801b0fec
	0x01 Arrow Arc	: 801b0ffc
	0x02 Glowing Tar: 801b153c
	0x03 Golem	: 801b1aec
	0x04 Spell chrg : 801b1c04
	0x05 Unsure	: 801b27dc
	0x06 Red Orbs   : 801b284c
	0x07 Not Called : 801b2968
	0x08 Falling Tar: 801b2970
	0x09 Splash     : 801b2a88
	0x0a Not Called : 801b2bfc
	0x0b Not Called : 801b2c04
	0x0c Venom Trap : 801b2c0c
	0x0d Level Up	: 801b2d28
	0x0e Not Called : 801b2e60
	0x0f Death Poof	: 801b2e68
	0x10 Not Called : 801b3118
	0x11 Zodiac Poof: 801b3120
	0x12 Reflect    : 801b33d4
	0x13 teleport	: 801b3820
	0x14 Lin. Proj. : 801b3938
	0x15 Equip Break: 801b40f8
	0x16 Smn chrg   : 801b4234
	
801b895c
801b8a40 - first 0x10 bytes of first section of main motion data stored here
	0x00
	0x04
	0x08
	0x0c
801b8b9c - current effect target data (not in MISC/battle ID unit order; entries in order of unit being animated.) 0x54 bytes long per unit (up to 0x10 entries)
	0x00 - previous effect target ID
	0x01 - current effect target ID
	0x02 - next effect target ID
	0x03 - secondary effect's function byte
	0x04 - Additional animation effects? 
		0x00 - nothing
		0x01 - nothing
		0x02 - spell charging spots and lines (if called incorrectly, will loop indefinitely)
		0x03 - nothing
		0x04 - spell charging spots and lines (ditto)
		0x05 - Summon charge (if called incorrectly, will loop indefinitely)
		0x06 - nothing
		0x07 - an additional strike glow on target?
		0x08 - an additional strike glow on target?
		0x09 - landing from a height in sand
		0x0a - reflect spiiiIIIiiIIiin
		0x0b - green zodiac stone poof?
		0x0c - death poof
		0x0d - level up sparkles? job level up sparkles?
		0x0e - triggering a venom trap
		0x0f - landing in water
		0x10 - nothing
		0x11 - red focus orbs
		0x12 - break equipment shatter particles
		0x13 - teleport send-recieve
		0x14 - golem block 
	0x06 - ability element, presented in awful format (none, fire, water, earth, wind, holy, dark, Ice, Lightning) and also its just a value, not bitflags. edits target palette?
	0x08 - if prepared correctly, 0x01?
	0x10 - Contains unit misc ID (and a bunch of unrelated stack.)
	0x1a - X coordinate of target
	0x1e - map level & Y coordinate of target
		- if effect target ID 0x00 (null); stores centre tile of ability aoe instead?
	0x24 - used weapon ID
	0x28 - hit counter
	0x50 - pointer to effect data in RAM (after loaded in)
	
801b9130 - previous effect target ID
801b9134 - current effect target ID
801b9138 - Next effect target ID
801bacc8 - start of on hit effect header
801baccc - GTE data
	0x14 - X vector
	0x18 - Y vector
	0x1c - Z vector
801bad0c - effect coordinate data stored here
	0x00 - Hit Counter
	0x02 - Counter of found targets
	0x04 - animate on miss flag (01 if animate on miss
	0x06 - Target ID / X coordinate for animate on miss
	0x07 - Type of attack
			0x00 - normal hit
			0x01 - critical hit
			0x02 - reflected
			0x03 - evaded
	0x08 - map level of animate on miss
	0x0a - Y coordinate
	0x0c - some address (word) 0x800bdd24
	0x0e - 00?
	0x10 - next units Data
	0x12 - next target ID
	
	0x34 - acting unit data address
	0x38 - acting unit ID? byte
	0x40 - some address (8017ac40)
	0x48 - some address (80026cec) something for GPU?
	
	0x54 - pointer to start of misc data
	
	0x74 - unit ID
	0x78 - 801938ef - post action byte address
	0x7c - units misc data pointer
	
801badca - X/Y Coordinate for effect?
801badcc - map level
801badce - X/Y?
	
801bade0


-4088
801bbf78 - start of frame data address
-4084
801bbf7c - 0x10 in effect data (coordinates?)
801bbf80 - effect palette address
801bbf84 - start of misc timed display? (effect misc. timing data + 0x8)
801bbf8c - parameter sets address (+ 0x04?)
801bbf90 - Is effect playing? 0 = false, 1 = true
           // used in effect control routine
801bc094 - Ptr. to effect's code scripts (relative to start of effect data.)
801bc0c8 - misc effect data address
801bc0cc - (while processing models/effects) pointer to polygons by depth table


0x1bc0d4 - set to 0 after storing data to 0x801bad0c
0x1bc0dc - 0x0a in sound effect data (word)
801bf000 - 2nd byte in header / 16 (shifted 0x04 right) 1 space to the right
801bf02c - Temp effect data table (0xf8 per phase?)
	0x00 - Is effect playing(?)
	0x06 - header counter
	0x08 - Ptr. to effect code scripts
       0x12 - caster-target angle
	0x1c - 
	0x1e - 0x1, skip some step. 
       0x20 - pointer to effect construction data
	0x28 - timer
	0x2c - when not 0, execute custom code in 0xd4?
	0xd4 - ptr. to extra code for effect to execute
801bf21c - start of some data (temp effect data?)
0x00 - 
801bf242 - skip effect routine if = 2?
0x1e - some counter (decremented)
801c00c8 - Copied/edited of effect parameter data in RAM. 0x24 bytes per parameter?
	0x06 - Function flags for effect
		0x01 - set when loading new frame. 0 otherwise.
		0x02 - set on initialisation; Don't multiply motion vector by some matrix (describes camera rotation?)
		0x04 - set on initialisation; Don't multiply rotation matrix by camera zoom. the other flags don't seem to be checked?
	0x08 - special function half (for 0x83 function, 2nd byte is added)
		// tbh don't think it's that. this is any extra XX XX offset appended to the parameter.
	0x0a - 0x03 and 0x04 of starting 5 bytes (half)(for 0x83 function, 3rd byte is added)
		// again, I don't think it's that. YY YY offset.
	0x0c - screen XX XX of current frame? maybe XX velocity?
	0x0e - screen YY YY of current frame? maybe YY velocity?
	0x10 - screen ZZ ZZ of current frame? maybe ZZ velocity?
	0x12 - angle between attacker and target
	0x14 - current 3rd byte?
	0x16 - Duration to hold frame
	0x18 - pointer to current Parameter data in file
	0x1c - parameter counter
	0x1e - next frame byte? VRAM flag check?
	0x1f - current frame
	0x20 - pointer to temp effect SHP or palette data?
	
801c24d0 - Effect ID (During effect animation, or last played effect); sometimes set to 0x0c when no effect is playing     //Current ability Effect
801c24da - ? Changes during effect