Console variable

From Doomsday Wiki
Jump to: navigation, search

Console variables (cvar) are variables "built-in" to the engine. The direct way to change and/or query their values is with the command line interface of the console. Most variables accept values only within a preset range appropriate for that variable.

Note: The most commonly changed variables can also be adjusted from the control panel GUI.

Examples

Displaying the value of the variable con-fps in the console:

con-fps

Displaying help information for the variable con-move-speed:

 help con-move-speed

Changing the value of the variable con-completion from the console (to 1):

con-completion 1

Changing the value of the variable rend-particle-rate with force from the console (to 10):

 rend-particle-rate force 10
Note: Forcing the value of a variable is not generally a good idea. Doing so tells Doomsday to ignore the predetermined accepted value range and sets the value regardless. This feature exists primarily for development purposes.

Querying the value of the variable con-snapback and using the if command to generate a status message:

 if con-snapback = 0 "Console snapback is disabled" "Console snapback is enabled"

See also