Not enough players online? Bots can fill up your Team Fortress 2 game server so you can get a match going even during quiet hours, or test maps and settings without any other players. In this guide, we’ll show you how to add bots, control their number, and set their difficulty.
In ZapX, open your server’s Console tab and enter the number of bots you want:
tf_bot_quota 6
Use tf_bot_quota 0 to remove all bots. Values entered in the Console tab only apply until the next restart.
To make sure the bots return after every restart, add the commands to the custom.cfg file:
- In the Files tab, open the
tf/cfgfolder. - Open the
custom.cfgfile. If it doesn’t exist yet, create it. - For example, add these lines:
tf_bot_quota 6
tf_bot_quota_mode fill
tf_bot_difficulty 1
- Save the file and restart your server.
Server Configuration explains why your own settings belong in custom.cfg rather than server.cfg.
| Command | Meaning |
|---|---|
tf_bot_quota <anzahl> | Target number of bots. 0 = no bots |
tf_bot_quota_mode <modus> | How the number of bots is managed: normal, fill, or match |
tf_bot_difficulty <stufe> | Bot difficulty: 0 easy, 1 normal, 2 hard, 3 expert |
According to Valve, the tf_bot_quota_mode modes work as follows:
normal: The server always has the number of bots specified bytf_bot_quota.fill: The server adds bots until the combined number of players and bots reaches the number specified bytf_bot_quota. When players join, bots leave.match: The server maintains a fixed ratio of players to bots, withtf_bot_quotabots per player.
fill is a good choice for a community server that you don’t want to be empty during quiet hours. Bots take up player slots, so make sure tf_bot_quota is lower than Max. Players in the startup parameters.
Bots need a navigation file (.nav) on the map with the same name as the map. For custom maps, upload it along with the .bsp file to the tf/maps folder, as described in Installing mods. Without a matching .nav file, your server can’t use bots on that map. If it’s missing, your server can generate it: switch to the map, then enter sv_cheats 1 followed by nav_generate in the Console tab. Depending on the map, this can take a few minutes; afterwards, the .nav file is in the tf/maps folder. Then reload the map, for example with changelevel and the map name, and set sv_cheats 0.
Bots can now fill your Team Fortress 2 server just the way you want. Find more useful commands in Server commands. If you have any questions, our support team is available every day! 🙂