Difference between revisions of "Cvars"
Jump to navigation
Jump to search
(Added flags table) |
(→Flags) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
=== Flags === | === Flags === | ||
Each cvar has | Each cvar has flags associated with it. It tells the engine a bunch of information like type and what it should do with them. Not all flags are known at the moment. | ||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+Cvar flags | ||
!Flag | !Flag | ||
!Description | !Description | ||
Line 45: | Line 45: | ||
|- | |- | ||
|32768 (0x8000) | |32768 (0x8000) | ||
| | |Read-only (Cannot change the cvar value) | ||
|- | |- | ||
|65536 (0x10000) | |65536 (0x10000) | ||
| | |Server-only (Removed from client and not allowed to change) | ||
|} | |} | ||
Latest revision as of 17:47, 19 February 2022
Cvars are variables that can be read or set via the in-game console. Cvar stands for Console Variable. Each cvar has a name, description, type and some flags associated with it
Flags[edit | edit source]
Each cvar has flags associated with it. It tells the engine a bunch of information like type and what it should do with them. Not all flags are known at the moment.
Flag | Description |
---|---|
1 (0x01) | Type: Boolean |
2 (0x02) | Type: Integer |
4 (0x04) | Type: Float |
8 (0x08) | Type: String |
16 (0x10) | Saved (The cvar will be saved to the user config) |
32 (0x20) | |
64 (0x40) | Hidden (The cvar will not appear in the console auto-complete) |
128 (0x80) | |
256 (0x100) | |
512 (0x200) | |
1024 (0x400) | |
2048 (0x800) | |
32768 (0x8000) | Read-only (Cannot change the cvar value) |
65536 (0x10000) | Server-only (Removed from client and not allowed to change) |
Quake-C[edit | edit source]
It is possible to interact with these variables from Quake-C, however in vanilla QC there is some limitations. For example, being only able to read numeric values.
Use the following builtins to read and set cvars:
You can also set cvars using Localcmd, which will allow you to concatenate strings together.