Half-Life Console Commands and Variables

Category: video

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
brightness 1 enable glare reduction (try higher values, like 3, for even brighter) [Flags: a]
gamma 3 set video gamma level [Flags: a]
gl_affinemodels 0 makes my screen go crazy (Voodo2)
gl_alphamin 0.250 set minimum alpha blending level
gl_clear 0 makes cracks between textures visible when 1
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_dump   dump data about video card: vendor, renderer, version, entensions
gl_flipmatrix 0 enable special crosshair fix when using the 3DNow! 3DFX MiniGL (3dfxglam.dll) [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_log <logfile> writes graphic debug messages to logfile
gl_max_size 256 set the maximum texture size (higher may look better, but may slow performance if set too high)
gl_monolights 0 creates a uniform light source with no shadows (OpenGL only) [Flags: a]
gl_nobind 0 enable replacing textures with bizarre alphanumeric characters (trippy)
gl_nocolors 0 disable colors (OpenGL only)
gl_overbright 1 enable maximum brightness mode [Flags: a]
gl_palette_tex 1 enable paletted textures
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_polyoffset 4 set polygon offset -- try larger values for flickering decal or texture problems [Flags: a]
gl_reporttjunctions 0 enable T-junction reporting to console, see gl_keeptjunctions
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_texels   report the number of texesl uploaded to the video card
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_zmax 4096 set max size for zbuffer
gl_ztrick 1 speeds up renndering on some 3dfx cards (and maybe others), but may cause flickering on some video cards
host_speeds 0 enable display of current FPS on-screen
interp   enable frame interpolation
lcd_x 0 screws up my screen
lcd_yaw 0 screws up my screen
lightgamma 2.500 set lighting gamma value
r_mirroralpha 1 enable reflective textures (0 may improve performance)
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)
texgamma 2 set texture gamma level
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 
vid_nopageflip 0 disable video page flipping [Flags: a]
vid_stretch_by_2 0 enable video stretching (for interlaced display) [Flags: a]
vid_wait 0 enable video synch
viewframe   enable wire-frame display (OpenGL only, not 3dfx)
viewmodel   enable model display
viewnext   select next model
viewprev   select previous model
viewsize 120 set view size [Flags: a]
_vid_default_mode 0 set default video mode (screen resolution) [Flags: a]
_vid_default_mode_win 3 set default windowed video mode (screen resolution) [Flags: a]
_vid_wait_override 0 set video wait override [Flags: a]
_windowed_mouse 0 enable mouse in windowed mode [Flags: a]
All · Audio · Cheats · Controls · DemoUtils · Developer · Help · Joystick · Misc · Mouse · Net · Prefs · Scripting · TFC · Tweaks · Unknown · Video