r/RPGMaker • • 13d ago

RMMV Enemy reapplying status effects when already on.

So, I've resumed work on my project, and the next step is working on a series of three bosses hidden across the map, with me working on the first one. I've given it two abilities that apply a positive buff to it (one for physical defense and one for magic), set to become usable after it's health drops to 55%. Only problem is that it will still use those abilities even when they're already up, thus wasting a turn. Is there a way to make it so that they only use these if they aren't in effect?

2 Upvotes

10 comments sorted by

1

u/Kermy89 13d ago

The best way to achieve this is using Yanfly Battle AI Core plugin. You can set more complex conditions for skill usage with notetags.

1

u/3dmariobros864 13d ago edited 11d ago

So, I installed the plugin, only issue is that I have zero knowledge with coding, so I have no idea what I'm even doing with it.

Edit: Here's what I'm using for the code:

<AI Priority>

State !== Protect, Shell

</AI Priority>

1

u/Carlonix 13d ago

You should check the plugin description for some examples on how to use it

1

u/Alarmed-Mud-3461 13d ago

If it's just for a one-time enemy, you can do it in the troop event, no? Have the buff give an empty state (if it's not a state of its own), check for the state and only apply/reapply the buff if the state is not there. At least that's how I'd do it in VX Ace. (I'd do a force action instead of giving the boss a skill with the 55% health condition.)

1

u/3dmariobros864 13d ago

I've never even used troop events. What would that look like?

1

u/Alarmed-Mud-3461 13d ago

This is what it looks like in Ace. You set up that once a turn, every turn when the enemy's HP is 55% or less, check if the enemy has state, if so, force the enemy to use skill, if not, do nothing.

Edit: it should have been if the enemy DOESN'T have the state, sorry.

1

u/zombietoaststudios 13d ago

I'm not sure why people are suggesting plugins for this.

Just have the states seal the skill that applies them.

1

u/3dmariobros864 9d ago

I didn’t know that existed, but it does sound useful. Only real flaw is that it only works well if there’s one enemy. Otherwise you’d have to save applying it to the caster last. I’ll use it like this for now though, until I can figure out the plugin.

1

u/zombietoaststudios 9d ago edited 9d ago

Well, it was a suggestion based on the situation you described: a boss fight where the boss uses these skills on itself and you're trying to stop it from using these skills on itself when it already has the state.

If it's a fight with multiple enemies and the skill user is applying the buffs to it's allies then that's an entirely different scenario.

In that case I would personally use yanflys target core which allows you to assign a notetag to a state that prevents specific skills from targeting it and if there are no valid targets (the user and every ally has the state) then the enemy won't try to use the skill.

1

u/Liamharper77 13d ago

Having two separate buff abilities complicates things a bit without plugins. Otherwise you could do the following.

Set the regular bosses toolkit to a low rating (let's say, 1)
Add one buff ability with the condition that the boss has 0-55% health, at rating 5
Add a second copy of the bosses toolkit, all with the condition that the boss has the buff, at rating 10

Now the boss will always use the buff skill when it isn't active and it's HP is 55% or below. Otherwise it'll use the regular toolkit.