SRCDS Steam group


Tutorial: How to setup a TF2 server
#1
This is based on my experience with setting up a server from scratch, IE I didnt know anything about it when I started!

Installation
1) Download the HLDSTOOLUPDATE to a temp location, like c:\Temp.
Use the link below to download HLDSTOOLUPDATE.
http://www.steampowered.com/download/hldsupdatetool.exe
The tool is used to download, update and run the dedicated Source server.

2) Once you have downloaded hldsupdatetool.exe, run the installer and install to a permanent location, like c:\HLServer.
The permanent location is something you decide, like any other program you install in Windows.

3) Now you need to download the files for your dedicated TF2 server.
To download the dedicated TF2 server, use this script in a .bat file:
Code:
c:\HLServer\hldsupdatetool -command update -game tf -dir c:\HLServer
This is how it should look, if your server location is "c:\HLServer".
When downloading, dont panic over the size....its about 1,8Gb.
Sometimes the update tool will exit for no reason. Just run it again untill you are confident you have everything.

Configuration
4) Now you have you base installation. You just need to configure it.
Open Notepad and create a file called server.cfg and put it in the "C:\HLServer\orangebox\tf\cfg" folder. (Remember NOT to save it as an "txt" file)
Heres a base server.cfg file:
Code:
// Team Fortress 2 Server Configuration File, To be used with TF2 only!


// Server Name
hostname "Team Fortress 2"

// Rcon Cvars
rcon_password "" //Set's remote control password
sv_rcon_banpenalty 15 //Number of minutes to ban users who fail rcon authentication
sv_rcon_log 1 //Enable/disable rcon logging.
sv_rcon_maxfailures 3 //Max number of times a user can fail rcon authentication before being banned
sv_rcon_minfailures 5 //Number of times a user can fail rcon authentication in sv_rcon_minfailuretime before being banned
sv_rcon_minfailuretime 10 //Number of seconds to track failed rcon authentications

// Server Password
sv_password "" // Password protects server

// Server Cvars
mp_allowspectators 1 //Toggles whether the server allows spectator mode or not
mp_autocrosshair 0
mp_autoteambalance 1 //Toggles server autoteambalance
mp_bonusroundtime 5 //Time in seconds after round win until round restarts
mp_chattime 5 //amount of time in seconds players can chat after the game is over

mp_decals 1
mp_defaultteam 1
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 //Amount of damage players sustains from a fall
mp_flashlight 0 //Toggles flashlight on or off
mp_footsteps 1 //Toggles footsteps on or off
mp_forcecamera 0 //Restricts spectator modes for dead players
mp_forcerespawn 0
mp_forcerespawnplayers 1 //Force all players to respawn.
mp_forcewin 1 //Forces team to win
mp_fraglimit 0
mp_idledealmethod 2 //Deals with Idle Players. 1 = Sends them into Spectator mode then kicks them if they're still idle, 2 = Kicks them out of the game
mp_idlemaxtime 1 //Maximum time a player is allowed to be idle (in minutes)
mp_maxrounds 10 //max number of rounds to play before server changes maps
mp_teams_unbalance_limit 2 //Teams are unbalanced when one team has this many more players than the other team. (0 disables check)
mp_teststalemate 0 //Test the stalemate mode. Parameter: <0/1>. If 1, the map will reset at the end.
mp_time_between_capscoring 5 //Delay between scoring of owned capture points.
mp_timelimit 20 //game time per map in minutes
mp_winlimit 10 //Max number of rounds one team can win before server changes maps
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 0 //Players can hear all other players, no team restrictions
sv_alternateticks 0 //If set, server only simulates entities on even numbered ticks.
sv_autosave 0 //Set to 1 to autosave game on level transition. Does not affect autosave triggers.
sv_bonus_challenge 0 //Set to values other than 0 to select a bonus map challenge type.
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 0 //Clear memory of server side hints displayed to the player.
sv_consistency 1 //Whether the server enforces file consistency for critical files
sv_contact "" //Contact email for server sysop
sv_downloadurl "" //Location from which clients can download missing files
sv_enableoldqueries 1 //Enable support for old style (HL1) server queries
sv_pausable 0 //Is the server pausable.

// Lan or internet play, Server region cvars
sv_lan 0 //Server is a lan server ( no heartbeat, no authentication, no non-class C addresses )
sv_region 255 // Region Codes: 0 - US East coast, 1 - US West coast, 2 - South America, 2 - South America, 3 - Europe, 4 - Asia, 5 - Australia, 6 - Middle East, 7 - Africa, 255 - world

//server Logging
sv_log_onefile 0 //Log server information to only one file.
sv_logbans 1 //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_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.

//Server Rates
sv_maxcmdrate 0 //(If sv_mincmdrate is > 0), this sets the maximum value for cl_cmdrate.
sv_maxrate 20000 //Max bandwidth rate allowed on server, 0 == unlimited
sv_maxreplay 2 //Maximum replay time in seconds
sv_maxupdaterate 100 //Maximum updates per second that the server will allow
sv_mincmdrate 0 //This sets the minimum value for cl_cmdrate. 0 == unlimited.
sv_minrate 0 //Min bandwidth rate allowed on server, 0 == unlimited
sv_minupdaterate 30 //Minimum updates per second that the server will allow
NOTE
If you want to run it as a internet server and not LAN, add below to the config:
console sv_lan 0

Complete list of server commands:
http://www.dodbits.com/downloads/cvars/TF2/Team_Fortress_2_cvar_list_a-z.htm
Other great list:
http://forums.steampowered.com/forums/showthread.php?t=598508

Starting
To start the TF2 dedicated server you can use this command:
Code:
c:\HLserver\orangebox\srcds.exe -console -game tf -port 27015 +maxplayers 24 +map ctf_2fort
I start the server with the above, my server will support a maximum of 24 players, you can make it more or less if you like, and start on ctf_2fort map.

You can use the command in a .bat file

Updating later/checking for updates
To update your installation, use this script in a .bat file:
(its the same as installing, but it will check for updates, thats why theres the "-command update" option in there.
Code:
c:\HLServer\hldsupdatetool -command update -game tf -dir c:\HLServer

Adding custom maps
Just put it it in the "maps" folder and if your map requires any thing else put them in the same folders the the map came zipped up in.

Extras
If you want to control the number of players on each class or spawntimes, use this program:
http://www.beetlesmod.com/comm/

For more info on Dedicated Server:
http://planethalflife.gamespy.com/View.php?view=HL2Guides.Detail&id=4&game=3

Fast respawn without mods, by GTFO Gaming:
http://www.gtfogaming.co.uk/forum/viewtopic.php?t=2637

If you dont want to create the .txt and .bat files yourself, then you can download a zip file with them here:
http://silenthunter.dk/?page_id=7


This should get you going!

If you have additions for this please post them - then ill add them Smile
Reply
#2
Saying:

Quote:Its maximum player number is 10 and is starts with 2Fort.

would make some people think TF2 cannot support more then 10 players - would change that Toungue
Reply
#3
Muppet Wrote:Saying:

Quote:Its maximum player number is 10 and is starts with 2Fort.

would make some people think TF2 cannot support more then 10 players - would change that Toungue
Better now?
Reply
#4
Beck Wrote:
Muppet Wrote:Saying:

Quote:Its maximum player number is 10 and is starts with 2Fort.

would make some people think TF2 cannot support more then 10 players - would change that Toungue
Better now?

Not really - apparently you didn't change much, if anything.
Reply
#5
I did it for you ToungueWink
Join the Source Dedicated Server Support Group on Steam Community!
Source Dedicated Server (SRCDS)
Free to join, Live support! (When available)

http://forums.srcds.com/viewtopic/5114
Reply
#6
OK...ran into the first snag....cant get the server to run...
Theres no SRCDS.EXE file to be found...
My HLServer folder is app 1,27 Gb...am I missing something here?
Reply
#7
Beck Wrote:OK...ran into the first snag....cant get the server to run...
Theres no SRCDS.EXE file to be found...
My HLServer folder is app 1,27 Gb...am I missing something here?
Never mind...saw the solution in an other thread...need to keep running the updater tool and the scrds file will appear in the orangebox folder
Reply
#8
Beck Wrote:
Beck Wrote:OK...ran into the first snag....cant get the server to run...
Theres no SRCDS.EXE file to be found...
My HLServer folder is app 1,27 Gb...am I missing something here?
Never mind...saw the solution in an other thread...need to keep running the updater tool and the scrds file will appear in the orangebox folder
Found the program to change classes...added to the tut
Reply
#9
Just to let yall know, I ran into an issue where it downloaded everything but the orangebox folder and it's contents. After trying the updatetool a few more times with no success I made an empty orangebox folder myself in the install dir then ran the updatetool again and it worked. Just in case anyone else runs into this issue. Thanks for the great Tutorial, helped me out tons!
Reply
#10
Thank you very much Beck for the nice writeup on this. This was extremely helpful! Couldn't have gotten my server up w/out you.

Looking forward to seeing your example config when you get it done, but the links you provided were also quite helpful.

Looks like Mani is not available for TF2. Did you look at all into Metamod? This link is from Mani's site. http://www.sourcemod.net

Thanks also to Dracona for the nice writeup on port forwarding -- I needed that info as well!
Reply
#11
FYI TF2 guys! Mani is back and he is planning to make a plugin for TF2. Totally 1337. Just wanted everyone to know.

http://www.mani-admin-plugin.com/

I used this plugin back when I was running a DOD:Source server and I really liked it.
Reply
#12
Stickied
Join the Source Dedicated Server Support Group on Steam Community!
Source Dedicated Server (SRCDS)
Free to join, Live support! (When available)

http://forums.srcds.com/viewtopic/5114
Reply
#13
Beck Wrote:Extras
If you want to control the number of players on each class or spawntimes, use this program:
http://www.beetlesmod.com/comm/




This should get you going!

If you have additions for this please post them - then ill add them Smile

Hey, I know this might be noobish, and that is what I am at this point with servers, but how do we install the beetlesmod onto our server? It confuses me looking at his install guide, if someone could maybe walk me through it I would greatly appreciate it. Thank you.
Reply
#14
Not really the appropriate thread to post that question but, all you have to do is extract the .zip into the TF mod folder and it runs.
Join the Source Dedicated Server Support Group on Steam Community!
Source Dedicated Server (SRCDS)
Free to join, Live support! (When available)

http://forums.srcds.com/viewtopic/5114
Reply
#15
JoelGrigori Wrote:Hey, I know this might be noobish, and that is what I am at this point with servers, but how do we install the beetlesmod onto our server? It confuses me looking at his install guide, if someone could maybe walk me through it I would greatly appreciate it. Thank you.

After you read through all the files and guide, it becomes easy enough to install within seconds. Feel free to PM me and I can help you out.
~ Mooga ...w00t? - SRCDS.com on Twitter
[Image: 76561197965445574.png]
Please do not PM me for server related help
fqdn Wrote:if you've seen the any of the matrix movies, a game server is not all that different. it runs a version of the game that handles the entire world for each client connected. that's the 2 sentence explanation.
Reply


Forum Jump:


Users browsing this thread: 39 Guest(s)