Team Fortress 2

From MonsterLANWiki

Jump to: navigation, search

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").

@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=ctf_2fort
GOTO compserver

:mapTwo
set servermap=ctf_2fort
GOTO compserver

:mapThree
set servermap=ctf_2fort
GOTO compserver

:mapFour
set servermap=ctf_2fort
GOTO compserver

:mapFive
set servermap=ctf_2fort
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 
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

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"

Go Live

This file is used to tell the gamers when the server is going live so the game can start. It restarts the server 3 times and tells them the game is live via the in game chat. The file is called: ml_golive.cfg

// Aliases
alias lo0 "say --- LIVE AFTER RESTART ---; wait 20; say --- LIVE AFTER RESTART ---; wait 20; say --- LIVE AFTER RESTART ---; wait 20; say --- LIVE AFTER RESTART ---"
alias lo1 "mp_restartgame 1"
alias lo4 "wait 500;say [------------];wait 20;lo5;"
alias lo5 "say [E-----------];wait 20;lo6;"
alias lo6 "say [VE----------];wait 20;lo7;"
alias lo7 "say [IVE---------];wait 20;lo8;"
alias lo8 "say [LIVE--------];wait 20;lo9;"
alias lo9 "say [-LIVE-------];wait 20;lo10;"
alias lo10 "say [--LIVE------];wait 20;lo11;"
alias lo11 "say [---LIVE-----];wait 20;lo12;"
alias lo12 "say [----LIVE----];wait 20;lo13;"
alias lo13 "say [-----LIVE---];wait 20;lo14;"
alias lo14 "say [------LIVE--];wait 20;lo15;"
alias lo15 "say [-------LIVE-];wait 20;lo16;"
alias lo16 "say [--------LIVE];wait 20;lo17;"
alias lo17 "say [E--------LIV];wait 20;lo18;"
alias lo18 "say [VE--------LI];wait 20;lo19;"
alias lo19 "say [IVE--------L];wait 20;lo20;"
alias lo20 "say [LIVE--------];wait 20;lo21;"
alias lo21 "say [-LIVE-------];wait 20;lo22;"
alias lo22 "say [--LIVE------];wait 20;lo23;"
alias lo23 "say [---LIVE-----];wait 20;lo24;"
alias lo24 "say [----LIVE----];wait 20;lo25;"
alias lo25 "say [----LIVE----];wait 20;lo26;"
alias lo26 "say [----LIVE----];wait 20;lo27;"
alias lo27 "say [----LIVE----];wait 500;lo28;"
alias lo28 "say [----LIVE----];"

// Execute
lo0
lo1
lo2
lo3
lo4

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_granary</li>
<li>cp_well</li>
<li>ctf_2fort</li>
<li>tc_hydro</li>
<li>ctf_well</li>
<li>cp_badlands</li>
<li>cp_dustbowl</li>
</ul>
<br>
<br>
Play nice & have fun :)

</body> </html> </pre>


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.
Personal tools