Item restrictions in Main Menu

Hey all, I'm working with yanfly and am trying to restrict use for mp cure items for one actor.

Using Target core I can, in battle, get it to work.

<Cannot Select: Item 4>
The actor can use item on others but not themselves. perfect.

However when I'm in my menu I can use the mp cure item on that actor without issue. They are not the party leader.
I've tried Item Restrictions,

Not Class: 9
or
Actor: 6
or
Not Actor: 1, 2, 3, 4, 5, 7, 8, 9,

But none work as expected... In fact the restrictions end up applying to everyone, even in battle. Not good. I feel like I'm doing something wrong.
Any advice? Should I try a CE? Thanks.
the reason it might not work is outdated version or incorrect YEP plugin order.
so check the website or the plugin below my post (ALOE_X_YEP_PluginOrderChecker).

if they are in the correct order, the notetag on the items (or skills) are correct,
it should work correctly.

if it still fails, try a new project and see if it works there, or set a console.error
with the text to see if its applying correctly (or console.log).


console log, plugin database, notetag used can be useful as well.
the reason it might not work is outdated version or incorrect YEP plugin order.
their issue sounds correct. IIRC, yanfly's selection core where the select tags theyre using comes from only functions in battle. it should be a singular check, but i never tried to see if the rest of the plugin is able to handle running out of battle.

I've tried Item Restrictions,

Not Class: 9
or
Actor: 6
or
Not Actor: 1, 2, 3, 4, 5, 7, 8, 9,
the problem with this is that item restrictions only imposes restrictions on the user. If the actor meets the criteria, then they can use it. It doesnt restrict the target and can only be used to prevent certain actors from being able to use it.
You could try setting up that common event, change the formula so that it fails to have an effect when used on that actor, or use a hit chance plugin to force it to miss on that actor, but otherwise i believe your options with existing plugins are limited.
the reason it might not work is outdated version or incorrect YEP plugin order.
so check the website or the plugin below my post (ALOE_X_YEP_PluginOrderChecker).

if they are in the correct order, the notetag on the items (or skills) are correct,
it should work correctly.

if it still fails, try a new project and see if it works there, or set a console.error
with the text to see if its applying correctly (or console.log).


console log, plugin database, notetag used can be useful as well.
I've done your plugin, ty btw, and fixed my order but it doesn't seemed to have helped.

their issue sounds correct. IIRC, yanfly's selection core where the select tags theyre using comes from only functions in battle. it should be a singular check, but i never tried to see if the rest of the plugin is able to handle running out of battle.


the problem with this is that item restrictions only imposes restrictions on the user. If the actor meets the criteria, then they can use it. It doesnt restrict the target and can only be used to prevent certain actors from being able to use it.
You could try setting up that common event, change the formula so that it fails to have an effect when used on that actor, or use a hit chance plugin to force it to miss on that actor, but otherwise i believe your options with existing plugins are limited.
That's what i figured... I'm a noob with damage formula so I could use more help.
I'm pushing through some of the threads and found,

y = b._actorId !== 6 ? 200 : 0; y

which is a great step forward.
both seem to crash the game...
exactly what does your item do? is the heal from an effect, or is the heal from the formula? Show a screenshot if possible.
if its from a formula then you should be able to use
Code:
b != $gameActors.actor(6) ? 50 : 0
to make the formula restore 50 mp for everyone who isnt actor 6.
If its an effect, then you can use the common event approach as at that point, the only way to make it conditional afaik is to force a miss somehow.
All this makes me think I should use a state to somehow deny the usage in menu. I'm pushing through some of the threads but I haven't found anything super helpful yet. Thanks.
youd make the skill apply a dummy state and have the common event go through all your actors, check if that have the state, and if they do, remove the state and heal them (not including actor 6).

EDIT:
just saw the edit and that you figured out the formula bit. If that works for you then that can be it, but just to note on something I said, Hime's Effect Conditions plugin should work in the menu
exactly what does your item do? is the heal from an effect, or is the heal from the formula? Show a screenshot if possible.

If its an effect, then you can use the common event approach as at that point, the only way to make it conditional afaik is to force a miss somehow.

youd make the skill apply a dummy state and have the common event go through all your actors, check if that have the state, and if they do, remove the state and heal them (not including actor 6).

EDIT:
just saw the edit and that you figured out the formula bit. If that works for you then that can be it, but just to note on something I said, Hime's Effect Conditions plugin should work in the menu
It's just a basic mp heal item, its the character that's special. I think I forgot to put 0 in the formula, that was causing the crash.

I'm forcing the miss by making the actor 100% resist the state.

Thanks for the help, I believe I have it.
The convo that helped is at item prevention

2025-07-17.png

2025-07-17 (1).png

Original thread: https://forums.rpgmakerweb.com/threads/item-restrictions-in-main-menu.178934/