Console

From modwiki

Jump to: navigation, search
Console quick reference

Image:D3square_25.png Doom 3


Image:Q4square_25.png Quake 4



Image:Preysquare_25.png Prey


The console is a fundamental part of Doom 3 engine games: it is used for example to relate debug to the developer and status information for troubleshooting general game problems. To access the console you need to press "Ctrl + Alt + ~". To simplify access to the console take a look here. Aside from gaining information you can also interact with the engine through CVars and Commands.

CVars

CVar's (console variables) are used to hold scalar or string variables that can be changed or displayed at the console as well as accessed directly in code. CVars are mostly used to hold settings that can be changed from the console or saved to and loaded from the configuration files. CVars are also occasionally used to communicate information between different modules of the program, and new CVars can be created on mods.

CVars are restricted from having the same names as console commands to keep the console interface from being ambiguous. CVars can be accessed from the console in three ways:

INPUT RESULT
cvarName prints the current value and a short description
cvarName [X] sets the value to X if the variable exists
set cvarName [X] as above, but creates the CVar if not present
seta cvarName [X] as above, but also stores the CVar value in [game]config.cfg, so that it will be the default value. Never use seta in your command line!

A full list of the cvars, and a brief description can be generated using the cvarList console command.

It should be noted that many cvars are not intended to be changed by players, and are intended only for developers / mappers. Many of these cvars are marked as "cheat protected", which is indicated by CH in the output of cvarList. Cheat protected cvars cannot be modified from the default values during online play and so have no effect, but if tweaked can have a negative effect on single-player games, or when watching demos or using the various editors, as these respect cheat protected cvars. Therefore, it is strongly recommended that players do not adjust cheat protected cvars unless they know the specific effect of that cvar.

Console commands

Console commands are instructions that are typed directly into the console to perform various tasks. These tasks may range from things users may wish to do (eg recordNetDemo to record a demo of the current multiplayer game), through to internal functions used by the game (such as updateSI which triggers a refresh of the serverinfo data).

Some commands require one or more parameters, and most will report their usage by typing them without parameters. A full list of console commands and a brief description can be generated using the console command "listCmds".

They can also be used indirectly, for instance through GUI scripts by using the set command, or programmtically changed via the game-code or engine via the cvarSystem interface.

Personal tools
Main