Final Fantasy Hacktics

Modding => Help! => Topic started by: Miroshi Beshima on September 12, 2011, 08:30:32 pm

Title: Rend Skills
Post by: Miroshi Beshima on September 12, 2011, 08:30:32 pm
I was wondering how the rend skills decide on what piece of equipment they break. I was looking in FFTPatcher and I they are all exactly the same, same formulas as well. So how does the game actually decide whats being broken?
Title: Re: Rend Skills
Post by: RandMuadDib on September 12, 2011, 08:31:29 pm
its hard-coded and not changeable in the patcher. Doing so would require ASM hacking.
Title: Re: Rend Skills
Post by: Miroshi Beshima on September 12, 2011, 08:33:55 pm
Haha that was quick. lol
And, yeah, that makes sense. Thanks for answering!
Title: Re: Rend Skills
Post by: Pride on September 12, 2011, 09:00:35 pm
From my notes

Steal/Break/Might Sword Hard Coding      
001879c8: 3c038019 lui r3,0x8019      
001879cc: 8c632d90 lw r3,0x2d90(r3)      Current Action Data Pointer
001879d0: 340200fe ori r2,r0,0x00fe      
001879d4: a0620019 sb r2,0x0019(r3)      Store as 0x00FE
001879d8: 3c048019 lui r4,0x8019      
001879dc: 8c842d98 lw r4,0x2d98(r4)      Load Defender's Stats
001879e0: 00000000 nop            
001879e4: 90820006 lbu r2,0x0006(r4)      Load Defender's Gender
001879e8: 00000000 nop            
001879ec: 30420020 andi r2,r2,0x0020      
001879f0: 144000a5 bne r2,r0,0x00187c88      Branch if Gender is a Monster
001879f4: 3402008a ori r2,r0,0x008a      R2 = 8a
001879f8: 3c038019 lui r3,0x8019      
001879fc: 946338d6 lhu r3,0x38d6(r3)      Load Used Ability ID
00187a00: 00000000 nop            
00187a04: 10620005 beq r3,r2,0x00187a1c      Branch if used ability is 'Head Break'
00187a08: 340200a1 ori r2,r0,0x00a1      
00187a0c: 10620003 beq r3,r2,0x00187a1c      Branch if used ability is 'Blastar Punch'
00187a10: 3402006e ori r2,r0,0x006e      
00187a14: 14620013 bne r3,r2,0x00187a64      Branch if used ability is not 'Steal Helmet'
00187a18: 3402008b ori r2,r0,0x008b      
00187a1c: 3c028019 lui r2,0x8019      
00187a20: 8c422d98 lw r2,0x2d98(r2)      Load Defender's Stats
00187a24: 00000000 nop            
00187a28: 9043001a lbu r3,0x001a(r2)      Load Defender's Headgear
00187a2c: 340200ff ori r2,r0,0x00ff      
00187a30: 10620095 beq r3,r2,0x00187c88      Branch if Headgear ID is FF (Doesn't exist?)
00187a34: 34020080 ori r2,r0,0x0080      R2 = 80
00187a38: 3c038019 lui r3,0x8019      
00187a3c: 8c632d90 lw r3,0x2d90(r3)      Load Current Action Data Pointer
00187a40: 00000000 nop            
00187a44: a0620019 sb r2,0x0019(r3)      Store as remove helmet
00187a48: 3c028019 lui r2,0x8019      
00187a4c: 8c422d98 lw r2,0x2d98(r2)      Load Defender's Stats
00187a50: 3c048019 lui r4,0x8019      
00187a54: 8c842d90 lw r4,0x2d90(r4)      Load Current Action Data Pointer
00187a58: 9043001a lbu r3,0x001a(r2)      Load Defender's Headgear
00187a5c: 08061f20 j 0x00187c80         
00187a60: 00001021 addu r2,r0,r0      R2 = 0
00187a64: 10620005 beq r3,r2,0x00187a7c      Branch if used ability is 'Armor Break'
00187a68: 340200a0 ori r2,r0,0x00a0      
00187a6c: 10620003 beq r3,r2,0x00187a7c      Branch if used ability is 'Shellbust Stab'
00187a70: 3402006f ori r2,r0,0x006f      
00187a74: 14620013 bne r3,r2,0x00187ac4      Branch if used ability is not 'Steal Armor'
00187a78: 3402008c ori r2,r0,0x008c      
00187a7c: 3c028019 lui r2,0x8019      
00187a80: 8c422d98 lw r2,0x2d98(r2)      Load Defender's Stats
00187a84: 00000000 nop            
00187a88: 9043001b lbu r3,0x001b(r2)      Load Defender's Armor
00187a8c: 340200ff ori r2,r0,0x00ff      
00187a90: 1062007d beq r3,r2,0x00187c88      Branch if Armor doesn't exist
00187a94: 34020040 ori r2,r0,0x0040      
00187a98: 3c038019 lui r3,0x8019      
00187a9c: 8c632d90 lw r3,0x2d90(r3)      Load Current Action Data Pointer
00187aa0: 00000000 nop            
00187aa4: a0620019 sb r2,0x0019(r3)      Store as remove helmet?
00187aa8: 3c028019 lui r2,0x8019      
00187aac: 8c422d98 lw r2,0x2d98(r2)      Load Defender's Stats
00187ab0: 3c048019 lui r4,0x8019      
00187ab4: 8c842d90 lw r4,0x2d90(r4)      Load Current Action Data Pointer
00187ab8: 9043001b lbu r3,0x001b(r2)      Load Defender's Armor
00187abc: 08061f20 j 0x00187c80         
00187ac0: 00001021 addu r2,r0,r0      R2 = 0
00187ac4: 10620003 beq r3,r2,0x00187ad4      Branch if used ability is 'Shield Break'
00187ac8: 34020070 ori r2,r0,0x0070      
00187acc: 1462001f bne r3,r2,0x00187b4c      Branch if used ability is not 'Steal Shield'
00187ad0: 340200a3 ori r2,r0,0x00a3      
00187ad4: 9083001e lbu r3,0x001e(r4)      Load Defender's Right Hand Shield
00187ad8: 340200ff ori r2,r0,0x00ff      
00187adc: 1062000c beq r3,r2,0x00187b10      Branch if Right Hand Shield doesn't exist?
00187ae0: 34020008 ori r2,r0,0x0008      R2 = 8
00187ae4: 3c038019 lui r3,0x8019      
00187ae8: 8c632d90 lw r3,0x2d90(r3)      Load Current Action Data Pointer
00187aec: 00000000 nop            
00187af0: a0620019 sb r2,0x0019(r3)      Store as Remove Right Hand Shield
00187af4: 3c028019 lui r2,0x8019      
00187af8: 8c422d98 lw r2,0x2d98(r2)      Load Defender's Stats
00187afc: 3c048019 lui r4,0x8019      
00187b00: 8c842d90 lw r4,0x2d90(r4)      Load Current Action Data Pointer
00187b04: 9043001e lbu r3,0x001e(r2)      Load Defender's Shield
00187b08: 08061f20 j 0x00187c80         
00187b0c: 00001021 addu r2,r0,r0      R2 = 0
00187b10: 90820020 lbu r2,0x0020(r4)      Load Left Hand Shield
00187b14: 00000000 nop            
00187b18: 1043005b beq r2,r3,0x00187c88      Branch if Left Hand Shield doesn't exist
00187b1c: 34020002 ori r2,r0,0x0002      
00187b20: 3c038019 lui r3,0x8019      
00187b24: 8c632d90 lw r3,0x2d90(r3)      Load Current Action Data Pointer
00187b28: 00000000 nop            
00187b2c: a0620019 sb r2,0x0019(r3)      Store as remove Left Hand Shield
00187b30: 3c028019 lui r2,0x8019      
00187b34: 8c422d98 lw r2,0x2d98(r2)      Load Defender's Stats
00187b38: 3c048019 lui r4,0x8019      
00187b3c: 8c842d90 lw r4,0x2d90(r4)      Load Current Action Data Pointer
00187b40: 90430020 lbu r3,0x0020(r2)      Load Left Hand Shield
00187b44: 08061f20 j 0x00187c80         
00187b48: 00001021 addu r2,r0,r0      R2 = 0
00187b4c: 10620003 beq r3,r2,0x00187b5c      Branch if used ability is 'Icewolf Bite'
00187b50: 34020072 ori r2,r0,0x0072      
00187b54: 14620010 bne r3,r2,0x00187b98      Branch if used ability is not 'Steal Accessory'
00187b58: 3402008d ori r2,r0,0x008d      
00187b5c: 9083001c lbu r3,0x001c(r4)      Load Defender's Accessory
00187b60: 340200ff ori r2,r0,0x00ff      
00187b64: 10620048 beq r3,r2,0x00187c88      Branch if Accessory doesn't exist?
00187b68: 34020020 ori r2,r0,0x0020      
00187b6c: 3c038019 lui r3,0x8019      
00187b70: 8c632d90 lw r3,0x2d90(r3)      Load Current Action Data Pointer
00187b74: 00000000 nop            
00187b78: a0620019 sb r2,0x0019(r3)      Store as remove accessory
00187b7c: 3c028019 lui r2,0x8019      
00187b80: 8c422d98 lw r2,0x2d98(r2)      Load Defender's Stats
00187b84: 3c048019 lui r4,0x8019      
00187b88: 8c842d90 lw r4,0x2d90(r4)      Load Current Action Data Pointer
00187b8c: 9043001c lbu r3,0x001c(r2)      Load Defender's Accessory
00187b90: 08061f20 j 0x00187c80         
00187b94: 00001021 addu r2,r0,r0      R2 = 0
00187b98: 10620006 beq r3,r2,0x00187bb4      Branch if used ability is 'Weapon Break'
00187b9c: 2405ffff addiu r5,r0,0xffff      R5 = 0xFFFF ?
00187ba0: 340200a2 ori r2,r0,0x00a2      
00187ba4: 10620003 beq r3,r2,0x00187bb4      Branch if used ability is 'Hellcry Punch'
00187ba8: 34020071 ori r2,r0,0x0071      
00187bac: 14620036 bne r3,r2,0x00187c88      Branch if used ability is 'Steal Weapon'
00187bb0: 00000000 nop            
00187bb4: 3c068019 lui r6,0x8019      
00187bb8: 8cc62d98 lw r6,0x2d98(r6)      Load Defender's Stats
00187bbc: 00000000 nop            
00187bc0: 90c3001d lbu r3,0x001d(r6)      Load Right Hand Weapon
00187bc4: 340700ff ori r7,r0,0x00ff      
00187bc8: 10670007 beq r3,r7,0x00187be8      Branch if Right Hand Weapon doesn't exist
00187bcc: 2404ffff addiu r4,r0,0xffff      R4 = FFFF
00187bd0: 00031040 sll r2,r3,0x01      Right Hand Weapon * 2
00187bd4: 00431021 addu r2,r2,r3      Right Hand Weapon * 3
00187bd8: 00021080 sll r2,r2,0x02      Right Hand Weapon * 12
00187bdc: 3c018006 lui r1,0x8006      
00187be0: 00220821 addu r1,r1,r2      
00187be4: 90242eba lbu r4,0x2eba(r1)      
00187be8: 90c3001f lbu r3,0x001f(r6)      Load Left Hand Weapon
00187bec: 00000000 nop            
00187bf0: 10670006 beq r3,r7,0x00187c0c      Branch if Left Hand Weapon doesn't exist
00187bf4: 00031040 sll r2,r3,0x01      Left Hand Weapon * 2
00187bf8: 00431021 addu r2,r2,r3      Left Hand Weapon * 3
00187bfc: 00021080 sll r2,r2,0x02      Left Hand Weapon * 12
00187c00: 3c018006 lui r1,0x8006      
00187c04: 00220821 addu r1,r1,r2      
00187c08: 90252eba lbu r5,0x2eba(r1)      
00187c0c: 2402ffff addiu r2,r0,0xffff      R2 = 0xFFFF
00187c10: 14820003 bne r4,r2,0x00187c20      
00187c14: 00000000 nop            
00187c18: 10a4001b beq r5,r4,0x00187c88      
00187c1c: 00000000 nop            
00187c20: 0085102a slt r2,r4,r5         
00187c24: 1440000c bne r2,r0,0x00187c58      
00187c28: 34020004 ori r2,r0,0x0004      
00187c2c: 3c038019 lui r3,0x8019      
00187c30: 8c632d90 lw r3,0x2d90(r3)      Load Current Action Data Pointer
00187c34: 34020010 ori r2,r0,0x0010      
00187c38: a0620019 sb r2,0x0019(r3)      Store as remove right hand weapon
00187c3c: 3c028019 lui r2,0x8019      
00187c40: 8c422d98 lw r2,0x2d98(r2)      Load Defender's Stats
00187c44: 3c048019 lui r4,0x8019      
00187c48: 8c842d90 lw r4,0x2d90(r4)      Load Current Action Data Pointer
00187c4c: 9043001d lbu r3,0x001d(r2)      Load Right Hand Weapon
00187c50: 08061f20 j 0x00187c80         
00187c54: 00001021 addu r2,r0,r0      R2 = 0
00187c58: 3c038019 lui r3,0x8019      
00187c5c: 8c632d90 lw r3,0x2d90(r3)      Load Current Action Data Pointer
00187c60: 00000000 nop            
00187c64: a0620019 sb r2,0x0019(r3)      Store as remove left hand weapon
00187c68: 3c028019 lui r2,0x8019      
00187c6c: 8c422d98 lw r2,0x2d98(r2)      Load Defender's Stats
00187c70: 3c048019 lui r4,0x8019      
00187c74: 8c842d90 lw r4,0x2d90(r4)      Load Current Action Data Pointer
00187c78: 9043001f lbu r3,0x001f(r2)      Load Left Hand Weapon
00187c7c: 00001021 addu r2,r0,r0      R2 = 0
00187c80: 08061f26 j 0x00187c98         
00187c84: a0830003 sb r3,0x0003(r4)      Store Equipment... ?
00187c88: 3c038019 lui r3,0x8019      
00187c8c: 8c632d90 lw r3,0x2d90(r3)      Load Current Action Data Pointer
00187c90: 2402ffff addiu r2,r0,0xffff      R2 = 0xFFFF
00187c94: a0600019 sb r0,0x0019(r3)      Store equipment as 0 ?
00187c98: 03e00008 jr r31         
00187c9c: 00000000 nop            
Title: Re: Rend Skills
Post by: RandMuadDib on September 12, 2011, 09:03:43 pm
Also, FormerDeathCorp's formula hack will allow you to set any skill to steal or break any equipment or stat. Assuming he is still working on it. I haven't seen anything happen in that thread in a while...
Title: Re: Rend Skills
Post by: RavenOfRazgriz on September 12, 2011, 09:07:01 pm
Quote from: RandMuadDib on September 12, 2011, 09:03:43 pm
Also, FormerDeathCorp's formula hack will allow you to set any skill to steal or break any equipment or stat. Assuming he is still working on it. I haven't seen anything happen in that thread in a while...


He just edits the most recent post lately instead of a new post to keep things organized better.  Though the last update was still a month ago to the day, heh.