-
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.
You can use prefix a bind, toggle bind, or page with NOFORMAT to display with only the bind title, instead of using the format KV. You can also use NOEXIT to prevent the bind exiting.
e.g
NOFORMAT "<I>Credits<I>" {
NOFORMAT TOGGLE BIND "<—————————— Do you know the way to town sir?" "" "Do you know the way to town sir? ——————————>" "" |
NOFORMAT NOEXIT BIND "——————————> Created By ME! <——————————" "" |
NOFORMAT TOGGLE BIND "<—————————— Yeah it's back the way you came." "" "Yeah it's back the way you came. ——————————>" "" |
}
Result:
<—————————— Do you know the way to town sir?
——————————> Created By ME! <——————————
<—————————— Yeah it's back the way you came.
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:
*hits 1*
*executes "debug=on"*
*hits 1*
*executes "debug=minimal"*
*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:

To exit the menu, select an option, or run cvm.exitmenu.
Key-Values (KVs) are the program's main way of configuration. They can only be assigned.
Syntax: <key : identifier> = <value : string>
Example: resetkeys = "bind 1 quickbuild_1; bind 2 quickbuild_2; bind 3 quickbuild_3; bind 4 quickbuild_4"
Key Values used by the generator:
-
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". -
predisplay_time- cc_predisplay_time is set after exiting menu. Key Value determines the cvar value. Default value is "0.25". -
linger_time- cc_linger_time is set after exiting menu. Key Value determines the cvar value. Default value is "0". -
format- 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)" strings will be replaced with the bind/page's actual title.
Sidenote: If the format KV is surrounded in <B> or <I> tags, you will have to append a space to the end of the string. This is because a tag will not shift to the next line if no character is before it.
Legacy KVs:
-
#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 "".