Question about making a parallel parameter checker/correcter?

Apologies if this is in the wrong place, and if this is a dumb question. The quick rundown is that I am making a system that uses one of the parameters as a sanity check for dialogue, enemy and scene triggers etc. I wanted to make a ring that made it to where the parameter used as sanity could not be lowered below a certain threshold while the ring was equipped. I have a passive timer event that drains as well as items that run common events that lower the parameter, and can not figure out a way with my limited coding knowledge to set a floor for the parameter, to prevent the common event from lowering it.

If this is something I will be unable to achieve, I can just figure out some different workaround. I have Yanfly plugins if that will assist. Thank you for your time!
Assuming you only have the main character, it should be something like this:
1776499848203.png

Let's just say the Dunstan's Armor is your item thingy. After waiting 999 frames it checks if item is equiped, if so, check if sanity is equal or less than 50, if so, do nothing, else reduce sanity by the usual amount.

Of course you'd also need to do whatever event you had set up to convert your stat into a variable value.
Assuming you only have the main character, it should be something like this:
View attachment 364669
Let's just say the Dunstan's Armor is your item thingy. After waiting 999 frames it checks if item is equiped, if so, check if sanity is equal or less than 50, if so, do nothing, else reduce sanity by the usual amount.

Of course you'd also need to do whatever event you had set up to convert your stat into a variable value.
I plan on having multiple party members, I currently have the parameter lowering items set to give a state to the actor using the item, then use that to assign the actor to a variable. From there, I adjust the parameter using the common event. I was hoping id be able to avoid a long chain of conditional branches for each actor in each event pertaining to if they have the piece of gear or not, but I'm not sure if I can achieve that.
I mean unless you have like 30 characters, it's just a matter of copy pasting the same branch a couple of times.
I mean unless you have like 30 characters, it's just a matter of copy pasting the same branch a couple of times.
1776563808986.png


that was basically the workaround, i just had to use the existing variable calling the actor id to establish the current stat and then loop a +1 effect until the number was reached. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/question-about-making-a-parallel-parameter-checker-correcter.183303/