Half-Life Console Commands and Variables

Category: tweaks

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
bgmvolume 0 enable CD audio (0 may improve performance) [Flags: a]
cl_allowdownload 1 enable download of maps, models, and decals on joining a server
cl_allowupload 1 enable upload of maps, models, and decals on joining a server
cl_allow_download   toggle allowing download of maps, models, and decals on joining a server
cl_allow_upload   toggle upload of maps, models, and decals on joining a server
cl_downloadinterval 1 set the minimum time between downloads from the server in a multiplayer game
cl_download_ingame 1 enable downloads during a multiplayer game (generally not a good thing -- instead set cl_allow_download 1 and this one to 0 so downloads are between maps only)
cl_download_max 0 set the maximum number of files to download from a server
cl_gaitestimation 1 enable estimated player stepping motion -- disable (0) to decrease apparent "ice skating" and possibly increase lag
cl_gg 0 enable Game Gauge mode (gg starts running a demo in gamegauge mode and will report averag FPS at the end
cl_himodels 0 enable high quality player models. Set to 1 for slightly better quality player models (and slightly lower fps) [Flags: a]
cl_nolerp 0 disable model (entity) movement prediction (1 may increase lag)
cl_nopred 0 disable client-side prediction (1 may increase lag) [Flags: a]
cl_predict_players 1 enable client-side prediction of other players
cl_pred_fraction 0.500 set client-side prediction faction (closer to one is more prediction) [Flags: a]
cl_pred_link 1 set client-side prediction link value
cl_pred_maxtime 255 set client-side prediction maximum prediction time [Flags: a]
cl_resend 6 set resend count (the number of times to attempt to resend packets)
cl_upload_max 0 set the max number of files a client can upload to a server
dc   enable class briefing displays after selecting a class in TFC
fps_lan 31 set the max framerate for multiplayer games (only when rate is set higher than 5000. fps_modem sets the max framerate when rate is set lower than 5000). Lower reduces lag.
fps_modem 31 set the max framerate for multiplayer games (only when rate is set less than 5000. fps_lan sets the max framerate when rate is set 5000 or higher). Lower reduces lag.
fps_single 72 set max framerate for a single player game
gl_cull 1 enable rendering of visible objects only (0 will slow fps)
gl_d3dflip 0 enable reversed rendering order for D3D video mode
gl_dither 1 enable dithering [Flags: a]
gl_keeptjunctions 1 enable allowing slight cracks between textures, setting to 1 may look better on some video cards, but will be a bit slower (fewer fps)
gl_lightholes 1 enable light holes (0 may improve perfomance)
gl_max_size 256 set the maximum texture size (higher may look better, but may slow performance if set too high)
gl_picmip 0 set rendering quality (0,1,2, higher is faster and lower quality) see gl_playermip, gl_texturemode
gl_playermip 0 set player rendering quality (0,1,2, higher is faster and lower quality) see gl_playermip, gl_texturemode
gl_round_down 3 set texture size rounding-down value (higher rounds more, resulting in lower quality and higher FPS)
gl_smoothmodels 1 enable model smoothing. Disabling (0) may increase fps a bit
gl_spriteblend 1 enable blending sprite graphics
gl_texsort 0 enables brighter and more vivid textures, but slows performance
gl_texturemode [type] set the rendering mode: in order from lowest quality (fastest) to highest quality (slowest), [type] options are: GL_NEAREST_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_NEAREST, GL_NEAREST_MIPMAP_LINEAR, GL_LINEAR_MIPMAP_LINEAR. Think of the 1st two as low and high quality for hardware that supports bilinear filetering, and the 2nd two as low and high quality for hardware that supports trilinear filtering.
gl_wateramp 0 enable amplified (higher) waves in water. 1 may decrease FPS (see sv_wateramp)
gl_ztrick 1 speeds up renndering on some 3dfx cards (and maybe others), but may cause flickering on some video cards
hisound 0 enable high-quality sound (1=22kHz, 0=11kHz) see also loadas8bit (0 may improve performance) [Flags: a]
host_framerate 0 set the speed that host and server interact with the game. 
host_speeds 0 enable display of current FPS on-screen
loadas8bit 0 set to 1 to force 8-bit (lower quality) sounds (see hisound also)
mp_decals 2000 set max number of decals to display in multiplayer (set lower for perfomance boost, but blast marks and logos will disappear sooner) [Flags: a]
precache 1 enable pre-loading of all needed files at map start (1 may help skipping/stoppoing problems)
pushlatency -50 set pushlatency (try around -1/2 to -1 times ping) -- some people say using non-integer values (like -100.0521) reduces lag [Flags: a]
rate 9001.204 set client data rate (1000-4000 modem, 20000+ LAN) -- bad values cause LAG! turn on the r_netgraph to help avaluate different values, and try non-integers like 4001.0528. [Flags: a i]
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_drawadaptive 0 enable adaptive detail levels
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_mirroralpha 1 enable reflective textures (0 may improve performance)
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_netgraph 1 enable graph of network conditions (yellow is bad, red is worse) turn this on to evaluate rate settings and connection quality (1 is normal netgraph, 2 and 3 give more detailed packet info, but are harder to read)
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)
sizedown   decrease screen size (will increase FPS, won't work on all video cards)
sizeup   increase screen size (will decrease FPS, won't work on all video cards)
s_a3d 0 enable A3D support (0 may improve performance) [Flags: a]
s_eax 0 enable EAX support (0 may improve performance) [Flags: a]
s_reverb 1 enable reverb (0 may improve performance)
timedemo <demo> play demo HalfLife\Valve\demo.dem at max FPS and report average FPS (see r_speeds, timerefresh, gg)
timerefresh   spin view in place and report average FPS for the spin (see timedemo, r_speeds, gg)
uprate 9999 set transfer rate from client to server (how many bytes per second your computer will try to send to the server). Lower may improve lag (to a point -- too low can be worse than too high)
vid_config_x 800 set horizontal screen resolution [Flags: a]
vid_config_y 600 set vertical screen resolution [Flags: a]
vid_d3d 0 enable Direct3D support (keep this off if your video card supports OpenGL)
vid_describemode   display video mode settings
vid_mode 0 set video mode 
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)
All · Audio · Cheats · Controls · DemoUtils · Developer · Help · Joystick · Misc · Mouse · Net · Prefs · Scripting · TFC · Tweaks · Unknown · Video