Class Item Restriction In and Outside of Battle

Good Day,

So, I have Yanfly's Item Class Restriction Plugin, and it only works within battle. The class restriction won't work outside of battle. And while I can use it for one part of my game, a major part of my game won't work with it. I need item restriction that depends on if the player is exploring the world physically or ethereally. While it most likely would be a futile effort to have two inventories, the simpler solution would be to restrict physical healing items to only being able to heal the physical body. Outside of the body, there will be items that can repair the ethereal vehicle.

Other uses for this would extend to things such as if one has a human player and a robot companion. It'd make little sense to have stimpacks heal robots. Adding two kinds of stimpacks would be needed to make sense.

Not sure if I've missed something obvious but hopefully this can be done.
Hi SoftCloud!

So i I have two interpretations of your problem.
1. You have an actor that have 2 differents states: Physical or Ethereal.
A workaround for this problem is to use a switch “isPhysical” that you toggle according to his current state. Then use a common event bound to your item with a conditionnal branch checking “isPhysical” that will either heal the player or refuse the item (don’t forget to refund the item if it is a consumable)

2. You have multiple actors with a single class for each. (Seperating Humans and Robots)

Depending on your situation, it might be a little more complicated.

If you have one actor specific to each item, simple: Just as before you can use a common event that will check the actor’s class and accept or refuse the heal.


If you have multiple actors for the same item, add a choice menu that will ask the player who to heal. But this will work only if your party is static (no changes during the game). If not, Yanfly’s Message Core plugin might be able to help with conditionnal options on choice menus (if i remember well)

Hope this helps!
Good luck 🙂

Original thread: https://forums.rpgmakerweb.com/threads/class-item-restriction-in-and-outside-of-battle.105350/