Whether you’re familiarizing yourself with the game or filling in a missing player slot, bots are a great resource for a TF2 server.
Only certain gamemodes and maps have official bot support. For a full list of supported maps and how to generate bot pathing, you can check out our article on How to Generate Bot Pathing on a TF2 Map.
ADDING BOTS
Adding bots to your TF2 server is easily done with a single command that is customizable based on your preferences. You can add bots to your server via your control panel or RCON.
- Start your server.
- Go to your Console.
- Enter the command
tf_bot_add <amount> <team> <class>
, replacing<amount>
<team>
and<class>
with your desired values.
The team and class values are optional. If you wish to specify these fields, the options for <team>
are red
and blue
.
The options for <class>
are scout
, soldier
, pyro
, demoman
, heavyweapons
, engineer
, medic
, sniper
, and spy
.
For example, if you want to add one spy to the blue team, the command would be tf_bot_add 1 blue spy
.
AUTOMATICALLY POPULATING YOUR SERVER WITH BOTS
Like many team-based games, TF2 is most enjoyable when both teams have sufficient players. Consistently having enough players on your server for a competitive game is not always feasible. Fortunately, there is a way to configure your server so bots join both teams whenever a player connects to your server. If you wish to fill all player slots with bots, these settings will ensure a bot will disconnect to make room for a human player.
- Stop your server.
- Navigate to Files > Config Files.
- Select TF2 server.cfg.
- Add the following lines:
tf_bot_quota "<amount>"
, replacing<amount>
with your desired bot count.tf_bot_quota_mode "fill"
tf_bot_auto_vacate "1"
. - Press Save.
REMOVING BOTS
All bots will automatically disconnect from your server when the last human player leaves. Bots can be removed mid-game by entering a command through your server console or RCON.
- Navigate to your server Console.
- Enter the command
tf_bot_kick <name>
.- If the bot’s name has spaces in it, you will have to surround it with quotation marks. For example,
tf_bot_kick “Humans Are Weak”
. - If you wish to kick all of the bots, you can use the command
tf_bot_kick all
.
- If the bot’s name has spaces in it, you will have to surround it with quotation marks. For example,