|
楼主 |
发表于 2004-12-20 16:58:05
|
显示全部楼层
来自 中国–福建–龙岩
在Steam\SteamApps\User\source dedicated server\cstrike\cfg目录下
设置server.cfg文件。
关于如何设置sv_maxrate,sv_maxupdaterate等参数,
参考
http://www.dt-club.net/showthread.php?t=18297
随着每次升级,这些CFG内容都会变化的。
-----------------------------------------------------------
// CS:S Server Config file
// mostly the default settings with rate limits set to prevent massive lag
// CS:S的服务器基本配置文件
// 金闪闪(CHM)@DT
echo =========================
echo executing CS:S Server.cfg
echo =========================
hostname "Counter-Strike:Source Dedicated Server!"
// set to force players to respawn after death
mp_forcerespawn 1
// enable player footstep sounds
mp_footsteps 1
sv_footsteps 1
// Bounce multiplier for when physically simulated objects collide with other objects.
sv_bounce 0
// enable flashlight
mp_flashlight 1
// enable autocrosshair (default is 1)
mp_autocrosshair 1
// allow bots
mp_allowNPCs 1
// world gravity (default 600)
sv_gravity 600
// world friction (default 4)
sv_friction 4
// world water friction (default 1)
sv_waterfriction 1
// Minimum stopping speed when on ground
sv_stopspeed 75
// spectator settings
sv_noclipaccelerate 5
sv_noclipspeed 5
sv_specaccelerate 5
sv_specspeed 3
sv_specnoclip 1
// Allow team show mode (default 0, 1 and 2)
mp_forcecamera 0
// Allow friendlyfire to hurt teammates (default 0)
mp_friendlyfire 0
// Misc settings (leave as is)
mp_teamplay 0
mp_fraglimit 0
mp_falldamage 0
mp_weaponstay 0
// player movement acceleration rates (default 5, 10 and 10)
sv_accelerate 5
sv_airaccelerate 10
sv_wateraccelerate 10
// max player speed (default 320)
sv_maxspeed 320
// misc physics settings, leave them as-is
sv_rollspeed 200
sv_rollangle 0
// player steps and stepsize - dont mess with this (default 18)
sv_stepsize 18
//teamplay talk all (1) or team only (0)
sv_alltalk 0
//enable voice on server
sv_voiceenable 1
// misc default vehicle settings (leave these alone)
//r_VehicleViewDampen 1
//r_JeepViewDampenFreq 7.0
//r_JeepViewDampenDamp 1.0
//r_JeepViewZHeight 10.0
//r_AirboatViewDampenFreq 7.0
//r_AirboatViewDampenDamp 1.0
//r_AirboatViewZHeight 0.0
//disable pause on server (set this to 0 always)
sv_pausable 0
//disable cheats (set this to 0 always)
sv_cheats 0
//disable Valve Anti-Cheat (default 0)
sv_secure 0
//teamserver coop (default 0)
coop 0
//deathmatch - set this to 1
deathmatch 1
//allow players to upload sprays (default 1)
sv_allowupload 1
//allow sprays and map content to be downloaded (default 1)
sv_allowdownload 1
//how often players can spray tags (default 20)
decalfrequency 30
//fast http download url address
//sv_downloadurl
//Enable instanced baselines - Saves network overhead
sv_instancebaselines 1
//Force server side preloading (default 0)
sv_forcepreload 1
//set timelimit before map change
mp_timelimit 45
//How many minutes each round takes (min. 1.000000 max. 9.000000)
mp_roundtime 5
//Max bandwidth rate allowed on server, 0 == unlimited
sv_maxrate 9999
//Min bandwidth rate allowed on server, 0 == unlimited
sv_minrate 5000
//Maximum updates per second that the server will allow (default 60)
sv_maxupdaterate 30
//Minimum updates per second that the server will allow (default 10)
sv_minupdaterate 10
//Maximum speed any ballistically moving object is allowed to attain per axis (default 3500)
sv_maxvelocity 3000
//Maximum lag compensation in seconds (min. 0.000000 max. 1.000000)
sv_maxunlag 1
//Enables player lag compensation
sv_unlag 1
//rcon failure settings
//Number of minutes to ban users who fail rcon authentication
sv_rcon_banpenalty 0
//Number of minutes to ban users who fail rcon authentication
sv_rcon_maxfailures 10
//Number of times a user can fail rcon authentication in sv_rcon_minfailuretime before being banned
sv_rcon_minfailures 5
//Number of seconds to track failed rcon authentications
sv_rcon_minfailuretime 30
//The region of the world to report this server in (255 = world)
// 4 是亚洲区
sv_region 4
//gather server statistics
sv_stats 1
//After this many seconds without a message from a client, the client is dropped (default 65)
sv_timeout 65
//Specifies which voice codec DLL to use in a game. Set to the name of the DLL without the extension
sv_voicecodec vaudio_miles
//Disable SourceTV on this server
tv_enable 0
tv_delay 0
tv_delaymapchange 0
tv_status 0
//Enable old style server queries
sv_enableoldqueries 1
//toggles whether the server allows spectator mode or not
mp_allowspectators 1
//If set to 1 then Server is a lan server ( no heartbeat, no authentication, no non-class C addresses, 9999.0 rate, etc. )
// set to 0 for internet server
sv_lan 0
// Server contact name / url / email
sv_contact ""
// server password for players to join (default "")
//sv_password
// execute SteamID based ban list
exec banned_user.cfg
// execute IP based ban list
exec banned_ip.cfg
// Set packet filtering by IP mode (default 1)
sv_filterban 1
// log all bans in logfile
sv_logbans 1
// here are a few useful alias
//exec alias.cfg
//exec rate.cfg
// enable logging and start log file
sv_logfile 1
log on
mp_logdetail 0
================================================
There is also this advice for choosing your maxplayer and netspeed/tickrate settings:
A good rule of thumb for SRCDS (CS:S and HL2DM) is 53.4KBits per player (about 1.5x more then HLDM).
(每人需要的带宽53.4KBits)
Certain maps and MODs may take more uplink bandwidth too.
(当然地图以及一些MODs将占用更多的带宽)
This maxplayers setting also assumes you are running the following server rate limits (in the server.cfg file):
//minimum rate allowed
// use 5000 for SRCDS Servers
sv_minrate 3500
// no limit on maxrate for LAN only use 7500 for regular server
// this controls how fast maps can be downloaded by clients
//sv_maxrate 0 = unlimited
// Use 9999 for SRCDS servers
sv_maxrate 7500
// this is the minimum playable updaterate, leave this at 13
sv_minupdaterate 13
// 60 for updaterate is LAN ONLY use 13 for internet
// 20 is default but will cut the maxplayers you can handle in 1/2
// for SRCDS Servers use 30 - you might be able to use 20
// sv_maxupdaterate 60
sv_maxupdaterate 13
--------------------------------------- TF2 Server.cfg
- --------------------------------------
- hostname ""
- rcon_password ""
- sv_password ""
- mp_maxrounds 0
- mp_winlimit 0
- mp_timelimit 25
- mp_idledealmethod 1 //Deals with Idle Players. 1 = Sends them into Spectator mode then kicks them if they're still idle, 2 = Kicks them out of the ga
- mp_idlemaxtime 5 //Maximum time a player is allowed to be idle (in minutes)
- mp_allowNPCs 1
- mp_allowspectators 1
- mp_autocrosshair 1
- mp_autoteambalance 1
- mp_autoteambalance_delay 15
- mp_autoteambalance_warning_delay 5
- mp_bonusroundtime 15
- mp_chattime 10
- mp_clan_ready_signal 0 //Text that team leader from each team must speak for the match to begin
- mp_clan_readyrestart 0 //If non-zero, game will restart once someone from each team gives the ready signal
- mp_decals 200
- mp_defaultteam 0
- mp_disable_autokick 1 //Prevents a userid from being auto-kicked
- mp_enableroundwaittime 1 //Enable timers to wait between rounds.
- mp_fadetoblack 0 //fade a player's screen to black when he dies
- mp_falldamage 5
- mp_flashlight 1
- mp_footsteps 1
- mp_forcecamera 1 //Restricts spectator modes for dead players
- mp_forcerespawn 1
- //mp_forcerespawnplayers 1 //Force all players to respawn.
- //mp_forcewin 1 //Forces team to win
- mp_fraglimit 0
- //mp_friendlyfire 0
- mp_restartgame 0 //If non-zero, game will restart in the specified number of seconds
- mp_restartround 0 //If non-zero, the current round will restart in the specified number of seconds
- mp_scrambleteams 0 //Scramble the teams and restart the game
- mp_showrespawntimes 0 //Show the min respawn times for the teams
- //mp_simulatemultiplecappers 1
- mp_stalemate_timelimit 240 //Timelimit (in seconds) of the stalemate round.
- mp_switchteams 0 //Switch teams and restart the game
- mp_teamlist 0
- mp_teamoverride 1
- mp_teamplay 1
- mp_teams_unbalance_limit 1 //Teams are unbalanced when one team has this many more players than the other team. (0 disables check)
- //mp_teststalemate 1 //Test the stalemate mode. Parameter: <0/1>. If 1, the map will reset at the end.
- mp_time_between_capscoring 30 //Delay between scoring of owned capture points.
- mp_waitingforplayers_cancel 0 //Set to 1 to end the WaitingForPlayers period.
- mp_waitingforplayers_restart 0 //Set to 1 to start or restart the WaitingForPlayers period.
- mp_weaponstay 0
- sv_region 4
- sv_minrate 13000
- sv_maxrate 25000
- sv_minupdaterate 33
- sv_maxupdaterate 67
- sv_mincmdrate 33
- sv_maxcmdrate 67
- 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
- decalfrequency 10
- sv_maxreplay 0 //Maximum replay time in seconds
- //sv_maxspeed 320
- //sv_maxunlag 1 //Maximum lag compensation in seconds
- //sv_maxvelocity 3500 //Maximum speed any ballistically moving object is allowed to attain per axis.
- //sv_accelerate 10
- //sv_airaccelerate 10
- sv_allow_color_correction 1 //Allow or disallow clients to use color correction on this server.
- sv_allow_wait_command 0 //Allow or disallow the wait command on clients connected to this server.
- sv_allowdownload 1 //Allow clients to download files
- sv_allowupload 1 //Allow clients to upload customizations files
- sv_alltalk 1 //Players can hear all other players, no team restrictions
- sv_alternateticks 0 //If set, server only simulates entities on even numbered ticks.
- sv_autosave 1 //Set to 1 to autosave game on level transition. Does not affect autosave triggers.
- //sv_backspeed 0 //How much to slow down backwards motion
- sv_bonus_challenge 0 //Set to values other than 0 to select a bonus map challenge type.
- //sv_bounce 0 //Bounce multiplier for when physically simulated objects collide with other objects.
- sv_cacheencodedents 1 //If set to 1, does an optimization to prevent extra SendTable_Encode calls.
- sv_cheats 0 //Allow cheats on server
- sv_clearhinthistory 1 //Clear memory of server side hints displayed to the player.
- sv_consistency 1 //Whether the server enforces file consistency for critical files
- sv_contact ""
- sv_downloadurl"" //Location from which clients can download missing files
- sv_enableoldqueries 0 //Enable support for old style (HL1) server queries
- sv_filterban 1 //Set packet filtering by IP mode
- sv_findsoundname 0 //Find sound names which reference the specified wave files.
- //sv_footsteps 1
- //sv_force_transmit_ents 0 //Will transmit all entities to client, regardless of PVS conditions (will still skip based on transmit flags, however).
- sv_forcepreload 0 //Force server side preloading.
- //sv_friction 4
- //sv_gravity 800
- //sv_ignore_hitboxes 0
- //sv_instancebaselines 1 //Enable instanced baselines. Saves network overhead.
- //sv_lagflushbonecache 1 //Flushes entity bone cache on lag compensation
- sv_lan 0
- sv_log_onefile 0 //Log server information to only one file.
- sv_logbans 0 //Log server bans in the server logs.
- sv_logblocks 0 //If true when log when a query is blocked (can cause very large log files)
- sv_logdownloadlist 1
- sv_logecho 0 //Echo log information to the console.
- sv_logfile 1 //Log server information in the log file.
- sv_logflush 0 //Flush the log file to disk on each write (slow).
- sv_logsdir logs //Folder in the game directory where server logs will be stored.
- sv_massreport 0
- sv_master_legacy_mode 1 //Use old (outside-of-Steam) code to communicate with master servers.
- sv_master_share_game_socket 1 //Use the game's socket to communicate to the master server. If this is 0, then it will create a socket on -steamport + 1 to comm
- sv_max_queries_sec 3 //Maximum queries per second to respond to from a single IP address.
- sv_max_queries_sec_global 60 //Maximum queries per second to respond to from anywhere.
- sv_max_queries_window 30 //Window over which to average queries per second averages.
- //sv_netvisdist 10000 //Test networking visibility distance
- sv_noclipaccelerate 5
- sv_noclipspeed 5
- sv_npc_talker_maxdist 1024 //NPCs over this distance from the player won't attempt to speak.
- //sv_optimizedmovement 1
- sv_parallel_packentities 1
- sv_parallel_sendsnapshot 1
- sv_pausable 0
- sv_precacheinfo 1
- sv_pure 1
- sv_pure_kick_clients 1
- sv_pure_trace 1
- //sv_pushaway_clientside 0 //Clientside physics push away (0=off, 1=only localplayer, 1=all players)
- //sv_pushaway_clientside_size 15 //Minimum size of pushback objects
- //sv_pushaway_force 30000 //How hard physics objects are pushed away from the players on the server.
- //sv_pushaway_max_force 1000 //Maximum amount of force applied to physics objects by players.
- //sv_pushaway_max_player_force 10000 //Maximum of how hard the player is pushed away from physics objects.
- //sv_pushaway_min_player_speed 75 //If a player is moving slower than this, don't push away physics objects (enables ducking behind things).
- //sv_pushaway_player_force 200000 //How hard the player is pushed away from physics objects (falls off with inverse square of distance).
- sv_pvsskipanimation 1 //Skips SetupBones when npc's are outside the PVS
- sv_rcon_banpenalty 2 //Number of minutes to ban users who fail rcon authentication
- sv_rcon_log 1
- sv_rcon_maxfailures 2 //Max number of times a user can fail rcon authentication before being banned
- sv_rcon_minfailures 2 //Number of times a user can fail rcon authentication in sv_rcon_minfailuretime before being banned
- sv_rcon_minfailuretime 30 //Number of seconds to track failed rcon authentications
- //sv_rollangle 0
- //sv_rollspeed 200
- //sv_sendtables 0 //Force full sendtable sending path.
- sv_showladders 0 //Show bbox and dismount points for all ladders (must be set before level load.)
- //sv_showlagcompensation 0 //Show lag compensated hitboxes whenever a player is lag compensated.
- sv_skyname 0 //Current name of the skybox texture
- sv_soundemitter_filecheck 1 //Report missing wave files for sounds and game_sounds files.
- sv_soundemitter_flush 1 //Flushes the sounds.txt system (server only)
- sv_soundemitter_trace 0 //Show all EmitSound calls including their symbolic name and the actual wave file they resolved to
- sv_soundscape_printdebuginfo 0 //print soundscapes
- sv_specaccelerate 5
- sv_specnoclip 1
- sv_specspeed 3
- sv_stats 1 //Collect CPU usage stats
- //sv_stepsize 18
- //sv_stopspeed 100 //Minimum stopping speed when on ground.
- //sv_stressbots 0 //If set to 1, the server calculates data and fills packets to bots. Used for perf testing.
- sv_strict_notarget 0 //If set, notarget will cause entities to never think they are in the pvs
- //sv_suppress_viewpunch 0
- sv_test_scripted_sequences 0 //Tests for scripted sequences that are embedded in the world. Run through your map with this set to check for NPCs falling throu
- sv_teststepsimulation 1
- sv_thinktimecheck 0 //Check for thinktimes all on same timestamp.
- sv_timeout 300 //After this many seconds without a message from a client, the client is dropped
- sv_turbophysics 0 //Turns on turbo physics
- //sv_unlag .5 //Enables player lag compensation
- //sv_unlag_fixstuck 0 //Disallow backtracking a player for lag compensation if it will cause them to become stuck
- sv_unlockedchapters 99 //Highest unlocked game chapter.
- //sv_useexplicitdelete 1 //Explicitly delete dormant client entities caused by AllowImmediateReuse().
- sv_vehicle_autoaim_scale 8
- sv_visiblemaxplayers -1 //Overrides the max players reported to prospective clients
- sv_voicecodec 0 //Specifies which voice codec DLL to use in a game. Set to the name of the DLL without the extension.
- sv_voiceenable 1
- //sv_wateraccelerate 10
- //sv_waterdist 12 //Vertical view fixup when eyes are near water plane.
- //sv_waterfriction 1
- tf_flag_caps_per_round 4 //Number of flag captures per round on CTF maps. Set to 0 to disable.
- tf_playergib 1 //Allow player gibbing.
- tf_stats_track 1 //Turn on//off tf stats tracking.
- tf_stats_verbose 0
- net_maxfilesize 90 //Max download file size. Default is 15
- log on
复制代码
TF2的服务器也可参考:
http://www.teamwarfare.com/forum ... amp;threadid=389037 |
|