-
Notifications
You must be signed in to change notification settings - Fork 2
Syntax
NOTE:
- Syntax can change at any time.
- How the captions display will vary based on your hud.
- Titles should be written as though you are writing captions.
/* ... */ makes a block comment.
// makes an inline comment.
Example:
/*
This page is unfinished. Don't compile yet.
*/
// TODO: Remove unicode support.
A bind is a command or string of commands that executes when a key is pressed. (More Info)
In the VMG Language, a bind is a command string that is displayed as its title, and bound to a number key.
Syntax: BIND <title : string> <command string : string> |
Example:
BIND "#ÜbersawIsOverrated" "say #ÜbersawIsOverrated" |
Display in voicemenu:

*1 key is pressed*
Output:

The number key bound is determined by the bind's placement in a page. For example in the page:
"warnings" {
BIND "Sniper!" "say_team Sniper Ahead!" |
BIND "Sticky Trap!" "say_team Sticky Trap Ahead!" |
BIND "Flank!" "say_team Sniper Incoming Flank!" |
}
The bind titled "Sniper!" will be bound to 1, since it appears first.
The bind titled "Sticky Trap!" will be bound to 2.
The bind titled "Flank!" will be bound to 3.
Currently only accessible in the development branch, you can use prefix the bind with NOFORMAT to prevent formatting of any kind. You can also use NOEXIT to prevent the bind exiting. Also applies to toggle binds.
Syntax: TOGGLE BIND <title : string> <command string : string> <title : string> <command string : string> ... |
A toggle bind is a bind with multiple states. Each time it is ran, it changes to the next state until it modulates back to its first state. The first state is always the first bind (first 2 strings).
Example:
TOGGLE BIND "Debug Full" "debug=on" "Debug Minimal" "debug=minimal" "Debug Off" "debug=off" |
Result in-game:
1. Debug Full
*hits 1*
*executes "debug=on"*
1. Debug Minimal
*hits 1*
*executes "debug=minimal"*
1. Debug Off
*hits 1*
*executes "debug=off"*
cycles back to Debug Full
Syntax: <title : string> { ... }
A page is a collection of binds and toggle binds. You can insert pages into parent pages, or run "exec $pageopen_<title>"
NOTE: In the files, a page uses a formatted title in which:
- Has caption tags, punctuation, and non-ascii characters removed.
- Is all lower case.
- All spaces ( ) are replaced with underscores (_).
For instance, the page titled "Callouts" will use "callouts" internally in the voicemenu vpk. If you were to open this page, you'd need to call exec $pageopen_callouts.
Example:
"<B>Comp Callouts<B>" {
BIND "ENEMY PUSHING" "say_team **ENEMY PUSHING**" |
BIND "ENEMY SPY" "say_team *ENEMY SPY ROUND HERE*" |
}
*executes $pageopen_comp_callouts*
Result in game:
1. ENEMY PUSHING
2. ENEMY SPY
To exit the menu, select an option, or run cvm.exitmenu.
Key-Values are the program's main way of configuration. They can only be assigned.
Syntax: <key : identifier> = <value : string>
Example: #cvm.resetkeys = "bind 1 quickbuild_1; bind 2 quickbuild_2; bind 3 quickbuild_3; bind 4 quickbuild_4"
Key Values used by the generator:
-
#cvm.boldbydefault- If set to true, will bold all pages with <B>. As a result, <B> in titles will unbolden the selected characters. Note that the number key prepended will not be effected by this trick. Default value is "false". -
#cvm.italicizedbydefault- If set to true, will italicize all entries with <I>. As a result, <I> in titles will unitalicize the selected characters. Note that the number key prepended will not be effected by this trick. Default value is "false". -
#cvm.defaultcolor- Color tag that is inserted into every caption. Note that the number key prepended will not be effected by any tags. Default value is "". -
#cvm.resetkeys- Command-String that runs after selecting a bind. Default value is "bind 1 slot1; bind 2 slot2; bind 3 slot3; bind 4 slot4; bind 5 slot5; bind 6 slot6; bind 7 slot7; bind 8 slot8; bind 9 slot9; bind 0 slot10". -
#cvm.predisplay_time- cc_predisplay_time is set after exiting menu. Key Value determines the cvar value. Default value is "0.25". -
#cvm.linger_time- cc_linger_time is set after exiting menu. Key Value determines the cvar value. Default value is "0". -
format- (IN DEVELOPMENT BRANCH ONLY) Sets formatting for titles of binds and pages. All "$(nkey)" strings will be replaced with the bind/page's resulting number key, and all "$(str)" will be replaced with the bind/page's actual title. This replaces#cvm.boldbydefault,#cvm.italicizedbydefault, and#cvm.defaultcolorKVs.