Adding Bots
To add bots to a server, the following must be added to the server.cfg
:
tf_bot_quota "20"
tf_bot_auto_vacate "1"
tf_bot_quota_mode "fill"
tf_bot_difficulty 0
tf_bot_fire_weapon_allowed 1
There are a ton more options for bots, but this is the basic stuff to get up and running without having to manually add bots via rcon every time you game on your server.
tf_bot_quota
This set s the maximum number of bots for the server
tf_bot_vacate
This will make the bots automatically leave the server when a human player joins
tf_bot_quota_mode
This will fill the teams accordingly based on vacancy, or something like that.
normal |
fill |
match |
competitive |
The number of bots on the server equals bot_quota |
The server is filled with bots until there are at least bot_quota players on the server (humans + bots). Human players joining cause an existing bot to be kicked, human players leaving might cause a bot to be added |
The number of bots on the server equals the number of human players times bot_quota |
The number of inactive bots on each team with no human players equals bot_quota . It has the same side effect as bot_stop 1 , although being independent from this ConVar |
tf_bot_difficulty
0
= Easy, 1
= Normal, 2
= Hard, 3
= Expert
If this variable is not set, 0
is automatically selected
tb_bot_fire_weapon_allowed
This enables (1
) or disables (0
) the ability for bots to fire their weapons with some exceptions:
- Engineers can still build things, like sentry guns
- Some bots will fire in response (least on my server), but not very often at all
- Medics will still heal other team members
nav_generate
This isn't something you add to the server.cfg file. If you've added bots to your server, but they stay in the spawn area, it's because the map doesn't have a generated navigation mesh for the bots to move around. This is typical for non-standard maps, and the like.
- Start a server and press "~" (the key to the left of 1) to open up the console (enable the console through the options menu). Type the following commands in the console:
sv_cheats 1
(this will turn on the cheat mode for the server, and disable earning badges, etc. blah blah)nav_generate
this will stop the game play, and the server will generate what it needs to for the bots
After the server has generated the mesh, the server will restart the map. Don't forget to turn off sv_cheats
to re-enable badge earning and whatnot.