Yanfly Battle A.I. Core: Help with setting up enemy escaping behavior

Hungry Moogle

A Rat in the Wall
May 4, 2017
Reaction score
First Language
Primarily Uses
I was wondering if I could some help with setting up an enemy A.I. behavior wherein when the enemy forces have been reduced to a single remaining enemy, the sole survivor will run away. I've been trying to setup this behavior with Yanfly's Battle A.I. Core plugin, using the following AI Priority:

<AI Priority>
Troop Alive Members = 1: Escape
<AI Priority>

Unfortunately, this setup hasn't been working as intended, as the enemy will instead run away despite all of their allies being alive, those craven curs. I'm not sure why it isn't working, I would have thought that 'Troop Alive Members = 1' would translate to the enemy running away when the number of enemies was equal to one, but evidently not since its working the way I wanted it to.

There's also a 'group DEAD MEMBERS eval' option as well, which (unless I'm misinterpreting its function) counts the number of enemies currently KO'd in the battle. The issue I with this have this option though, is that (unless, once-again, I'm misinterpreting the manner in which its works) this would be problematic with enemy formations with varying numbers of enemies. For example, if the enemy is setup with the AI Priority 'Troop Dead Members <= 3: Escape', the enemy would run away from the battle once the number of enemies dropped below three, despite there being two enemies left to continue the fight.

I also wondering if it is at possible to include a <=25% HP trigger to go along with the A.I. instructions for an enemy to escape when alone, so that an enemy would only run away if it is both alone and it's HP is in critical.

Latest Threads

Latest Profile Posts

Does anybody want to get weirded out? If so, I have a weird fact for them in the top comments.
Creating the mood, coloring, and lighting for this gonna need a big brain moment.1685936069202.png
Someone in a facebook group just corrected something I said, by saying exactly what I said. The mind boggles.
Less than 20 tiles remain in Inside_B that I need some kind of analogue of in my in custom Inside_B, and a whole 39 tiles that I didn't use and can thus make my own custom tiles or my own flavors of from other tile sheets.

Forum statistics

Latest member