Hello, I would like to disable access to inventory and equip options in my game, I wanted to achieve a similar effekt with a plugin on the principle of Multiple Inventories these plugins do not work at my place, and other plugins are paid. So instead of combining I just want to do the simplest thing which is to disable access to inventory and equip options for a while. Is it possible, and if so, how to do it?
Temporarily disable inventory and equip options in menu in RPG Maker MZ
RPG Maker MZ SupportI have already found a solution
I wrote a code in javascript that disables the status equip and inventory option.
Here it is:
/*:
* @target MZ
* @plugindesc Disables the “Items”, “Equip” and “Status” options in the game menu using switches 100, 101 and 102.
* @Author GalaxyLIVAN
* @Help
* This plugin allows you to hide the “Items”, “Equip” and “Status” options in the menu using
* switches 100, 101 and 102. You can control the hiding of these options with events.
*
* Switches:
* - Switch 100: Hides/displays the “Items” option.
* - Switch 101: Hides/displays the “Equip” option.
* - Switch 102: Hides/displays the “Status” option.
*/
(() => {
const ITEM_SWITCH_ID = 100; // Switch that controls the visibility of “Items”.
const EQUIP_SWITCH_ID = 101; // The switch that controls the visibility of “Equip”
const STATUS_SWITCH_ID = 102; // The switch that controls the visibility of “Status”
const _Window_MenuCommand_addOriginalCommands = Window_MenuCommand.prototype.addOriginalCommands;
Window_MenuCommand.prototype.addOriginalCommands = function() {
_Window_MenuCommand_addOriginalCommands.call(this);
// Checking the status of the switches
const hideItems = $gameSwitches.value(ITEM_SWITCH_ID);
const hideEquip = $gameSwitches.value(EQUIP_SWITCH_ID);
const hideStatus = $gameSwitches.value(STATUS_SWITCH_ID);
// Hide “Items” if the switch is enabled
if (hideItems) {
this._list = this._list.filter(command => command.symbol !== 'item');
}
// Hide “Equip” if the switch is enabled
if (hideEquip) {
this._list = this._list.filter(command => command.symbol !== 'equip');
}
// Hide “Status” if the switch is enabled
if (hideStatus) {
this._list = this._list.filter(command => command.symbol !== 'status');
}
};
})();
If you already have Switch 101, 102 and 103 occupied then modify the switch numbers.
I wrote a code in javascript that disables the status equip and inventory option.
Here it is:
/*:
* @target MZ
* @plugindesc Disables the “Items”, “Equip” and “Status” options in the game menu using switches 100, 101 and 102.
* @Author GalaxyLIVAN
* @Help
* This plugin allows you to hide the “Items”, “Equip” and “Status” options in the menu using
* switches 100, 101 and 102. You can control the hiding of these options with events.
*
* Switches:
* - Switch 100: Hides/displays the “Items” option.
* - Switch 101: Hides/displays the “Equip” option.
* - Switch 102: Hides/displays the “Status” option.
*/
(() => {
const ITEM_SWITCH_ID = 100; // Switch that controls the visibility of “Items”.
const EQUIP_SWITCH_ID = 101; // The switch that controls the visibility of “Equip”
const STATUS_SWITCH_ID = 102; // The switch that controls the visibility of “Status”
const _Window_MenuCommand_addOriginalCommands = Window_MenuCommand.prototype.addOriginalCommands;
Window_MenuCommand.prototype.addOriginalCommands = function() {
_Window_MenuCommand_addOriginalCommands.call(this);
// Checking the status of the switches
const hideItems = $gameSwitches.value(ITEM_SWITCH_ID);
const hideEquip = $gameSwitches.value(EQUIP_SWITCH_ID);
const hideStatus = $gameSwitches.value(STATUS_SWITCH_ID);
// Hide “Items” if the switch is enabled
if (hideItems) {
this._list = this._list.filter(command => command.symbol !== 'item');
}
// Hide “Equip” if the switch is enabled
if (hideEquip) {
this._list = this._list.filter(command => command.symbol !== 'equip');
}
// Hide “Status” if the switch is enabled
if (hideStatus) {
this._list = this._list.filter(command => command.symbol !== 'status');
}
};
})();
If you already have Switch 101, 102 and 103 occupied then modify the switch numbers.
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/temporarily-disable-inventory-and-equip-options-in-menu-in-rpg-maker-mz.171922/