Team Fortress 2
From MonsterLANWiki
Contents |
Server Scripts
The following are the scripts & config files used to run the Team Fortress 2 Servers on Windows XP for MonsterLAN.
Start Script
This is the windows server start script for Team Fortress 2. This is file is called MLServer.bat and must be put in the server directory ("\mlservers\hl2server\orangebox\MLcomp"). This file is currently setup for Capture Points. If you want it to be CTF or another map type then you need to change the maps in the :mapOne to :mapFive section.
@echo off rem // variable 1 is the server number. // rem // variable 2 is the round number. // :servercheck rem // which server should we start? // IF %1 == 1 GOTO portset IF %1 == 2 GOTO portsetAlt IF %1 == 3 GOTO portset IF %1 == 4 GOTO portsetAlt IF %1 == 5 GOTO portset IF %1 == 6 GOTO portsetAlt IF %1 == 7 GOTO portset IF %1 == 8 GOTO portsetAlt IF %1 == 0 GOTO publicserver GOTO roundcheck :portset set serverport=27016 set tvportvalue=27020 GOTO roundcheck :portsetAlt set serverport=27017 set tvportvalue=27021 GOTO roundcheck :roundcheck rem // which round should we start? // IF %2 == 1 GOTO mapone IF %2 == 2 GOTO maptwo IF %2 == 3 GOTO mapthree IF %2 == 4 GOTO mapfour IF %2 == 5 GOTO mapfive IF %2 == 0 GOTO publicserver GOTO compserver :mapOne set servermap=cp_well GOTO compserver :mapTwo set servermap=cp_granary GOTO compserver :mapThree set servermap=cp_badlands GOTO compserver :mapFour set servermap=cp_well GOTO compserver :mapFive set servermap=cp_granary GOTO compserver :compserver echo ::: STARTING SERVER %1 - ROUND %2 ::: start "Comp Server %1" /high C:\mlservers\hl2server\orangebox\srcds.exe -console -game tf -port %serverport% +map %servermap% +exec ml_match_tf2.cfg +hostname "MonsterLAN Tournament Server %1" +maxplayers 16 +tv_name "MonsterLAN TF2 Match TV Server %1" +tv_port %tvportvalue% GOTO end :publicserver echo ::: STARTING PUBLIC SERVER ::: start "Public Server" /high C:\mlservers\hl2server\orangebox\srcds.exe -console -game tf -port 27016 +map cp_dustbowl +exec ml_public_tf2.cfg +hostname "MonsterLAN's Public Server" +maxplayers 24 GOTO end :end echo ::: BATCH FILE COMPLETE :::
Configs
These files are put in the server config directory ("\mlservers\hl2server\orangebox\tf\cfg").
Public Server
This file is the public server config. This file is called: ml_public_tf2.cfg
//Official MonsterLAN Public Config rcon_password monster hostname "MonsterLAN's Public TF2 Server" sv_maxrate "20000" sv_minrate "10000" sv_maxupdaterate "101" sv_minupdaterate "70" sv_maxcmdrate "101" sv_mincmdrate "70" sv_client_cmdrate_difference "30" sv_client_interpolate "0.1" sv_lan "1" sv_alltalk "0" sv_pausable "0" sv_cheats "0" sv_consistency "1" sv_allowupload "1" sv_allowdownload "1" sv_timeout "300" sv_pure "1" sv_pure_kick_clients "1" sv_consistency "1" decalfrequency "10" tf_flag_caps_per_round "3" tf_playergib "1" tf_stats_track "1" tf_stats_verbose "0" mp_autoteambalance "1" mp_teams_unbalance_limit "2" mp_enableroundwaittime "1" mp_bonusroundtime "20" mp_restartround "20" mp_stalemate_timelimit "120" mp_timelimit "20" mp_maxrounds "0" mp_winlimit "0" mp_forcecamera "1" mp_allowspectators "1" mp_friendlyfire "0" mp_footsteps "1" sv_voiceenable "1" sv_alltalk "1" mp_chattime "20" sv_allowupload "1" sv_allowdownload "1" net_maxfilesize "15" say "MonsterLAN Public TF2 Config Has Been Executed"
Match
CTF
This file is the match config. This file is called: ml_match_tf2.cfg
//Official MonsterLAN Match Config rcon_password monster // Enter your RCON password here before the double slashes hostname "MonsterLAN's Match TF2 Server" mp_allowspectators "1" mp_autoteambalance "0" mp_autocrosshair "1" mp_chattime "15" mp_falldamage "0" mp_flashlight "0" mp_footsteps "1" mp_forcecamera "1" mp_forcerespawn "1" mp_fraglimit "0" mp_bonusroundtime "0" mp_showrespawntimes "1" mp_teams_unbalance_limit "0" mp_time_between_capscoring "0" mp_timelimit "1" mp_winlimit "0" mp_tournament "1" mp_stalemate_enable "1" mp_stalemate_timelimit "120" sv_lan "1" sv_alltalk "0" sv_cheats "0" sv_client_cmdrate_difference "30" sv_client_predict "1" sv_client_max_interp_ratio "1" sv_client_min_interp_ratio "1" sv_consistency "1" sv_forcepreload "1" sv_gravity "800" sv_maxrate "30000" sv_maxupdaterate "101" sv_maxcmdrate "101" sv_mincmdrate "67" sv_minrate "15000" sv_minupdaterate "67" sv_turbophysics "1" sv_voiceenable "1" sv_pure "1" sv_allow_color_correction "0" sv_allow_wait_command "0" sv_pure_kick_clients "1" sv_pure_trace "1" sv_pausable "0" tv_delay "90" tv_maxrate "3500" tv_transmitall "1" tf_flag_caps_per_round "0" tf_weapon_criticals "0" say "MonsterLAN Tournament Match TF2 Config Has Been Executed" say "CTF scoring - One 20 minute round. Most total captures wins." say "In the event of a tie, a sudden death OT round will be played." say "Teams must hit F4 and select "ready" to begin"
CP
This file is the CP match config. This file is called: ml_match_tf2_cp.cfg
//=== MonsterLAN MATCH Config - v.1 === //=== by CherryPopper === //=== THIS CONFIG IS FOR CP MAP types === //=== Server Logging Parameters === log on mp_logdetail "3" sv_contact "MonsterLAN - CP - v.1" //=== Server name, you may add your Clan Tag === //hostname "MonsterLAN CP Tournament Server 1" //----------------------------------------------------------------- //=== Gameplay Settings for CP maps === mp_winlimit "3" // first team to 3 wins mp_maxrounds "5" // no more than 5 total rounds mp_timelimit "20" //timelimit safety valve, rounds last at least 20 minutes //----------------------------------------------------------------- //=== PASSWORDS - Set Your Own Server Passwords, un-comment to use each rcon_password monster //sv_password "Input your own" //tv_password "Input your own" //=== Source TV Parameters === //=== These variables can not be changed tv_enable "1" tv_delay "90" //=== Customize these variables for your server //tv_name "MonsterLAN TF2 Match TV" //These are set in the batch file //tv_port 27020 //These are set in the batch file tv_dispatchmode "0" //Keeps clients on master proxy tv_maxclients "1" //Spectators - 1 minimum is required tv_transmitall "1" tv_maxrate "3500" tv_autorecord "0" //=== Pure settings, check your whitelist.txt ==== sv_pure 1 sv_pure_kick_clients 1 sv_pure_trace 1 sv_consistency "1" //=== Multiplayer Parameters === mp_autoteambalance "0" mp_bonusroundtime "15" mp_chattime "15" mp_clan_ready_signal "ready" mp_clan_readyrestart "1" mp_falldamage "0" mp_flashlight "0" mp_footsteps "1" mp_forcecamera "1" mp_friendlyfire "0" mp_fraglimit "0" mp_forcerespawn "1" mp_stalemate_enable "0" mp_stalemate_timelimit "0" mp_teams_unbalance_limit "0" mp_time_between_capscoring "0" mp_tournament "1" mp_tournament_restart mp_tournament_stopwatch 0 //=== Server Side Parameters === sv_allow_color_correction "1" sv_allowupload "0" sv_allow_wait_command "1" sv_alltalk "0" sv_alternateticks "0" sv_cacheencodedents "1" sv_cheats "0" sv_client_cmdrate_difference "20" sv_client_predict "1" sv_client_max_interp_ratio "1" sv_client_min_interp_ratio "1" sv_enableoldqueries "0" sv_forcepreload "0" sv_lan "1" sv_pausable "0" sv_rcon_banpenalty "0" sv_rcon_log "1" sv_showladders "0" sv_specaccelerate "5" sv_specnoclip "1" sv_specspeed "3" sv_turbophysics "1" sv_voiceenable "1" //=== SV Rates === sv_maxrate "30000" sv_minrate "10000" sv_maxupdaterate "100" sv_minupdaterate "30" sv_maxcmdrate "100" sv_mincmdrate "30" //Criticals & Damage Spread Off tf_weapon_criticals "0" tf_damage_disablespread "1" //------------------------------------------------------- //=== Sets default config === //=== Note - be sure to use this command in all your server configs === //=== If you rename the cfg file, be sure to change the line below === servercfgfile "ml_match_tf2_cp.cfg" //=== Announce === say "MonsterLAN Tournament - COMMAND POINT Config - v.1" say "Rules - First team to three wins, or..." say "Rules - Five total rounds have been played, or..." say "Rules - More than 20 minutes have been played." say "Rules - Hit F4 and ready when your team is ready to start."
MOTD (Message of The Day)
This file is displayed before they join the game. It is called motd.txt & is kept in the 'hl2server\orangebox\tf' directory.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>TeamFortress 2 MOTD</title>
<style type="text/css">
pre {
font-family:Verdana,Tahoma;
color:#FFB000;
}
body {
background:#000000;
margin-left:8px;
margin-top:0px;
}
a {
text-decoration: underline;
}
a:link {
color: #FFFFFF;
}
a:visited {
color: #FFFFFF;
}
a:active {
color: #FFFFFF;
}
a:hover {
color: #FFFFFF;
text-decoration: underline;
}
</style>
</head>
<body scroll="no">
<pre>
<img src="http://10.0.0.254/skins/MonsterLAN-New/MLBanner-Small.jpg">
<br>
<br>
<h2><b><font color=#991008>Welcome to MonsterLAN's Team Fortress 2 Server</font></b></h2>
<br>
<br>
<h3><b><font color=#991008>On Tournament Match Server</font></b></h3>
<br>
<br>
<b><u>HIT F4 and select "READY" to start the match</u></b>
<br>
<br>
<h3><b><font color=#991008>On Public Server</font></b></h3>
<br>
<br>
Map Cycle:
<ul>
<li>cp_gravelpit</li>
<li>cp_dustbowl</li>
<li>cp_granary</li>
<li>cp_well</li>
<li>ctf_2fort</li>
<li>tc_hydro</li>
<li>ctf_well</li>
<li>cp_badlands</li>
<li>pl_goldrush</li>
<li>cp_fastlane</li>
<li>ctf_turbine</li>
<li>pl_badwater</li>
<li>cp_steel</li>
<li>cp_egypt_final</li>
<li>cp_junction_final</li>
</ul>
<br>
<br>
Play nice & have fun :)
< /pre>
</body>
</html>
Server Admin Console Commands
These commands are used to administrate the server from the console.
exec ml_golive.cfg This will restart the server 3 times & say that the server is going live. say <text> Say something in-game as Console: <text> changelevel <map> Change the level of play (Example: de_dust2) stats This will show a table with CPU usage and stuff on the server. mp_restartgame <x> This will restart the game (NOT the server) in <x> seconds. kickid <number> Kick someone from the game, using the UserID or SteamID. banid <x> <y> kick Ban <x> in minutes (0=permanent) <y> User or SteamID. addip <x> <z> kick Ban by IP <x> same as above <z> IP-address of player. removeid <p> Remove ban for <p> by SteamID. removeip <q> Remove ban for <q> by IP-address. quit This terminates the server.
