• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
March 28, 2024, 11:59:09 am

News:

Please use .png instead of .bmp when uploading unfinished sprites to the forum!


Best way to get enemies to use wider variety of skills?

Started by DuxorW, October 05, 2014, 12:55:52 pm

DuxorW

I am making my own personal patch using fft rebirth as a base. One thing I want to do is have some enemies, such as the Lucavi, cast a wider variety of spells. Currently I am testing my patch at the Adramelk battle and he pretty much spams the same abilities (summons) over and over (I almost never see the fire4/bolt4/ice4 spells). I thought the random hits flag in fftpatcher would be a good way to make him use an uber powerful ability once in a while.

These are not necessarily the final abilities I want him to have, but or the sake of experimentation I gave him fire4/ice4/bolt4/demi2/flare as his main abilities and took away his summons. Here are the stats for each ability in fftpatcher

fire4/ice4/bolt4: Range 5, Effect area 3, Vertical 3, CT 5, Y=40)
Flare is normal except Y=45 and CT is 6
Flare2 is Range 4, effect area 1, vertical 3, CT 8, Y=65, flagged as random hits
Ultima is Range 4, effect area 2, vertical 3, CT 10, Y=60, flagged as random hits

The spell powers are so strong because units have such high hp in rebirth.
I wanted him to occassionally use flare2 and lvl2 ultima, so I flagged them as random hits. This seems to cause him to vastly prefer flare2 instead of using a random mix of flare2 and ultima. I find that adding several other dummied "random hits" abilities to his skillset increases the odds that he will use flare2, but not the odds that he will use those other, weaker spells, including ultima. So it seems like random hits forces the AI to occasionally use one of the abilities flagged as random hits, but it looks at all the abilities flagged as random hits and chooses the one best suited for the situation (usually dealing maximum damage).

For example, if I flag fire4/ice4/bolt4/demi2/flare/flare2/and ultima ALL as random hits, he will use flare2 essentially every turn (unless he can hit more units with ultima and kill at least one of them), and I essentially never see the other spells unless my units are all spaced out and he can only hit one of them. In that case he will use whatever ability will kill that unit most efficiently, and if he can't kill them in one hit he will deal max damage using flare2.

If I try to give him an AOE "megadeath" spell he will use it every turn, and if I flag it (and ultima and flare 2) as random hits he will not use flare2/ultima and will instead only use death if he isn't casting fire4/ice4/bolt4/demi2. If i give him regular death he will spam it every turn if he can't kill multiple units using some other ability.

So right now I am essentially stuck having him use ice4/bolt4/fire4/demi2 and randomly using either flare2 or ultima (even though the ability is flagged as random hits, he uses it with alarming frequency). Strangely, if I give him ultima (not flagged as random hits) and flag ice4/bolt4/fire4 as random hits, he will only ever use ultima. So it seems like the ability flagged as random hits needs to be more powerful than the other abilities in order to ever be used, at least in my instance.

Is there a good way to get him to use all of these skills? I realize I am kind of asking to make the AI dumber than it currently is. It's just nice and suspenseful to know that the enemy has some ultra powerful abilities but will use them sparingly.

Ronin1984

Honestly tweaking AI is still a bit over my head but right now my best-guess suggestion is perhaps to tweak the charge time of the spells so that the weaker ones are faster and more appealing in terms of AT for the boss creature? Then, hopefully, it will fire off the weaker spells when its under pressure and only use the uber ones when it feels it can devote the time to it safely. I wish I could be more help but that might be worth a shot. Good luck.
"History does not repeat itself but it often does rhyme." -Mark Twain

FFMaster

Giving reasons to cast different spells is the best way to about it. For example, your  Fire/Ice/Bolt spells are exactly the same, except for element. Ever wondered why the AI loves using Fire and Shiva? It's because they are at the top of the list while the exact copies (Ice, Bolt, Ifrit, Ramuh) are lower on the skill list.

So you can take a few things away from this:
- Units will use skills higher in the skillset more often, if the skills are similar.
- Units will always be efficient. If There was no difference between Skill 1 and Skill 2 except Skill 2 does a bit more damage, the AI will almost always use Skill 2.

Skills that do only damage are considered similar skills. You can change it up by adding different cast ranges, charge times or adding statii.
  • Modding version: Other/Unknown
☢ CAUTION CAUTION ☢ CAUTION CAUTION ☢