Final Fantasy Hacktics

Modding => Help! => Topic started by: Mysfit on October 23, 2012, 10:22:20 am

Title: "Requires Sword" on Reactions
Post by: Mysfit on October 23, 2012, 10:22:20 am
Might someone with more experience with regard to ASM hacking have possibly looked into this sort of thing at all? I was curious whether it was possible to somehow have that boolean applied to specific reaction abilities as can be done with active ones. I specifically had "Hamedo" in mind.
Title: Re: "Requires Sword" on Reactions
Post by: Choto on October 23, 2012, 05:29:30 pm
I was just looking at some reaction routines... its possible to implement, but i'm not sure if we know the necessary info at this time. I could be wrong though
Title: Re: "Requires Sword" on Reactions
Post by: Pride on October 23, 2012, 07:12:58 pm
You can probably write this in this section for hamedo but this should be possible for most reactions in their respected routines.


Big... Contains Hamedo check
0017defc: 27bdffb8 addiu r29,r29,0xffb8
0017df00: afb5003c sw r21,0x003c(r29)
0017df04: 0080a821 addu r21,r4,r0
0017df08: afb60040 sw r22,0x0040(r29)
0017df0c: 001510c0 sll r2,r21,0x03
0017df10: 00551023 subu r2,r2,r21
0017df14: 00021180 sll r2,r2,0x06
0017df18: afb20030 sw r18,0x0030(r29)
0017df1c: 3c128019 lui r18,0x8019
0017df20: 265208cc addiu r18,r18,0x08cc
0017df24: afb1002c sw r17,0x002c(r29)
0017df28: 00528821 addu r17,r2,r18
0017df2c: afbf0044 sw r31,0x0044(r29)
0017df30: afb40038 sw r20,0x0038(r29)
0017df34: afb30034 sw r19,0x0034(r29)
0017df38: afb00028 sw r16,0x0028(r29)
0017df3c: 3c018019 lui r1,0x8019
0017df40: ac2038bc sw r0,0x38bc(r1)
0017df44: 92230001 lbu r3,0x0001(r17)
0017df48: 340200ff ori r2,r0,0x00ff
0017df4c: 1062007e beq r3,r2,0x0017e148
0017df50: 00a0b021 addu r22,r5,r0
0017df54: 9630002c lhu r16,0x002c(r17)
0017df58: 0c05f688 jal 0x0017da20
0017df5c: 02202021 addu r4,r17,r0
0017df60: 14400079 bne r2,r0,0x0017e148
0017df64: a630002c sh r16,0x002c(r17)
0017df68: 00002021 addu r4,r0,r0
0017df6c: 02401821 addu r3,r18,r0
0017df70: a460019a sh r0,0x019a(r3)
0017df74: a0600189 sb r0,0x0189(r3)
0017df78: 24840001 addiu r4,r4,0x0001
0017df7c: 28820015 slti r2,r4,0x0015
0017df80: 1440fffb bne r2,r0,0x0017df70
0017df84: 246301c0 addiu r3,r3,0x01c0
0017df88: 9222016f lbu r2,0x016f(r17)
0017df8c: 3c018006 lui r1,0x8006
0017df90: 00220821 addu r1,r1,r2
0017df94: 90255cb4 lbu r5,0x5cb4(r1)
0017df98: 00000000 nop
0017df9c: 30a300ff andi r3,r5,0x00ff
0017dfa0: 10600004 beq r3,r0,0x0017dfb4
0017dfa4: 00003021 addu r6,r0,r0
0017dfa8: 34020006 ori r2,r0,0x0006
0017dfac: 1462000d bne r3,r2,0x0017dfe4
0017dfb0: 34020008 ori r2,r0,0x0008
0017dfb4: 96230170 lhu r3,0x0170(r17)
0017dfb8: 00000000 nop
0017dfbc: 2c620170 sltiu r2,r3,0x0170
0017dfc0: 10400006 beq r2,r0,0x0017dfdc
0017dfc4: 000310c0 sll r2,r3,0x03
0017dfc8: 00431023 subu r2,r2,r3
0017dfcc: 00021040 sll r2,r2,0x01
0017dfd0: 3c018006 lui r1,0x8006
0017dfd4: 00220821 addu r1,r1,r2
0017dfd8: 9026fbf3 lbu r6,-0x040d(r1)
0017dfdc: 30a300ff andi r3,r5,0x00ff
0017dfe0: 34020008 ori r2,r0,0x0008
0017dfe4: 10620008 beq r3,r2,0x0017e008
0017dfe8: 2404ffff addiu r4,r0,0xffff
0017dfec: 3402000a ori r2,r0,0x000a
0017dff0: 10620005 beq r3,r2,0x0017e008
0017dff4: 34020002 ori r2,r0,0x0002
0017dff8: 10620003 beq r3,r2,0x0017e008
0017dffc: 30c20020 andi r2,r6,0x0020
0017e000: 10400005 beq r2,r0,0x0017e018
0017e004: 2402ffff addiu r2,r0,0xffff
0017e008: 0c05eb24 jal 0x0017ac90
0017e00c: 2624016e addiu r4,r17,0x016e
0017e010: 00402021 addu r4,r2,r0
0017e014: 2402ffff addiu r2,r0,0xffff
0017e018: 1082004c beq r4,r2,0x0017e14c
0017e01c: 27a40010 addiu r4,r29,0x0010
0017e020: 3c018019 lui r1,0x8019
0017e024: ac20f4f8 sw r0,-0x0b08(r1)
0017e028: 0c05f614 jal 0x0017d850
0017e02c: 02202821 addu r5,r17,r0
0017e030: 00409821 addu r19,r2,r0
0017e034: 34020001 ori r2,r0,0x0001
0017e038: 16620043 bne r19,r2,0x0017e148
0017e03c: 00000000 nop
0017e040: 93b20010 lbu r18,0x0010(r29)
0017e044: 00000000 nop
0017e048: 1255003f beq r18,r21,0x0017e148
0017e04c: 001210c0 sll r2,r18,0x03
0017e050: 00521023 subu r2,r2,r18
0017e054: 00021180 sll r2,r2,0x06
0017e058: 3c038019 lui r3,0x8019
0017e05c: 246308cc addiu r3,r3,0x08cc
0017e060: 00438021 addu r16,r2,r3
0017e064: 9202008e lbu r2,0x008e(r16)      Load 4th set of Reactions
0017e068: 00000000 nop            
0017e06c: 30420001 andi r2,r2,0x0001      
0017e070: 10400036 beq r2,r0,0x0017e14c      Branch if Hamedo is not equiped
0017e074: 2402ffff addiu r2,r0,0xffff      
0017e078: 0c0634e1 jal 0x0018d384      Chance to react
0017e07c: 02002021 addu r4,r16,r0      
0017e080: 14400032 bne r2,r0,0x0017e14c      
0017e084: 2402ffff addiu r2,r0,0xffff      
0017e088: 02002021 addu r4,r16,r0      
0017e08c: 0c06325a jal 0x0018c968      
0017e090: 2614016e addiu r20,r16,0x016e
0017e094: 1440002d bne r2,r0,0x0017e14c
0017e098: 2402ffff addiu r2,r0,0xffff
0017e09c: 3c058019 lui r5,0x8019
0017e0a0: 24a53848 addiu r5,r5,0x3848
0017e0a4: 3c018019 lui r1,0x8019
0017e0a8: ac33f5f0 sw r19,-0x0a10(r1)
0017e0ac: 0c01788b jal 0x0005e22c
0017e0b0: 02802021 addu r4,r20,r0
0017e0b4: 02002021 addu r4,r16,r0
0017e0b8: 34050001 ori r5,r0,0x0001
0017e0bc: 340201c5 ori r2,r0,0x01c5
0017e0c0: 00003021 addu r6,r0,r0
0017e0c4: 34070001 ori r7,r0,0x0001
0017e0c8: 3c018019 lui r1,0x8019
0017e0cc: a4222d9c sh r2,0x2d9c(r1)
0017e0d0: 3c018019 lui r1,0x8019
0017e0d4: ac35f8c8 sw r21,-0x0738(r1)
0017e0d8: 0c05f994 jal 0x0017e650
0017e0dc: a212016e sb r18,0x016e(r16)
0017e0e0: 14400015 bne r2,r0,0x0017e138
0017e0e4: 00000000 nop
0017e0e8: 0c05f688 jal 0x0017da20
0017e0ec: 02002021 addu r4,r16,r0
0017e0f0: 14400011 bne r2,r0,0x0017e138
0017e0f4: 00000000 nop
0017e0f8: 0c05f528 jal 0x0017d4a0
0017e0fc: 02002021 addu r4,r16,r0
0017e100: 3c028019 lui r2,0x8019
0017e104: 94422d9c lhu r2,0x2d9c(r2)
0017e108: 00000000 nop
0017e10c: a6c20000 sh r2,0x0000(r22)
0017e110: 3c018019 lui r1,0x8019
0017e114: ac3338bc sw r19,0x38bc(r1)
0017e118: 92230003 lbu r3,0x0003(r17)
0017e11c: 3402005d ori r2,r0,0x005d
0017e120: 14620003 bne r3,r2,0x0017e130
0017e124: 340200ff ori r2,r0,0x00ff
0017e128: a222001d sb r2,0x001d(r17)
0017e12c: a222001f sb r2,0x001f(r17)
0017e130: 0805f853 j 0x0017e14c
0017e134: 02401021 addu r2,r18,r0
0017e138: 3c048019 lui r4,0x8019
0017e13c: 24843848 addiu r4,r4,0x3848
0017e140: 0c01788b jal 0x0005e22c
0017e144: 02802821 addu r5,r20,r0
0017e148: 2402ffff addiu r2,r0,0xffff
0017e14c: 8fbf0044 lw r31,0x0044(r29)
0017e150: 8fb60040 lw r22,0x0040(r29)
0017e154: 8fb5003c lw r21,0x003c(r29)
0017e158: 8fb40038 lw r20,0x0038(r29)
0017e15c: 8fb30034 lw r19,0x0034(r29)
0017e160: 8fb20030 lw r18,0x0030(r29)
0017e164: 8fb1002c lw r17,0x002c(r29)
0017e168: 8fb00028 lw r16,0x0028(r29)
0017e16c: 27bd0048 addiu r29,r29,0x0048
0017e170: 03e00008 jr r31
0017e174: 00000000 nop


And this section of the routine in particular...


0017e04c: 001210c0 sll r2,r18,0x03
0017e050: 00521023 subu r2,r2,r18
0017e054: 00021180 sll r2,r2,0x06
0017e058: 3c038019 lui r3,0x8019
0017e05c: 246308cc addiu r3,r3,0x08cc
0017e060: 00438021 addu r16,r2,r3
0017e064: 9202008e lbu r2,0x008e(r16) Load 4th set of Reactions
0017e068: 00000000 nop
0017e06c: 30420001 andi r2,r2,0x0001
0017e070: 10400036 beq r2,r0,0x0017e14c Branch if Hamedo is not equiped
0017e074: 2402ffff addiu r2,r0,0xffff
0017e078: 0c0634e1 jal 0x0018d384 Chance to react
0017e07c: 02002021 addu r4,r16,r0


I would try myself but I cannot test any ASMs without crashing my laptop. I blame the graphics card :[