If you want to run a TF server, you've come to the right place.
The following document will describe what you need to run a TF server, how to
start it, and what commands you need to know to customize it. If you've got a
TF 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.
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. |
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 1.5
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:
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 1.5 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.
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.
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:
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:
TF
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:
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. |
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:
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 ) :
When you start up the server it will either say WON Auth
Server or just Auth Server at the server's console. If your server
says WON Auth server at the console, that means that it is properly sending a
heartbeat to the WON master server. As long as your server is sending
heartbeats to the master server, you will be listed in the Half-Life launcher.
The server identifies players that are connected to your server
by assigning them a userid and (in the case of an Internet server) a uniqueid.
To see the userid and uniqueid for the users connected to your
server, type the command users at the server's console. This will
display all the users connected to your server, their userid, and their uniqueid.
The first number listed is the player's userid:
The second number shown is the user's uniqueid:
There are a few different ways to kick a player off your TF
server. The first step is to identify the player that you want to kick off. If
you know the player's name already, you can kick them off using their name. As
an example, let's say that a player named 'Bob' is causing trouble on your TF
server. You have warned him to curb his behavior, but he continues.
In this case you would type the following text at the dedicated server console:
To kick a user by their userid, first type in users
at the server's console. This will give you a listing of the users on your
computer and their corresponding userid.
We'll use Bob as the example again. To kick Bob off your server using his userid,
type this in at the server's console:
|
Make sure that you have a space between the pound sign (#) and
the player's userid. |
If a player is causing enough trouble on your server that you
want to ban them for a specific amount of time, then you should use the banid
command. With the banid command you can ban a player for a specific
number of minutes until they cool off and start playing in a manner that makes
the server more enjoyable for everyone.
To ban the player 'Bob' from your server for 5 minutes, type this in at the
server's console:
Sometimes a player will cause enough trouble that you have to
deny them access to your server permanently. Banning a player from your server
permanently is accomplished in the same way as banning a player from your
server for a specific amount of time.
To ban the player 'Bob' from your server permanently, type this at the server's
console:
To ban a player from playing on your server and kick them at the
same time, simply add in the command kick in your banid line.
To ban the player 'Bob' from your server for 10 minutes and kick him off, type
this at the server's console:
If you have banned users permanently from your server, it's a
good idea to keep a list of those uniqueids handy.
To write out a list of the users that you have banned permanently from your
server, type this in at the server's console:
This will write out a file called banned.cfg to the
working directory of your server. In the case of a TFC server it will be
written to \halflife\tfc.
If you have restarted your server and want to keep 'Bob' off
your server, you will want to add a line into your server's server.cfg
file. The server.cfg is located at \halflife\tfc and is run every time
your server starts up or changes maps. To keep Bob off your server after the
server has restarted, do this:
If you have a player that has changed their ways and you want to
allow them back on your server after you have banned them, you can use the removeid
command. To remove Bob from your banned list, type this in at the server's
console:
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:
Remote administration makes it possible for the server
administrator to control their server without sitting at the machine the server
is running on. This can be very useful for server operators that play on their
own servers. Remote administration is accomplished using the rcon
(remote console). The first thing you need to do is set up an rcon password on
the server you want to control. To set the rcon password at the server, type
this in at the server's console:
Now that the rcon password is set you are ready to control it
remotely. Connect to the server from another machine and bring down the
console. Now you have to let your server know that you are legitimate and
should be able to control the server. To do this, you send the server the rcon
password. To send the rcon password, type this at the client's console:
You are now recognized by your server as an administrator.
Issuing rcon commands is the same as issuing commands from the server itself.
For example, say you wanted to change the map to 2fort. You would type in:
|
At this point you will get a 'bad rcon password' message if
the password you entered was incorrect. |
You can issue virtually any command to your server using the
rcon command. You can also get your user list using the rcon command, and it
will be printed into your client's console. To get your user list along with
the user's unique ids, type this in at your client's console:
If you would like to set the amount of data that the server will
send to its connected clients, you will want to use the sv_minrate and sv_maxrate
commands. Say, for example, you wanted to only allow users to play with rate
settings of less than 5000 on your server to conserve your server's bandwidth.
To do that, you would type this at the server's console:
Conversely, if you wanted to only allow users with high
bandwidth connections to play on your server (rate settings of greater than
8000) you would do that this way:
Some maps work much better if the game is slowed down a bit, and
one easy way to do this (and make 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 has subtle team equalization built in, which alters the
strength of each team as the game progresses 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.) The 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 multiplier of his/her team. The
multiplier is calculated based upon two factors: the score of each team and the
number of players on each team. If a team has a higher score and more players
than their opposing team, its multiplier will be less than 1, so that all
damage its team members are doing is reduced. 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 equalization at all. This isn't recommended,
especially for public games. Team equalization is 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 equalize
based upon number of players in each team, and tfc_balance_scores, to
equalize based upon the scores of each team. Both settings can be on at once,
which is recommended.
For example, this turns on equalization based upon scores and players:
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 every
time the player dies. Players should write down their Battle ID. If they are
disconnected during the battle, they can use the Battle ID to reconnect onto
the server, and be automatically re-assigned their team, class, and kills. If a
player is 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
example, 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:
Use the tfc_clanbattle command to set Clan Battle Mode. 1
turns it on, 0 off.
For example, this turns on Clan Battle Mode:
Prematch time is an amount of time in which players can run
around and kill each other, but not actually achieve any mission goals. It's a
good idea to run a clan battle with a few minutes of prematch time, to allow
players to warm up, and ensure that all the players are in the game before it
starts. You can set up 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:
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: