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

Problem with Formula 9/53 (Gravity attacks)

Started by Aqueous, August 04, 2012, 09:20:58 am

Aqueous

Hi All!

Got a little issue I can't work out how to fix. I'm currently trying to make a ranged attack for the archer that works like the gravity spell. For some reason, this attack causes the game to crash when a target is selected as if it's having trouble calculating the damage it should apply. I'm using the same formula as Gravity (formula 9) and have also tried formula 53 but no matter which I select I'm seeing crashes and it's always when I select a target.

Please see a screenshot of the options selected for the attack in the FFTPatcher. Also, don't worry about the fact I'm using empty skill slots as all the others work perfectly.



Thanks guys.

RavenOfRazgriz

Don't flag the Use Weapon Range flag in the topleft box.  That's a dynamic flag set by the skill when in use.  The AI flag set should be Magical Attack and not Physical Attack - that flag tells the AI whether the skill is affected by Protect/Defense UP or Shell/Magic Defense UP among other things, and you're using a magical formula, so flagging Physical Attack will make the AI act incorrectly with the skill.  Longbow Attack also doesn't need to be flagged.

Weapon Range skills also require Allow Self-Target and Hit Caster to be flagged.  Weird, I know.  Depending on what animation byte setup you're using, you may also need Weapon Strike flagged.  (For example, if you're using Animation Byte set 07 00 00 to make it look like the Archer is firing his Crossbow, then you need Weapon Strike set.  You may also need it set because you're using Weapon Range, I've never tried making a Weapon Range skill without Weapon Strike so I don't know if they're co-dependent or not.)

You can look to one of the Knight's Break skills to see all the things I just told you.  Base your flags off one of those skills and what I've told you and see if you still get errors.



Also - if you're giving this to Archers, make sure their Skillset is set to <Default> under the Action Menus Tab and that their Skillset contains NONE of the original Charge +X skills. These skills are hardcoded, and an error like not removing them or forgetting to set Archer skillset to <Default> may also be the source of your error.

Aqueous

Hi Raven,

Thanks for the reply. I've tried each of these things and am unfortunately still getting the same problems. In desperation I even tried copying the Gravity skill over this one and using that without changing a thing - it still crashes!

I've already made a few arrow skills so the "Charge" skill set has been set to default.

It's really weird but for now I may just give up on this ability - perhaps there's some hardcoding for gravity-based attacks?


Aqueous

Hi Raven,

I looked into this more and the problem isn't with this skill specifically or even gravity-based skills as I've been getting the same issue now with any skill that revives someone, even when I haven't done anything to the skill in question. For a little while, I didn't make the connection but it seems basically any formula that displays a value that is calculated based upon the target's HP is causing my game to crash.

It seems an ASM hack I've downloaded and installed has somehow caused issues as I started from scratch with a new ISO, installed my own patches without any ASM hacks and it's working fine. So I'm now looking into adding each of the ASM hacks I wanted, one by one, to work out which is causing the issues.

Thanks for the help :)

Lydyn

Let us know which ASM hack causes the crash. =)

Aqueous

Hiya!

Nailed it. It's one of Razele's hacks found in this thread: http://ffhacktics.com/smf/index.php?topic=1785.0

The hacks that change formulas 09 (Demi), 0D (Raise), 0E (Death), 10 (Life Drain), 35 (Revive), 47 (Blood Suck), 4D (Mutilate), and 53 (Hurricane) to use Min(999,MaxHP).

Here's the code:

<Patch name="Change % HP formulas to use Min(999,MaxHP)">
    <Description>
      Formulas affected include 09 (Demi), 0D (Raise), 0E (Death), 10 (Life Drain), 35 (Revive), 47 (Blood Suck), 4D (Mutilate), and 53 (Hurricane).
    </Description>
    <Location file="BATTLE_BIN" offset="11F624">
      2108E003
      DF54000C
      1980023C
      21F82000
      1980033C
      FA386390
    </Location>
    <Location file="BATTLE_BIN" offset="EC7FC">
      982D428C
      00000000
      2A004290
      054e0508
      E803432C
    </Location>
    <Location file="BATTLE_BIN" offset="0ec814">
      02006014
      00000000
      E7030234
      1980033C
      902D638C
      0800E003
      00000000
    </Location>
  </Patch>

Thanks :)

RavenOfRazgriz

Use the version of that ASM that exists in the .482 release of FFTPatcher instead, which you can find in the Hacking/Patching Tools section.  FDC, Glain, and some others went through every ASM included with that release and made sure they all worked properly so this should resolve your issue if you simply switch to the updated version.

Aqueous

Alright, thanks guys. I had the .478 Patcher from a few weeks ago, nice that there's an update :)

Almost got the game in a state where I can just play it through beginning to end rather than playing 30 second intervals and 30 mins fixing bugs! Finally...