The ultimate menu generator script for your objects and HUDs.
The Master Menu PRO lets you create a professional looking (2 level) menu with up to 144 buttons. The buttons can be shown in a customizable blue dialog menu and can also be used on a HUD.
What the buttons do is up to you. The Master Menu PRO takes care of creating the menu and sending the data to a other script (in the same prim) and/or to a Master Menu PRO script in a other object (anywhere on the sim).
Important to note is that the Master Menu PRO is designed for menu generation and communication and it does not do things such as changing textures without a additional script. With basic scripting knowledge you can easily add these functions yourself (examples included). You also have the option to get the “Master Changer PRO” which comes with over 20 functions (changing texture, color, size, etc) and is easily integrated with the Master Menu PRO.
Inside the _Config script you can set the settings of the blue dialog menu, the communication settings and setup the buttons.
click_menu: this can be set to On or Off. When this is set to “Off” the blue dialog menu doesn’t show when your object is clicked. This is very useful for HUDs. When this is set to off you can still force the menu to show up by using a button with the name “menu:main:menu”.
click_prim: this can be set to On or Off. If you only want the menu to show when a certain prim on your object is clicked you add the script/s to that prim and set this to On. The script/s do not need to be in the root prim.
close_button & back_button: here you enter the name of your close and back button (not case sensitive). Adding a close and back button to your menu is optional however if you do add a back button to your menu make sure the name matches the name in the setting or the button will be treated like any other button.
link_number: when a button is clicked the data is send over a linked message using this number. llMessageLinked(LINK_THIS, link_number, data, id);
channel_offset: this lets you change the communication channel the script uses. All scripts with the same channel can hear each other. If you create different object that you don’t want to communicate with each other make sure to give them a other number.
hash & password: only objects with the same hash and password can communicate with each other. As hash i recommend you use a random hash from https://onlinehashtools.com/generate-random-md5-hash. The password can be anything you want, just don’t leave it at 123456.
link_com_num: this is the link number that is used for message the script receives from other objects. Its recommended you use a different number here (then link_number) so you can distinguish between message from the object itself and message from other objects.
listen: this can be set to On or Off. When this is set to “On” the script will listen to messages from other objects (Master Menu PRO scripts owned by the same avatar with the same channel, hash and password). If you make a “sending object” (ex. HUD) and a “receiving object” (ex. clothes) you want to set listen to “Off” in the “sending object” and “On” in the “receiving object”.
Inside the same _Config script you also setup the buttons.
The buttons consist of 3 elements: BUTTON = ACTION | DATA.
The main menu always starts with “menu:main:menu”.
Ex.: menu:main:menu = Button1, Button2, Button2 | The text in the blue dialog menu.
This creates a blue dialog menu with the text “The text in the blue dialog menu.” and 3 buttons (Button1, Button2 and Button3).
To make Button1 do something you need to create a line for Button1.
Ex.: menu:main:Button1 = link | Hi, you clicked a button.
When Button1 is clicked a link message with the data “Hi, you clicked a button.” is send.
You can create more lines per button if you want more data to be send. Every line that starts with “menu:main:Button1” gets executed when Button1 is clicked.
The action in the above example is “link”. This refers to sending a link message (to a other script in the same prim). In addition you can also use “msg” and “re”.
Ex.: “menu:main:Button1 = msg,re | Hi, you clicked a button.” Would send the data to other scripts and make the menu come back.
To create a sub menu on for example Button2 we would do:
menu:Button2:menu = Sub1, Sub2, Sub3 | This is the text on the sub menu.
To make Sub1 do something you would create a line like:
menu:Button2:Sub1 = link | some data.
More instructions and examples can be found in the _Config script.
Creating a HUD
To create a HUD is as simple as setting “settings:click_menu” to Off and renaming the prims on your HUD to match the buttons.
As soon as the Red prim above is clicked “menu:main:Button1” is executed.
You can also make a prim open a sub menu with ex.: “menu:Button2:menu” or even the main menu with “menu:main:menu “.
When you use a HUD you generally want the data from the HUD to be send to a other object. To do this you want to use the “msg” action (instead of link). Ex.: menu:main:Button1 = msg | Hi, you clicked a button.
You also want to make sure that you add all the scripts to your receiving object (the object with which the HUD communicates), make sure the communication settings are the same and that “settings:listen” is set to On.
See the working example HUD that is included.
TIP: Setup your object with a fully functional menu first. After you setup your object you can just copy past the scripts to the HUD, set the “click_menu” to Off and name the buttons on your HUD.
You can use “link,msg” on all lines even if you don’t use the “msg”.
Link Example script
Included is a Link Example script that you can use as a reference to create your own scripts.
The first part of the script checks for internal link messages from the Master Menu PRO script containing the menu channel (blue dialog menu listener), the menu user (UUID of after using the blue dialog menu) and when the script finishes loading.
The seconds part checks for link message defined by the _Config script.
For example “menu:Access:Everyone = link | access – everyone” inside the _Config script will send a link message containing “access – everyone”. On line 54 we check if the first part of the message is “access” and on line 56 we send the 2th part “everyone” back to the Master Menu PRO script.
Make sure that link_number matches the number in your config script (“settings:link_number”).
In the last part of the script we check for link messages on the link_com_number.
You only get link message here when a message is send from a other object (as the object cant hear itself).
Ex.: if a other object has a button with “menu:main:Button = msg | Hi, you clicked a button” and that button is clicked we would get a message containing “Hi, you clicked a button” here. Assuming that “settings:listen” is set to On and that the other setting match.
Again make sure that link_com_number matches the number that is inside the _Config script (“settings:link_com_number”).
Extras (update v1.48)
From version 1.48 the Master Menu PRO comes with a EXTRAS box that contains the “Master Menu EXTRAS v1.xx” script and a slightly modified _Config and Link Example script.
The EXTRAS script lets you create custom [tags] in your blue dialog menu and adds textbox dialogs.
In addition you can extend the amount of script memory by splitting your sub menus over 2 scripts (the main and the extras script).
A little bit to much?
The Master Menu PRO lets you create almost everything you want. However some basic scripting knowledge is required to setup your own item. I understand that for many the lines in the Example Script might look like Chinese (assuming you don’t know Chinese).
To make everything a lot easier i have created the Master Changer PRO.
With the Master Change PRO you can use lines like “menu:Color:Green = link | mc_color # -4 # <0.0, 1.0, 0.0> # -1” inside your _Config script to chance the color of your object.
Included with the Master Menu PRO are a few working examples. I recommend you have a good look at these before you start with your own script and maybe go over this manual again.
The Master Menu PRO and the Master Changer PRO cover about 90% of what most people need in regards to custom scripts. In most cases only a little code is required to get these scripts to do exactly what you want.
As example i have included a Merge script that uses both the Master Changer PRO and the Master Menu PRO. This script has been designed for things like paths or other objects that are often linked together. What the script does is check for prims when they are linked and provides a menu that asks if you want to “Merge”. When “Merge” is selected the contents of all prims Containing the Master Changer PRO are cleared except for the root prim. Or in other words it removes all unnecessary scripts.
This is possible because the Master Changer PRO can change multiple prims at the same time based on the prims name.
If that’s still all Chinese to you then feel free to contact me.
Since both scripts do most of the work creating custom scripts is easy, fast and a lot less expensive then getting a custom script made.