• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
April 18, 2024, 10:11:35 am

News:

Please use .png instead of .bmp when uploading unfinished sprites to the forum!


Question(s) About Weapon Guard

Started by Krendall, January 30, 2014, 07:52:09 am

Krendall

January 30, 2014, 07:52:09 am Last Edit: January 30, 2014, 05:50:11 pm by Krendall
Is it possible to make Weapon Guard a support ability rather than a reaction ability so that a unit can use another reaction ability with it? If so, how hard would it be and what (in general) would I need to do?

I noticed in FFTPatcher there's an option next to every ability to set what kind it is. Is it that simple? If so, I'll be quite happy.

Xifanie

No, unfortunately, FFTPatcher cannot edit which item can be equipped in which slot, and same goes for reactions/supports/movements.

Hopefully someone else can provide a more enlightened answer, but I'm not sure someone has ever achieved this before. I'm sure it was attempted though.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Choto

ha, it's a case of "too good to be true".

I'm not even sure what that setting does in FFTPatcher. It has something to do with how the ability appears in the learn-ability screens. Anyway, to do what you want you must do the following

Rename one of the support abilities weapon guard - you could eat one of the blank ones for that.

Then we're going to modify this routine: http://ffhacktics.com/wiki/Equipment_Evasion_Setting_(Physical)

More specifically:

00184fac: 9082008e lbu r2,0x008e(r4)      Load 4th set of Reactions (Target)
00184fb0: 00000000 nop
00184fb4: 30420040 andi r2,r2,0x0040
00184fb8: 10400004 beq r2,r0,0x00184fcc      Branch if No Weapon Guard

We're going to modify the first and 3rd line above. Take a look at this page: http://ffhacktics.com/wiki/Battle_Stats

And scroll down to offset 0x008e. You can see that the game checks the 0x0040 flag, which corresponds to wether or not the unit has weapon guard equipped.

You can also see that the support abilities start at 0x008F, and all the individual ability flags under each byte.

So now we need MasshexASM, a program written by FFH's Glain to write ASM code. Our new code to replace that which i posted above will look like this:

lbu r2, 0x00ZZ(r4)
nop
andi r2, r2, 0x00YY

Where ZZ and YY correspond to the desired ability.

in MasshexASM, copy paste that code segment into the left textbox and replace ZZ YY with what you want.

In the "starting address" box, put 0x184fac, since that's the address of the first command that we're writing to.

check the "show addresses" box

Hit "Encode"

Make sure the code on the left looks exactly like we want. Then we can make a patch to put in our .xml for FFTorgASM. In order to write to location 0x184fac, we need to subtract 0x67000. The reason for this is that Battle.Bin starts at 0x67000 in memory. so 0x184fac in memory is really 0x11dfac in the file. If this is confusing, don't worry about it just know that you have to do it.

Paste the hex encoding from MasshexASM in the space in between the <location file> tag and </location> tag as I've done below:

<Patch name="Support ability ______ is weapon guard">
<Location file="BATTLE_BIN" offset="11dfac">
8E008290
00000000
40004230
</Location>
</Patch>

The above patch does nothing as I've chosen 0x8e and 0x40, which are the default weapon guard settings. I'll leave it to you to create this patch for whatever skill you'd like as I've done 90% of the work for you :P Good luck!

Krendall

Thanks, but I'm not quite at the point of ASM-hacking at the moment. I'll keep this topic in mind when I do get there, though.

savantopus

wow, what an amazing explanation Choto thank you. I haven't tried this hack yet myself but for you to go so far out of your way for another person means a lot.
  • Modding version: PSX
Every word man speaks is a plagiarism.