Adressing enemies outside of battle

Simple question, I'm not that much into scripting, furthermore I need to specify my question with an explanation of my motives.

First of all: I use a Plug-in which allows me to check for common events, while the battle screen is active

I want to check via an common event if the hp of an enemy is under a certain amount of health (%), after that the specific enemy on the field should chance his status to "bleed" I want to implement it universal for every encounter without copying the same line of codes on every troop encounter.

I have two major problems:

- How can I check the HP of enemies inside an common event? I need some sort possibility to adress the enemy and his hp value. It's not my intention to check it on the troop event side.

- Goes in the same direction, how can I change the status condition of an enemy? In the conditional branches I can merely chance the status of actors.

That gives me headaches for quite a while, it can't be that difficult or inconvient but it seems I was mistaken.

if anyone knows a good plug-in for such purposes, I would be happy to know about it.
Especially targeting enemys is horrible because there is no "this" option, just the indexes of the enemies.
I think this would be next to impossible the way you're trying to do it.

Every single enemy is susceptible to this state? Then you want to use YEP_AutoPassiveStates. There is an example at the bottom of his lunatic code, where the state only becomes active when the condition is met, we don't even have to change it much, as the example is already checking to see if the afflicted battler is below 25% max hp.
Code:
<Custom Passive Condition>
if (user.hp / user.mhp <= 0.25) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>
Put this note tag on the bleed state that you want the common event to apply. Then you want to use the plugin parameters to give this state to all enemies. This will make it so that every single enemy in the game will gain the bleed state if below 25% hp (or whatever arbitrary % you choose). If you want a particular enemy to not bleed out, like a boss, you can still make them immune to the bleed state in their traits box.
Wow, thanks for the quick answer that's exactly a convient solution I searched for.
Absolutely no need for a script
- How can I check the HP of enemies inside an common event? I need some sort possibility to adress the enemy and his hp value. It's not my intention to check it on the troop event side.
Control variable - game data - enemy - HP (or whatever game data you want to load into the variable)
then check the variable for its number as usual.
- Goes in the same direction, how can I change the status condition of an enemy? In the conditional branches I can merely chance the status of actors.
Check by conditional branch - on the third page you have enemy state to check
Change by event command "change enemy state" on the third page.

There is only one thing to keep in mind: because the common event is not connected to a troop, you can only set those commands by enemy ID without getting the enemy name directly (that is why it's displayed as "enemy #1 ?" instead of giving the enemy type directly.
But the IDs are corresponding to the same IDs you have for the eight enemies in the troop.

Original thread: https://forums.rpgmakerweb.com/threads/adressing-enemies-outside-of-battle.80620/