How to disable the use of items without disabling the menu?

I just want to deny the use of all items within a particular dungeon, but still be able to open the game menu. Is it possible or do I need a plugin?
You might need a plugin... I use Yanfly Item Requirements [Yanfly Item Requirements] plugins myself for this kind of thing, but there are a lot of item requirement plugins out there that you don't have to pay for.
You don't use items directly from the game menu, so I'm not sure why that's connected 😛

However, there's no event command to do what you're asking, so yes, you'll need a plugin.

Paste the below into a text editor, save as a *.js file, include as a plugin:
Code:
Window_MenuCommand.prototype.addMainCommands = function() {
    var enabled = this.areMainCommandsEnabled();
    if (this.needsCommand('item')) {
        this.addCommand(TextManager.item, 'item', $gameSwitches.value(42));
    }
    if (this.needsCommand('skill')) {
        this.addCommand(TextManager.skill, 'skill', enabled);
    }
    if (this.needsCommand('equip')) {
        this.addCommand(TextManager.equip, 'equip', enabled);
    }
    if (this.needsCommand('status')) {
        this.addCommand(TextManager.status, 'status', enabled);
    }
};

Replace 42 with whatever switch ID you want to use. The Items command will only be enabled when that switch is ON.
What you could do is have the "Items" choice of the main menu (the one that you get when you press "Escape" when not in battle) disabled or hidden by a switch. (That wouldn't prevent items from being used in battle, though.)

I believe that there is more than one plugin that will let you do the job, but I use the Yanfly one:

http://www.yanfly.moe/wiki/Main_Menu_Manager_(YEP)

It might seem a bit of a chore learning how to use it, but it can do quite a lot of things. If you want to add "Credits" to the main menu, or "Estimate Time" whenever the party is in a map where they can be expected to see the position of the sun, that will do it as well.

If you happen to be allergic to Yanfly's plugins or want another option, you could have a go with:

https://himeworks.com/2016/03/menu-command-manager-mv/

Have to say that I haven't used it myself, but I find that Himeworks' plugins tend to work well, and are usually easy to learn how to use.
You don't use items directly from the game menu, so I'm not sure why that's connected 😛

However, there's no event command to do what you're asking, so yes, you'll need a plugin.

Paste the below into a text editor, save as a *.js file, include as a plugin:
Code:
Window_MenuCommand.prototype.addMainCommands = function() {
    var enabled = this.areMainCommandsEnabled();
    if (this.needsCommand('item')) {
        this.addCommand(TextManager.item, 'item', $gameSwitches.value(42));
    }
    if (this.needsCommand('skill')) {
        this.addCommand(TextManager.skill, 'skill', enabled);
    }
    if (this.needsCommand('equip')) {
        this.addCommand(TextManager.equip, 'equip', enabled);
    }
    if (this.needsCommand('status')) {
        this.addCommand(TextManager.status, 'status', enabled);
    }
};

Replace 42 with whatever switch ID you want to use. The Items command will only be enabled when that switch is ON.
It worked perfectly, thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-disable-the-use-of-items-without-disabling-the-menu.169698/