MV Limiting an item's effect on certain actors/classes

Good morning / afternoon/ evening

I could really use some help here.

is it possible to code a plugin that makes it so for example, you have a character that is an android, and a potion obviously has no effect on them, but something like a "repair kit" would indeed heal them?

I tried using YEA item requirements but it doesn't seem to achieve this because it only restricts which actor can USE which item, what I want is to limit the item's effect on certain party members or classes, so for example, in the menu if i'd try to use a potion on an android actor, it would just do the buzzer sound effect and the android character would not get the effect of the item at all.


Any help is appreciated!
If you want to use a plugin, I think YF targeting plugin should be able to restrict who you can use the item on. If not, you can change the effect in the damage formula if you know what you are doing.
What I would really like is make it so for example if I use a potion on actor 1 a human the potion will do it's thing and heal them but if I used the potion on actor 4 who is an android the same item would have no effect on them and it would simply make the buzzard sound.

but maybe you're right maybe I can use formula effects or something similar to Hime's plugin or any other that does something similar?

I'm going to try YEP's selection core.

EDIT


okay I tried using Selection Control and in battle since the actor cannot be selected for this item, it works okay.

BUT what I want is something that will do exactly what this does but in the main menu.

Any help is appreciated.

EDIT

I found a way to do this with Hime's effect conditions

I set up a condition effect for each class I want the item to work on except for the two classes and this worked, it buzzers when the class has no condition for it to have an effect.

only minor nitpick is in battle the item is still used on these classes, even if it has no effect, i still waste the item, wish there was a way around this.
Does it work if you use a formula in the item:

if (b.actorId() === X) { AudioManager.playSe({name: 'Buzzer1', volume: 100, pitch: 100}); $gameParty.gainItem($dataItems[Y], 1); 0; } else { 100; }

X = ID of your actor you don't want the item to work on
Y = ID of the item
100 <- the amount it heals other actors

But this way it plays both the 'use item' and buzzer at the same time though.
Does it work if you use a formula in the item:

if (b.actorId() === X) { AudioManager.playSe({name: 'Buzzer1', volume: 100, pitch: 100}); $gameParty.gainItem($dataItems[Y], 1); 0; } else { 100; }

X = ID of your actor you don't want the item to work on
Y = ID of the item
100 <- the amount it heals other actors

But this way it plays both the 'use item' and buzzer at the same time though.


This does indeed work. It's a good possible solution, is it possible to also make it so maybe instead of 0 damage the popup will just display a miss?
If you want the item to simply be ineffective on the wrong characters, this is easy to do with something like Yanfly's auto passive states. Make "android" a state, and use a conditional for the effect of the item to alter its formula or event.
There have been a number of prior threads about this. These both come up as Google results:

Original thread: https://forums.rpgmakerweb.com/threads/limiting-an-items-effect-on-certain-actors-classes.160448/