Remove ''Items'' Tab from Battles.

Hello, I have been wondering if there is a way to disable the Items tab from the battle screen temporarily.
I would like to do this without using a third party plugin if possible. Only through eventing or a simple switch.
I managed to do this with Attack, Escape and Guard. But I cannot disable the Items tab.
(I would be fine with it just being there but not interactable like grey'ed out or something)
And again possibly with re-enabling it under circumstances or with disabling a switch or something.

I know one way to get a workaround would be to simply make items unusable and perhaps useable again. But this is something I would like to avoid.

If there is only a way to do it with plugins, would somebody know if there is any Yanfly plugin to do it with? I would like to avoid using too many Plugins from all kind of creators to prevent issues in the future, since I am making a quite complex game in some areas, which is only asking for errors!
I can't think of a way of doing this without plugins, nor can I think of a Yanfly plugin that disables battle commands. You could always use Item Requirements to make all items unusable when a switch is enabled/state applied/whatever.

http://yanfly.moe/2017/05/12/yep-136-item-requirements-rpg-maker-mv/

If that doesn't suit you you might have to consider using someone else's plugin. I think these should do what you're looking for.

http://himeworks.com/2015/12/actor-battle-commands/
https://forums.rpgmakerweb.com/inde...kill-and-skill-type-restrictions-1-5-3.49224/
So I was right to assume that it cannot really be achieved on normal matters. Only plugins will do in the end. Meh that's a pity.
I guess I will end up disabling and enabling items with a switch for the time being. Since this is only used for a tutorial battle, it wont also have many items to be disabled, since you cannot get as many items in the beginning anyways.

I will not use hime plugins, because they are too old and might interfere with current or future plugins. As of now I will only use Yanfly, MogHunter and Galv plugins. Because they seem to work fine together so far. Reminds me I didnt check Galv's Plugins about that matter yet which I will just do I guess.
Here's a 5 line "plugin" that does it:

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.
Here's a 5 line "plugin" that does it:

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.

I got it. Thank you a lot buddy. It works like a charm and the way I wanted it

I will credit you obviously. And named the plugin after you, hero.

Edit: It seems to be also working with other things like Attack and Guard. I am really liking this simple Code.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/remove-items-tab-from-battles.104645/