Difference between revisions of "Talk Skill"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
m
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<font face='Courier New'>
+
No Parameters - Returns Nothing
 
   
 
   
  00186c04: 3c028019 lui r2,0x8019
+
Hard coded : effect depends on ability ID
  00186c08: 944238d6 lhu r2,0x38d6(r2) load used ability ID
+
  00186c0c: 27bdffe8 addiu r29,r29,0xffe8
+
If The Ability is not a talk skill one, it will jump to the Apply status routine (default section)
  00186c10: 2443ff8b addiu r3,r2,0xff8b
+
Otherwise it will handle the stats/gil modification (See [[#Hard coded mechanics]])
  00186c14: 2c620007 sltiu r2,r3,0x0007 set if non-status inflicting talk-skill (except death sentence)
+
--------------------------------------------------------------------------------------------
  00186c18: 1040002d beq r2,r0,0x00186cd0 branch if not
+
  00186c04: 3c028019 lui r2,0x8019           |
  00186c1c: afbf0010 sw r31,0x0010(r29)
+
  00186c08: 944238d6 lhu r2,0x38d6(r2)       |{{f/load|<nowiki>r2 = Current Ability used Ability ID</nowiki>}}
  00186c20: 00031080 sll r2,r3,0x02 prepares Ability load address
+
  00186c0c: 27bdffe8 addiu r29,r29,-0x0018    |
  00186c24: 3c018017 lui r1,0x8017
+
  00186c10: 2443ff8b addiu r3,r2,-0x0075      |{{f/std|<nowiki>r2 = Used Ability ID - 0x75 </nowiki>}}
  00186c28: 00220821 addu r1,r1,r2 variable load address
+
  00186c14: 2c620007 sltiu r2,r3,0x0007       |{{f/std|<nowiki>r2 = 0x01 if Used Ability is between Persuade (0x75) and Negotiate (0x7b)</nowiki>}}
  00186c2c: 8c22427c lw r2,0x427c(r1) load ability return address
+
  00186c18: 1040002d beq r2,r0,0x00186cd0     {{f/Cond|If used Ability is a Talk Skill Ability with Stat alteration}} {{f/std| Death sentence Adress send to Status Ability section}}
  00186c30: 00000000 nop
+
  00186c1c: afbf0010 sw r31,0x0010(r29)           |
  00186c34: 00400008 jr r2 Jumps to below listed locations depending on ability
+
  00186c20: 00031080 sll r2,r3,0x02               |{{f/std|<nowiki>r2 = Used Ability Offset (Jump Address Table)  - (Ability ID - 0x75)*4</nowiki>}}
0x80186c4c persuade
+
  00186c24: 3c018017 lui r1,0x8017               |
0x80186c60 praise
+
  00186c28: 00220821 addu r1,r1,r2               |{{f/std|<nowiki>r1 = 0x80170000 + Used Ability Offset</nowiki>}}
0x80186c7c threaten
+
  00186c2c: 8c22427c lw r2,0x427c(r1)             |{{f/adr|<nowiki>r2 = Jump Adress for used Ability</nowiki>}}
0x80186c98 preach
+
  00186c30: 00000000 nop                         |
0x80186cb4 solution
+
  00186c34: 00400008 jr r2                       |{{f/std|Jump to dedicated section}}          [[Talk_Skill_Ability_Table|<span style="color:blue">Talk_Skill_Ability_Table<span>]]
0x80186cd0 death sentence
+
  00186c38: 00000000 nop                         |
0x80186c3c negotiate
+
  00186c38: 00000000 nop
+
{{f/loc| --- Negotiate --- }}
  00186c3c: 0c0619d1 jal 0x00186744 steal gil routine If ability = 'Negotiate'
+
  00186c3c: 0c0619d1 jal 0x00186744               |{{f/jal|Steal Gil|Steal Gil}} Calculate Stolen Gil (Speed * Lv), update Target and Attacker Action data (gain or loss)
  00186c40: 00000000 nop
+
  00186c40: 00000000 nop                         |
  00186c44: 08061b3c j 0x00186cf0 Jumps to pseudo-status set
+
  00186c44: 08061b3c j 0x00186cf0                 {{f/jump|Jumps to Set Attack type as pseudo status}}
  00186c48: 00000000 nop
+
  00186c48: 00000000 nop                         |
  00186c4c: 3c038019 lui r3,0x8019
+
  00186c50: 8c632d90 lw r3,0x2d90(r3) Loads Target Current Action Data Pointer If ability = 'Persuade'
+
{{f/loc| --- Persuade --- }}
  00186c54: 3402007f ori r2,r0,0x007f sets r2 to 0x7f (CT0)
+
  00186c4c: 3c038019 lui r3,0x8019               |
  00186c58: 08061b38 j 0x00186ce0 Jumps to pseudo-status set
+
  00186c50: 8c632d90 lw r3,0x2d90(r3)             |{{f/adr|<nowiki>r2 = Target Current Action (TCA) data pointer</nowiki>}}
  00186c5c: a0620013 sb r2,0x0013(r3) Saves set CT00 to target data
+
  00186c54: 3402007f ori r2,r0,0x007f             |{{f/std|<nowiki>r2 0x7f (CT0)</nowiki>}}
  00186c60: 3c028019 lui r2,0x8019
+
  00186c58: 08061b38 j 0x00186ce0                 {{f/jump|Jumps to Set Attack type as pseudo status}}
  00186c64: 904238fa lbu r2,0x38fa(r2) Loads 'Praise' ability Y
+
  00186c5c: a0620013 sb r2,0x0013(r3)             |{{f/store|Set TCA CT change to - 127 (CT00)}}
  00186c68: 3c038019 lui r3,0x8019
+
  00186c6c: 8c632d90 lw r3,0x2d90(r3) Loads target current action data pointer
+
{{f/loc| --- Praise --- }}
  00186c70: 34420080 ori r2,r2,0x0080 Sets bonus flag
+
  00186c60: 3c028019 lui r2,0x8019               |
  00186c74: 08061b38 j 0x00186ce0 Jumps to Pseudo-status set
+
  00186c64: 904238fa lbu r2,0x38fa(r2)           |{{f/load|<nowiki>r2 = Current Ability used Ability Y</nowiki>}}
  00186c78: a0620016 sb r2,0x0016(r3) Saves positive Brave increase
+
  00186c68: 3c038019 lui r3,0x8019               |
  00186c7c: 3c028019 lui r2,0x8019
+
  00186c6c: 8c632d90 lw r3,0x2d90(r3)             |{{f/adr|<nowiki>r3 = TCA data pointer</nowiki>}}
  00186c80: 904238fa lbu r2,0x38fa(r2) Loads 'Threaten' Ability Y
+
  00186c70: 34420080 ori r2,r2,0x0080             |{{f/std|<nowiki>r2 = Y with bonus flag</nowiki>}}
  00186c84: 3c038019 lui r3,0x8019
+
  00186c74: 08061b38 j 0x00186ce0                 {{f/jump|Jumps to Set Attack type as pseudo status}}
  00186c88: 8c632d90 lw r3,0x2d90(r3) Loads Target Current Action Data Pointer
+
  00186c78: a0620016 sb r2,0x0016(r3)             |{{f/store|Set TCA Brave change to +Y}}
  00186c8c: 3042007f andi r2,r2,0x007f Removes bonus flag (if set)
+
  00186c90: 08061b38 j 0x00186ce0 Jumps to Pseudo-status set
+
{{f/loc| --- Threaten --- }}
  00186c94: a0620016 sb r2,0x0016(r3) Saves negative Brave change
+
  00186c7c: 3c028019 lui r2,0x8019               |
  00186c98: 3c028019 lui r2,0x8019
+
  00186c80: 904238fa lbu r2,0x38fa(r2)           |{{f/load|<nowiki>r2 = Current Ability used Ability Y</nowiki>}}
  00186c9c: 904238fa lbu r2,0x38fa(r2) Loads 'Preach' Ability Y
+
  00186c84: 3c038019 lui r3,0x8019               |
  00186ca0: 3c038019 lui r3,0x8019
+
  00186c88: 8c632d90 lw r3,0x2d90(r3)             |{{f/adr|<nowiki>r3 = TCA data pointer</nowiki>}}
  00186ca4: 8c632d90 lw r3,0x2d90(r3) Loads Target Current Action Data Pointer
+
  00186c8c: 3042007f andi r2,r2,0x007f           |{{f/std|<nowiki>r2 = Y without bonus flag</nowiki>}}
  00186ca8: 34420080 ori r2,r2,0x0080 Sets bonus flag
+
  00186c90: 08061b38 j 0x00186ce0                 {{f/jump|Jumps to Set Attack type as pseudo status}}
  00186cac: 08061b38 j 0x00186ce0 Jumps to pseudo-status set
+
  00186c94: a0620016 sb r2,0x0016(r3)             |{{f/store|Set TCA Brave change to -Y}}
  00186cb0: a0620017 sb r2,0x0017(r3) Saves positive Faith increase
+
  00186cb4: 3c028019 lui r2,0x8019
+
{{f/loc| --- Preach --- }}
  00186cb8: 904238fa lbu r2,0x38fa(r2) Loads 'Solution' ability Y
+
  00186c98: 3c028019 lui r2,0x8019               |
  00186cbc: 3c038019 lui r3,0x8019
+
  00186c9c: 904238fa lbu r2,0x38fa(r2)           |{{f/load|<nowiki>r2 = Current Ability used Ability Y</nowiki>}}
  00186cc0: 8c632d90 lw r3,0x2d90(r3) Loads Target Current Action Data Pointer
+
  00186ca0: 3c038019 lui r3,0x8019               |
  00186cc4: 3042007f andi r2,r2,0x007f Removes bonus flag (if set)
+
  00186ca4: 8c632d90 lw r3,0x2d90(r3)             |{{f/adr|<nowiki>r3 = TCA data pointer</nowiki>}}
  00186cc8: 08061b38 j 0x00186ce0 Jumps to pseudo-status set
+
  00186ca8: 34420080 ori r2,r2,0x0080             |{{f/std|<nowiki>r2 = Y with bonus flag</nowiki>}}
  00186ccc: a0620017 sb r2,0x0017(r3) Saves negative Faith change
+
  00186cac: 08061b38 j 0x00186ce0                 {{f/jump|Jumps to Set Attack type as pseudo status}}
  00186cd0: 0c061fc9 jal 0x00187f24 Jumps to Apply Status if ability = 'Invitation', 'Death Sentence', 'Insult', 'Mimic Daravon'
+
  00186cb0: a0620017 sb r2,0x0017(r3)             |{{f/store|Set TCA Faith change to +Y}}
  00186cd4: 00000000 nop
+
  00186cd8: 08061b3c j 0x00186cf0 Jumps to end
+
{{f/loc| --- Solution --- }}
  00186cdc: 00000000 nop
+
  00186cb4: 3c028019 lui r2,0x8019               |
  00186ce0: 3c038019 lui r3,0x8019
+
  00186cb8: 904238fa lbu r2,0x38fa(r2)           |{{f/load|<nowiki>r2 = Current Ability used Ability Y</nowiki>}}
  00186ce4: 8c632d90 lw r3,0x2d90(r3) Load Target Current Action Data Pointer
+
  00186cbc: 3c038019 lui r3,0x8019               |
  00186ce8: 34020001 ori r2,r0,0x0001 Sets r2 to 0x1 (Pseudo-Status change)
+
  00186cc0: 8c632d90 lw r3,0x2d90(r3)             |{{f/adr|<nowiki>r3 = TCA data pointer</nowiki>}}
  00186cec: a0620025 sb r2,0x0025(r3) Saves attack type as Pseudo-Status change
+
  00186cc4: 3042007f andi r2,r2,0x007f           |{{f/std|<nowiki>r2 = Y without bonus flag</nowiki>}}
  00186cf0: 8fbf0010 lw r31,0x0010(r29)
+
  00186cc8: 08061b38 j 0x00186ce0                 {{f/jump|Jumps to Set Attack type as pseudo status}}
  00186cf4: 27bd0018 addiu r29,r29,0x0018
+
  00186ccc: a0620017 sb r2,0x0017(r3)             |{{f/store|Set TCA Faith change to -Y}}
 +
 +
  {{f/loc| --- Invitation, Death Sentence, Insult, Mimic Daravon --- }}
 +
00186cd0: 0c061fc9 jal 0x00187f24              |{{f/jal|Apply status (to action)|Apply status (to action)}}
 +
  00186cd4: 00000000 nop                         |
 +
  00186cd8: 08061b3c j 0x00186cf0                 {{f/jump|Jumps to END}}
 +
  00186cdc: 00000000 nop                         |
 +
 +
                                            ''' Set Attack Type to pseudo status section '''
 +
  00186ce0: 3c038019 lui r3,0x8019               |
 +
  00186ce4: 8c632d90 lw r3,0x2d90(r3)             |{{f/adr|<nowiki>r3 = TCA data pointer</nowiki>}}
 +
  00186ce8: 34020001 ori r2,r0,0x0001             |{{f/std|<nowiki>r2 = 0x01</nowiki>}}
 +
  00186cec: a0620025 sb r2,0x0025(r3)             |{{f/store|Set TCA Attack type to pseudo status (disables other flags)}}
 +
  00186cf0: 8fbf0010 lw r31,0x0010(r29)       END
 +
  00186cf4: 27bd0018 addiu r29,r29,0x0018|
 
  00186cf8: 03e00008 jr r31
 
  00186cf8: 03e00008 jr r31
 
  00186cfc: 00000000 nop
 
  00186cfc: 00000000 nop
</font>
+
=== Hard coded mechanics ===
 +
Jump Address is determined by Ability ID  - see [[Talk_Skill_Ability_Table|<span style="color:blue">Talk_Skill_Ability_Table<span>]]
 +
 +
0x75  Persuade        CT = 0x00
 +
0x76  Praise          Brave Bonus
 +
0x77  Threaten        Brave Malus
 +
0x78  Preach          Faith Bonus
 +
0x79  Solution        Faith Malus
 +
0x7a  Death sentence  Jump to default section - (Apply status)
 +
0x7b  Negotiate      Steal Gil
 +
 +
=== Return locations ===
 +
'''Battle.bin'''
 +
00189a80: [[2A_Hit_(MA%2BX)%25_//_AffectBraveOrFaith(Y)]]

Latest revision as of 20:32, 22 April 2022

No Parameters - Returns Nothing

Hard coded : effect depends on ability ID 

If The Ability is not a talk skill one, it will jump to the Apply status routine (default section)
Otherwise it will handle the stats/gil modification (See #Hard coded mechanics)
--------------------------------------------------------------------------------------------
00186c04: 3c028019 lui r2,0x8019            |
00186c08: 944238d6 lhu r2,0x38d6(r2)        |r2 = Current Ability used Ability ID
00186c0c: 27bdffe8 addiu r29,r29,-0x0018    |
00186c10: 2443ff8b addiu r3,r2,-0x0075      |r2 = Used Ability ID - 0x75 
00186c14: 2c620007 sltiu r2,r3,0x0007       |r2 = 0x01 if Used Ability is between Persuade (0x75) and Negotiate (0x7b)
00186c18: 1040002d beq r2,r0,0x00186cd0     #If used Ability is a Talk Skill Ability with Stat alteration  Death sentence Adress send to Status Ability section
00186c1c: afbf0010 sw r31,0x0010(r29)           |
00186c20: 00031080 sll r2,r3,0x02               |r2 = Used Ability Offset (Jump Address Table)   - (Ability ID - 0x75)*4
00186c24: 3c018017 lui r1,0x8017                |
00186c28: 00220821 addu r1,r1,r2                |r1 = 0x80170000 + Used Ability Offset
00186c2c: 8c22427c lw r2,0x427c(r1)             |r2 = Jump Adress for used Ability
00186c30: 00000000 nop                          |
00186c34: 00400008 jr r2                        |Jump to dedicated section           Talk_Skill_Ability_Table
00186c38: 00000000 nop                          |

 --- Negotiate --- 
00186c3c: 0c0619d1 jal 0x00186744               |-->Steal Gil Calculate Stolen Gil (Speed * Lv), update Target and Attacker Action data (gain or loss)
00186c40: 00000000 nop                          |
00186c44: 08061b3c j 0x00186cf0                 >>Jumps to Set Attack type as pseudo status
00186c48: 00000000 nop                          |

 --- Persuade --- 
00186c4c: 3c038019 lui r3,0x8019                |
00186c50: 8c632d90 lw r3,0x2d90(r3)             |r2 = Target Current Action (TCA) data pointer
00186c54: 3402007f ori r2,r0,0x007f             |r2 =  0x7f (CT0)
00186c58: 08061b38 j 0x00186ce0                 >>Jumps to Set Attack type as pseudo status
00186c5c: a0620013 sb r2,0x0013(r3)             |Set TCA CT change to - 127 (CT00)

 --- Praise --- 
00186c60: 3c028019 lui r2,0x8019                |
00186c64: 904238fa lbu r2,0x38fa(r2)            |r2 = Current Ability used Ability Y
00186c68: 3c038019 lui r3,0x8019                |
00186c6c: 8c632d90 lw r3,0x2d90(r3)             |r3 = TCA data pointer
00186c70: 34420080 ori r2,r2,0x0080             |r2 = Y with bonus flag
00186c74: 08061b38 j 0x00186ce0                 >>Jumps to Set Attack type as pseudo status
00186c78: a0620016 sb r2,0x0016(r3)             |Set TCA Brave change to +Y

 --- Threaten --- 
00186c7c: 3c028019 lui r2,0x8019                |
00186c80: 904238fa lbu r2,0x38fa(r2)            |r2 = Current Ability used Ability Y
00186c84: 3c038019 lui r3,0x8019                |
00186c88: 8c632d90 lw r3,0x2d90(r3)             |r3 = TCA data pointer
00186c8c: 3042007f andi r2,r2,0x007f            |r2 = Y without bonus flag
00186c90: 08061b38 j 0x00186ce0                 >>Jumps to Set Attack type as pseudo status
00186c94: a0620016 sb r2,0x0016(r3)             |Set TCA Brave change to -Y

 --- Preach --- 
00186c98: 3c028019 lui r2,0x8019                |
00186c9c: 904238fa lbu r2,0x38fa(r2)            |r2 = Current Ability used Ability Y
00186ca0: 3c038019 lui r3,0x8019                |
00186ca4: 8c632d90 lw r3,0x2d90(r3)             |r3 = TCA data pointer
00186ca8: 34420080 ori r2,r2,0x0080             |r2 = Y with bonus flag
00186cac: 08061b38 j 0x00186ce0                 >>Jumps to Set Attack type as pseudo status
00186cb0: a0620017 sb r2,0x0017(r3)             |Set TCA Faith change to +Y

 --- Solution --- 
00186cb4: 3c028019 lui r2,0x8019                |
00186cb8: 904238fa lbu r2,0x38fa(r2)            |r2 = Current Ability used Ability Y
00186cbc: 3c038019 lui r3,0x8019                |
00186cc0: 8c632d90 lw r3,0x2d90(r3)             |r3 = TCA data pointer
00186cc4: 3042007f andi r2,r2,0x007f            |r2 = Y without bonus flag
00186cc8: 08061b38 j 0x00186ce0                 >>Jumps to Set Attack type as pseudo status
00186ccc: a0620017 sb r2,0x0017(r3)             |Set TCA Faith change to -Y

 --- Invitation, Death Sentence, Insult, Mimic Daravon --- 
00186cd0: 0c061fc9 jal 0x00187f24               |-->Apply status (to action)
00186cd4: 00000000 nop                          |
00186cd8: 08061b3c j 0x00186cf0                 >>Jumps to END
00186cdc: 00000000 nop                          |

                                             Set Attack Type to pseudo status section  
00186ce0: 3c038019 lui r3,0x8019                |
00186ce4: 8c632d90 lw r3,0x2d90(r3)             |r3 = TCA data pointer
00186ce8: 34020001 ori r2,r0,0x0001             |r2 = 0x01
00186cec: a0620025 sb r2,0x0025(r3)             |Set TCA Attack type to pseudo status (disables other flags)
00186cf0: 8fbf0010 lw r31,0x0010(r29)       END
00186cf4: 27bd0018 addiu r29,r29,0x0018|
00186cf8: 03e00008 jr r31
00186cfc: 00000000 nop

Hard coded mechanics

Jump Address is determined by Ability ID  - see Talk_Skill_Ability_Table

0x75  Persuade        CT = 0x00
0x76  Praise          Brave Bonus
0x77  Threaten        Brave Malus
0x78  Preach          Faith Bonus
0x79  Solution        Faith Malus
0x7a  Death sentence  Jump to default section - (Apply status)
0x7b  Negotiate       Steal Gil

Return locations

Battle.bin
00189a80: 2A_Hit_(MA+X)%_//_AffectBraveOrFaith(Y)