Natural Selection as with other Half-Life engine related modifications has several variables that can be configured on the client side and server side. Though many server side and client side variables have similarities across all Half-Life based mods this entry deals more specifically with the variables for most recent release of Natural Selection v. 3.2.0
- 1 NS impulse commands
- 2 Networked client configuration
- 3 cvars (client variables)
- 4 Command line options
NS impulse commands
Impulse commands are preassigned flags that when evoked will produce a certain outcome in the form of an animation of the player character, etc. In relation to Natural Selection, the impulse list will have the effect of allowing for upgrades, pre-recorded voice communications, etc. for both the Alien (Kharaa) players and Marine (Frontiersmen) players for either combat or classic game play modes. Typically the impulse command will be bound to a key on the keyboard using the in-game configuration GUI. However, these impulse commands may be entered separately into the userconfig.cfg file located in the base directory of the NS game folder. The following tabulation details the effect of each of the documented impulse commands:
Alien Combat and Classic
Both Marines and Aliens for Classic and Combat
- impulse 5 - Go to the Ready Room (same as "readyroom")
- impulse 100 - Toggle flashlight/hive sight
- impulse 201 - Spray logo
- impulse 49 - Toggle Ason Hax
Communications Impulse List (All player, all game modes)
- impulse 7 - Follow Me
- impulse 8 - Covering
- impulse 9 - Taunt
- impulse 10 - Need Health
- impulse 11 - Need Ammo
- impulse 12 - In Position
- impulse 13 - Enemy Spotted
- impulse 14 - Weld/heal me
- impulse 15 - All Clear
- impulse 81 - Awknowledge orders
- impulse 105 - Select all soldiers
- impulse 123 - Go to order request
- impulse 124 - Go to ammo request
- impulse 125 - Go to health request
Networked client configuration
The behavior of models in a non-networked Half-Life game is considerably different to the behaviour of other clients, i.e. other networked players, to the connected game server. Half-Life has several variables to account for different connection speeds, interpolation, upload and download speeds to the client connected to the game server. For the most part, the lay player can connect to a game server without modifying any client side variables and will have the ability to player well. The following items are meant to explain in more detail what client side to game server setting do and how they can be configured to optimize your clients connection speed and hardware resources.
Client data controlling rates
rate and cl_rate
- Argument variables:
cvar Default Range Description cl_rate 9999 1000 to 20000 server to client-side data transfer throttle rate 20000 1000 to 20000 server-side to client data transfer throttle
The rate and cl_rate command controls the amount of data the server sends to the client. The rate variable itself is bound to all Half-Life based Steam games and set via a Windows registry entry, thus changing the value in the userconfig.cfg or config.cfg file will not change this value. The cl_rate variable specifies the server how many bytes per second to send the client. It a general misconception that this should be set to 20000, which is the maximum setting. Most servers connected to your client will not be configured to send your client information 20000 bytes per second. A reasonable setting for this for the rate is between 12000-15000 (approximately 14 kilobytes per second). The rate value should however not be set below 10000. The rate and cl_rate values should be the same.
- Argument variables:
cvar Default Range Description cl_cmdrate 30 10 to 100 client to server update rate
cl_cmdrate controls the amount of packages your client send to the server. Set it to 5 above your fps to send the server as many commands as possible. If your upload can't handle this, then set it as high as you can without experiencing choke/loss or ping spikes.
- Argument variables:
cvar Default Range Description cl_cmdbackup 2 1 to 3 client to server update cache
cl_cmdbackup sets how many times you should send each package to the server. Leaving at the cl_cmdbackup = 2 default setting is ideal. A higher setting will use more of your available bandwidth.
cl_updaterate specifies how many data packets per second to send to your client. This command actually works two ways. You want to receive a lot of packages since it will give you more correct player locations and therefore better hit-registry, and others want you to use a high setting as well. If you don't you'll base the packages you're sending to the server on old data which will result in bad hitreg on you as well. Set it to half your fps if your connection can handle it.
- Argument variables:
cvar Default Range Description cl_smoothtime 0.1 0.0 to 1.0
Valve writes that "corrections of prediction errors can be quite noticeable and will cause your view to jump a bit. To visually smooth that effect, the prediction error is corrected gradually over a short amount of time ( cl_smoothtime )." If cl_smoothtime is set to 0(or cl_nosmooth to 1), the interpolation won't be "smoothed" or "corrected" and the actual position of the player player models will be shown. Note that a setting of 0 this will cause "jerking" of the player models, however the position of the models will be correct.
Rendering controlling rates (ex_)
Rendering controlling rates will display the positions of other networked player as models on the server.
- Argument variables:
cvar Default Range Description ex_extrapmax 1.2 0.0 to 1.5 smooth out player movements
ex_extrapmax is used to smooth out player movements in situations when the client lacks sufficient information from the server (either due to packet loss, or the client using low rates) to interpolate the player movements. Ideally, the client should not be forced to extrapolate and extrapolation can be minimized with the correct rate settings. Even if the extrapolation does smooth out player movements, it will cause the hit registry to be misrepresented due to rough estimates where the player will be, which might not at all correspond to where the player is located according to the server. Leaving this at the default value of 1.2 is ideal.
- Argument variables:
cvar Default Range Description ex_interp 0.1 0.0 to 1.0 interpolate frames
ex_interp controls the interpolation of the extrapolation. Setting ex_interp = 0 will minimize the amount of interpolated (estimated) frames. If the server sent to your client the data packets on the exact right frame, ex_interp = 0 would be an appropriate setting. However, due to internet lag, i.e. the ping time to the server, the data packets won't arrive on the exact right frame, which forces the client to extrapolate. This results in a lot worse hit registry than you should be getting (see ex_extrapmax explained above). An ideal setting depends on the connection speed and the ping time to the server which should be adjusted to a value greater than 0.
Netcode and netgraph
The Half-Life netgraph tool allows the user to monitor the client to game server connection and fclient frame rate updates status. Netgraph is analogous to the Windows Task Manager. Some users clain to have success when cl_updaterate matches the game server sv_maxupdaterate and then set ex_interp to 0 to minimize client-side extrapolation. However, doing so may cause inaccurate hitbox registry on the client-side. The netgraph tool allows the client to be fine tunned to the particular network connection by displaying these values in-game. Using the netgraph tool to minimize client-side extrapolation indicates that ex_interp and be left at the default setting of 0.1 with cl_updaterate set to half of the resulting FPS displayed with the netgraph tool. This approach would send to the client as many data packets as the server could and not sparing the client the need of interpolate for each of data packets. The client would not have to extrapolate, resulting in much better client-side hitbox registry. Depending on the client-side setup, the ex_interp maybe set to 0.05 (which actually is the correct value for cl_updaterate = 20). Most servers are configured to send the client sufficient data packets to interpolate correctly for this setting, while not having to extrapolate at all, resulting in an optimal hitbox registry.
- Argument variables:
cvar Default Range Description graph r = red, g = green, b = blue net_graph 0 0 to 3 0 = off, 1 = minimal, 2 = detail, 3 = most detail net_graphpos 1 1 to 3 1 = bottom right (default), 2 = bottom center, 3 = bottom left net_scale 1 1 to 5 1 = normal y-axis scale (default), 5 = largest y-axis scale
The netgraph as a tool for all Half-Life mods that retrieves data from the various client hardware such as the video and network card while playing. When net_graph is set to an integer between 1 and 3, an in-game display will show up on the bottom of the screen according to the net_graphpos, either left, center, or right. The display monitors the frame rate, network upload and download speed to the connected server. Depending on the net_graph setting, the client to server connection status will display on the screen as time elapsed in seconds versus kilobytes per second (kb/sec).
Extrapolation from netgraph
To determines whether the client is interpolating, the easiest way is to display the netgraph to
net_graph "2". If yellow dots appear in the graph, then the client is extrapolating. Setting your ex_interp and cl_updaterate to higher values to get minimize extrapolation. If the client cl_updaterate already is half of the fps, then the ex_interp should be increased instead.
- Example recommended client side configuration
cvar Recommended Value Description fps_max 60 observed frames per second on client cl_cmdrate 65 fps + 5 cl_updaterate 30 half observed frames per second on client ex_extrapmax 1.2 default Half-Life value cl_cmdbackup 2 rate 15000 ex_interp 0.05
cvars (client variables)
cvar Default Range Description cl_updaterate 20 10 to 100 This is how often you send updates to the server. Ideal range is 20-100 depending on the client connection to the server. Typically a faster connection will allow you to use a higher value. Using net_graph "3" will monitor the connection to the server. If a lot of falling and rising lines is observed, the value should be lowered. Note: it can may take a few seconds to a minute before a new setting to be observed. For 512k adsl/cable 80 should be used. Cable users may use up to 100. 56k modem users I'd should use a range of 20-35 and isdn 35-50. cl_cmdrate 30 10 to 100 This setting restricts how many packets are sent from your client to the server. You need to figure out your average fps and set this to it or a divisor of it, example if you get 78 fps average, set it to 44 or ideally 78. Lets say you get 90fps but only have this set to 30, that means only a 3rd of what you see is accurate. If you get 99 fps constant set this to 101 cl_lw 1 0 off, 1 on Leave this to 1, putting this to 0 removes the client-side behaviour of weapons and hits. Packets [bullets] are sent to the server and then returned to verify if they hit or not. Basically the server controls weapon sound and animations so its more accurate as you know exactly where you hit in theory but it doesn't work great on the net. cl_lc 1 0 off, 1 on Again leave this at 1 since this another variable that works decently on LAN only. It removes the lag compensation part of the HL netcode completely: it takes into account your ping when deciding if you hit or not. This is how it used to be ages back in HL before it was made more ISDN/56K friendly. Note: server needs to have sv_unlag 1 for this to work cl_dlmax 128 Sets the maximum number of kilobytes to download from a server. 128 is fine for cable/dsl but 56k and ISDN should experiment with settings of 56 and 64 cl_himodels 0 0 off, 1 on enable high quality player models. Set to 1 for slightly better quality player models but you'll lose some fps. cl_idealpitchscale 0.8 This is one HL's most mysterious variable since no-one knows wtf it is :] I leave it in because it comes with default cfg cl_timeout 300 Sets amount of time before you are disconnected due to inactivity cl_cmdbackup 2 Another unknown variable, again its default so I left it cl_download_ingame 0 0 off, 1 on Allows downloading during the game, such as custom sprays for example, I prefer 0, then it only downloads between maps cl_allowdownload 1 0 off, 1 on Enables downloads of maps models sounds etc cl_allowupload 1 0 off, 1 on If a server for some bizarre reason doesn't have something you do then it uploads it Also allows custom spray upload cl_forwardspeed 500 Sets maximum speed a player moves forward at [depends on server setting] cl_backspeed 500 sets maximum speed a player can move backwards [again depends on server setting] cl_vsmoothing 0.05 Another unknown variable I leave as its default. cl_autohelp 0 0 off, 1 on NS help, set to 1 for on-screen help cl_centerentityid 1 0 off, 1 on NS specific variable, center player names or not, 1 is yes 0 is no cl_musicenabled 0 0 off, 1 on NS specific variable, disable the in-game music with 0, enable with 1 cl_musicvolume 0.000000 More NS specific variables - alternatively if you want to only limit the music volume use this to adjust the level cl_quickselecttime 0.500000 NS specific variable cl_highdetail 0 0 off, 1 on Set at "1" for higher detail, set at "0" for lower quality but better performance cl_particleinfo 0 0 off, 1 on Unknown cl_drawnames 1 0 off, 1 on Set to 1 to enable player names on-screen cl_rate 9999 1000 to 20000 set rate that client will send data to the server in bytes per second (suggested starting values: 1000-4000 modem, 5000-7000 ISDN, 6000-10000 cable/DSL, 7000-20000 T1, 20000 LAN) try non-integers like 4001.0528.
Graphics options cvars
cvar Default Range Description gl_affinemodels 0 0 off, 1 on Unknown gl_alphamin 0.250 set minimum alpha blending level gl_clear 0 makes cracks between textures visible when "1" gl_cull 1 0 off, 1 on enable rendering of visible objects only; setting to "0" would take up more resources gl_d3dflip 0 enable reversed rendering order for D3D video mode gl_dither 1 0 off, 1 on enables colour dithering if the video card supports dithering in colour depths greater than 16 bit then "0" should be used gl_dump dump data about video card: vendor, renderer, version, extensions gl_flipmatrix 0 enable crosshair fix when using the 3DNow! 3DFX MiniGL (3dfxglam.dll) 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 0 off, 1 on enable light holes, set to "0" for small performance increase unless you have r_lightmap set to "1", in which case you should set this to "1" also gl_max_size 256 set the maximum texture size (higher may look better, but may slow performance if set too high) gl_monolights 0 0 off, 1 on creates a uniform light source with no shadows (OpenGL only) gl_nobind 0 enable replacing textures with bizarre alphanumeric characters (it doesn't work) gl_nocolors 0 disable colors (it doesn't work) gl_overbright 1 0 off, 1 on enable maximum brightness mode when set to "1" (D3D only) gl_palette_tex 1 enable paletted textures gl_picmip 0 0 to 2 set rendering quality (0,1,2, higher is faster and lower quality) see gl_playermip, gl_texturemode gl_playermip 0 0 to 2 set player rendering quality (0, 1, 2, higher value is faster and lower quality)(This doesn't work in HL1 Engine) see gl_playermip, gl_texturemode gl_polyoffset 4 0 to 20 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 1 to 256 set texture size rounding-down value (higher rounds more, resulting in lower quality and higher FPS) gl_spriteblend 1 0 off, 1 on enable blending sprite graphics; if set to "0" you might see a mediocre performance increase at the cost of visually degraded sprite textures gl_texels report the number of texels uploaded to the video card 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 waves (higher water detail) in water; "1" may decrease FPS (see sv_wateramp) gl_zmax 4096 set max size for zbuffer gl_ztrick 1 0 off, 1 on speeds up rendering on some 3dfx cards (and maybe others), but may cause flickering on some video cards r_drawviewmodel 1 0 off, 1 on Shows player models such as weapons, should be kept at "1" r_mmx 1 0 off, 1 on Forces MMX Calculation, a processor optimization supported by most cpu's r_dynamic 0 0 off, 1 on Dynamic lighting effects, setting to "0" improves the FPS rate r_decals 100 The lower this is set the faster explosion marks and bullet marks disappear which can help performance r_mirroralpha 0 0 off, 1 on Enables in-game reflective textures (This doesn't work in HL1 Engine) r_bmodelhighfrac 5.0 Unknown variable violence_ablood 1 0 off, 1 on Enables blood decals violence_agibs 1 0 off, 1 on Enables body parts decals violence_hblood 1 0 off, 1 on Enables blood decals violence_hgibs 1 0 off, 1 on Enables body parts decals
Sound cvar definitions
cvar Default Range Description voice_scale 0.5 0.0 to 1.0 Defines the volume of voice communication (in percent) over in-game noises voice_enable 1 0 off, 1 on Enables client-side voice communication voice_forcemicrecord 1.000000 Unknown sv_voiceenable 1 0 off, 1 on Enables server-side voice communication s_eax 0.000000 Enable EAX sound support if supported by soundcard s_a3d 0.000000 Enable A3D s_verbwet 0.25 Unknown a3d sound variable s_bloat 2.0 Unknown a3d sound variable s_numpolys 200 Unknown a3d sound variable s_polysize 10000000 Unknown default s_polykeep 1000000000 Unknown default s_refdelay 4 Unknown a3d sound variable s_refgain 0.4 Unknown a3d sound variable s_leafnum 0 Unknown default s_max_distance 1000.0 Sets the maximum distance of a sound source s_min_distance 1.0 Sets minimum distance before roll off is applied. If a sound source is at a closer distance than your setting, it is played at full volume s_automax_distance 50.0 Sets distance for maximum sound volume s_automin_distance 1.0 Sets distance for minimum sound volume s_distance 60 0 to 60000 Adjusts in-game distance units to meters. The higher this number, the closer the sound is. s_doppler 0.0 0 to 10 Adjusts Doppler effect. s_rolloff 1.0 Adjusts the rolloff factor; when the rolloff value is increased, the effects of distance are increased: high frequencies are filtered and volume is lowered s_occlude 1 Unknown a3d sound variable volume 0.850000 In-game volume suitvolume 0.250000 Sets HEV suit volume. Not used in NS. hisound 1.000000 Enables high quality sound bgmvolume 1.000000 Enables CD audio MP3Volume 0.800000 Adjusts the volume setting for in-game MP3 playback _snd_mixahead 0.1 Set mix ahead value. Higher setting can cause problems with some soundcards voice_modenable 1 0 off, 1 on Enable HL voice communication voice_loopback 0 0 off, 1 on Loops your voice communication back to hear yourself ati_subdiv 0 0 off, 1 on Set to 0 if you have an ATI card with poor frame rate ati_npatch 0 0 off, 1 on Set to 0 if you have an ATI card with poor frame rate s_occfactor 1.0 Unknown a3d sound variable
HUD (Heads-Up Display) cvars
cvar Default Range Description console 1.0 Enables Console net_graph 3 A net graph appears on your screen by default, set to 3 or 5 for different graphs net_scale 5 Set net graph vertical scale net_graphpos 2 Set position on screen, 1 is bottom right, 2 is bottom middle and 3 id bottom left hud_classautokill 1 Enables auto suicide if player class is changed, not applicable in NS hud_takesshots 0 0 off, 1 on If set to 1, screenshot are automatically taken of the player scores (+showscores) at the end of each round and saved as a bitmap file in the game mod directory hud_capturemouse 1 0 off, 1 on Enables locking mouse pointer to menu area when the menu is activated hud_fastswitch 0 0 off, 1 on Fast weapons switch, recommended value is "1" hud_centerid 1 0 off, 1 on This also centers player names rather than bottom left con_color 255 180 30 Adjust console text color in RGB 24-bit color representation scr_conspeed 1500 Console scroll speed mp_decals 100.000000 Lower this setting for faster disappearance of sprays explosions etc which saves some fps
cvar Default Range Description lookstrafe 0.000000 Enables automatic view centering if +mlook is off lookspring 0.000000 Enable mouse strafing if +mlook is off m_pitch 0.022000 Set mouse pitch sensitivity, negative values invert the mouse m_yaw 0.022 Sets mouse turning sensitivity m_forward 1 Set mouse forward sensitivity m_side 0.8 Sets mouse strafing sensitivity m_filter 0.000000 0 off, 1 on enables mouse filtering sensitivity 8.900000 Mouse sensitivity joystick 0.000000 0 off, 1 on Enables joystick support, disabled by default as mouse is predominantly used +mlook Enables mouse look +jlook Enables joystick look
Miscellaneous Game Options
cvar Default Range Description fps_max 72 20-100 Sets Maximum numbers of frames per second, set this to your average fps to stop big drops fps_modem 0.0 When your connection used to determine your fps, replaced by fps_max crosshair 1 0 off, 1 on Enables crosshair gamma 2 1.8-3 Sets gamma brightness 2 Sets in game brightness sv_aim 0 0 off, 1 on Enables auto aim if server allows hpk_maxsize 4 0 to 4 Hpk file size in Megabytes, note that "0" is defined as no maximum size and when the maximum size of 4 MB is reached, the file will be deleted viewsize 120 Sets view size name NSPlayer Sets name team "" Not applicable in NS model scientist Not applicable in NS skin "" Not applicable in NS topcolor 76 Sets top player model colour bottomcolor 206 Sets bottom player model colour
Command line options
Half-Life has some command line options that allow you to tweak the game engine (i.e. Half-Life) and subsequently the game mod you are playing. These command line options can be entered in the game's shortcut command line. The following is an example:
Executable flag Description -game <name> Loads Half-Life1 game mod. -dev Developer's mode. Enables the console and displays debugging information while playing. Useful if you're having technical difficulties and want to find out why. Use 'developer 1' and 'developer 2' in console to set debug message detail level -startwindowed Start Half-Life in window instead of fullscreen. -wavonly Disables Direct Sound and plays SFX in wav files. Try this if your sound card stutters or you don't have DirectSound drivers. -console Loads developer console by default on start -numericping This option allows you to see actual ping times to servers instead of stupid dot ratings in the Half-Life server browser. Even if you use other game browsers, it's still informative, and doesn't have any drawbacks. -nojoy This disables joystick support in the Half-Life engine. It shaves a little bit off the memory footprint of Half-Life, so add this if you don't use a joystick. -win selects windowed mode (not supported by all video cards). -noipx This disabled IPX support in the Half-Life engine, and like nojoy, it reduces memory use slightly. If you don't use IPX in your network, add this to your command line. -nointro Skip the introduction movies. -zone 4096 Gives half-life more memory for scripts -heapsize 196000 Tells half-life how much memory it can use in kilobytes. Best to set
this to 3/4 of your total RAM. If performance seems slower after enacting this, disable it. On some computers halflife runs faster when it does its own memory management.
-32bpp Lets half-life use 32 bit colors. May be slower on older computers, if so, disable. -noforcemparms
Disables mouse acceleration, makes aiming easier. -toconsole causes Half-Life to load directly to the command console -w <#> sets video mode width (# is number of pixels wide). -win selects windowed mode (not supported by all video cards). -particles <number> number is the number of particles for which to set aside buffer space. This is useful for seraching for leaks in maps. -nosierrs skips the two AVI (Sierra and Valve) intro movies -gldrv <name> selects OpenGL rendering engine with driver "name.dll". -gamegauge <demoname> Runs the demo in demoname.dem in benchmaking mode and saves the results in fps.txt file. Can do the same thing in-game with cl_gg 1; gg in the console. -3dfxgamma Force the game to use the video gamma settings from the 3dfx driver setup (3dfx cards only). Otherwise Half-Life ignores the gamma settings. -d3d Selects Direct3D rendering engine. HL1 version 22.214.171.124 only.