Half-Life Console Help


Setting Variables
Half-Life has hundreds of variables you can change that affect almost every aspect of the game, from video and network options to player movement speeds and even the world gravity strength (check out the link bar on the left for alphabetical and categorized lists of all of the console variables). Changing a variable is simple, just open the console and type:

variable_name value 
For example, to set the gamma-correction level (a variable named gamme) to 2.6 (a good number for a Voodoo2), just open the console and type:
gamma 2.6 
You can accomplish the same thing by putting the variable setting in a script, or config file, but if you do there's an extra word, set, that you must put before the variable name, like this:
set gamma 2.6 
Some variables are numeric, some are strings, and some are boolean or "toggle" variables, where setting them to "0" is "off" or "not true", and setting them to "1" is "on" or "true". You can type the variable name into the console with no value to see the current setting (so after the setting above, typing just gamma into the console would echo "2.6"). In general, you only need to put double-quotes around a value if it is a string containing spaces, such as in the command name "cool guy" to change your player's name to "cool guy", but it's always safe to use the quotes, even if it's not necessary.

Most of the variables you can set from the console are not available from the configuration menus, so use your autoexec.cfg file to set everything the way that's best for your system and personal preferences. You can try out a setting by just changing it's value in the console directly, and then save the values you like in your autoexec.cfg. Note that changes to some variables, particularly sound and video settings, will not take effect until the game is restarted. Note also that some variables can only be set from the command-line, like the developer one for accessing the console (theres a list coming up). 

In a multiplayer game, most game variables such as sv_cheats and sv_gravity may only be changed by the server console or remote console (using the remote password), but clients can still see the value of the variables by entering just the variable name into the console.

Complete lists of all console commands and variables, sorted alphabetically or categorized, are available from the navigation links in the upper-left of this page.
 
[Previous Page] [Back to Console Index] [Next Page]