Overdose Mechanic how to make it? (RPG MAKER MV)

Im trying to make a mechanic that when an actor use one item or items from a certain group the chances of him die grown. Three strikes. I tried to make it using states. The item has 2.5% to cause KO, and the different items give the actor 800% KO State Rate, so it should be 1-> 2.5% / 2 -> 20% / 3 -> 160% (certain death). But it doesnt work. Something wrong with my logic I suppose. I think it can work without any plugins, but i accept plugin suggestions.
Moved to MV Support
You should always post what you've tried to do when you're asking for help, that way we can see why it didn't work.

Especially because this:
the different items give the actor 800% KO State Rate, so it should be 1-> 2.5% / 2 -> 20% / 3 -> 160% (certain death).
doesn't make sense to me. Why would you use an item that makes you more vulnerable to instant death spells? And why is something 160% instead of 100%?

And why is the player choosing to use an item the third time if it will outright kill the character?

But just basically, you would make the item apply a blank state, we'll call it Dummy State. Then it has a common event attached to it that does:
Code:
◆Control Variables:#0002 Max HP = Max HP of Harold
◆If:Harold is affected by Took 2 items
  ◆Change HP:Harold, - {Max HP} (Allow Knockout)
  ◆
:End
◆If:Harold is affected by Took 1 item
  ◆Control Variables:#0003 Random = Random 1..100
  ◆If:Random ≤ 20
    ◆Change HP:Harold, - {Max HP} (Allow Knockout)
    ◆
  :Else
    ◆Change State:Harold, - Took 1 item
    ◆Change State:Harold, + Took 2 items
    ◆
  :End
  ◆
:Else
  ◆Control Variables:#0003 Random = Random 1..100
  ◆If:Random ≤ 3
    ◆Change HP:Harold, - {Max HP} (Allow Knockout)
    ◆
  :Else
    ◆Change State:Harold, + Took 1 item
    ◆
  :End
  ◆
:End
◆Change State:Harold, - Dummy state
Aren't states a little bit limitted for this? Well I suppose you want to have them for some "knockout ressistance" through the "State Rate" trait.

But how would you make the State Rate to change? I am not aware that you can 'tweak' state traits on the fly. Maybe if you would have multiple of those states with incremental State Rate? But that would be discrete solution, like "Knockout resistance 5%", "Knockout resistance 10%" but nothing in between.

For better granularity, I would still keep the real value for each character in a variable and set the state when crossing a threashold.

So for example:
For Harold, you would have variable ressistanceHarold.
For each item you need to identify who is using it.
On map it might be:
JavaScript:
var userId = $gameParty.menuActor().actorId();
In battle:
JavaScript:
var user = BattleManager._subject;
If the ID would be harold's ID then you would increase/decrease the ressistanceHarold value.
And based on the value you would pick the state for Harold.

Now all this could be in a common event so no repetitive code. Only disadvantage is the discretation of the State.

Original thread: https://forums.rpgmakerweb.com/threads/overdose-mechanic-how-to-make-it-rpg-maker-mv.169958/