Armor that gives a state to an enemy when the enemy's HP is under a certain percentage

Hey there everyone, I hope you're doing well !

I'm trying to give a piece of armor a passive ability that makes it so when an enemy's HP is under 25%, the enemy is inflicted with a state.
I tried the "easy" solution by doing the following :
> The piece of armor gives an attack state (with a 1000% chance of success) to the character, so when the character attacks an enemy the enemy gets the state
> I used Yanfly's AutoPassive plugin to make it so the state has the passive condition : "triggers when HP is below 25%"
By doing that, I thought that the state would be automatically inflicted when the user attacks an enemy, but it would only show and trigger when said enemy has 25% of its max HP.
Unfortunately, the State seems to ignore the passive condition and triggers as soon as the user attacks the enemy, whether the enemy's HP are under 25% or not. Would you guys know why, and how I can fix that ? Thanks in advance ! ^^
StatesHelp.jpg
I used Yanfly's AutoPassive plugin to make it so the state has the passive condition : "triggers when HP is below 25%"
The state having a passive condition tag doesnt automatically make the state a passive. It can still be applied through normal means and be a normal state. The condition tag only applies when the state exists on the battler as a passive, like through passive state notetags in armor, enemies, etc.

If you have access to yanfly's aura state, id make a passive state attached to the armor that has an aura effect to give a state to all enemies to do whatever you want, and give that aura effect state an aura condition for the enemy to be below 25% hp
When you're posting screenshots for us, please change MV's language to English. If you're using it on Steam, you can right-click it in your Steam library, go to Properties, and use the drop-down menu there.

That way we can read all of the editor fields and the trait names and that stuff.

The piece of armor gives an attack state...
I used Yanfly's AutoPassive plugin to make it so the state has the passive condition...
You can't use states that way. Per the Auto Passive States instructions, states are only passive when they're assigned to a database entry via the <Passive State> notetag.

This situation sounds to me like you should put a passive state on the armor and make that state have an aura via Yanfly's Passive Aura Effects. That aura state can have the HP condition you're looking for.

Edit: Bah, be that way @Robro33 🤣
Okay, thank you guys ! I'll try that ^^

Ah, okay, I didn't know I could change the language of the software that way, but I figured it wouldn't be really problematic since the words are similar to English and the tabs are on the same spots ^^ I'll think about it next time !
I was able to figure it out because I studied some French and you did say in your post what the traits were doing. But it's good advice generally when you need help 🙂
Sorry to come back to that thread, but I tried your idea and it doesn't work ><

To put it simple, I made the armor give State 1 to the character, and on the State 1 I made an aura effect that gives State 2. On State 2 I put the Passive condition "HP below 25%", but the condition is getting ignored by State 2, so basically the enemies have the State from the start of the battle...
give that aura effect state an aura condition
On State 2 I put the Passive condition "HP below 25%",
The passive aura effects plugin has its own notetags separate from the auto passives one. You have to use the aura condition tags on the aura effect if youre still using the passive condition ones
Okay, thank you !
I made the armor give State 1 to the character
I hope that's just an example - per the instructions in the database, state 1 must be your death state. Changing it to be something else will break things in the battle system.

and on the State 1 I made an aura effect that gives State 2. On State 2 I put the Passive condition "HP below 25%"
That's not how it works. Nothing in the plugin says the states being given are passive states and can take passive state notetags.

1718815893895.png


You'd need to use this, per the instructions. The provided example even gives you an HP level condition So:
Code:
<Custom Aura Condition>
condition = user.hpRate() < .25;
</Custom Aura Condition>

Edit: Damn it, @Robro33 🤣
Edit: Damn it, @Robro33 🤣
Twice in one day? Im on a roll!
Its usually the other way around 🤣
@Robro33
1718816409152.png
I hope that's just an example - per the instructions in the database, state 1 must be your death state. Changing it to be something else will break things in the battle system.


That's not how it works. Nothing in the plugin says the states being given are passive states and can take passive state notetags.

View attachment 308896

You'd need to use this, per the instructions. The provided example even gives you an HP level condition So:
Code:
<Custom Aura Condition>
condition = user.hpRate() < .25;
</Custom Aura Condition>

Edit: Damn it, @Robro33 🤣
Death state ?

Well, I know nothing in the plugin says so, but since it's another plugin on States by the same author I thought it could work maybe. ^^

I tried using the custom condition I saw in the plugin but it didn't work, the way you rewrote it does work though ! So thank you ! ^^
Death state ?
the state the game automatically applies when a battler's hp hits 0 and uses to consider if theyre dead. its state 1 by default, which is why he hoped you said "state 1" as an example and didnt actually mean you tried applying your database's state 1 as an aura.
Death state ?
From the default "New Project" settings:
1718846943185.png


Well, I know nothing in the plugin says so, but since it's another plugin on States by the same author I thought it could work maybe. ^^
As a rule, plugins do exactly what they say. No one's going to go through the effort to code in notetags and then not list them in the instructions 😉

Good luck with your project.
Ah, no no no ! Sorry I thought you were referring to something else, like an expression of some sort haha ! No indeed I didn't try to apply it on the death state don't worry ^^

Thanks again !

Original thread: https://forums.rpgmakerweb.com/threads/armor-that-gives-a-state-to-an-enemy-when-the-enemys-hp-is-under-a-certain-percentage.169626/