casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
431
Reaction score
542
First Language
English
Primarily Uses
RMMZ
CGMZ Menu Command Window
By: Casper Gaming
Last Update: September 9, 2022
Latest Version: 1.2.0
dxEPbU0.png

Use this plugin to easily manage the command window in the menu scene. It allows you to re-arrange commands or use JavaScript to add custom commands which are capable of calling custom plugin scenes or functions.
nlUIeRv.png

  • Enable/Disable menu commands with a switch
  • Show/Hide menu commands with a switch
  • Add as many custom commands as you want with JavaScript parameter in plugin setup
zvfGt10.png

A menu with some options disabled, and many custom options
5q4YeLQ.png
EBsAIiJ.png


lWNLTGy.png

Import into plugin manager and enable the plugin. Some customization options available. Further instructions in plugin.
3AzjNYV.png

Plugin (along with all my other plugins) can be found here: https://www.caspergaming.com/plugins/cgmz/menucommandwindow/
Requires CGMZ Core plugin: https://www.caspergaming.com/plugins/cgmz/core/
l8DkDBW.png

https://www.caspergaming.com/terms-of-use/
KbfnB7j.png

Version 1.0
- Initial Release

Version 1.0.1
- Added ability to choose alignment of command text

Version 1.1.0
- Added option to use text codes in commands

Version 1.2.0
- Added option to disable commands if party doesn't have item
 
Last edited:

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
715
Reaction score
234
First Language
English
Primarily Uses
RMMZ
Can I use JS to show/hide commands?
 

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
431
Reaction score
542
First Language
English
Primarily Uses
RMMZ
Yes but not directly. Each command is optionally shown/hidden via switch (controllable with event -> control switches). To do it with JS you would need to call

JavaScript:
$gameSwitches.setValue(switchId, value)

where switchId is the switchId you set in the plugin parameter for that command, and value is either true/false (for on/off).
 

chocopanda

Veteran
Veteran
Joined
Sep 24, 2017
Messages
48
Reaction score
21
First Language
English
Primarily Uses
RMMV
is this working for battle commands menu or just the menu alone?
 

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
431
Reaction score
542
First Language
English
Primarily Uses
RMMZ
@chocopanda it is just for the menu alone, but adding options for the other command windows is a good idea. I will look into adding the battle commands menu as well, but that might take a few weeks as I am looking to port my MV plugins to MZ first.
 

chocopanda

Veteran
Veteran
Joined
Sep 24, 2017
Messages
48
Reaction score
21
First Language
English
Primarily Uses
RMMV
take your time.. all other plugins will take time as well so it's alright.. i just think it's a good idea specially if you are starting the game and there would be a tutorial to switch off/on the battle command first before it can be used..
 

Jennavieve

Veteran
Veteran
Joined
Oct 21, 2020
Messages
90
Reaction score
87
First Language
English
Primarily Uses
RMMZ
I think I might have encountered a bug with this plugin. Although, I am still a noob so it's possible I'm doing something wrong but it all looks right as far as I can tell.

The problem I'm encountering is when I'm trying to use the CGMZ Crafting and CGMZ Encyclopedia plugins with the Menu Command Window plugin. It looks like I have the parameters set correctly but, for some reason, when I select "Encyclopedia" in the menu it opens up the crafting menu and, oddly, when I open the crafting menu it works fine but after you leave crafting and go back to the main menu, the button for Encyclopedia is highlighted instead of Crafting as if you were in the encyclopedia instead.

I took screenshots of how I have it set up.

This is for the encyclopedia
Encyclopedia.png
text is:
{"Command Name":"Encyclopedia","Command Symbol":"","JS Command":"\"SceneManager.push(CGMZ_Scene_Encyclopedia)\"","Enable Switch":"0","Show Switch":"0"}


And for the Crafting I have
Crafting.png
text is:
{"Command Name":"Crafting","Command Symbol":"","JS Command":"\"SceneManager.push(CGMZ_Scene_Crafting)\"","Enable Switch":"0","Show Switch":"0"}


Is this a bug or do I have something wrong?
 
Last edited:

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
431
Reaction score
542
First Language
English
Primarily Uses
RMMZ
@Jennavieve Make sure their command symbols are different and not blank.
 

Jennavieve

Veteran
Veteran
Joined
Oct 21, 2020
Messages
90
Reaction score
87
First Language
English
Primarily Uses
RMMZ
@Jennavieve Make sure their command symbols are different and not blank.

Okay that must be where I'm going wrong. I keep seeing notes that say "see documentation" and that was one of the things that said it but I haven't been able to find the documentation. I'll figure it what needs to go there and let you know if it still doesn't work. Thanks for responding so quickly

Edit: I looked at the symbols on the examples you gave to call the default menu items and adjusted the others accordingly. Works fine now. Thank you!
 
Last edited:

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
431
Reaction score
542
First Language
English
Primarily Uses
RMMZ
@Jennavieve The documentation for all my plugins is at the bottom of the help window where you set up plugin params. In this case it is just referring to the documentation explaining the special command symbols for the original commands (that's why you can make the command symbol something like "item" and it'll know you want to use the default item command). I guess I should add some additional help text for why the command symbol is important since you are not the first one to ask about this.
 

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
431
Reaction score
542
First Language
English
Primarily Uses
RMMZ
Hi all, small update today to let you choose the alignment of the text in the command window:
Version 1.0.1:
- Added ability to choose alignment of command text
 

jhs

Villager
Member
Joined
Jun 22, 2019
Messages
10
Reaction score
8
First Language
korean
Primarily Uses
RMMZ
What do I need to write in the JS Command to make a menu and press it to bring up Common Event 1?

I wrote '$gameTemp.reserveCommonEvent(1)' but it doesn't work.
 

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
431
Reaction score
542
First Language
English
Primarily Uses
RMMZ
@jhs if you want the menu to close and go to the map so the common event immediately runs, use:

JavaScript:
SceneManager.pop();
$gameTemp.reserveCommonEvent(1);


If you want the menu to stay and the common event to be processed when the user closes the menu, use:

JavaScript:
$gameTemp.reserveCommonEvent(1);
this._commandWindow.activate();
 

jhs

Villager
Member
Joined
Jun 22, 2019
Messages
10
Reaction score
8
First Language
korean
Primarily Uses
RMMZ
Thank you very much.
 

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
431
Reaction score
542
First Language
English
Primarily Uses
RMMZ
Hi all, update today for this plugin to allow text codes as well in the command names (such as \c[x] or \i[x]).

This update requires CGMZ Core v1.5.1+

Version 1.1.0:
- Added option to use text codes in commands
 

alltheyuriz

The one the only Cat Dad
Veteran
Joined
Sep 18, 2020
Messages
879
Reaction score
588
First Language
English
Primarily Uses
RMMZ
@casper667 I was wondering do you change the parameters in the javascript file and then call the script prompt $gameSwitches.setValue(switchId, value) in the event it's self and should I do that for all the commands if I don't want them to be able to be activated?
 

casper667

Casper Gaming
Veteran
Joined
Mar 15, 2012
Messages
431
Reaction score
542
First Language
English
Primarily Uses
RMMZ
@alltheyuriz I'm not sure what you mean by changing the parameters in the javascript file.

If you want a command to be deactivated but still shown, set its Enable Switch in plugin parameters then turn that switch off in game via the Control Switches event command (or script command if that is easier for you).

If you want a command to be completely hidden from the menu set the Show Switch in plugin parameters and then turn the switch on/off via the Control Switches event command (or script command if that is easier for you).

The demo shows an example of showing/hiding and enabling/disabling the item command in the main menu, if you are still confused you can download that to see an example of how it is done.
 

alltheyuriz

The one the only Cat Dad
Veteran
Joined
Sep 18, 2020
Messages
879
Reaction score
588
First Language
English
Primarily Uses
RMMZ
@casper667 Edit: ok think I understand read it a second time ill try It out and see if I need anymore help! Thank you!
Edit: I edited the parameters and now im getting this, im sorry for bugging you so much
1619913625923.png
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

9 days left for Harold Jam... hope it's not too late to start gam mak
i think this girl has to be my favorite though :)
62702017_JJKXazrs2LInoZh.png
Wouldn't you know it? Every woman that is interested in me on FB is a bot. Maybe I should respond with 000100100011. If u r willing to date women on FB something has definitely went wrong with your life.
Hello world !! I've created a logo design for my game, I'm calling it "Soup Quest" (It was honestly the best I could come up with <:]) !!
[IMG]https://media.discordapp.net/attachments/866542330286178344/1076307540528332830/Soup_Quest_Game_Logo.png?width=473&height=473[/IMG]
P.S. ty to the person who told me about the "purple text not mixing well with dark mode". I'll be careful on using colored text in the future !!

Forum statistics

Threads
129,745
Messages
1,204,795
Members
170,835
Latest member
KathleenL42
Top