Difference between revisions of "Player Skill Set"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
m
Line 125: Line 125:
 
== Return Locations ==
 
== Return Locations ==
  
  00140514: - [[Routine at 1404cc]]
+
  00140514: - [[001404cc - 00140728]]

Revision as of 18:49, 24 December 2023

Alternate documentation here: Setup Act Menu

Player Skill Set:
001813c0: 27bdffd0 addiu r29,r29,0xffd0		
001813c4: afb40020 sw r20,0x0020(r29)		
001813c8: 0080a021 addu r20,r4,r0		acting unit
001813cc: afb00010 sw r16,0x0010(r29)		
001813d0: 00a08021 addu r16,r5,r0		displayed skillset list
001813d4: afb10014 sw r17,0x0014(r29)		
001813d8: 00c08821 addu r17,r6,r0		skillset determination list
001813dc: afb20018 sw r18,0x0018(r29)		
001813e0: 00e09021 addu r18,r7,r0		action menu byte list
001813e4: afbf0028 sw r31,0x0028(r29)		
001813e8: afb50024 sw r21,0x0024(r29)		
001813ec: 0c060435 jal 0x001810d4		Get unit data pointer?
001813f0: afb3001c sw r19,0x001c(r29)		
001813f4: 00401821 addu r3,r2,r0		
001813f8: 10600058 beq r3,r0,0x0018155c	       skip if no data found
001813fc: 2402ffff addiu r2,r0,0xffff		
00181400: 90670012 lbu r7,0x0012(r3)		Load Primary Skill Set
00181404: 90650013 lbu r5,0x0013(r3)		Load Secondary Skill Set
00181408: 30e400ff andi r4,r7,0x00ff		
0018140c: 2c8200b0 sltiu r2,r4,0x00b0		
00181410: 10400004 beq r2,r0,0x00181424	       Branch if using a Monster Skill Set?
00181414: 02004021 addu r8,r16,r0		r8 = skillset list
00181418: 2ca200b0 sltiu r2,r5,0x00b0		
0018141c: 1440000b bne r2,r0,0x0018144c	       Branch if not using a Monster Skill Set?(secondary)
00181420: 00000000 nop				
00181424: a2070000 sb r7,0x0000(r16)		store skillset
00181428: a2200000 sb r0,0x0000(r17)		store direct command
0018142c: 3c018006 lui r1,0x8006		
00181430: 00240821 addu r1,r1,r4			
00181434: 90235cb4 lbu r3,0x5cb4(r1)		Load Action Menu byte
00181438: 34020001 ori r2,r0,0x0001		return r2 = 1
0018143c: a2430000 sb r3,0x0000(r18)		store action menu byte
00181440: 340300ff ori r3,r0,0x00ff		
00181444: 08060557 j 0x0018155c		       jump to end
00181448: a2030001 sb r3,0x0001(r16)	 	store end of skillset list

If not monster
0018144c: 9062005a lbu r2,0x005a(r3)           Load 3rd set of  Current Status
00181450: 90660092 lbu r6,0x0092(r3)		Load 4th set of Support
00181454: 30420002 andi r2,r2,0x0002		
00181458: 10400002 beq r2,r0,0x00181464	       Branch if Unit is not Frog
0018145c: 00000000 nop				
00181460: 00003021 addu r6,r0,r0	        if frog, clear r6
00181464: 9062005c lbu r2,0x005c(r3)		Load 5th set of Current Status
00181468: 00000000 nop
0018146c: 30420004 andi r2,r2,0x0004		
00181470: 14400006 bne r2,r0,0x0018148c	       Branch if the unit is under  Don't Act
00181474: 340200ff ori r2,r0,0x00ff		R2 = FF
00181478: 90620182 lbu r2,0x0182(r3)		Load Usability Pointers(mounted  flags)
0018147c: 00000000 nop				
00181480: 30420040 andi r2,r2,0x0040		set if being ridden
00181484: 10400003 beq r2,r0,0x00181494	       Branch if unit is in "Deep Water"
00181488: 340200ff ori r2,r0,0x00ff		R2 = FF
0018148c: 08060556 j 0x00181558			Jump to end
00181490: a2020000 sb r2,0x0000(r16)		store no displayed skillsets

If ok to load act menus
00181494: 34020001 ori r2,r0,0x0001		R2 = 1
00181498: a2020000 sb r2,0x0000(r16)		store "Attack"
0018149c: 10800006 beq r4,r0,0x001814b8	       branch if no primary skillset
001814a0: 26100001 addiu r16,r16,0x0001	       Displayed skillsets++
001814a4: 34020018 ori r2,r0,0x0018		
001814a8: 10820003 beq r4,r2,0x001814b8	       jump if primary skillset = mimic
001814ac: 00000000 nop				
001814b0: a2070000 sb r7,0x0000(r16)		store primary skillset
001814b4: 26100001 addiu r16,r16,0x0001	       Skillset counter++
001814b8: 10a00003 beq r5,r0,0x001814c8	       branch if no secondary skillset
001814bc: 30c20040 andi r2,r6,0x0040		
001814c0: a2050000 sb r5,0x0000(r16)		store secondary skillset
001814c4: 26100001 addiu r16,r16,0x0001	       counter++
001814c8: 10400003 beq r2,r0,0x001814d8	       branch if unit doesn't have defend
001814cc: 34020002 ori r2,r0,0x0002		
001814d0: a2020000 sb r2,0x0000(r16)		store Defend
001814d4: 26100001 addiu r16,r16,0x0001	       Counter++
001814d8: 30c20020 andi r2,r6,0x0020		
001814dc: 10400004 beq r2,r0,0x001814f0	       Branch if no equip change
001814e0: 341500ff ori r21,r0,0x00ff		
001814e4: 34020003 ori r2,r0,0x0003		
001814e8: a2020000 sb r2,0x0000(r16)		store equip change
001814ec: 26100001 addiu r16,r16,0x0001		Counter++
001814f0: 340200ff ori r2,r0,0x00ff		
001814f4: a2020000 sb r2,0x0000(r16)		Store end of list
001814f8: 02208021 addu r16,r17,r0		r16 = skillset determination list
001814fc: 01008821 addu r17,r8,r0		start of skillset list
00181500: 26130006 addiu r19,r16,0x0006		r19 = action menu byte list
00181504: 92250000 lbu r5,0x0000(r17)		skillset
00181508: 00000000 nop				
0018150c: 10b50012 beq r5,r21,0x00181558	branch if end of list
00181510: 02802021 addu r4,r20,r0		r4 = unit ID
00181514: 3c018006 lui r1,0x8006		
00181518: 00250821 addu r1,r1,r5			
0018151c: 90265cb4 lbu r6,0x5cb4(r1)		Load Action Menu byte
00181520: 00000000 nop						
00181524: 30c6000f andi r6,r6,0x000f		
00181528: 0c060561 jal 0x00181584		Skillset Loading?
0018152c: a2460000 sb r6,0x0000(r18)		store action menu byte
00181530: 14400003 bne r2,r0,0x00181540		branch if No. Available abilities <> 0
00181534: 34020001 ori r2,r0,0x0001		
00181538: 08060551 j 0x00181544			
0018153c: a2020000 sb r2,0x0000(r16)		store skillset determination (load list) if No. Abilities = 0
00181540: a2000000 sb r0,0x0000(r16)		store skillset determination (direct command) if No. Abilities <> 0
00181544: 26100001 addiu r16,r16,0x0001		determination list++
00181548: 26520001 addiu r18,r18,0x0001		action menu byte list++
0018154c: 0213102a slt r2,r16,r19		set of not end of list
00181550: 1440ffec bne r2,r0,0x00181504		loop until it is
00181554: 26310001 addiu r17,r17,0x0001		skillset list++
00181558: 00001021 addu r2,r0,r0		
0018155c: 8fbf0028 lw r31,0x0028(r29)		
00181560: 8fb50024 lw r21,0x0024(r29)		
00181564: 8fb40020 lw r20,0x0020(r29)		
00181568: 8fb3001c lw r19,0x001c(r29)		
0018156c: 8fb20018 lw r18,0x0018(r29)		
00181570: 8fb10014 lw r17,0x0014(r29)		
00181574: 8fb00010 lw r16,0x0010(r29)		
00181578: 27bd0030 addiu r29,r29,0x0030		
0018157c: 03e00008 jr r31			
00181580: 00000000 nop

returns r2 = 0x01 monster 0x00 normal skillset list

Return Locations

00140514: - 001404cc - 00140728