Difference between revisions of "Equipment Stat Setting"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
Line 25: Line 25:
 
  0005c3f4: 00021840 sll r3,r2,0x01 ID * 2
 
  0005c3f4: 00021840 sll r3,r2,0x01 ID * 2
 
  0005c3f8: 00621821 addu r3,r3,r2 ID * 3
 
  0005c3f8: 00621821 addu r3,r3,r2 ID * 3
  0005c3fc: 00031880 sll r3,r3,0x02 ID * 12
+
  0005c3fc: 00031880 sll r3,r3,0x02 ID * 12  
  0005c400: 3c018006 lui r1,0x8006
+
  0005c400: 3c018006 lui r1,0x8006            
 
  0005c404: 00230821 addu r1,r1,r3
 
  0005c404: 00230821 addu r1,r1,r3
  0005c408: 90222ebb lbu r2,0x2ebb(r1) Load Accessory's Item Type
+
  0005c408: 90222ebb lbu r2,0x2ebb(r1) Load Accessory's Item Type (*see notes)
 
  0005c40c: 3c048006 lui r4,0x8006
 
  0005c40c: 3c048006 lui r4,0x8006
 
  0005c410: 24842eb8 addiu r4,r4,0x2eb8 r4 = Item Data Pointer
 
  0005c410: 24842eb8 addiu r4,r4,0x2eb8 r4 = Item Data Pointer
Line 146: Line 146:
 
  0005ab0c: [[Equipment/Move/Jump +X/Name Storing/Generation]]
 
  0005ab0c: [[Equipment/Move/Jump +X/Name Storing/Generation]]
 
  0005d704: [[Status Setting/Checking + Equip/R/S/M Stats]]
 
  0005d704: [[Status Setting/Checking + Equip/R/S/M Stats]]
 +
 +
 +
== Notes ==
 +
Notes : [[Data/Table_Locations#Item|The Item Data/Table]] start at 80062eb8 Each items are 12 bytes long So loading 0x8006YYYY (YYYY = Item ID * 12) + 2ebb = Loading offset 0x03 (2ebb - 2eb8) of this item

Revision as of 20:36, 7 February 2021

Equipment Stat Setting
0005c398: 27bdffe8 addiu r29,r29,0xffe8
0005c39c: afb00010 sw r16,0x0010(r29)
0005c3a0: 00808021 addu r16,r4,r0		r16 = Unit's Data Pointer
0005c3a4: 2604003c addiu r4,r16,0x003c		r4 = Unit's Data Pointer (WP 1)
0005c3a8: afbf0014 sw r31,0x0014(r29)
0005c3ac: 0c017991 jal 0x 0005e644		Data Nullifying (Equipment Stats)
0005c3b0: 3405000b ori r5,r0,0x000b		r5 = b (Equipment Stats)
0005c3b4: 92030003 lbu r3,0x0003(r16)		Load Unit's Job ID
0005c3b8: 00000000 nop
0005c3bc: 00031040 sll r2,r3,0x01		Job ID * 2
0005c3c0: 00431021 addu r2,r2,r3		Job ID * 3
0005c3c4: 3c038006 lui r3,0x8006
0005c3c8: 8c636194 lw r3,0x6194(r3)		Load Job Data Pointer
0005c3cc: 00021100 sll r2,r2,0x04		Job ID * 48
0005c3d0: 00431021 addu r2,r2,r3		Job Data Pointer * ID + 48
0005c3d4: 90430019 lbu r3,0x0019(r2)		Load Job's C-EV
0005c3d8: 92020006 lbu r2,0x0006(r16)		Load Unit's Gender Byte
0005c3dc: 00000000 nop
0005c3e0: 30420020 andi r2,r2,0x0020
0005c3e4: 14400073 bne r2,r0,0x 0005c5b4	Branch if Unit is a Monster
0005c3e8: a2030043 sb r3,0x0043(r16)		Store Job's C-EV into Unit's
0005c3ec: 9202001c lbu r2,0x001c(r16)		Load Unit's Accessory ID
0005c3f0: 00000000 nop
0005c3f4: 00021840 sll r3,r2,0x01		ID * 2
0005c3f8: 00621821 addu r3,r3,r2		ID * 3
0005c3fc: 00031880 sll r3,r3,0x02		ID * 12   
0005c400: 3c018006 lui r1,0x8006             
0005c404: 00230821 addu r1,r1,r3
0005c408: 90222ebb lbu r2,0x2ebb(r1)		Load Accessory's Item Type (*see notes)
0005c40c: 3c048006 lui r4,0x8006
0005c410: 24842eb8 addiu r4,r4,0x2eb8		r4 = Item Data Pointer
0005c414: 30420008 andi r2,r2,0x0008
0005c418: 1040000e beq r2,r0,0x 0005c454		Branch if Accessory isn't an Accessory
0005c41c: 00000000 nop
0005c420: 3c018006 lui r1,0x8006
0005c424: 00230821 addu r1,r1,r3
0005c428: 90222ebc lbu r2,0x2ebc(r1)		Load Accessory's Second Table ID
0005c42c: 3c038006 lui r3,0x8006
0005c430: 24633f58 addiu r3,r3,0x3f58		r3 = Accessory Secondary Data Pointer
0005c434: 00021040 sll r2,r2,0x01		ID * 2
0005c438: 00431021 addu r2,r2,r3
0005c43c: 90430000 lbu r3,0x0000(r2)		Load Accessory's P-EV
0005c440: 00000000 nop
0005c444: a2030040 sb r3,0x0040(r16)		Store Accessory's P-EV into Unit's
0005c448: 90420001 lbu r2,0x0001(r2)		Load Accessory's M-EV
0005c44c: 00000000 nop
0005c450: a2020044 sb r2,0x0044(r16)		Store Accessory's M-EV into Unit's
0005c454: 9202001e lbu r2,0x001e(r16)		Load Unit's RH Shield
0005c458: 00000000 nop
0005c45c: 00021840 sll r3,r2,0x01		ID * 2
0005c460: 00621821 addu r3,r3,r2		ID * 3
0005c464: 00031880 sll r3,r3,0x02		ID * 12
0005c468: 00641021 addu r2,r3,r4
0005c46c: 90420003 lbu r2,0x0003(r2)		Load Shield's Item Type
0005c470: 00000000 nop
0005c474: 30420040 andi r2,r2,0x0040
0005c478: 1040000e beq r2,r0,0x 0005c4b4	Branch if Shield isn't a Shield
0005c47c: 00000000 nop
0005c480: 3c018006 lui r1,0x8006
0005c484: 00230821 addu r1,r1,r3
0005c488: 90222ebc lbu r2,0x2ebc(r1)		Load Shield's Second Table ID
0005c48c: 3c038006 lui r3,0x8006
0005c490: 24633eb8 addiu r3,r3,0x3eb8
0005c494: 00021040 sll r2,r2,0x01		ID * 2
0005c498: 00431821 addu r3,r2,r3
0005c49c: 90620000 lbu r2,0x0000(r3)		Load Shield's P-EV
0005c4a0: 00000000 nop
0005c4a4: a2020041 sb r2,0x0041(r16)		Store RH Shield's P-EV into Unit's
0005c4a8: 90620001 lbu r2,0x0001(r3)		Load Shield's M-EV
0005c4ac: 00000000 nop
0005c4b0: a2020045 sb r2,0x0045(r16)		Store RH Shield's M-EV into Unit's
0005c4b4: 92020020 lbu r2,0x0020(r16)		Load Unit's LH Shield
0005c4b8: 00000000 nop
0005c4bc: 00021840 sll r3,r2,0x01		ID * 2
0005c4c0: 00621821 addu r3,r3,r2		ID * 3
0005c4c4: 00031880 sll r3,r3,0x02		ID * 12
0005c4c8: 00641021 addu r2,r3,r4
0005c4cc: 90420003 lbu r2,0x0003(r2)		Load Shield's Item Type
0005c4d0: 00000000 nop
0005c4d4: 30420040 andi r2,r2,0x0040
0005c4d8: 1040000e beq r2,r0,0x 0005c514	Branch if Shield isn't a Shield
0005c4dc: 00000000 nop
0005c4e0: 3c018006 lui r1,0x8006
0005c4e4: 00230821 addu r1,r1,r3
0005c4e8: 90222ebc lbu r2,0x2ebc(r1)		Load Shield's Second Table ID
0005c4ec: 3c038006 lui r3,0x8006
0005c4f0: 24633eb8 addiu r3,r3,0x3eb8
0005c4f4: 00021040 sll r2,r2,0x01		ID * 2
0005c4f8: 00431821 addu r3,r2,r3
0005c4fc: 90620000 lbu r2,0x0000(r3)		Load Shield's P-EV
0005c500: 00000000 nop
0005c504: a2020042 sb r2,0x0042(r16)		Store LH Shield's P-EV into Unit's
0005c508: 90620001 lbu r2,0x0001(r3)		Load Shield's M-EV
0005c50c: 00000000 nop
0005c510: a2020046 sb r2,0x0046(r16)		Store LH Shield's M-EV into Unit's
0005c514: 9203001d lbu r3,0x001d(r16)		Load Unit's RH Weapon
0005c518: 00000000 nop
0005c51c: 00031040 sll r2,r3,0x01		ID * 2
0005c520: 00431021 addu r2,r2,r3		ID * 3
0005c524: 00021080 sll r2,r2,0x02		ID * 12
0005c528: 00441021 addu r2,r2,r4
0005c52c: 90420003 lbu r2,0x0003(r2)		Load Weapon's Item Type
0005c530: 00000000 nop
0005c534: 30420080 andi r2,r2,0x0080
0005c538: 1040000a beq r2,r0,0x 0005c564	Branch if Weapon isn't a Weapon
0005c53c: 000318c0 sll r3,r3,0x03		Original ID * 8
0005c540: 3c028006 lui r2,0x8006
0005c544: 24423ab8 addiu r2,r2,0x3ab8
0005c548: 00621821 addu r3,r3,r2
0005c54c: 90620004 lbu r2,0x0004(r3)		Load Weapon's WP
0005c550: 00000000 nop
0005c554: a202003c sb r2,0x003c(r16)		Store RH Weapon's WP into Unit's
0005c558: 9062 0005 lbu r2,0x 0005(r3)		Load Weapon's W-EV
0005c55c: 00000000 nop
0005c560: a202003e sb r2,0x003e(r16)		Store RH Weapon's W-EV into Unit's
0005c564: 9203001f lbu r3,0x001f(r16)		Load Unit's LH Weapon
0005c568: 00000000 nop
0005c56c: 00031040 sll r2,r3,0x01		ID * 2
0005c570: 00431021 addu r2,r2,r3		ID * 3
0005c574: 00021080 sll r2,r2,0x02		ID * 12
0005c578: 00441021 addu r2,r2,r4
0005c57c: 90420003 lbu r2,0x0003(r2)		Load Weapon's Item Type
0005c580: 00000000 nop
0005c584: 30420080 andi r2,r2,0x0080
0005c588: 1040000a beq r2,r0,0x 0005c5b4	Branch if Weapon isn't a Weapon
0005c58c: 000318c0 sll r3,r3,0x03		Original ID * 8
0005c590: 3c028006 lui r2,0x8006
0005c594: 24423ab8 addiu r2,r2,0x3ab8
0005c598: 00621821 addu r3,r3,r2
0005c59c: 90620004 lbu r2,0x0004(r3)		Load Weapon's WP
0005c5a0: 00000000 nop
0005c5a4: a202003d sb r2,0x003d(r16)		Store LH Weapon's WP into Unit's
0005c5a8: 9062 0005 lbu r2,0x 0005(r3)		Load Weapon's W-EV
0005c5ac: 00000000 nop
0005c5b0: a202003f sb r2,0x003f(r16)		Store LH Weapon's W-EV
0005c5b4: 8fbf0014 lw r31,0x0014(r29)
0005c5b8: 8fb00010 lw r16,0x0010(r29)
0005c5bc: 27bd0018 addiu r29,r29,0x0018
0005c5c0: 03e00008 jr r31
0005c5c4: 00000000 nop


Return Locations

0005ab0c: Equipment/Move/Jump +X/Name Storing/Generation
0005d704: Status Setting/Checking + Equip/R/S/M Stats


Notes

Notes : The Item Data/Table start at 80062eb8 Each items are 12 bytes long So loading 0x8006YYYY (YYYY = Item ID * 12) + 2ebb = Loading offset 0x03 (2ebb - 2eb8) of this item