ListCvars (console command)
Description
This command displays a list of CVars and their current values.
Usage
At the console type…
listCvars [option] [search string]
Parameters
- [option] - a flag that changes what is displayed with the list.
- -help - Displays a list of CVars and a short description of what they do.
- -type - Displays a list of CVars and their type.
- -flags - Displays a list of CVars and their flags.
- [search string] - A search string that narrows the list of CVars displayed to those that partially match the specified string.
Notes
This console command is very useful when writing an article for the CVars section of the wiki.
The -flags output prints a line for each CVar, in the following format:
<CVar name> <type> [<usage>] [UI] [SI] [ST] [CH] [IN] [RO] [AR] [?NS?] [MO]
The first parameter marks the data type, which can be one of the following:
Symbol | Code flag | Description |
---|---|---|
S | No type flag | CVar is string type. |
B | CVAR_BOOL | CVar is boolean type. |
F | CVAR_FLOAT | CVar is float type. |
I | CVAR_SYSTEM | CVar is an integer type. |
The second parameter is either empty, or one of the following:
Symbol | Code flag | Description |
---|---|---|
SYSTEM | CVAR_SYSTEM | CVar is used in the engine. |
RNDR | CVAR_RENDERER | CVar is used in the renderer. |
SND | CVAR_SOUND | CVar is used for the sound system. |
GUI | CVAR_GUI | CVar is used for a GUI. |
GAME | CVAR_GAME | CVar is used in the gamecode. |
TOOL | CVAR_TOOL | CVar is used for controlling a tool. |
The next flags either show up or won’t according to the CVar’s flags.
Symbol | Code flag | Description |
---|---|---|
UI | CVAR_USERINFO | The CVar is sent to the server and is accessible from the menu. |
SI | CVAR_SERVERINFO | The CVar is received from the server and is accessible from the menu. |
ST | CVAR_STATIC | The CVar is statically declared, not created by the user. |
CH | The CVar is considered a cheat. | |
IN | CVAR_INIT | The CVar can only be set from the command-line. |
RO | CVAR_ROM | Only for display, cannot be changed by the user. |
AR | CVAR_ARCHIVE | The CVar will be saved to a config file. |
?NS? | CVAR_NETWORKSYNC | The CVar is synced from the server to clients. (Never shows up in the output?) |
MO | CVAR_MODIFIED | Flag is set when the variable is modified. |