Half-Life Console Commands and Variables

Category: prefs

Use these console commands and variables to customize Half-Life, TFC, Opposing Force, or most HL Mods, troubleshoot problems with video or sound hardware, optimize performance, or make your own scripts. If you don't know how to use these console commands and variables, please see the Console Tutorial. Many of these variables are boolean, which means that they can be either 1 (on) or 0 (off) and no other values are allowed. In the descriptions for boolean variables, I use "enables" or "disables" to indicate what happens when that variable is set on (1). The opposite is always true (if 1 enables the feature, 0 disables it, and vice-versa). Variables that can accept any number as a value have descriptions that begin with "sets the . . . " 

Be sure to check out the other categories, especially the tweaks!. The flags listed at the end of the descriptions of some variables have the following meanings: 

  • a - attribute variable, changes to these variables will be automatically saved to Half-Life/valve/config.cfg (or Half-Life/tfc/config.cfg for TFC). Variables without this flag will return to the default value listed unless set by Half-Life/valve/autoexec.cfg (or Half-Life/tfc/autoexec.cfg for TFC).
  • i - info variable, the values of these variables are displayed in response to the info command. 
  • sv - server info variable, the values of these variables are displayed in response to the serverinfo command. 
  • tfc - team fortress classic variables, these variables apply to TFC mode only (hl.exe -game tfc). 
All · Audio · Cheats · Controls · DemoUtils · Developer · Help · Joystick · Misc · Mouse · Net · Prefs · Scripting · TFC · Tweaks · Unknown · Video
Command
or
Variable
Name
Arguments
or
Default
Description
autosave   enable autosave
cam_command 0 enable chase cam commands
cam_contain 0 enable chase cam auto-contain in current room
cam_idealdist 64 set the preferred distance from the player model for the chase cam (only valid if thirdperson activated)
cam_idealpitch 0 set the preferred pitch for the chase cam (only valid if thirdperson activated)
cam_idealyaw 90 set the preferred yaw for the chase cam (only valid if thirdperson activated)
cam_snapto 0 set the preferred snap interval for the chase cam (only valid if thirdperson activated)
chase_active 0 enable chase-cam (third-person view, like TombRaider or Hexen 2)
chase_back 100 set the preferred cam distance from the player when backing up
chase_right 0 set the preferred offset to the side for the chase cam
chase_up 16 set the preferred offset up for the chase cam
cl_anglespeedkey 0.670 set the speed that the direction keys (not mouse) change the view angle
cl_backspeed 400 set the player backup speed on a server, up to server max [Flags: a]
cl_bob 0.010 set the amount that your player view bobs while running. Motion-sick types should set this to 0.
cl_bobcycle 0.800 set how frequently player view bobs while running. Motion-sick types should set this to 0.
cl_bobup 0.500 set the the amount of movement before view-bobbing kicks in. Motion-sick types should set this to 0.
cl_forwardspeed 400 set the player maximum forward speed. may not exceed server max [Flags: a]
cl_himodels 0 enable high quality player models. Set to 1 for slightly better quality player models (and slightly lower fps) [Flags: a]
cl_messages   displays server messages
cl_movespeedkey 0.300 set movement speed for keyboard movement keys
cl_pitchdown 89 set maximum angle that player can look down (in degrees)
cl_pitchspeed 225 set pitch (up and down) change speed
cl_pitchup 89 set maximum angle thaat player can look up (in degrees)
cl_rollangle 2 set view tilt angle for roll motion
cl_rollspeed 200 set view tilt speed
cl_sidespeed 400 set the manimum player strafing speed (may not exceed server manimum)
cl_skycolor_b 0 set the blue component of the sky color
cl_skycolor_g 0 set the green component of the sky color
cl_skycolor_r 0 set the red component of the sky color
cl_skyname 0 set the sky pattern [Flags: a]
cl_skyvec_x 0 set the sky pattern rotation axis vector x-component
cl_skyvec_y 0 set the sky pattern rotation axis vector y-component
cl_skyvec_z 0 set the sky pattern rotation axis vector z-component
cl_slist 10 set the number of servers in the serverlist
cl_solid_players 1 enable solid player models
cl_upspeed 320 set the player climbing up speed (up to server max)
cl_usr   display user HUD info
cl_waterdist 4 set underwater distance 
cl_yawspeed 210 set turning speed (with keyoard, up to server max)
con_notifytime 4 set console message notification time (how long messages stay on screen)
crosshair 1 enable crosshair [Flags: a]
c_maxdistance 200 set chase cam max distance
c_maxpitch 90 set chase cam max pitch
c_maxyaw 135 set chase cam max yaw
c_mindistance 30 set chase cam min distance
c_minpitch 0 set chase cam min pitch
c_minyaw -135 set chase cam min yaw
dc   enable class briefing displays after selecting a class in TFC
enableconsole   enable console screen
firstperson   enable first-person view (see thirdperson, chase_cam)
fps_single 72 set max framerate for a single player game
hud_centerid 0 enable center screen display of player ID names (instead of lower-left corner) [Flags: a]
hud_deathnotice_time 6 set how long death messages remain onscreen
hud_drawhistory_time 5 set how long HUD item icons remain onscreen
hud_fastswitch 1 enable fast weapon switching (0 is HL-style, where you must press fire after picking a weapon before it is activated) [Flags: a]
hud_saytext_time 5 set how long chat messages remain onscreen
model 0 If modelname is unspecified, this will display the current player model name. To change your player model, specify the name of a folder in Valve/models/player that contains a .mdl file. To view the model, start a multiplayer game and type chase_active 1. [Flags: a i]
precache 1 enable pre-loading of all needed files at map start (1 may help skipping/stoppoing problems)
r_decals 4096 set max number of blast mark decals in single-player (lower number will improves perfomance some, but decals wil disappear sooner)
r_drawviewmodel 1 enable drawing player weapon model (off improves perfomance a bit)
r_dynamic 1 enable dynamic lighting -- the light reflections glowing objects make on other objects nearby, such as rockets and the flashlight (0 may improve fps)
r_fullbright 0 enable max brightness, local game only
r_glowshellfreq 2.200 set the frequency of shimmering on glowing shells around flags and keys
r_mmx 1 force MMX calculation methods for MMX CPU's (set to 1 if your CPU supports MMX! Any p2 does, as do most newer AMD and Cyrix chips. If using 1 reduces perfomance, set back to 0)
r_norefresh 0 enable clearing hud and console before redrawing
r_novis 0 enable drawing underwater polygons (must be 1 for r_wateralpha to work)
r_shadows 0 enable player shadows (decreases performance and doesn't look that great)
r_speeds 0 enable display of average fps, draw speed, and polygon info (use to see running FPS info)
r_traceglow 0 enable inclusion of monsters in glow sprite occlusion checking (1 will decrease perfomance)
r_wateralpha 1 enable alpha blending underwater (r_novis muse be 1 for this to work)
scr_centertime 2 set how long server messages remain on screen
scr_conspeed 600 set the console scroll speed (try 3000 to make it nearly instant)
skin 0 set model skin (anyone know how to put more than one skin in a .mdl file so we can use this?) [Flags: a i]
thirdperson   enable third-person view (see firstperson, chase_cam)
traceralpha 0.500 set tracer bullet alpha component
tracerblue 0.400 set tracer bullet blue component
tracergreen 0.800 set tracer bullet green component
tracerlength 0.800 set tracer bullet length
traceroffset 30 set tracer bullet offset
tracerred 0.800 set tracer bullet red component
tracerspeed 6000 set tracer bullet speed
violence_ablood 1 enable blood (0 will improve perfomance some, but you won't see any blood)
violence_agibs 1 enable gibs (0 will improve performance some, but you won't see body chunks)
violence_hblood 1 enable more blood (0 will improve perfomance some, but you won't see as much blood)
violence_hgibs 1 enable more gibs (0 will improve performance some, but you won't see as many body chunks)
v_centermove 0.150 set autocentering threshold (how much the view must move before autocentering kicks in)
v_centerspeed 500 set autocentering speed
v_kickpitch 0.600 set amount player view pitch changes when player hit
v_kickroll 0.600 set amount player view roll changes when player hit
v_kicktime 0.500 set duration of player view pitch and roll changes when player hit
All · Audio · Cheats · Controls · DemoUtils · Developer · Help · Joystick · Misc · Mouse · Net · Prefs · Scripting · TFC · Tweaks · Unknown · Video