Running a server (configuration guide)
This section will go over all the settings you will need to run a dedicated (or listen) server. Please refer to the included file server_example.cfg (or listenserver_example.cfg), and I will take you through each setting in groups as already specified.
If you are running a full time dedicated server it is important that you get an understanding of how HLDS works and how to configure it. We are only going to cover Sven Co-op specific configuration and files we provide. For extensive guidelines on installing and configuring HLDS, visit HLDS 101.
Also bare in mind that a range of variables can be specified by mappers on a per-map basis. Please see the mapping (configuration guide) page for more details. Any variable from a map can be overridden in your staticcfgfile, for example to stop a map setting a time limit of a million hours.
Contents
- Starting statements
- Configuration files
- Passwords
- Core variables
- Server variables
- Multi-player variables
- Sven Co-op specific variables
- Execute configurations
- Increase the entity limit of maps on a server
- Advanced server extras
Starting statements
Setting | Default value | Description |
---|---|---|
hostname | Sven Co-op v4.6 | The name of your server as players see it. This line comes first to minimize the chance of your server appearing as the default name Half-Life. Try to limit yourself to 40 characters on this. |
log | on | Switch on logging of events on your server. There is little reason to turn this off unless you don't require logs. I recommend you specify this in your command parameters instead to lower the number of log files created. |
Configuration files
The following only need to be changed when running multiple servers off a single installation of Sven Co-op (aka configuration profiling) where sharing of configuration files is not desired.
Setting | Default value | Description |
---|---|---|
servercfgfile | server.cfg | Location of the server configuration file (for dedicated servers only). This will also need to be declared in your command line parameter as +servercfgfile server.cfg to be used when your server starts. |
lservercfgfile | listenserver.cfg | Location of the server configuration file (for listen servers only). This will also need to be declared in your user configuration file (userconfig.cfg) for it to take effect when your game starts. |
mapchangecfgfile | Empty | Location of a configuration file to be executed on each map change. Not often required. |
mapvotecfgfile | mapvote.cfg | Location of the file containing a list of maps available for voting. Exceeding 200 maps may prevent players joining due to "reliable channel overflowed"! |
staticcfgfile | static.cfg | Location of the static configuration file. Use this to override map defined variables (such as mp_timelimit). |
skillcfgfile | skill.cfg | Location of the skill configuration file. |
bannedcfgfile | banned.cfg | Location of the banned steam ID list file. |
mapcyclefile | mapcycle.txt | Location of the map cycle file. |
motdfile | motd.txt | Location of the welcome message file (aka message of the day) to display when players join. |
adminsfile | admins.txt | Location of the server administrators list file. Place all steam ID's in this file to mark them with the server administrator icon on the score board. 1 steam ID per line, comments afterwards accepted (i.e. STEAM_0:1:YOURID # YourName). |
logsdir | logs | Folder used to store server logs in. |
Passwords
Setting | Default value | Description |
---|---|---|
rcon_password | Empty | Password used for accessing the server console remotely. Use a password strength meter to help you build a good password. Only your trusted server administrators should know this as it allows unlimited access to your HLDS instance. If you leave this blank, remote console access will not be available (don't worry -- it won't allow everyone to use RCON without a password). |
sv_password | Empty | Password used for players to join your server. Leave blank if your server is public. |
sv_spectator_password | Empty | Password used for spectators to join your server. Leave it blank if your server is public. Currently obsolete in Sven Co-op. |
Core variables
Setting | Default value | Description |
---|---|---|
sys_ticrate | 128 | The maximum number of frames/second your server will process. We have discovered that setting this using base 16 increments (64, 128, 256, etc) provides a smoother base 10 tick rate (50, 100, 200, etc) than setting the number at base 10 directly. Setting this above roughly 250 is ridiculously stupid, and your players will just complain about lag when your server fills up. Framerates too high will also have a negative effect on NPC movement, and extreme framerates (over 500) will cause many brush entities to cause crush damage when nothing is blocking them. |
sv_contact | Empty | The email address of the server manager, so players have someone to contact when there is a problem. |
sv_downloadurl | Empty | The HTTP address where your server's custom content can be found, so players can download it very fast. This is essential to get players onto your server while it's running non-standard maps. |
allow_spectators | 1 | Allow players to spectate the game. Currently obsolete in Sven Co-op. |
deathmatch | 1 | This is essential for the intended game play of Sven Co-op. Do not change this, and do not use the coop setting. |
decalfrequency | 30 | The time (seconds) a player must wait before making their spray again. 0 will remove this delay, but is not recommended. |
hpk_maxsize | 2 | The size limit (megabytes) of the file that stores uploaded sprays. The oldest sprays are removed to make way for new sprays. |
pausable | 0 | Determines whether the game on your server can be paused by anyone. This is never recommended on public servers. |
skill | 3 | The default skill level your server will use. Maps can override this in their configuration.
|
Server variables
Because there are so many of these, I am only going over the ones you will have good reason to change. If a setting isn't listed then it's there to help maintain default settings, meaning you have no reason to change it.
Setting | Default value | Description |
---|---|---|
sv_allowdownload | 1 | Allow players to download custom content from your server. |
sv_alltalk | 1 | Voice communication is sent to all teams. Currently obsolete in Sven Co-op. |
sv_allowupload | 1 | Allow players to send custom sprays to your server. |
sv_cheats | 0 | Allow players to use cheat commands. This will only work on servers with the player limit at 2 or on private development servers. |
sv_filetransfercompression | 1 | Allow custom content to be compressed on the fly for faster delivery. |
sv_lan | 0 | Server is only for a local area network. When enabled players authenticate with their IP address, and can only join if they are within the same subnet as the server. |
sv_lan_rate | 32768 | Rate (bytes/second) that the clients are forced to talk to the server at when in LAN mode. 32,768 (32 kBtyes/sec) is more than enough for 32 players and sustainable on any modern LAN. |
sv_maxrate | 16384 | The maximum rate (bytes/second) that clients can talk to the server at when in Internet mode. 16,384 (16 kBytes/sec) is enough for 24 players. You will more than likely need to lower this if your running a server on a home broadband connection. |
sv_maxupdaterate | 50 | The maximum number of events/second the server can send to a client. 50 is enough for 24 players. If you're running a server on a home broadband connection, consider lowering this to 15 or 20. |
sv_minrate | 0 | The minimum rate (bytes/second) that clients can talk to the server at when in Internet mode. Please do not change this so dial-up users can still enjoy your server. |
sv_minupdaterate | 10 | The maximum number of events/second the server can send to a client. Please do not change this so dial-up users can still enjoy your server. |
sv_proxies | 0 | Allow spectator proxies (HLTV) to connect to your server. |
sv_region | 255 | The region your server is in. This is used in Steam's server browser, so players can look for servers near by.
|
sv_spectalk | 1 | Allow spectators to use chat. Currently obsolete in Sven Co-op. |
sv_timeout | 60 | The time (second) a client stops responding before the server considers the client to have completely lost connectivity. |
sv_voicecodec | voice_speex | The voice codec to use. Currently only voice_miles and voice_speex are available. There is no reason to revert to Valve's default voice_miles as the quality is terrible, and throughput consumption is more than double used by voice_speex. |
sv_voicequality | 5 | The voice quality for voice_speex.
|
sv_voiceenable | 1 | Allow players to use voice communication. |
sv_zmax | 32768 | The maximum distance (units) rendered from players. Only mappers should ever worry about this. |
Multi-player variables
Because there are so many of these, I am only going over the ones you will have good reason to change. If a setting isn't listed then it's there to help maintain default settings, meaning you have no reason to change it.
Setting | Default value | Description |
---|---|---|
mp_consistency | 1 | Force players to use the same content as the server. This will help enforce use of default cross-hairs, HUD, models, etc. Not really important in Sven Co-op, more for competitive games. |
mp_decals | 4096 | The maximum number of decals the server will render. This should be linked to the value used for num_edicts. |
mp_falldamage | 1 | Use realistic fall damage. If disabled, when players get hurt from falling they will always lose 10 health points. |
mp_flashlight | 1 | Allow players to use their flashlight. |
mp_footsteps | 1 | Players generate footstep sounds while running fast enough. |
mp_forcerespawn | 0 | Force players to respawn after they die. Disabling this allows players to respawn when they are ready to (recommended). |
mp_fraglimit | 0 | Map changes after someone obtains this many frags. Currently obsolete in Sven Co-op. |
mp_telefrag | 1 | Players will kill someone if they are teleported inside them. Disabling this will result in players piling up inside each other unable to move. |
mp_timelimit | 60 | Map changes after this amount of time (minutes) if the map hasn't been completed already. |
mp_weaponstay | 1 | Weapons can be picked up multiple times, with the exception of miniguns. Disabling this will result in a couple of players taking all the weapons leaving others with nothing. |
Sven Co-op specific variables
Setting | Default value | Description |
---|---|---|
mp_allowmonsterinfo | 1 | Allow players to see information about monsters they see. Disabling this will cause confusion over who is allied and who are enemies. |
mp_banana | 1 | Allow players to throw banana bombs. |
mp_disable_autoclimb | 0 | Deny players to use the auto-climb feature. |
mp_disable_pcbalancing | 0 | Disable skill auto-balancing. |
mp_disable_player_rappel | 0 | Deny players to use the Barnacle grapple on each other. |
mp_disablegaussjump | 0 | Disable vertical knock back caused by the gauss cannon's charge up shot. This can sometimes be used to exploit maps or get places players aren't meant to go. This is a direct copy of mp_allowgaussjump, which for some reason was inverted in Sven Co-op 3.0 and previous versions. |
mp_dropweapons | 1 | Allow players to drop weapons and ammo. Miniguns and shock rifles can always be dropped. |
mp_grapple_mode | 1 | Players are pulled to monsters bigger than headcrabs when grappled rather than the monster being pulled to a player. |
mp_multiplespawn | 1 | Allow players to use more than 1 spawn point. Disabling this would be epic fail on your behalf. |
mp_no_akimbo_uzis | 0 | Deny players to have akimbo uzis. This may help balance power on some maps or large player capacities. |
mp_noblastgibs | 0 | Deny monsters to be gibbed (ripped apart) when killed with explosives. |
mp_npckill | 2 | Set the behaviour of killing allied NPC's. This setting replaces the old killnpc command.
|
mp_playervotedelay | 300 | The time (seconds) a player must wait before starting another poll. |
mp_respawndelay | 6 | The time (seconds) a player must wait before respawning. This is 6 seconds by default to help encourage use of the new reviving feature. |
mp_voteallow | 1 | Allow players to use the built in voting system. Consider disabling this if you run plug-in packs such as AdminMod or AMX mod X. |
mp_votebanrequired | 100 | Percentage of players that must say yes for a ban vote to succeed. We recommend leaving this at 100% so bans are left up to the server administrators. |
mp_votekickrequired | 66 | Percentage of players that must say yes for a kick vote to succeed. |
mp_votekill_respawndelay | 15 | The time (seconds) a player must wait before respawning after being successfully killed by a vote. |
mp_votekillrequired | 51 | Percentage of players that must say yes for a kill (aka slay) vote to succeed. |
mp_votemaprequired | 66 | Percentage of players that must say yes for a map vote to succeed. |
mp_votetimebetween | 60 | The time (seconds) a player other than the previous poll starter can start a new poll. |
mp_votetimecheck | 20 | The time (seconds) players have to cast their vote. Players who don't answer in time will be assumed as inactive and not included in the result. |
Execute configurations
Command | Parameter | Description |
---|---|---|
exec | banned.cfg | Loads the list of banned steam ID's. This should match the bannedcfgfile value. |
exec | listip.cfg | Loads the list of banned IP addresses. Unfortunately this file can't be profiled without symbolic links. |
Increase the entity limit of maps on a server
Some years ago Alfred Reynolds added a parameter max_edicts to set the entity limit of GoldSrc games to anything the user wants, but didn't tell anyone about it! No longer are we limited to 900 entities on our maps or crashes due to the all famous ED_Alloc: NO FREE EDICTS message.
For the setting to work both the client and server must have the entity limit increased. Whichever has the lower limit is the limit that takes effect. However a client with 900 max entities joining a 4096 max entities server will only cause problems for that specific player, not for anyone else who does have enough max entities configured.
As of version 4.0 beta 1, Sven Co-op is being distributed with this parameter configured at 4096 entities. However, servers need to follow this manually.
To do this simply add -num_edicts 4096 to your command line parameters. You can change the number to anything you like, but no lower than 900. Someone claims to have had 10,000 entities working, but Sven Co-op clients by default won't be configured to handle that many.
Finally, you should set the variable mp_decals to match the number used for num_edicts. Thanks to Stixsmaster for this tip.