If you want to run a TFC server, you've come to the right place. The following document will describe what you need to run a TFC server, how to start it, and what commands you need to know to customize it. If you've got a TFC server running already, you probably want to skip straight to the Advanced Customization section to find further information on customizing it. If you want to know how to set your server up for a Clan Battle, skip straight to the Clan Battles section.

What do you need to run a Team Fortress Classic Server?

High Bandwidth Connection

The most important factor in how well your server will run is how fast your connection to the Internet is. When people connect to your server to play, you have to share that bandwidth with them. At the very minimum you need an ISDN connection (256 kb/s or more). Ideally a server will be running through a DSL or T1 connection. If you run a server and the bandwidth you are providing to the people that connect to you isn't enough, they are going to experience lag because your machine can't send them enough information.

CPU Power

Your computer is going to be doing a lot of work when people connect to it, and the amount of work that it needs to do increases dramatically as more people connect to your game. To be able to service a full game, you are going to want at least a Pentium II 266, but the more CPU power the better.

RAM

RAM is something that you really can never have enough of. Any time your machine doesn't have enough RAM it will start using a swap file, which is much slower. At the minimum you are going to want 64 MB of RAM, but 128 would be ideal.

The requirements are very dependant on the number of players on your server. The above requirements should be fine for a 16 player server. If you're planning on running a 32 player server, you'll need to have considerably more bandwidth, CPU power, and RAM than outlined above. A 6 or 8 player server could get by with slightly less than described.



How do I start the dedicated server?

The dedicated server program sits on the root of your Half-Life directory (hlds.exe). The first thing you should do is right click on the file and create a shortcut to it somewhere on your computer. This will make it easier to customize your server. The first thing that the dedicated server needs to know is what kind of game it will be running. Right click on the shortcut you created and go up to the target line. In the target line, append -game tfc. Then decide how many players you want your server to allow on it at once. Team Fortress Classic will support games of up to 32 players. Remember, the more people you allow to join your game, the more CPU power and bandwidth you will need to support them. Once you've decided, append this to the target line: +maxplayers X, when X is the number of players.
A sample Target line might read like this:
hlds.exe -game tfc +maxplayers 16
This lets the dedicated server know that it should look for all the files that it needs in the TFC directory, and that you're allowing a maximum of 16 players on your server at any one time.

You are now running a Team Fortress Classic server, but you need to run a map for people to join. Click on the console line at the bottom and type in 'map 2fort'. Now you are running a server that people can connect to. Hit the status button (or type status at the command line) and you can see information on your server, such as the map you're running, what IP address your server is running from, how many people are connected to your game, and how many people you will allow in your game.




How do I customize my server?

Once you've got a server started, you can set a variety of variables to run the server exactly how you wish. This is done by typing various commands into the console line. If you have settings you want to always have, you can use Notepad to edit the server.cfg file in your Half-Life \ TFC directory. Then, whenever you start you server, it'll run that file, executing all the commands in it just as if you'd typed each on the console line.

Below is a list of the most common settings that you'll probably want to customize.

How do I change my server's name?

If you want your server to have a custom name in the server list, you need to use the hostname command, followed by the name you wish, in quotes.
For example:
hostname "My TFC Server!"

How do I change my server's name?

If you want your server to have a custom name in the server list, you need to use the hostname command, followed by the name you wish, in quotes.
For example:
hostname "My TFC Server!"



How do I change the amount of time each map is played for?

TFC servers have a setting called the timelimit. The timelimit is the amount of time a map is played before the server automatically moves onto the next one. You can alter this using the mp_timelimit command, followed by the amount of time in minutes you want the server to run each map.
For example, this setting will make your server run each map for 30 minutes:
mp_timelimit 30


How do I change the maps my server is playing?

Your server moves through a list of maps called the Map Cycle. It finds the list in the mapcycle.txt file that's found in your Half-Life \ TFC directory. Use Notepad to edit the file. You can add and remove maps simply by adding or deleting the map names in the file.

If you add a new map name to the list, make sure you also place the map (the .BSP file) into your Half-Life \ TFC \ maps directory. You may need to make this directory yourself.




How do I change my server to a specific map?

You can use the changelevel command, followed by the name of the map, to change to a specific map.
For example, this will change your server to the Well:
changelevel well


How do I prevent teammates from hurting each other?

You can change the teammate damage settings using the mp_teamplay command. There's a variety of different settings you can choose. Each setting has an associated value. Add up the values of all the settings you want on, and type mp_teamplay followed by the sum of the settings. Here's the list of the settings and their associated values:
Teamplay on (you should always set this) 1
Teammates take half damage from direct weaponfire 2
Teammates take no damage from direct weaponfire 4
Teammates take half damage from explosive weaponfire 8
Teammates take no damage from explosive weaponfire 16
Teammates armor takes half damage from direct weaponfire 128
Teammates armor takes no damage from direct weaponfire 256
Teammates armor takes half damage from explosive weaponfire 512
Teammates armor takes no damage from explosive weaponfire 1024
For example, this will completely prevent players from hurting their teammates with direct and explosive weaponry ( 1 + 4 + 16 = 21 ) :
mp_teamplay 21



Advanced Customization


How do I turn on Auto Team?

If you want to have your server automatically place players into teams, you turn Auto Team on. Note that for the first 30 seconds of a game, players are allowed to join the team they want, to allow teams to reshuffle after each map. The Auto Team command is tfc_autoteam, and it simply needs to be set to 1 or 0.
For example, this turns on Auto Team:
tfc_autoteam 1


How do I set a Respawn Delay?

Some maps work much better if the game's slowed down a bit, and one easy way of doing this, and making players appreciate their lives a little more, is to add a respawn delay. When they die, players cannot respawn for the amount of time specified by the respawn delay. Long respawn delays aren't a lot of fun, but even short ones of 5 seconds or so can change the flow of a map considerably, and make medics far more important. The command you want to use is tfc_respawndelay followed by the amount of time, in seconds, that you want the respawn delay to be.
For example, this gives all players a respawn delay of 10 seconds:
tfc_respawndelay 10


How do I setup Team Equalisation?

TFC has a built in subtle team equalisation, which alters the strength of each team as the game goes on, to make it slightly more even, and hence more fun. It's great for public games, but probably not something you want for clan battles. They way it works is this: Every 10 seconds, the game calculates a multiplier for each team, and then every piece of damage done by any player is multiplied by the damage multiplayer of his/her team. The multiplier is calculated based upon two factors: The score of each team and the number of players in each team. If a team's got a higher score and more players than the opposing team, it's multiplier will be less than 1, so that all damage its team members are doing is reduced, while the opposing team's multiplier would be greater than 1, so its team members are doing more damage. If the losing team starts to come back, the multipliers will reduce in strength.
You can toggle off the factors in the multiplier calculation, or turn them both off if you don't want team equalisation at all. This isn't recommended, especially for public games. Team equalisation's extremely subtle, and all it does is make the game slightly more fun for everyone in it. The two commands you want to use are tfc_balance_teams, to equalise based upon number of players in each team, and tfc_balance_scores, to equalise based upon the scores of each team. Both settings can be on at once, which is probably the best setting.
For example, this turns on equalisation based upon scores and players:
tfc_balance_teams 1
tfc_balance_scores 1



Clan Battles

TFC supports a mode called Clan Battle. This mode is designed for a battle between two specific teams. It's best not to run your public server in this mode. In Clan Battle mode, TFC keeps full track of players joining, disconnecting, scoring, and killing each other, and at the end of the game it'll display a dump of all this data.

The other main feature of Clan Battle mode is Player Substitution. Whenever a player joins a Clan Battle server, he/she is assigned a Battle ID. This is a unique number that identifies this player to the battle. The Battle ID is displayed throughout prematch, as well as everytime the player dies. Players should write down their Battle ID. If a player is disconnected during the battle, he/she can use the Battle ID to reconnect into the server, and be automatically re-assigned their team, class, and kills. Should a player be unable to continue to play, the Battle ID can be given to someone else, who can then substitute. To connect with a Battle ID, the player needs to type, at the console, setinfo tf_id, followed by the Battle ID. The player should then connect. For instance, if you had a Battle ID of 212, and you were playing on a server with an IP of 202.166.23.24, you'd type this at the console:

setinfo tf_id 212
connect 202.166.23.24

How do I turn on Clan Battle Mode?

Use the tfc_clanbattle command to set Clan Battle Mode. 1 turns it on, 0 off.
For example, this turns on Clan Battle Mode:
tfc_clanbattle 1


How do I setup a prematch time?

Prematch time is an amount of time in which players can run around and kill each other, but not actually achieve any mission goals. Its a good idea to run a clan battle with a few minutes of prematch time, to allow players to warmup, and ensure that all the players are in the game before it starts. You can setup a prematch time using the tfc_clanbattle_prematch command, followed by the length of time in minutes. You can alter the length of the prematch time while the game is running using the same command.
For example, this sets up a 10 minute prematch time:
tfc_clanbattle_prematch 10


How do I prevent anyone else joining our clan battle while it's running?

You can use the tfc_clanbattle_locked command to Lock your game. Once this is done, the server will lock itself as soon as the prematch time is over and the battle has begun. The only players allowed on will be ones with Battle IDs that match players who were disconnected. This is highly recommended for clan battles.
For example, this tells your server to lock itself after the game starts:
tfc_clanbattle_locked 1