Half-Life Console Commands and Variables

Category: audio

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
ambient_fade 100 set the distance at which ambient sounds fade away
ambient_level 0.300 sets sound level for ambient sounds
bgmbuffer 4096 set the CD audio buffer size
bgmvolume 0 enable CD audio (0 may improve performance) [Flags: a]
cd   control CD audio. 'cd stop' stops play, 'cd loop X' plays track X (1-16 valid)
cl_appendmixed 0 force playing of mixed sounds as sequential sounds instead
hisound 0 enable high-quality sound (1=22kHz, 0=11kHz) see also loadas8bit (0 may improve performance) [Flags: a]
loadas8bit 0 set to 1 to force 8-bit (lower quality) sounds (see hisound also)
nosound 0 disable sounds (1 will make the game silent)
play <filename> play a WAV audio file designated by filename
room_delay 0 3D sound setting
room_dlylp 2 3D sound setting
room_feedback 0.520 3D sound setting
room_left 0.010 3D sound setting
room_lp 0 3D sound setting
room_mod 0 3D sound setting
room_off 0 3D sound setting
room_refl 0.900 3D sound setting
room_rvblp 1 3D sound setting
room_size 0.060 3D sound setting
room_type 18 3D sound setting
snd_noextraupdate 0 disable 'extra' sound system updates -- only try 1 if you have sound problems
snd_show 0 enable display of sounds as they are played
soundfade <params> set sound fade properties (params = <%>[])
soundinfo   display number of: stereo channels, samples, samplebits, speed, DMA, and sound channels
soundlist   display list of all loaded sounds
stopsound   stop playing current sound
suitvolume 0.250 set HEV suit volume [Flags: a]
s_2dvolume 0.880 Maximum volume at which 2D sounds are played. By the nature of the filters being applied to the A3D buffers, they are quieter then their 2D counterparts. Hence it is important to quiet the 2D sounds to normalize volume. Valid range is 0 to 1.0
s_a3d 0 enable A3D support (0 may improve performance) [Flags: a]
s_automax_distance 30 set distance for max sound volume [Flags: a]
s_automin_distance 2 set distance for min sound volume [Flags: a]
s_bloat 2 A3D 2.0 only. Bloat factor for polygons. This effectively scales each polygon by a certain amount. This is a rough way to fill holes left by unrendered small polygons. [Flags: a]
s_buffersize 65536 set sound buffer size
s_disable_a3d   disabe A3D support
s_distance 60 adjusts the ratio of game units to meters - affecting velocity, positioning, and distance. The higher this number, the closer everything gets (in audio terms). Valid range is 0 to infinity. [Flags: a]
s_doppler 0 adjusts doppler effect - this setting is very sensitive which is why it is disabled by default. Valid range is 0 to 10. [Flags: a]
s_eax 0 enable EAX support (0 may improve performance) [Flags: a]
s_enable_a3d   enable A3D support
s_geometry 1 A3D 2.0 only. enables geometry rendering on/off. When disabled (0), geometry is not processed at all.
s_max_distance 1000 Maximum distance from the listener before rolloff is no longer applied. Valid range is s_min_distance to infinity [Flags: a]
s_min_distance 8 Minimum distance a source will be from the listener before rolloff is applied to it. Sources with a value lower than s_min_distance will play at full volume. Valid range is 0 to s_max_distance. [Flags: a]
s_numpolys 200 A3D 2.0 only. Maximum polygons to be rendered. Polygons will stop being rendered either when there are no more polygons left or s_numpolys polygons have been rendered. Setting this to 0 is the same as turning s_geometry off. Valid range is 0 to infinity. [Flags: a]
s_occfactor 0.250 A3D 2.0 only. Transmission value of material - the smaller the number, the more occluded the sound is (less sound passes through the material). Valid range is 0 to 1.0
s_occlude 1 A3D 2.0 only. enable sound occlusions.
s_refdelay 4 A3D 2.0 only. Delay between a source and its closest reflection. The higher the delay, the more time it takes between when the source and its first reflection is played. Valid range is 0 to 100. [Flags: a]
s_refgain 0.400 A3D 2.0 only. Adjusts the gain on each reflection, where higher number means louder reflections. Remember very loud reflections could cancel out the effect of HRTFs. Valid range is 0 to 1.0 [Flags: a]
s_reflect 1 A3D 2.0 only. enable sound reflections.
s_reverb 1 enable reverb (0 may improve performance)
s_rolloff 1 Adjusts the rolloff factor; when the rolloff value is increased, the effects of distance are increased: high frequencies are filtered and volume is lowered. Valid range is 0 to 10. [Flags: a]
s_verbwet 0.250 controls the wet/dry mix of reverbfor A3D only. The higher the number, the more wet (more reverb) the sounds. Valid range is 0 to 1.0 [Flags: a]
volume 0.800 set game volume [Flags: a]
_snd_mixahead 0.100 set sound mixahead value (like s_mixahead in Q2), different values may help fix stuttering problems on some sound cards [Flags: a]
All · Audio · Cheats · Controls · DemoUtils · Developer · Help · Joystick · Misc · Mouse · Net · Prefs · Scripting · TFC · Tweaks · Unknown · Video