How do I allow items to be used more than once without being kicked out of the menu?

Forgive me if this has to be in plugins or hopefully doable through MZ, and I'm not sure how.

Hey everyone,

I need some guidance. So, I have bread where it restores 15 hunger (so it's connected to a common event/variable); now, what I'd like to do for QOL reasons, is to allow players to eat more than one bread without being kicked out of the menu.

Do I need a plugin for this? Do I need to code?

I'd love any support. Thank you as always!
Event common handler is on the map. So when an item triggers a common event, it kicks you to the map. That means you need a plugin for this.

But, if you just want to modify the variable value, can you just use the damage formula box to change the variable value?
Event common handler is on the map. So when an item triggers a common event, it kicks you to the map. That means you need a plugin for this.

But, if you just want to modify the variable value, can you just use the damage formula box to change the variable value?
Hmm. Dang, I don't know any plugins that would do this atm. I am guessing a script wouldn't help open back the menu/items?

Luckily, changing the value isn't too hard! I didn't want players to use the item and reopen the menu when they want to keep using it. QOL stuff.
Did you understand that @TheoAllen gave you a non-script solution? That's the one part of the post that you didn't acknowledge.

You can change the damage formula so it updates the variable, and don't need to use a common event. It's the common event that causes the menu to close.
Did you understand that @TheoAllen gave you a non-script solution? That's the one part of the post that you didn't acknowledge.

You can change the damage formula so it updates the variable, and don't need to use a common event. It's the common event that causes the menu to close.
Oh. No! It seems like I completely miss understood and that’s on me.

now I understand. To be honest I’m not sure where to even start with changing the damage formula to update the variable.

sorry, if I understood from the get go I would have already asked.

what is the damage formula? Where do I find it/enter it? I’m lost.


Event common handler is on the map. So when an item triggers a common event, it kicks you to the map. That means you need a plugin for this.

But, if you just want to modify the variable value, can you just use the damage formula box to change the variable value?

Forgive me, I didn't mean to ignore what you said about the damage formula. Sadly I am not well versed with the damage formula. I did do some research after you both suggested this.

However, I'm not sure on how to set it up.

My variable = 18 (Hunger Stat)
Result= +15 to Hunger stat.
Would I selected HP to recover for the Bread?

Any assistance is much appreciated.


$game_variables[18] * 5 Clearly this is wrong but yeah lol.
On the item database entry, the upper right of the window has the heading "Damage." Underneath that is a text field labeled "Formula."

You have to select a type of damage in order to enable the bar; however, it will only actually do the damage equal to the last value present, and there are a variety of script commands that can work in there.

So, you could have your damage formula be v[6]+=15; 0; where you replace the number 6 with whatever the ID of your hunger variable is.
On the item database entry, the upper right of the window has the heading "Damage." Underneath that is a text field labeled "Formula."

You have to select a type of damage in order to enable the bar; however, it will only actually do the damage equal to the last value present, and there are a variety of script commands that can work in there.

So, you could have your damage formula be v[6]+=15; 0; where you replace the number 6 with whatever the ID of your hunger variable is.

Thank you so much for the reply, I been googling like crazy trying to figure this out lol.

I did as you said! 18 is the variable for hunger.

1616469987817.png


However, my actor refuses to consume the bread even though she is 65/100 Hunger. Did I do something wrong?

Thank you again.
You might want to try setting the drop-down to a restore type, rather than a damage.
Edit: Nope, that won't help...
You might want to try setting the drop-down to a restore type, rather than a damage.

I just tried this and it didn't work (won't consume in-game sadly). I'm thinking maybe because my actor's HP and MP are maxed and it's considering the bread to be trying to fill those up? I'm not sure. Tried setting it to restore Hp/MP.

I'm stumped lol

EDIT: Nevermind! I had to add an effect to it.. that was the issue. Any effect.
1616473060359.png
Make a State in your database that's blank, doesn't do anything, doesn't have an icon.

In the Effects list of your bread, make it apply that state with a chance of 0%. (It technically doesn't need a new state for this, you can use anything, I just find it mentally tidier).
Or just use "add buff" then "remove buff".
Items need to have a valid effect to be used. It is to prevent accidental item recovery usage when your actor is already at max hp.
Make a State in your database that's blank, doesn't do anything, doesn't have an icon.

In the Effects list of your bread, make it apply that state with a chance of 0%. (It technically doesn't need a new state for this, you can use anything, I just find it mentally tidier).

Thank you so much. Works perfectly! now I can do this with all my other items.


Or just use "add buff" then "remove buff".
Items need to have a valid effect to be used. It is to prevent accidental item recovery usage when your actor is already at max hp.
Tested this as well works perfectly too.


Thank you both! learned something new today. Super happy, thank you again!!

Consider this solved =D.

you guys the best haha.
Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-allow-items-to-be-used-more-than-once-without-being-kicked-out-of-the-menu.134661/