Can I ban the use of an item during a specific battle?

Hi

As the title suggests, I want to ban the use of items during battle.
However, I don't want to ban all battle or all actors, but only certain actors.

Skills and basic attack seals were easily solved, but items were not.

Could you help me?
If you're okay with banning one item for all the actors during the battle, the easiest would be to

  • Store the amount of this Item in a Variable
  • Take away this Item from the Party
  • Battle
  • After the Battle, return this Item to the Party
To ban it only for some Actors, however, would require a plugin.
I'd recommend Victor's Command Replace plugin for that, it can replace the 'item' command with an unusable one or remove it.

If you're okay with banning one item for all the actors during the battle, the easiest would be to

  • Store the amount of this Item in a Variable
  • Take away this Item from the Party
  • Battle
  • After the Battle, return this Item to the Party
To ban it only for some Actors, however, would require a plugin.


Oh sorry but no.
I need to disable the 'Item Button', not just one item.

My current situation is like this.
Party members are on one vehicle.
This vehicle's health is fixed and the damage it receives is also fixed.
However, recovery of this vehicle must be done only with skills, because recovery using items becomes too easy.


In fact, don’t have to decide on just ‘one actor.’ It’s okay.
Since the only party member participating in battle is this 'vehicle', it is okay even if all party members cannot use the item.




I'd recommend Victor's Command Replace plugin for that, it can replace the 'item' command with an unusable one or remove it.



oh! I'll check.
There are so many plugins I'm currently using that I tend to be cautious, but...
If necessary, should use it.
oh well i solve this


Code:
(function() {
var addItemCommand = Window_ActorCommand.prototype.addItemCommand;
Window_ActorCommand.prototype.addItemCommand = function() {
if (!$gameSwitches.value(X)) { addItemCommand.call(this) }
}
})();

Turn switch 'X' to ON to remove the item command in battle.


never mind guys!

Original thread: https://forums.rpgmakerweb.com/threads/can-i-ban-the-use-of-an-item-during-a-specific-battle.167084/