• Welcome to Final Fantasy Hacktics. Please login or sign up.
 

Simple way to increase damage of formula 4? Also, changing item types?

Started by Ansehelm, January 31, 2019, 10:42:51 pm

Ansehelm

Heyo homies,

So formula 4 in FFTP is the one that allows for guns that can fire variable spells (Fire1, 2, or 3). Problem is, the guns that use it are pretty underwhelming.  I'd like to be able to increase their damage output by 50-75%, but don't want to raise the Weapon Power, since this can be abused with Jump and similar abilities.  By the same token, the spells are already pretty powerful by themselves (I wonder if this formula halves the damage versus the spell was cast normally).  Anyway, is there a well-worn path to either crank up the damage output of this formula across the board, or allow for variable increases, such as formula 2D (PA*(WP +Y))?

Also, while we're at it, I've changed several item types in my mod (e.g. helmet to robe), and it sort of works, except that the robe has a little helmet image next to it and is only equipped on the head - Apparently modifying "Item Type" in patcher doesn't do much.  How does one *actually* change the type of item?  Not strictly necessary, but it would save me from a lot of item reshuffling.

Danke

Edit: Also, I guess I should've posted this in the help forum. My bad. Feel free to move
  • Modding version: PSX

Glain

I mean, formula 4 could be modified via ASM hacking to do the sort of thing you're talking about.  The modifications made by the ASM patch would depend on what exactly you wanted the formula to do.  Not sure if that answers the question.

I do know item types are hardcoded by item ID in some places in the code.
  • Modding version: Other/Unknown

Ansehelm

Yeah, like I said, increasing the damage output of the formula is the end goal, I don't really care how it's done.  I suppose there's a way to multiply the current damage by 1.5 or add in a damage modifier with X or Y as with some swordskills. Currently the only way I know to make the magic guns do more damage is to raise the WP (but then jump becomes OP with that weapon), or raise the spell damage (but then the spell becomes OP), so modding the formula is the way to go.  ASMing is not and probably never will be my specialty, so if you or some other pro could help me that would be sweet.

And yeah, I haven't found anything to indicate that item types have been successfully changed, so I guess I'll do some reshuffling there.
  • Modding version: PSX

Glain

Hrm, well, here's a patch that should do 1.5 * ability power for formula 4, rounded down.  Untested!


<Patch name="Formula 4: 150% Ability Power">
    <Location file="BATTLE_BIN" offset="188C34" mode="ASM" offsetMode="RAM">
        lui     t0, 0x8019
        lbu     t1, 0x3902(t0)
        lbu     t2, 0x38fa(t0)
        sh      t1, 0x38ce(t0)
        srl     t3, t2, 1
        addu    t2, t2, t3
        sh      t2, 0x38d0(t0)
        nop
    </Location>
</Patch>
  • Modding version: Other/Unknown

Ansehelm

Dope.  I'll have to try it out.  Although I wonder if it's at the right offset - I normally apply patches via hex, and Battle.Bin ends before offset 188C34.  Is that the offset as referenced from the whole ISO file?
Thanks
  • Modding version: PSX

Glain

That's the location within the PSX RAM where the code will be when it's run.  The offsetMode="RAM" attribute will cause that offset to automatically be translated to the correct offset in BATTLE.BIN, that being 0x121C34.
  • Modding version: Other/Unknown

Ansehelm

ai'ight.  Maybe I'm applying it wrong, but it doesn't have any effect yet

Edit: it could be the problem on my end; FFTorgASM is being dumb and may not be applying or recognizing new patches properly, and I don't know how ASM stuff translates to pure hex
  • Modding version: PSX

Glain

Hmm... not sure what may be going on there.  The patch should apply just like any other patch. 
I just did a test and it seemed to work for me.  For 70 Faith Ramza with a Blaze Gun and two savestates, one normal and one patched:

58 faith target, bad compat: normal damage 85, patched damage 127
53 faith target, normal compat: normal damage 103, patched damage 155
  • Modding version: Other/Unknown

Raijinili

If you're still looking for an easier hack, you can add Enhance:Whatever and Innate:Faith to the magic guns.

Be aware that it'd make Equip Gun Wizards a strong option. To fix that, you can eliminate Equip Gun or add Innate:Silence, with the risk of overcomplicating the whole thing. (Magic Gun Chemist can't cast Time Magic? Why?)

Is magic gun damage really that important? It's reliable ranged damage for support jobs, not a powerful unevadeable attack for one-trick ponies (except Mustadio).
  • Modding version: Other/Unknown

Ansehelm

Hopefully this doesn't count as a necropost. Not that old anyway.

But yes, I'm here to report that it works great.  I had been having quite a few issues on that computer, but I tried it on a different one, and it works great, so thanks to Glain for that!

Also, I'm making a mod that significantly alters what formula 4 is used for (generally more powerful items than vanilla), so yeah, this hack is pretty useful for me
  • Modding version: PSX