Forced enemy behaviour

Is it possible to force enemies to follow a pattern when using skills?


If so can it change when their hp drops to x% and make it change over and over again?
By using priority and conditions when implementing skills in enemy, you can create different skill sets for different hp %.


Also, you can make a FORCE ACTION in battle event block.


If anything else bothers you, contact me.
There's a lot of patterning that can be done with Yanfly's Battle AI Core.


However, you can also do quite a bit with the default patterning. In your example, you can have like Attack, Fire I and Ice I at priority 5 and Fire II, Flame I and Blizzard I at priority 8 with the condition that the enemy's HP is x% or lower.


The pattern priority works, to put simply, like putting tickets into a box:


-The skill(s) with the highest priority - in this example, 10 - gets 3 tickets in.


-Skills with priority 9 get in 2 tickets.


-Skills with priority 8 get 1 ticket in.


-Skills with priority 7 or lower are ignored.


Thus, with a skill selection of:


-Fire II (10)


-Flame I (9)


-Attack Up (9)


-Flame II (8)


-Fire I (7)


We get the following odds for each skill to be picked:


Fire II: 37,5%


Flame I: 25%


Attack Up: 25%


Flame II: 12,5%


Fire I: 0%
I suggest you use the default attack patterns before using AI plugins however - what you describe can be done by default.


Just use the different conditions for skills in the enemy attack pattern and make sure that the rate for each skill is set in a way to make the correct priorities and defaults for the selection.
Thx guys, i've been using this method till now but what i really wanted was to make the enemy to follow an specific order, something like this:

- Attack > Buff > Skill that poison your > Attack > Attack
- Repeat the process till health reaches 40%


- Suffle Pattern or change to a new preset

I'll give shot at the forced action thing and the AI stuff by yanfly
Thx guys, i've been using this method till now but what i really wanted was to make the enemy to follow an specific order

Yes, that is why the condition on turn order is there.


Make three attack skill lines conditioned on turn (1+5*x), (4+5*x) and (0+5*x)


Make an Buff skill line conditioned on turn (2+5*x)


Make the poison skill line conditioned on turn (3+5*x)


The second part with the *x will tell the enemy to repeat every five turns, and you have a five-action-sequence.


Have all those skills at a rating of let's say 3


Then make a different pattern with additional condition of HP = %whatever, but give them a rating that is 7 or so (that will force the other pattern to be skipped due to rating priority)


EDIT: I just checked, you can't combine different conditions, but you can still use that way to have the basic pattern replaced by random skill selections on HP levels
That's quite amazing, sad that it can't be mixed by default.

Original thread: https://forums.rpgmakerweb.com/threads/forced-enemy-behaviour.61009/