Final Fantasy Hacktics

Modding => Help! => Topic started by: Squaresoft on March 13, 2020, 09:57:04 am

Title: AI behavior with a CHARGE+X variant
Post by: Squaresoft on March 13, 2020, 09:57:04 am
Hello there.
I created a "Charge+X" variant.
A simple skill that charges an attack (melee/bow) and that can be interrupted if a character is knocked back while charging, or if I move AFTER casting it, just like the normal Charge+X skill.

It works ALMOST perfectly, the problem is that the AI will treat it like a normal spell, I mean:
•The AI may move and then CHARGE. (That's perfect)
•But may also charge AND THEN move in the same turn, cancelling the ability, wasting his turn.

Is there a way to prevent this behavior?.

My skill currently has:
*Affect HP
*Target Enemies
*Physical Attack
*Weapon Range

....................................

By the way. Checking at the vanilla skills, Charge+X abilities doesn't have the "Check CT/Target" ticks like most casting spells, so I wonder...

What
(1) The Normal/Aim/* field under "Chance to learn",
and
(2) and the "Check CT/Target" checkbox under AI Behavior,
does and if it may affect said behavior.

Thank you.
Title: Re: AI behavior with a CHARGE+X variant
Post by: Nyzer on March 16, 2020, 01:59:11 am
No, the Patcher isn't set up for this.

IIRC there's an ASM for something along those lines that prevents the unit from moving after charging, but that's only a faint memory of having read something somewhere and I can't be any more specific.
Title: Re: AI behavior with a CHARGE+X variant
Post by: Squaresoft on March 23, 2020, 03:06:07 pm
Quote from: Nyzer on March 16, 2020, 01:59:11 amNo, the Patcher isn't set up for this.

IIRC there's an ASM for something along those lines that prevents the unit from moving after charging, but that's only a faint memory of having read something somewhere and I can't be any more specific.

Oh too bad, I suppose that I must deal with it,
just like many hard-limitations. Well, the AI would feel more "human" making mistakes, hah,

Thanks for this Patcher clarification, so I won't waste more time trying clueless.
Title: Re: AI behavior with a CHARGE+X variant
Post by: Heisho on April 03, 2020, 12:17:22 am
Hello there!

Try this:

<?xml version="1.0" encoding="utf-8"?>
<Patches>

<Patch name="Silly hardcoding removal, related to skillset 08">
    <Description>If you use skillset 08 (charge) for anything other than charge, you want to use this hack.  This eliminates the hardcoding that causes characters to cancel their own spells by moving.</Description>
    <Location file="BATTLE_BIN" offset="1191a0">
FFFF0234
    </Location>
  </Patch>

</Patches>

I haven't tested yet but the source is more than trustworthy.
Courtesy of Emmy if you were wondering.
Title: Re: AI behavior with a CHARGE+X variant
Post by: Nyzer on April 03, 2020, 12:43:36 am
I don't think that really addresses the issue, does it?
Title: Re: AI behavior with a CHARGE+X variant
Post by: Heisho on April 03, 2020, 01:00:06 am
Quote from: Nyzer on April 03, 2020, 12:43:36 amI don't think that really addresses the issue, does it?

Well according to the wiki, that address handles the skillset check for removing Charge, it is changed from 08 to FFFF so, I think it might work