Server Configuration

From Vertigo Gaming Wiki
Revision as of 11:09, 26 August 2016 by Silence (talk | contribs)

Jump to: navigation, search

Server Configuration

On this page we will put a general server.cfg up on this page to show the settings you can have in it.

The "server.cfg" file does not come with most server installations in Source. There are explanations/comments on each server variable for what it is used for. Remember to go to your ZPS Server Directory and replace the contents in it with this example file and tailor it's custom parts to your own liking.

//----------------------------------//
//----- START GENERAL SETTINGS -----//
//----------------------------------//

// Server hostname.
hostname "ZPS Server"

//Map Time
mp_timelimit 30

// NOTE: currently, this is disabled due to reserve slots
// Overrides the max players reported to prospective clients
sv_visiblemaxplayers 24

// Your server password. A pair of double quotes means it is not set and anyone can join.
//sv_password ""

// Control where the client gets content from.
// 0 = anywhere. Users can set custom skins/files on their end and it will work.
// 1 = anywhere listed in the server's white list. This can be adjusted to allow users to 
// 2 = official content only. 
sv_pure 0

// Control whether or not the client will get kicked for failing sv_pure check.
sv_pure_kick_clients 0

// Set the pause state of the server
setpause 0

// Is the server pausable?
// 0 = no
// 1 = yes.
sv_pausable 0

// Type of server being run.
// 0 = internet 
// 1 = lan.
sv_lan 0

// This tells us if the server enforces consistency for critical files.
// Leave this at 0 so people can have nice custom junk on, otherwise they will get dropped :(
// 0 = false
// 1 = true.
sv_consistency 0

// Collect CPU usage stats (set this to zero for better preformance)
sv_stats 0

//--------------------------------//
//----- END GENERAL SETTINGS -----//
//--------------------------------//






//-----------------------------------//
//----- START BANNED USER ITEMS -----//
//-----------------------------------//

// Execute Banned Users config files
exec banned_user.cfg
exec banned_ip.cfg
writeid
writeip

//---------------------------------//
//----- END BANNED USER ITEMS -----//
//---------------------------------//






//-------------------------------//
//----- START SERVER REGION -----//
//-------------------------------//

// This tells us what region of the world to report this server in.
// NOTE: In most versions of Source, this is no longer necessary to use
// and it no longer functions. This is most likely depreciated, but
// has been kept in for legacy purposes.
// -1 = World
// 0 = USA East Coast 
// 1 = USA West Coast
// 2 = South America 
// 3 = Europe 
// 4 = Asia 
// 5 = Australia
// 6 = Middle East
// 7 = Africa
//sv_region 0

//-----------------------------//
//----- END SERVER REGION -----//
//-----------------------------//






//--------------------------------//
//----- START RCON SETTINGS  -----//
//--------------------------------//
// Sets the rcon password for the server
// NOTE: If you can help it, do not use rcon unless you absolutely must. If you are using sourcemod, just
// use sm_rcon as it will pretty much do everything you need.
// rcon_password "<your password>"

// NOTE: If you need to use rcon, we recommend using a separate config file with the rcon_password in it and using 
// "exec" to run this configuration. This way its harder (but not impossible) to get to the password. 
// We named this rcon_pw.cfg for reference, you can name this configuration file anything you like as long as you 
// reference it in your server configuration. Then, make sure to use an rcon locker plugin to keep people from changing the password.
// exec rcon_pw.cfg

// The number of minutes to ban users who fail the rcon authentication.
sv_rcon_banpenalty 1440

// The max number of times the user can fail rcon authentication before being banned.
sv_rcon_maxfailures 3

// The max queries/sec
sv_max_queries_sec 3

// The max queries/sec global
sv_max_queries_sec_global 100

// Windows for queries/sec
sv_max_queries_sec_window 10

// Max connections
sv_max_connects_sec 2 

// Max connections/sec
sv_max_connects_sec_global 32 

//------------------------------//
//----- END RCON SETTINGS  -----//
//------------------------------//






//------------------------------//
//----- START LOG SETTINGS -----//
//------------------------------//

// Enables loggin to file, console, and udp.
// The only options are "on" or "off".
log 1

// Log server information to only one file.
// 0 = off.
// 1 = on.
sv_log_onefile 1

// Log server information in the log file.
// 0 = off.
// 1 = on.
sv_logfile 1

// Log server bans in the server logs.
// 0 = off.
// 1 = on.
sv_logbans 1

// Echo log information to the console.
// 0 = off.
// 1 = on.
sv_logecho 1

//----------------------------//
//----- END LOG SETTINGS -----//
//----------------------------//






//-----------------------------------------//
//----- START BANDWIDTH RATE SETTINGS -----//
//-----------------------------------------//
// Limits the maximum FPS someone can have. Leave it at 0, for unlimited (we have a 500 fps server).
// NOTE: In later versions of Source, this value does absolutely nothing for the server.
// fps_max 500

// Min bandwidth rate allowed on server.
// 0 == unlimited.
// NOTE: Setting this to 0, especially if sv_maxrate is set to 0 or lower in value than sv_minrate, 
// can sometimes cause issues for players as this cvar will adjust player rates on the server based on this value. 
// You do not want that! Use a moderate value here and adjust as needed.
sv_minrate 13000

// Max bandwidth rate allowed on the server.
// 0 == unlimited.
// NOTE: The maximum rate is 30000, even when set to 0.
sv_maxrate 0

// Maximum updates per second that the server will allow.
sv_maxupdaterate 67

// Minimum updates per second the server will allow.
sv_minupdaterate 30

// Sets the maximum amount of command packets sent to the server per second.
sv_maxcmdrate 67

// Sets the minimum amount of command packets sent to the server per second.
sv_mincmdrate 30

// This is the maximum rate that all packets are split.
// Valve default is 15000.
// NOTE: This should be set the same as sv_maxrate, in most cases. The theory is, at least for Source servers, 
// packets should be split as fast as you send/receive them. Information about this cvar is rather limited. 
// If sv_maxrate is set to 0 (unlimited), set this to 100000 and adjust from there.
net_splitpacket_maxrate 100000

// Time (seconds) between decal sprays.
decalfrequency 30

// The amount of decals that can show up all at once. Increasing this allows more at the expense of performance
// Default: 200
mp_decals 200

// Basic client settings to help offset some lag for users
// Should help with some lag and its also default on NFO servers
sv_client_cmdrate_difference 1
sv_client_predict 1
sv_client_interpolate 1
sv_client_min_interp_ratio -1
sv_client_max_interp_ratio -1

//---------------------------------------//
//----- END BANDWIDTH RATE SETTINGS -----//
//---------------------------------------//






//-----------------------------------//
//----- START DOWNLOAD SETTINGS -----//
//-----------------------------------//

// Allow clients to upload customization files.
// 0 = off.
// 1 = on.
sv_allowupload 0

// Allow clients to download files.
// 0 = off.
// 1 = on.
sv_allowdownload 0

// Set the download url for the hosted maps. This is much faster and more
// efficient than letting the client download from the server.
sv_downloadurl ""

// Maximum file size allowed for downloading, in megabytes.
// The Limit is 64MB.
net_maxfilesize 64

//---------------------------------//
//----- END DOWNLOAD SETTINGS -----//
//---------------------------------//






//--------------------------------------//
//----- START ROUND AND GAME TIMES -----//
//--------------------------------------//

// If non-zero, the current round will restart in the specified number of seconds.
mp_restartround 0

//------------------------------------//
//----- END ROUND AND GAME TIMES -----//
//------------------------------------//






//-------------------------------//
//----- START CLIENT CVARS  -----//
//-------------------------------//

// Toggles friendly fire.
mp_friendlyfire 0

// Toggles footstep sounds.
mp_footsteps 1

// Toggles game cheats.
sv_cheats 0

// After this many seconds without a message from a client, the client is dropped.
// Default is 60 seconds.
sv_timeout 60

//-----------------------------//
//----- END CLIENT CVARS  -----//
//-----------------------------//






//--------------------------------//
//----- START COMMUNICATIONS -----//
//--------------------------------//

// Enable voice communications.
// 0 = off.
// 1 = on.
sv_voiceenable 1

// Enables the ability to allow players on both teams hear each other.
// 0 = disabled.
// 1 = enabled.
sv_alltalk 0

//------------------------------//
//----- END COMMUNICATIONS -----//
//------------------------------//






//----------------------------------------//
//-----      START MISCELLANEOUS     -----//
//----------------------------------------//
// Queries and packets. Change/update values as needed.
sv_parallel_packentities 0
sv_parallel_sendsnapshot 0
net_queued_packet_thread 1

// The mapcycle file our server needs to be looking at.
mapcyclefile mapcycle.txt

// Maximum ragdolls to display on the server. Aka: Corpses!!
sv_maxragdolls 3

// Block bunnyhopping on the server.
// 0 = unblocked
// 1 = blocked
sv_bunnyhopblock 1

//----------------------------------------//
//-----    END MISCELLANEOUS/MODS    -----//
//----------------------------------------//