What a custom menu does and why you might build one

A custom menu in RPG Maker MZ replaces or extends the default menu that appears when a player presses Escape during gameplay. The default menu shows items, equipment, status, and save options in a fixed layout. A custom menu lets you change what appears, how it's organized, rearrange commands, add new ones, or style everything to match your game's look.

You build a custom menu because the default one might not fit your game's design. A survival game might need a hunger meter on the menu. A visual novel might want to hide combat options entirely. A game with a faction system might add a reputation tracker. Custom menus also let you control the visual style — colors, fonts, window positions — so the menu feels like part of your world instead of a generic overlay.

RPG Maker MZ uses JavaScript to handle menus, so you'll be writing code or using plugins that other developers have written. If you've never written JavaScript before, starting with a plugin made by someone else is faster than learning the language from scratch.

Key Takeaways

  • The default menu is defined in the Scene_Menu.js and Window_MenuCommand.js files in your project's js/rpg_objects folder, and you can edit these directly or use plugins to override them.
  • A plugin is a JavaScript file you place in your js/plugins folder and activate in the Plugin Manager; plugins let you add or change menu behavior without touching the core engine files.
  • You can add new menu commands by modifying the makeCommandList() function, remove commands by deleting their lines, or reorder them by changing the order those lines appear.
  • Window positioning, colors, and text styling are controlled through JavaScript properties like x, y, width, height, and textColor(), which you can adjust to match your game's design.
  • Testing your menu changes in-game is essential because the Plugin Manager and code editor won't show you how the menu actually looks or behaves during play.

Understanding the default menu structure

When you create a new RPG Maker MZ project, the menu system is built into the engine. The main files involved are Scene_Menu.js, which controls the overall menu screen, and Window_MenuCommand.js, which handles the command list (Items, Equipment, Status, Save). These files live in your project folder at js/rpg_objects/.

Scene_Menu.js creates the menu scene — the screen that appears when you press Escape. It sets up the windows, decides where they go, and handles what happens when you select a command. Window_MenuCommand.js builds the list of commands you see. If you open Window_MenuCommand.js in a text editor, you'll find a function called makeCommandList() that adds each command one line at a time.

You don't have to edit these files directly. Editing core engine files means your changes break if you update RPG Maker MZ, and it's harder to share your work with other developers. Instead, you'll use plugins.

Using plugins instead of editing core files

A plugin is a JavaScript file that sits in your project's js/plugins folder and tells RPG Maker MZ to change how something works. Plugins override the default behavior without touching the core engine files. When you update RPG Maker MZ, your plugins still work because they're separate.

To use a plugin, you write or download a .js file, place it in js/plugins/, then open the Plugin Manager (Tools menu > Plugin Manager in the editor). You'll see a list of available plugins. Click the empty space at the bottom, select your plugin file, and click OK. The plugin is now active. You can reorder plugins by dragging them — plugins higher in the list run first, which matters if one plugin depends on another.

Many developers have shared menu plugins for free. VisuStella, a well-known plugin creator, offers a MainMenuCore plugin that makes custom menus much easier. You download their plugin file, add it to js/plugins/, activate it in the Plugin Manager, and then use their system to add or remove commands without writing much code yourself.

Adding, removing, and reordering menu commands

If you're writing your own plugin or editing an existing one, the key function is makeCommandList(). This function builds the menu by calling this.addCommand() for each item you want to show. Each addCommand() line takes the command name, the symbol (an internal identifier), whether it's enabled, and what icon to show.

To add a new command, you write a new addCommand() line. For example, to add a "Status" command, you'd write: this.addCommand('Status', 'status', true, 119);. The 119 is the icon index — a number that points to an icon in your IconSet.png file. To remove a command, you delete its line. To reorder commands, you move the lines up or down in the function.

Here's what a simple makeCommandList() function looks like:

makeCommandList() {   this.addCommand('Items', 'item', true, 176);   this.addCommand('Equipment', 'equip', true, 16);   this.addCommand('Status', 'status', true, 119);   this.addCommand('Save', 'save', true, 225); }

If you wanted to remove Equipment, you'd delete that line. If you wanted Status to appear first, you'd move that line to the top. If you wanted to add a new "Map" command that shows the current location, you'd add a new line: this.addCommand('Map', 'map', true, 50);. Then you'd write a separate function that handles what happens when the player selects "Map".

Styling the menu with colors, fonts, and positioning

The visual appearance of your menu — where windows sit, what color the text is, what font it uses — is controlled through JavaScript properties. In Scene_Menu.js or your plugin, you set these properties on the window objects.

Window position and size are set with x, y, width, and height. For example, this.commandWindow.x = 100; moves the command window 100 pixels from the left edge. this.commandWindow.width = 300; makes it 300 pixels wide. Colors are set using textColor(). The default colors are numbered 0 to 31 — color 0 is white, color 1 is blue, color 2 is red. You can also define custom colors using hexadecimal codes like #FF0000 for red.

To change the font, you modify the fontSize property. this.commandWindow.contents.fontSize = 28; makes the text 28 pixels tall. You can also change the font family: this.commandWindow.contents.fontFace = 'Arial';. Most games use the default font that comes with RPG Maker MZ, but you can load custom fonts if you place them in the fonts folder and reference them in your code.

Opacity controls transparency. An opacity of 255 is fully visible; 0 is invisible. this.commandWindow.setBackgroundType(0); sets the window background to fully opaque. setBackgroundType(1) makes it semi-transparent, and setBackgroundType(2) hides the background entirely, leaving only the text.

Handling what happens when a command is selected

When a player selects a menu command, something needs to happen. The default menu opens the Items scene, the Equipment scene, and so on. If you add a new command, you need to tell RPG Maker MZ what scene or action to run.

This is done through a handler function. In your plugin, you write code like this.commandWindow.setHandler('map', this.commandMap.bind(this));. This says: when the player selects the command with symbol 'map', run the function called commandMap(). Then you write that function to do what you want — open a map window, show location information, or anything else.

For simple commands that open existing scenes, you can reuse the default handlers. For example, this.commandWindow.setHandler('item', this.commandItem.bind(this)); uses the built-in commandItem function, which opens the Items scene. For new commands, you write your own function. If your new command just displays text, you might write a function that creates a window, fills it with text, and waits for the player to close it.

Testing your custom menu in-game

After you've written or modified your menu code, you need to test it by running the game. Click the green play button in the RPG Maker MZ editor to launch the game in a test window. Press Escape during gameplay to open the menu and see your changes. If something doesn't look right or doesn't work, you'll see it here, not in the code editor.

Common issues include commands that don't appear (usually because the symbol doesn't match the handler), windows that overlap (because x and y positions weren't adjusted), or text that's cut off (because the window width is too narrow). If a command doesn't work when you select it, check that the handler function exists and is spelled correctly — JavaScript is case-sensitive, so 'commandMap' and 'commandmap' are different.

If the game crashes or shows an error message, look at the browser console. In most test windows, you can press F12 to open the developer tools and see error messages that tell you exactly what went wrong and which line of code caused it. These messages are usually more helpful than guessing.

Frequently Asked Questions

Can I use a pre-made menu plugin instead of writing my own code?

Yes. VisuStella's MainMenuCore and other free plugins handle most common menu customizations without requiring you to write JavaScript. Download the plugin, add it to your js/plugins folder, activate it in the Plugin Manager, and configure it through the Plugin Manager's parameter settings. This is the fastest route if you don't want to learn JavaScript.

What's the difference between a symbol and a command name?

The command name is what the player sees on screen — "Items", "Equipment", "Status". The symbol is an internal identifier that your code uses to recognize which command was selected. The symbol is usually lowercase and has no spaces, like 'item', 'equip', 'status'. You can have a command named "My Custom Option" with symbol 'custom', and the code will use 'custom' to identify it.

How do I add an icon to a menu command?

The last number in addCommand() is the icon index. Icons are stored in IconSet.png in your img/system folder. Icon 0 is the first icon in the top-left corner, icon 1 is next to it, and so on. You can open IconSet.png in an image editor to see which number corresponds to which icon, or use an online RPG Maker icon index to find the number you want.

Can I disable a menu command so the player can't select it?

Yes. The third parameter in addCommand() is a boolean — true means the command is enabled, false means it's disabled and grayed out. You can write this.addCommand('Save', 'save', $gameSystem.isSaveEnabled(), 225);. This makes the Save command only available when the game allows saving, which is useful if you want to disable saves during certain story moments.

Where do I find the icon numbers for common items like weapons or magic?

Open your project folder, go to img/system/, and open IconSet.png in an image editor or the RPG Maker MZ editor's image viewer. Count from the top-left corner, starting at 0. Each row has 16 icons, so icon 16 is the first icon in the second row, icon 32 is the first icon in the third row, and so on. Many developers share icon index charts online for quick reference.