• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
October 22, 2020, 10:17:57 pm

News:

Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed. Find out how you can help in the Recruitment section.


AI and AoE ASMs

Started by Dokurider, June 10, 2020, 07:19:44 pm

Dokurider

June 10, 2020, 07:19:44 pm Last Edit: June 10, 2020, 08:54:56 pm by Dokurider Reason: Updating OP
Long time no see, FFH. I'm remaking my old ASM thread. This post will contain links to all future ASMs published as well as a current XML of all of my hacks.
Stat and Golem Priority

Dokurider.xml

Dokurider

(Note to mods: If making a new thread is problematic, feel free to merge it with the old thread or I can do it.)

Stat and Golem Priority Hack

This is a hack that gives the AI code for Stat usage. The rules I implemented go as follows:

  • Stat Priority has (Level/10) + 3 floor in order to keep stat usage reasonable. In addition, Stats have an bottom cap of 3 (or 1 if SP) and an upper cap of 24 to prevent monster stat growths from bugging the AI out and 24 seemed like a reasonable cap. In addition, Stat Priority gains a Level/10 bonus.
  • Stat Priority increases depending on what the target's Support is. For instance, PA priority doubles if the target has 2S/2H and +1 if MAtkUp. This is not a fool proof by any means and can absolutely be manipulated. Nevertheless, I concluded this is the best system for determining what units need to be targeted for stat abilities. Feel free to make suggestions as this is entirely experimental.
  • Abilities also gain a Ability X/Y priority bonus. Stat Breaks have their X bonus doubled if they are using Two Swords.
  • Speed priority has a +1 weight for obvious reasons.
  • Brave's priority is (Ability Y / 2) unless Brave is less than 21, then it's just (Ability Y). This only matters for Chicken. Level has no factor in Brave calcs.
  • Faith is (Ability Y / 4). It will properly invert if said ability is in the Unfaith skillset. Level has no factor in Faith calcs either.
  • Song/Dances (determined by formula number) have their priorities cut in half.
  • Multi Stat abilities are treated as Speed+ abilities.
  • Quick/CT 00 has priority that scales based on curCT, up to 0x30. No Level Bonus.

I also reworked my old Golem hack to properly divide by current living team units. I also made it as a standalone hack for those who just want the Golem hack.

I had many setbacks making this hack. Finding out that the Priority routine clears out Current Action Data multiple times was heartbreaking in particular. I ended up having to implement a very crude workaround to even make this hack possible. Because of this behavior, I may never be able to make the AI reasonably act against Reactions/Procs. Basically, I'd have to save a copy of Current Action Data for every unit, which is kanji space and calc intensive. There might yet be a glimmer of hope, but I've yet to look into it and it's not a very promising lead either.

Regardless, I hope you enjoy this hack. Feel free to leave questions and comments below as always. Thank you.StatGolemPriority.xmlGolemFixFinal.xml

RavenCurow

August 30, 2020, 04:32:35 am #2 Last Edit: August 30, 2020, 05:10:04 am by RavenCurow
Hi, I was wanting to use your hack for the arcing aoe range. I was wonder if that hack works well as FFTOrgASM stats there there is a possible load delay issue and if that would be a problem. It also lists that it is attached to an unknown ability flag. Is this one of the blank flags listed in FFTPatcher? If so which one?

Edit: So after trying the ASM I answered most of my questions. The only thing is after trying it I found that it didn't do quite what I expected. I expected in to increase the size of the AOE based on how high the caster is. Instead it increased the AOE size based on how high the tile I was targeting was which wasn't what I expected lol.
  • Modding version: PSX
Ramza: Delita, your hurt?
Delita: No, really? Did you think I was taking a nap down here?