• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
March 28, 2024, 07:22:55 am

News:

Use of ePSXe before 2.0 is highly discouraged. Mednafen, RetroArch, and Duckstation are recommended for playing/testing, pSX is recommended for debugging.


AI behavior with a CHARGE+X variant

Started by Squaresoft, March 13, 2020, 09:57:04 am

Squaresoft

March 13, 2020, 09:57:04 am Last Edit: March 13, 2020, 01:41:46 pm by Squaresoft
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.
  • Modding version: PSX

Nyzer

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.
  • Modding version: Other/Unknown

Squaresoft

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.
  • Modding version: PSX

Heisho

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.
  • Modding version: PSX
Grrr, arwg, hiss, and some other zombie noises...
  • Discord username: Heisho

Nyzer

I don't think that really addresses the issue, does it?
  • Modding version: Other/Unknown

Heisho

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
  • Modding version: PSX
Grrr, arwg, hiss, and some other zombie noises...
  • Discord username: Heisho