Seal items menu

How do I disable items during a battle? I want to make a scenario where the player temporarily loses his bag (items menu).
In the System tab in the database, you can select what menus will be available. I don't have MV open and don't recall if Items was one of those.

That, of course, is for the entire game, which is not what you want.

If Items is one of the things you can change there, I suggest getting a plugin written that will copy $dataSystem.menuCommands into $gameSystem on the start of a new game, and refer to the $gameSystem values when checking them, and that will give you the ability to turn on a switch when you want the opposite of what the default selection was. So if you enable it in the system tab, it will be enabled by default for all of the game, unless you turn on that specific switch. So when you want to remove the Items menu, you just turn on that switch, and you turn it off again when you want the Items menu back. This will probably affect battle as well as the main menu.
It's a bit more complex than removing the item command from the menu, which has a checkbox in the database and can have its flag turned on/off via script call. The actor command window in battle doesn't actually contain anything until it's selected for an actor's turn, so it's harder to change up on the fly. I'll look into it.

@Shaz - testing has confirmed that the checkbox does not remove the item command, it's hardcoded to always be drawn in the actor command window regardless of settings.
Must just be the Item menu in the main menu then? That's a bit weird - why would you want items in battle if you can't have them in the main menu? (I'm not expecting an answer on that)
I'm glad you're not expecting an answer because I can't provide you one. 😛

Quick and dirty plugin to fix it:

Code:
//=============================================================================
// BattleItemSeal.js
//=============================================================================

/*:
 * @plugindesc Quick plugin to have the items option in battle follow the same restriction setting as in the menu using the database flag.
 *
 * @author John Clifford (Trihan)
 *
 * @help
 *
 * Plug and play.
 *
 * Plugin commands:
 * SealItem on - Removes item command in battle/menu
 * SealItem off - Adds item command in battle/menu
 */

(function() {   
    var _Game_Interpreter_pluginCommand =
            Game_Interpreter.prototype.pluginCommand;
    Game_Interpreter.prototype.pluginCommand = function(command, args) {
        _Game_Interpreter_pluginCommand.call(this, command, args);
        if (command === 'SealItem') {
            switch (args[0]) {
            case 'on':
                $dataSystem.menuCommands[0] = false;
                break;
            case 'off':
                $dataSystem.menuCommands[0] = true;
                break;
            }
        }
    };

    Window_ActorCommand.prototype.makeCommandList = function() {
        if (this._actor) {
            this.addAttackCommand();
            this.addSkillCommands();
            this.addGuardCommand();
            if ($dataSystem.menuCommands[0]) {
                this.addItemCommand();
            }
        }
    };
})();
I'm glad you're not expecting an answer because I can't provide you one. 😛

Quick and dirty plugin to fix it:

Code:
//=============================================================================
// BattleItemSeal.js
//=============================================================================

/*:
 * @plugindesc Quick plugin to have the items option in battle follow the same restriction setting as in the menu using the database flag.
 *
 * @author John Clifford (Trihan)
 *
 * @help
 *
 * Plug and play.
 *
 * Plugin commands:
 * SealItem on - Removes item command in battle/menu
 * SealItem off - Adds item command in battle/menu
 */

(function() {  
    var _Game_Interpreter_pluginCommand =
            Game_Interpreter.prototype.pluginCommand;
    Game_Interpreter.prototype.pluginCommand = function(command, args) {
        _Game_Interpreter_pluginCommand.call(this, command, args);
        if (command === 'SealItem') {
            switch (args[0]) {
            case 'on':
                $dataSystem.menuCommands[0] = false;
                break;
            case 'off':
                $dataSystem.menuCommands[0] = true;
                break;
            }
        }
    };

    Window_ActorCommand.prototype.makeCommandList = function() {
        if (this._actor) {
            this.addAttackCommand();
            this.addSkillCommands();
            this.addGuardCommand();
            if ($dataSystem.menuCommands[0]) {
                this.addItemCommand();
            }
        }
    };
})();
Thanks. I will use this.

Original thread: https://forums.rpgmakerweb.com/threads/seal-items-menu.75194/