Difference between revisions of "Bots"

From Team Fortress Wiki
Jump to: navigation, search
(Add info on other bot command options)
(Changed header at the top to Other uses)
 
(127 intermediate revisions by 45 users not shown)
Line 1: Line 1:
[[Image:Tr_dustbowl0003.png|right|thumb|300px|A [[Soldier]] bot in action on the [[Dustbowl (Training)|Dustbowl Training]] map.]]
+
[[File:Tr_dustbowl0003.png|right|thumb|300px|A [[Soldier]] bot in action on the [[Dustbowl (Training)|Dustbowl Training]] map.]]
{{Update|Many of the bot commands have been changed, removed, or simply don't work.}}
+
{{Other uses|this=the computer-controlled players|Robot}}
 
 
{{hatnote|This page is about computer-controlled players in the game Team Fortress 2. For bots in [[Team Fortress Classic]], see [[Bots (Classic)]]. For bots on the [[Team Fortress Wiki]], see [[:Category:User bots]]. For robots introduced in the [[Mann vs. Machine (update)|Mann vs. Machine]] update, see [[Robots]]. For other uses, see [[Robot]].}}
 
  
 
{{Quotation|'''The Soldier'''|Human teammates might judge you, but will these soulless automatons? YES. They're not blind. But they ARE mute, so your incompetence is a secret they will take to their grave.}}
 
{{Quotation|'''The Soldier'''|Human teammates might judge you, but will these soulless automatons? YES. They're not blind. But they ARE mute, so your incompetence is a secret they will take to their grave.}}
  
A '''Bot''' or '''BOT''' is a [https://support.steampowered.com/kb_article.php?ref=9073-WOHK-7760| computer-controlled player] on a server.  There are two types of bots in ''Team Fortress 2'': AI bots and Puppet bots. AI bots are coded with sophisticated artificial intelligence designed to emulate player actions in game, and can be used without enabling [[cheats]]. Puppet bots have no AI coding, but are useful for testing and training. Puppet bots require the server to have cheats enabled, which also disables [[achievements]].
+
<!--
 +
  Attention:
 +
  All content related with cheater bots/Casual bots will be reverted. This is not the proper page, and it is covered enough in the page [[Cheating#Bots]]. Thanks!
 +
-->
 +
A '''bot''' is a computer-controlled player on a server.  There are two types of bots in ''Team Fortress 2'': AI bots and Puppet bots. AI bots are coded with sophisticated artificial intelligence designed to emulate player actions in game, and can be used without enabling [[cheats]]. Puppet bots have no AI coding, but are useful for testing and training. Puppet bots require the server to have cheats enabled, which also disables [[achievements]].
  
==AI bots==
+
==Stock AI bots==
AI bots are designed to emulate human players and are not directly controlled. Additionally, their [[classes]] are chosen at random. They use sophisticated AI code based on the PlayerBot and Infected AI featured in the ''Left 4 Dead'' series.<ref>[http://teamfortress.com/post.php?id=3279 Team Fortress Official Blog - Erectin a dispenser]</ref> AI bots do not require the server to have cheats enabled; therefore, achievements are enabled while playing with them. There is one exception, however; Bots do not see [[Deathcam]] shots when killed; therefore, a player cannot attain Deathcam-related achievements. Also, killing a bot with a [[Strange]] weapon will not increase the weapon's kill count, unless the weapon has a [[Strange Parts|Strange Part]]: Robots Destroyed applied to it, in which case, the kill will be added to the Strange Part and not the main counter.
+
The stock AI bots, or TFBots, are designed to emulate human players and are not directly controlled. Additionally, their [[classes]] are chosen at random. They use sophisticated AI code based on the PlayerBot and Infected AI featured in the ''Left 4 Dead'' series.<ref>[http://teamfortress.com/post.php?id=3279 Team Fortress Official Blog - Erectin a dispenser]</ref> AI bots do not require the server to have cheats enabled; therefore, achievements are enabled while playing with them. There is one exception, however; Bots do not see [[Deathcam]] shots when killed; therefore, a player cannot attain Deathcam-related achievements. Also, killing a bot with a [[Strange]] weapon will not increase the weapon's kill count, unless the weapon has a [[Strange Parts|Strange Part]]: Robots Destroyed applied to it, in which case, the kill will be added to the Strange Part and not the main counter.
 
 
AI bots come in four skill levels ranging from easy to expert. [https://steamcommunity.com/id/segmentation_fault Sigsegv] has compiled [https://steamcommunity.com/sharedfiles/filedetails/?id=572409016|a detailed explanation on the skill differences].
 
  
 
AI bots can be indirectly controlled to an extent:  
 
AI bots can be indirectly controlled to an extent:  
Line 20: Line 20:
 
* Bots will attempt to join teammates performing a partner taunt (e.g. the [[High Five!|High Five]]) or a group taunt (e.g. the [[Conga]]).
 
* Bots will attempt to join teammates performing a partner taunt (e.g. the [[High Five!|High Five]]) or a group taunt (e.g. the [[Conga]]).
  
===Current AI bot status===
+
=== Skill levels ===
AI bots are fully released{{cite|when were they fully/officially released?}}. Currently, all classes are working properly due to the [[Hatless Update]], including the once-buggy [[Spy]]. AI bots only work properly for most official [[King of the Hill]] maps, some [[Payload]] maps, Attack/Defend maps [[Dustbowl]] and [[Gorge]], [[Capture the Flag]] maps, and [[Mann Manor]] (on the latter two, bots can only be added by using the <kbd>tf_bot_add</kbd> command that can only be used after activating <kbd>sv_cheats 1</kbd> in console). The use of AI bots on non-supported maps is possible by following certain steps; however, they will not emulate human players as well.  
+
AI bots come in four skill levels ranging from easy to expert. Below is a table with a breakdown with some differences between bot skill levels.
  
Bots will not work properly on any [[PLR]] map as they either can't jump over the railings on [[Hightower]] or get stuck in a random corner in spawn; and bots have a dance party on any other [[PLR]] map (this may change in the future).{{cite|where is the future plan?}}
+
{{Bot skill levels}}
  
''Note: A [http://forums.steampowered.com/forums/showthread.php?t=1264447 pack of pre-made bot meshes] has been compiled for many popular maps.''
+
{{TFBot quiet weapons list}}
  
====AI bot names====
+
===Pathfinding===
The AI bots are programmed to have different names, with many of their names being references to ''Team Fortress 2'', Valve's other works, and computer programming. Many of these names have been requested on the [[Steam Users' Forums|Steam forums]]. <!--If you encounter other names that aren't on the list, please add them-->
+
====Maps with official bot support====
{{Bot names}}
+
{{Maps with bot support}}
AI bots names can also be customized by a player by typing in, for example, <kbd>tf_bot_add heavyweapons blue "Blu Hoovy"</kbd>; this example would put a [[BLU]] [[Heavy]] on the BLU team with the name "Blu Hoovy".
 
  
 
====Using bots on unsupported maps====
 
====Using bots on unsupported maps====
{{hatnote| See also: {{vdc|Navigation Meshes}}}}
+
{{hatnote|See also: [[vdc:Navigation Meshes|Navigation Meshes]] and {{vdc|Nav Mesh Editing}}}}
# Nav mesh editing requires cheats enabled, so type "<kbd>sv_cheats 1</kbd>" in the [[console]].
+
# Nav mesh editing requires cheats enabled, so type {{code|sv_cheats 1}} in the [[console]].
# Build the initial nav mesh using the "<kbd>nav_generate</kbd>" command.
+
# Build the initial nav mesh using the {{code|nav_generate}} command.
 
# Wait while the game generates AI paths, progress is tracked in the console.
 
# Wait while the game generates AI paths, progress is tracked in the console.
 
# Map will reload.
 
# Map will reload.
# Optionally tweak the generated nav mesh to add missing data and remove erroneous data. Use "<kbd>nav_edit 1</kbd>" to enter nav mesh editing mode.
+
# Verify the nav mesh exists on all stages of the map by using the {{code|nav_edit 1}} command, then traveling across all the stages. Use the {{code|nav_mark_walkable}} command on all of the stages without a nav mesh, then use the {{code|nav_generate}} command again to apply the changes.
 +
# Optionally tweak the generated nav mesh to add missing data and remove erroneous data. Use {{code|nav_edit 1}} to enter nav mesh editing mode.
 
# Reload/Restart the server (optional, but if it is not done, then achievements will be disabled).
 
# Reload/Restart the server (optional, but if it is not done, then achievements will be disabled).
# Open console and type ''"<kbd>tf_bot_add <number></kbd>"'' as above to add bots.
+
# Open console and type {{code|tf_bot_add <number>}} as above to add bots.
 
'''WARNING: The game is likely to crash if you edit the navigation mesh with bots enabled.'''
 
'''WARNING: The game is likely to crash if you edit the navigation mesh with bots enabled.'''
  
 +
Bots can be used on any map on which the above steps have been performed without having to repeat them, except for entering the {{code|tf_bot_add <number>}} command each time bots need to be added.
  
Bots can be used on any map on which the above steps have been performed without having to repeat them, except for entering the ''"<kbd>tf_bot_add <number></kbd>"'' command each time bots need to be added.
+
Auto-generated nav meshes work best on Control Points, King of the Hill, Payload, and Capture the Flag maps. On [[Mannpower]] maps, the bots will play as Capture the Flag, but be unable to use [[Grappling Hook]]s or intelligently use the Powerups they walk over.
 
 
Bots work best on Control Points, King of the Hill, Payload, and Capture the Flag maps. On [[Mannpower]] maps, they will treat it as Capture the Flag, but be unable to use [[Grappling Hook]]s and cannot intelligently use the Powerups they walk over.
 
 
 
====Maps with official bot support====
 
* [[Dustbowl]]
 
* [[Turbine]]
 
* [[Mann Manor]]
 
* [[Foundry (Control Point)|Foundry (CP)]]
 
* [[Badlands (Control Point)|Badlands (CP)]]
 
* [[Badlands (KOTH)]]
 
* [[Lakeside]]
 
* [[Granary (Control Point)|Granary (CP)]]
 
* [[Vanguard]]
 
* [[Gullywash]]
 
* [[Nucleus (KOTH)]]
 
* [[Sawmill (KOTH)]]
 
* [[Snakewater]]
 
* [[Viaduct]]
 
* [[Process]]
 
* [[Metalworks]]
 
* [[Badwater Basin]]
 
* [[Sunshine]]
 
* [[Gold Rush]]
 
* [[Swiftwater]]
 
* [[Hoodoo]]
 
* [[Thunder Mountain]]
 
* [[Upward]]
 
* [[Gorge]]
 
* [[Barnblitz]]
 
* [[Kong King]]
 
  
====Maps with no official bot support====
+
Setting the value of the console command {{code|tf_bot_offense_must_push_tim}} to {{code|0}} allows bots to fight each other in maps without objectives that they can recognize, unless the map doesn't have any respawn room entities.
Complete list (may need updating):
 
* [[Hydro]]
 
* [[DeGroot Keep]]
 
* [[Hightower]]
 
* [[Frontier]]
 
* [[Pipeline]]
 
* [[Steel]]
 
* [[2Fort]]
 
* [[2Fort Invasion]]
 
* [[Double Cross]]
 
* [[Landfall]]
 
* [[Sawmill (CTF)]]
 
* [[Well (CTF)]]
 
* [[5Gorge]]
 
* [[Coldfront]]
 
* [[Fastlane]]
 
* [[Freight]]
 
* [[Powerhouse]]
 
* [[Sinshine]]
 
* [[Well]]
 
* [[Yukon]]
 
* [[Egypt]]
 
* [[Gorge Event]]
 
* [[Gravel Pit]]
 
* [[Junction]]
 
* [[Mercenary Park]]
 
* [[Mossrock]]
 
* [[Mountain Lab]]
 
* [[Snowplow]]
 
* [[Steel]]
 
* [[Standin]]
 
* [[Borneo]]
 
* [[Brimstone]]
 
* [[Cactus Canyon]]
 
* [[Enclosure]]
 
* [[Frontier]]
 
* [[Hellstone]]
 
* [[Snowycoast]]
 
* [[Swiftwater]]
 
* [[Banana Bay]]
 
* [[Helltower]]
 
* [[Hightower]]
 
* [[Nightfall]]
 
* [[Pipeline]]
 
* [[Badlands (Arena)]]
 
* [[Byre]]
 
* [[Granary (Arena)]]
 
* [[Lumberyard]]
 
* [[Nucleus (Arena)]]
 
* [[Offblast]]
 
* [[Ravine]]
 
* [[Sawmill]]
 
* [[Watchtower]]
 
* [[Well (Arena)]]
 
* [[Brazil]]
 
* [[Eyeaduct]]
 
* [[Ghost Fort]]
 
* [[Harvest]]
 
* [[Harvest Event]]
 
* [[Highpass]]
 
* [[Lazarus]]
 
* [[Maple Ridge Event]]
 
* [[Moonshine Event]]
 
* [[Probed]]
 
* [[Suijin]]
 
* [[Carnival of Carnage]]
 
* [[Doomsday]]
 
* [[Cloak]]
 
* [[Bigrock]]
 
* [[Coal Town]]
 
* [[Decoy]]
 
* [[Ghost Town]]
 
* [[Mannhattan]]
 
* [[Mannworks]]
 
* [[Rottenburg]]
 
* [[Asteroid]]
 
* [[Foundry (Capture the Flag)|Foundry (CTF)]]
 
* [[Gorge (Capture the flag)|Gorge (CTF)]]
 
* [[Hellfire]]
 
* [[Thunder Mountain]]
 
* [[Brickyard]]
 
* [[District]]
 
* [[Timberlodge]]
 
* [[Pit of Death]]
 
* [[Watergate]]
 
  
====AI bot behavior====
+
==== Stock maps with no official bot support ====
* Bots currently only use the default [[loadout]] (although they can be given non-Stock weapons with a custom mod/plugin).
+
{{Maps with no bot support}}
* Bots on Easy difficulty will rarely, if ever, use any weapon other than their primary weapon. Bots on higher difficulties will switch to and use their secondary weapon as soon as the ammunition of their primary weapon is spent.
 
* [[Spy]] and [[Sniper]] bots do not appear on Easy mode; they will only appear on Normal mode and beyond.
 
* Bots currently cannot execute special [[jump]]s (such as rocket jumps) or [[haul]] buildings.
 
* If a bot kills a player, they roll a chance to [[taunt]] immediately after, and if it succeeds, they will taunt even if they are under enemy fire. This behavior applies to [[Robots]] in [[Mann vs. Machine (game mode)|Mann vs. Machine mode]].
 
* Spy bots (and players) are properly ignored by other bots while [[disguise]]d. However, upon 'touching' any enemy bot, [[Sapper|sapping]], shooting, or [[Cloak]]ing, all other bots who see it happen will declare the bot/player a Spy and won't forget who they are until they change disguises while unseen or until the bot(s) who declared them a Spy dies or feigns death with the [[Dead Ringer]].
 
* [[Pyro]] bots will use the [[compression blast]] against projectiles and opponents with unusual frequency if on difficulties other than Easy.
 
* [[Medic]] bots will usually heal all other classes before Snipers (and to a lesser extent Engineers) even if the "Medic!" voice command is used.
 
* Medic bots tend to favor Heavies, Soldiers, Demomen, and Pyros, if being played by a human. If a no human player is one of these classes, they are not likely to be pocketed.
 
* A Medic bot with an ÜberCharge ready will immediately activate the charge if he gets hurt. This behavior is used by [[Über Medic]]s in [[Mann vs. Machine (game mode)|Mann vs. Machine mode]].
 
* If a disguised Spy bot, on Expert difficulty, sees enemy Spies cloak, he will be able to follow them while they are invisible regardless of whether their Cloak is blinking or not.
 
* Bots do not attack during setup time unless they are attacked first (with the exception of [[Demoman]] bots planting stickybombs).
 
* Engineer bots do not upgrade (or even remove Sappers from) their Teleporters, and sometimes don't repair their Sentry Guns even when they're not under fire.
 
* Engineer bots will never repair or upgrade a friendly Engineer bot's building, unless that building is in the way of the Engineer's target.
 
* Bots, excluding Engineers, Snipers, and Spies, will stay in their spawn positions on setup when attacking in a [[Attack/Defend]] map or a [[Payload]] map.
 
* Spy bots, when spotted by another bot (possibly player), will not attempt to backstab and will instead switch to their [[Revolver]] and shoot while retreating.
 
* Demoman bots, once they know where a Sentry Gun is (usually after dying to one), will be able to stand out of range of the sentry and perfectly aim and time their stickybomb charges to land precisely where the Sentry Gun is. Walls and ceilings may occasionally get in the way of the stickybombs' flight path, though.
 
 
 
====Bugs====
 
* Bots may try to walk/shoot through unmovable objects such as walls.
 
* Whenever a player/bot cloaks/decloaks or disguises/undisguises, the bots will 'see' players who are behind them and turn around, even if out of the bot's [[field of view]]. Note that this isn't due to any sounds made by the player (footsteps, miscellaneous weapon noises, etc.).
 
* Though rarely, bots may stand inside one another during usage of an Engineer's Teleporter, and get stuck (can't move).
 
* When bots use [[voice commands]] (such as "Spy!" and "Move Up!"), text versions of the voice commands do not display.
 
* A [[Medic]] bot who is [[healing]] a player will not avoid enemy fire or collect [[health pickups]], even if he is at critically low health.
 
* Bots are able to move while taunting, making the [[Holiday Punch]] ineffective.
 
* Recently attacked Medic bots will often fail to use their [[Syringe Gun]] to deal with enemies at non-[[melee]] range, instead switching to their [[Bonesaw]], or even to their [[Medi Gun]] on extremely rare occasions.
 
* Medic bots will fail to lead their aim or to compensate for gravity while firing the Syringe Gun. This may be due to the Syringe Gun not being properly identified as a non-[[hitscan]] weapon in the bot AI code.
 
* Spy bots are able to see and follow cloaked Spies (AI or player) should one give himself away, regardless of difficulty level.
 
* Even if a Spy is disguised as a class of his team (player only, as bots will never do this), enemies will still point him out as a Spy should he bump into an enemy.
 
* Bots abide by Auto-balance rules. To be able to spawn bots on a specific team, you must set {{cvar|mp_teams_unbalance_limit}} to 0.
 
* Engineer bots may ignore their [[buildings]] until they're destroyed.
 
* Heavy bots will sometimes try to fire their Minigun even when out of ammo. (Although it seems to occur abundantly when the bot difficulty is set below Advanced)
 
* Medic bots on the losing team will occasionally commit suicide during [[Humiliation]] when there are no enemies nearby. Players are unable to do the same, even using commands.
 
* Setting the loadout menu's preview to BLU will cause RED bots to appear BLU.
 
* Currently, bots do not work on the following types of game modes or maps, even with a generated navigation mesh. (Spies and Snipers may work, though.)
 
** [[Arena|Arena Mode]] <small>{{tooltip|NOTE|Bots will only move after being attacked or approached, and will still stay in spawn indefinitely. snipers always work though, so you can play a normal working game if you force the sniper class with the command tf_bot_force_class sniper}}</small>
 
** [[Payload#Payload Race|Payload Race]]
 
** [[Mann Vs. Machine (game mode)|Mann Vs. Machine]] <small>{{tooltip|NOTE|While the actual robot team works, any player-sided bots rarely work. They know to open fire on the enemy team though, and on occasion a bot may step through a player-placed teleporter, but only one or two at most. Spies always work though, so it's possible to play with many Spies on your side that function properly. Engineer bots may also be used, they behave like the engineer bots featured in Mann vs Machine}}</small>
 
** [[Special Delivery (game mode)|Special Delivery]]
 
** [[Robot Destruction]]
 
** [[Cactus Canyon]] <small>{{tooltip|NOTE|Section 2 is not being mapped in the navigation mesh}}</small>
 
** [[Mannpower]] <small>{{tooltip|NOTE|Cannot use grappling hooks, or properly use powerups.}}</small>
 
** [[PASS Time]] <small>{{tooltip|NOTE|Only spies and snipers will leave spawn, and they won't pick up or follow the ball. The ball can be passed to them, though.}}</small>
 
** [[Player Destruction]] <small>{{tooltip|NOTE|Again, only spies and sometimes snipers will leave spawn, waiting outside the enemy's spawn while disguised if no human players are present.}}</small>
 
** [[Snowycoast]] <small>{{tooltip|NOTE|The RED team will not leave spawn or setup a defence around the cart, and the BLU team will get stuck on a wall in attempting to push the cart. Spies on the BLU team will not move at all.}}</small>
 
* Bots that have their [[Melee]] weapons out will occasionally not switch to their other weapons, even if they pick up ammo.
 
** This can be fixed by either killing them or just randomly.
 
* After the [[Jungle Inferno Update]] bots spawned with specific parameters (example:{{cvar|tf_bot_add 5 pyro blue normal}}) will die in their spawnrooms. This can be prevented with the command: {{cvar|tf_bot_reevaluate_class_in_spawnroom 0}}, which requires setting {{cvar|sv_cheats}} to 1.
 
  
 
===AI bot commands===
 
===AI bot commands===
<small>For a more comprehensive list of commands, see the [https://developer.valvesoftware.com/wiki/List_of_TF2_console_commands_and_variables Valve list of TF2 console commands and variables].</small>
+
{{Hatnote|For a more comprehensive list of commands, see the {{vdc|List of TF2 console commands and variables}}}}
<br>
 
 
 
 
To use AI bots on supported maps, the server administrator should type the following commands into the console (some may require <kbd>sv_cheats</kbd> to be set to 1):
 
To use AI bots on supported maps, the server administrator should type the following commands into the console (some may require <kbd>sv_cheats</kbd> to be set to 1):
  
Line 226: Line 63:
 
|This command will create one or more AI bots of random classes on random teams.  They will also be assigned random names from a default set.
 
|This command will create one or more AI bots of random classes on random teams.  They will also be assigned random names from a default set.
  
;Syntax: <code>tf_bot_add [<''count''>] [<''class''>] [<''team''>] [<''difficulty''>] [<''name''>]</code>
+
;Syntax: <code>tf_bot_add [<''count''>] [<''class''>] [<''team''>] [<''difficulty''>] [<''name''>] [''noquota'']</code>
  
 
;Parameters:
 
;Parameters:
Line 232: Line 69:
 
::Specifies the number of bots to spawn.  If omitted, one bot is spawned.
 
::Specifies the number of bots to spawn.  If omitted, one bot is spawned.
 
::Trying to create bots beyond maxplayers will fail with an error message in the console.
 
::Trying to create bots beyond maxplayers will fail with an error message in the console.
::If <kbd>mp_team_unbalance_limit</kbd> is too low, adding more bots onto one team may still result in autobalancing to even out team numbers.
+
::If <kbd>mp_teams_unbalance_limit</kbd> is too low, adding more bots onto one team may still result in autobalancing to even out team numbers.
  
 
:<code><''class''></code>
 
:<code><''class''></code>
Line 245: Line 82:
 
:<code><''name''></code>
 
:<code><''name''></code>
 
::Sets the connecting bot's name.
 
::Sets the connecting bot's name.
 +
 +
:<code>''noquota''</code>
 +
::If the exact phrase 'noquota' is present, the bot is excluded from the bot quota management system. See <code>tf_bot_quota</code>.
  
 
;Example: <kbd>tf_bot_add 3 heavyweapons red easy</kbd> will add three Heavies to the RED team at the easy skill level.
 
;Example: <kbd>tf_bot_add 3 heavyweapons red easy</kbd> will add three Heavies to the RED team at the easy skill level.
 
|-
 
|-
|{{nw|<big>'''<var>tf_bot_difficulty</var>'''</big>}}
+
|{{nw|<big>'''<code>tf_bot_difficulty</code>'''</big>}}
 
|Defines the skill of bots joining the game.   
 
|Defines the skill of bots joining the game.   
  
;Syntax: <kbd>tf_bot_difficulty <''level''></kbd>
+
;Syntax: <code>tf_bot_difficulty <''level''></code>
  
 
;Parameters:
 
;Parameters:
Line 259: Line 99:
 
;Example: <kbd>tf_bot_difficulty 2</kbd> will set all bots created after this command to "Hard" difficulty.
 
;Example: <kbd>tf_bot_difficulty 2</kbd> will set all bots created after this command to "Hard" difficulty.
 
|-
 
|-
|{{nw|<big>'''<var>tf_bot_fire_weapon_allowed</var>'''</big>}}
+
|{{nw|<big>'''<code>tf_bot_fire_weapon_allowed</code>'''</big>}}
 
|Determines whether bots should fire weapons. If disabled, bots can still use certain non-damaging weapons such as the [[Medi Gun]]. As one exception, though, [[Medic]] bots will still fire their [[Syringe Gun]]. Additionally, [[Demoman]] bots will still be able to detonate existing stickies, but will not place any more.
 
|Determines whether bots should fire weapons. If disabled, bots can still use certain non-damaging weapons such as the [[Medi Gun]]. As one exception, though, [[Medic]] bots will still fire their [[Syringe Gun]]. Additionally, [[Demoman]] bots will still be able to detonate existing stickies, but will not place any more.
  
;Syntax: <kbd>tf_bot_fire_weapon_allowed <''integer''></kbd>
+
;Syntax: <code>tf_bot_fire_weapon_allowed <''integer''></code>
  
 
;Parameters:
 
;Parameters:
Line 270: Line 110:
 
;Example: <kbd>tf_bot_fire_weapon_allowed 0</kbd> will result in bots not using their weapons, with a few exceptions.
 
;Example: <kbd>tf_bot_fire_weapon_allowed 0</kbd> will result in bots not using their weapons, with a few exceptions.
 
|-
 
|-
|{{nw|<big>'''<var>tf_bot_force_class</var>'''</big>}}
+
|{{nw|<big>'''<code>tf_bot_force_class</code>'''</big>}}
 
|If set to a class name, all TFBots will respawn as that class.
 
|If set to a class name, all TFBots will respawn as that class.
  
;Syntax: <kbd>tf_bot_force_class <''class''></kbd>
+
;Syntax: <code>tf_bot_force_class <''class''></code>
  
 
;Parameters:
 
;Parameters:
Line 281: Line 121:
 
;Example: <code>tf_bot_force_class medic</code> will make all TFBots respawn as Medic.
 
;Example: <code>tf_bot_force_class medic</code> will make all TFBots respawn as Medic.
 
|-
 
|-
|{{nw|<big>'''<var>tf_bot_force_jump</var>'''</big>}}
+
|{{nw|<big>'''<code>tf_bot_force_jump</code>'''</big>}}
 
|If enabled, forces bots to repeatedly jump over and over.
 
|If enabled, forces bots to repeatedly jump over and over.
  
;Syntax: <kbd>tf_bot_force_jump <''integer''></kbd>
+
;Syntax: <code>tf_bot_force_jump <''integer''></code>
  
 
;Parameters:
 
;Parameters:
Line 292: Line 132:
 
;Example: <kbd>tf_bot_force_jump 1</var> will force AI bots to repeatedly jump.
 
;Example: <kbd>tf_bot_force_jump 1</var> will force AI bots to repeatedly jump.
 
|-
 
|-
|{{nw|<big>'''<var>tf_bot_join_after_player</var>'''</big>}}
+
|{{nw|<big>'''<code>tf_bot_join_after_player</code>'''</big>}}
 
|If nonzero, bots wait until a player joins before entering the game. This only applies to quota spawned bots.
 
|If nonzero, bots wait until a player joins before entering the game. This only applies to quota spawned bots.
  
;Syntax: <kbd>tf_bot_join_after_player <''integer''></kbd>
+
;Syntax: <code>tf_bot_join_after_player <''integer''></code>
  
 
;Parameters:
 
;Parameters:
Line 303: Line 143:
 
;Example: <kbd>tf_bot_join_after_player 0</kbd> will make TFBots join the game when added even if no players are on a team.
 
;Example: <kbd>tf_bot_join_after_player 0</kbd> will make TFBots join the game when added even if no players are on a team.
 
|-
 
|-
|{{nw|<big>'''<var>tf_bot_keep_class_after_death</var>'''</big>}}
+
|{{nw|<big>'''<code>tf_bot_keep_class_after_death</code>'''</big>}}
 
|If zero, bots will always respawn as a different class.
 
|If zero, bots will always respawn as a different class.
  
;Syntax: <kbd>tf_bot_keep_class_after_death <''integer''></kbd>
+
;Syntax: <code>tf_bot_keep_class_after_death <''integer''></code>
  
 
;Parameters:
 
;Parameters:
Line 318: Line 158:
 
This command will remove one or all AI bots.
 
This command will remove one or all AI bots.
  
;Syntax: <kbd>tf_bot_kick <''name/all''></kbd>
+
;Syntax: <code>tf_bot_kick <''name/all/team''></code>
  
 
;Parameters:
 
;Parameters:
:<code><''name/all''></code>
+
:<code><''name/all/team''></code>
::Specifies the name of bot to remove or all.
+
::Specifies the name of bot to remove, the team to remove, or all.
  
 
;Example: <kbd>tf_bot_kick CEDA</kbd> will kick the TFBot named "CEDA" if one exists. Like <kbd>tf_bot_kill</kbd>, quotation marks will be needed to kick bots with names that consist of 2 or more words, such as <kbd>tf_bot_kick "Black Mesa"</kbd> to kick the TFBot named "Black Mesa".
 
;Example: <kbd>tf_bot_kick CEDA</kbd> will kick the TFBot named "CEDA" if one exists. Like <kbd>tf_bot_kill</kbd>, quotation marks will be needed to kick bots with names that consist of 2 or more words, such as <kbd>tf_bot_kick "Black Mesa"</kbd> to kick the TFBot named "Black Mesa".
Line 330: Line 170:
 
This command will kill one or all AI bots.
 
This command will kill one or all AI bots.
  
;Syntax: <kbd>tf_bot_kill <''name/all''></kbd>
+
;Syntax: <code>tf_bot_kill <''name/all/team''></code>
  
 
;Parameters:
 
;Parameters:
:<code><''name/all''></code>
+
:<code><''name/all/team''></code>
::Specifies the name of bot to kill or all.
+
::Specifies the name of bot to kill, the team to kill, or all.
  
 
;Example: <kbd>tf_bot_kill CEDA</kbd> will kill the TFBot named "CEDA" if one exists. Quotation marks will be needed to kill bots with names that consist of 2 or more words, such as <kbd>tf_bot_kill "Black Mesa"</kbd> to kill the TFBot named "Black Mesa".
 
;Example: <kbd>tf_bot_kill CEDA</kbd> will kill the TFBot named "CEDA" if one exists. Quotation marks will be needed to kill bots with names that consist of 2 or more words, such as <kbd>tf_bot_kill "Black Mesa"</kbd> to kill the TFBot named "Black Mesa".
 
|-
 
|-
|{{nw|<big>'''<var>tf_bot_melee_only</var>'''</big>}}
+
|{{nw|<big>'''<code>tf_bot_melee_only</code>'''</big>}}
 
|Determines whether a bot should only use melee weapons or not.
 
|Determines whether a bot should only use melee weapons or not.
  
;Syntax: <kbd>tf_bot_melee_only <''integer''></kbd>
+
;Syntax: <code>tf_bot_melee_only <''integer''></code>
  
 
;Parameters:
 
;Parameters:
Line 349: Line 189:
 
;Example: <kbd>tf_bot_melee_only 1</kbd> will have bots using only melee weapons.
 
;Example: <kbd>tf_bot_melee_only 1</kbd> will have bots using only melee weapons.
 
|-
 
|-
|{{nw|<big>'''<var>tf_bot_prefix_name_with_difficulty</var>'''</big>}}
+
|{{nw|<big>'''<code>tf_bot_prefix_name_with_difficulty</code>'''</big>}}
 
|If nonzero, append the skill level of the bot to the bot's name
 
|If nonzero, append the skill level of the bot to the bot's name
  
;Syntax: <kbd>tf_bot_prefix_name_with_difficulty <''integer''></kbd>
+
;Syntax: <code>tf_bot_prefix_name_with_difficulty <''integer''></code>
  
 
;Parameters:
 
;Parameters:
Line 358: Line 198:
 
::Either 1 or 0. Default is 0 (disabled).
 
::Either 1 or 0. Default is 0 (disabled).
  
;Example: <kbd>tf_bot_prefix_name_with_difficulty 1</kbd> will cause added bots to have names like "1 Aimbot" (normal) and "3 Saxton Hale" (expert).
+
;Example: <kbd>tf_bot_prefix_name_with_difficulty 1</kbd> will cause added bots to have names like "Normal Aimbot" and "Expert Saxton Hale".
 
|-
 
|-
|{{nw|<big>'''<var>tf_bot_quota</var>'''</big>}}
+
|{{nw|<big>'''<code>tf_bot_quota</code>'''</big>}}
 
|Determines the total number of TFBots in the game. Only has effect if <var>tf_bot_quota_mode</var> = "<code>fill</code>" or "<code>match</code>".
 
|Determines the total number of TFBots in the game. Only has effect if <var>tf_bot_quota_mode</var> = "<code>fill</code>" or "<code>match</code>".
  
;Syntax: <kbd>tf_bot_quota <''integer''></kbd>
+
;Syntax: <code>tf_bot_quota <''integer''></code>
  
 
;Parameters:
 
;Parameters:
Line 371: Line 211:
 
;Example: <kbd>tf_bot_quota 2</kbd>, if <var>tf_bot_quota_mode</var> = <code>match</code>, will add two bots to the server for every one human.
 
;Example: <kbd>tf_bot_quota 2</kbd>, if <var>tf_bot_quota_mode</var> = <code>match</code>, will add two bots to the server for every one human.
 
|-
 
|-
|{{nw|<big>'''<var>tf_bot_quota_mode</var>'''</big>}}
+
|{{nw|<big>'''<code>tf_bot_quota_mode</code>'''</big>}}
 
|Determines the type of quota.
 
|Determines the type of quota.
  
;Syntax: <kbd>tf_bot_quota_mode<''normal/fill/match''></kbd>
+
;Syntax: <code>tf_bot_quota_mode<''normal/fill/match''></code>
  
 
;Parameters:
 
;Parameters:
Line 384: Line 224:
 
;Example: <kbd>tf_bot_quota_mode fill</kbd> will always keep (bot_quota - # of human players) bots in the game.
 
;Example: <kbd>tf_bot_quota_mode fill</kbd> will always keep (bot_quota - # of human players) bots in the game.
 
|-
 
|-
|{{nw|<big>'''<var>tf_bot_taunt_victim_chance</var>'''</big>}}
+
|{{nw|<big>'''<code>tf_bot_taunt_victim_chance</code>'''</big>}}
 
|Determines how often a Bot will taunt a human victim.
 
|Determines how often a Bot will taunt a human victim.
  
;Syntax: <kbd>tf_bot_taunt_victim_chance <''integer''></kbd>
+
;Syntax: <code>tf_bot_taunt_victim_chance <''integer''></code>
  
 
;Parameters:
 
;Parameters:
Line 396: Line 236:
 
:<kbd>tf_bot_taunt_victim_chance 100</kbd> Bots will always taunt after killing a human player.
 
:<kbd>tf_bot_taunt_victim_chance 100</kbd> Bots will always taunt after killing a human player.
 
|-
 
|-
|{{nw|<big>'''<var>tf_bot_warp_team_to_me</var>'''</big>}}
+
|{{nw|<big>'''<code>tf_bot_warp_team_to_me</code>'''</big>}}
 
|Teleports your team's bots to your position. Requires <code>sv_cheats 1</code>.
 
|Teleports your team's bots to your position. Requires <code>sv_cheats 1</code>.
  
;Syntax: <kbd>tf_bot_warp_team_to_me</kbd>
+
;Syntax: <code>tf_bot_warp_team_to_me</code>
  
 
;Parameters:
 
;Parameters:
Line 405: Line 245:
 
|}
 
|}
  
=== Third-Party Bots ===
+
===Current AI bot status===
As of now, there is only one other bot that is still being developed for TF2: RCBot2.
+
AI bots are fully released{{cite|when were they fully/officially released?}}. Currently, all classes are working properly due to the [[Hatless Update]], including the once-buggy [[Spy]]. AI bots only work properly for most official [[King of the Hill]] maps, some [[Payload]] maps, Attack/Defend maps [[Dustbowl]] and [[Gorge]], [[Capture the Flag]] maps, and [[Mann Manor]] (on the latter two, bots can only be added by using the <kbd>tf_bot_add</kbd> command in the console). The use of AI bots on non-supported maps is possible by following certain steps; however, they will not emulate human players as well.  
The bot was created and is being maintained by Cheeseh, and the website can be found [http://rcbot.bots-united.com/ here].
 
  
Players can also try [APG] Foundation's Nightly builds which are updated and enhanced to work on those TF2 latest updates that would corrupt the bots. However it will take some work and finding the new hookinfo for the bots to function. Be sure to use Hookinfo tool and adjust the config.ini offset values, using [https://github.com/APGRoboCop/rcbot2/releases this] Nightly version (Latest update is 1.04 v491-APG since 26th May 2019)
+
Bots will not work properly on any [[PLR]] map as they either can't jump over the railings on [[Hightower]] or get stuck in a random corner in spawn; and bots have a dance party on any other [[PLR]] map (this may change in the future).{{cite|where is the future plan?}}
  
The bots run on a waypoint system and must be manually setup by a player instead of typing a command. RCBot2 are their own separate bot, so they can be used alongside the regular TFBots if one so chooses.  
+
====AI bot behavior====
 +
* Bots currently only use the default [[loadout]] (although they can be given non-Stock weapons with a custom mod/plugin).
 +
* Bots on Easy difficulty will rarely, if ever, use any weapon other than their primary weapon. Bots on higher difficulties will switch to and use their secondary weapon as soon as the ammunition of their primary weapon is spent, or to compensate for the distance of their target.
 +
* Bots currently cannot execute special [[jump]]s (such as rocket jumps) or [[haul]] buildings.
 +
* If a bot kills a player, they roll a chance to [[taunt]] immediately after, and if it succeeds, they will taunt even if they are under enemy fire. However, bots will not taunt if carrying the enemy intelligence. This behavior applies to [[Robots]] in [[Mann vs. Machine (game mode)|Mann vs. Machine mode]].
 +
* Spy bots (and players) are properly ignored by other bots while [[disguise]]d. However, upon 'touching' any enemy bot, [[Sapper|sapping]], shooting, or [[Cloak]]ing, all other bots who see it happen will declare the bot/player a Spy and won't forget who they are until they change disguises while unseen or until the bot(s) who declared them a Spy dies or feigns death with the [[Dead Ringer]].
 +
* [[Pyro]] bots will use the [[compression blast]] against projectiles and opponents with unusual frequency if on difficulties other than Easy.
 +
* [[Medic]] bots will usually heal all other classes before Snipers (and to a lesser extent Engineers) even if the "Medic!" voice command is used.
 +
* Medic bots tend to favor Heavies, Soldiers, Demomen, and Pyros, if being played by a human. If no human player is one of these classes, they are not likely to be pocketed.
 +
* A Medic bot with an ÜberCharge ready will immediately activate the charge if he gets hurt. This behavior is used by [[Über Medic]]s in [[Mann vs. Machine (game mode)|Mann vs. Machine mode]].
 +
* Bots do not attack during setup time unless they are attacked first (with the exception of [[Demoman]] bots planting stickybombs).
 +
* Engineer bots do not upgrade (or even remove Sappers from) their Teleporters, and sometimes don't repair their Sentry Guns even when they're not under fire.
 +
* Engineer bots will never repair or upgrade a friendly Engineer bot's building, unless that building is in the way of the Engineer's target.
 +
* Bots, excluding Engineers, Snipers, and Spies, will stay in their spawn positions on setup when attacking in a [[Attack/Defend]] map or a [[Payload]] map.
 +
* Spy bots, when spotted by another bot (possibly player), will not attempt to backstab and will instead switch to their [[Revolver]] and shoot while retreating.
 +
* Demoman bots, once they know where a Sentry Gun is (after seeing, getting shot by, or dying to one), will be able to stand out of range of the sentry and perfectly aim and time their stickybomb charges to land precisely where the Sentry Gun is. Walls and ceilings may occasionally get in the way of the stickybombs' flight path, though.
 +
* Sniper bots, upon scoping in and not finding a target, will use one of the "Negative" [[Sniper voice commands#Voice Menu 3|voice commands]]
 +
* Friendly Medics will tend to heal a disguised Spy.
 +
 
 +
====Bugs====
 +
* Bots may try to walk/shoot through unmovable objects such as walls.
 +
* Whenever a player/bot cloaks/decloaks or disguises/undisguises, the bots will 'see' players who are behind them and turn around, even if out of the bot's [[field of view]]. Note that this isn't due to any sounds made by the player (footsteps, miscellaneous weapon noises, etc.).
 +
* Though rarely, bots may stand inside one another during usage of an Engineer's Teleporter, and get stuck (can't move).
 +
* When bots use [[voice commands]] (such as "Spy!" and "Move Up!"), text versions of the voice commands do not display.
 +
* A [[Medic]] bot who is [[healing]] a player will not avoid enemy fire or collect [[health pickups]], even if he is at critically low health.
 +
* Bots are able to move while taunting, making the [[Holiday Punch]] ineffective.
 +
* Recently attacked Medic bots will often fail to use their [[Syringe Gun]] to deal with enemies at non-[[melee]] range, instead switching to their [[Bonesaw]], or even to their [[Medi Gun]] on extremely rare occasions.
 +
* Medic bots will fail to lead their aim or to compensate for gravity while firing the Syringe Gun. This may be due to the Syringe Gun not being properly identified as a non-[[hitscan]] weapon in the bot AI code.
 +
* Spy bots are able to see and follow cloaked Spies (AI or player) should one give himself away, regardless of difficulty level.
 +
* Even if a Spy is disguised as a class of his team (player only, as bots will never do this), enemies will still point him out as a Spy should he bump into an enemy.
 +
* Bots abide by Auto-balance rules. To be able to spawn bots on a specific team, you must set {{cvar|mp_teams_unbalance_limit}} to 0.
 +
* Engineer bots may ignore their [[buildings]] until they're destroyed.
 +
* Heavy bots will sometimes try to fire their Minigun even when out of ammo. (Although it seems to occur abundantly when the bot difficulty is set below Advanced)
 +
* Medic bots on the losing team will occasionally commit suicide during [[Humiliation]] when there are no enemies nearby. Players are unable to do the same, even using commands.
 +
* Setting the loadout menu's preview to BLU will cause RED bots to appear BLU.
 +
* Currently, bots do not work on the following types of game modes or maps, even with a generated navigation mesh. (Spies and Snipers may work, though.)
 +
** [[Arena]] and [[Versus Saxton Hale]] Modes <small>{{tooltip|NOTE|Bots will only move after being attacked or approached, and will still stay in spawn indefinitely. Snipers and Spies always work, and Engineers will start to work once the Control Point is unlocked. You can play a normal working game if you force the Sniper or Spy class with the command tf_bot_force_class}}</small>
 +
** [[Payload#Payload Race|Payload Race]] <small>{{tooltip|NOTE|Only Engineers, Snipers, and Spies will leave spawn.}}</small>
 +
** [[Mann Vs. Machine (game mode)|Mann Vs. Machine]] <small>{{tooltip|NOTE|While the actual robot team works, any player-sided bots rarely work. They know to open fire on the enemy team and on occasion a bot may step through a player-placed Teleporter, but only one or two at most. Spies will always work, so it is possible to play with only Spies. Engineer bots may also be used, they behave like the Engineer Robots. Bots cannot purchase upgrades.}}</small>
 +
** [[Special Delivery (game mode)|Special Delivery]]
 +
** [[Robot Destruction]]
 +
** [[Cactus Canyon]] <small>{{tooltip|NOTE|Section 2 is not being mapped in the navigation mesh.}}</small>
 +
** [[Mannpower]] <small>{{tooltip|NOTE|Cannot use grappling hooks, or properly use powerups.}}</small>
 +
** [[PASS Time]] <small>{{tooltip|NOTE|Only Spies and Snipers will leave spawn, and they won't pick up or follow the ball. The ball can be passed to them, though.}}</small>
 +
** [[Player Destruction]] <small>{{tooltip|NOTE|Again, only Spies and sometimes Snipers will leave spawn, waiting outside the enemy's spawn while disguised if no human players are present.}}</small>
 +
** [[Snowycoast]] <small>{{tooltip|NOTE|The RED team will not leave spawn or setup a defence around the cart, and the BLU team will get stuck on a wall in attempting to push the cart. Spies on the BLU team will not move at all.}}</small>
 +
** [[Snowplow]] <small>{{tooltip|NOTE|The RED team will not leave spawn and setup a defense during setup time, and the BLU team will attempt to push the train as if it were a Payload. Section 2 is not being mapped in the navigation mesh.}}</small>
 +
** [[Byre]] <small>{{tooltip|NOTE|Only Engineers will leave spawn.}}</small>
 +
** [[Nightfall]] and [[Pipeline]] <small>{{tooltip|NOTE|Only section 3 is mapped in the navigation mesh.}} </small>
 +
** [[Hassle Castle]] <small>{{tooltip|NOTE|RED bots will work perfectly fine, but BLU bots will never leave spawn, with the exception of Scouts and Spies.}}</small>
 +
* Bots that have their [[Melee]] weapons out will occasionally not switch to their other weapons, even if they pick up ammo.
 +
** This can be fixed by either killing them or just randomly.
 +
* After the [[Jungle Inferno Update]], bots spawned with specific parameters (example:{{cvar|tf_bot_add 5 pyro blue normal}}) will die in their spawnrooms. This can be prevented with the command: {{cvar|tf_bot_reevaluate_class_in_spawnroom 0}}, which requires setting {{cvar|sv_cheats}} to 1.
  
===RCBot2 Features===
+
===AI bot names===
*Soldier bots can rocket jump and Demoman bots can sticky jump (provided that the map has waypoints for them).
+
The AI bots are programmed to have different names, with many of their names being references to ''Team Fortress 2'', Valve's other works, and computer programming. Many of these names have been requested on the [[Steam Users' Forums|Steam forums]]. <!--If you encounter other names that aren't on the list, please add them-->
*Engineer bots now work properly on CTF and other maps.
 
*Bots can use custom loadouts such as The Huntsman and Bonk! Atomic Punch.
 
*Bots can "spycheck".  If a Spy is disguised as one of the bots, and the bot who they are disguised as sees them, the bot will attack on sight.
 
*Bots can use voice commands properly. Text will appear in the chat unlike TFBots.
 
*Bots can be on the defending team in Mann VS Machine, but are unable to purchase upgrades.
 
*If playing on a CP map, the bots will "mess around" until the round starts.  They will randomly hit players with their Melee weapon and spam voice commands, similar to many human players.
 
*Engineers can move their buildings after a set amount of time.
 
*Bots have profiles which can customize certain aspects of the bot, such as aiming skill, courage, etc.
 
*Engineer bots can help out friendly Engineers by upgrading friendly Sentry Guns (if they are finished upgrading their own first) and removing any Sappers on them.
 
*If bots are targeted by a sentry and escape, they will use the voice command "Sentry Ahead" similar to human players.
 
*Engineer bots will upgrade their Teleporter and put them where Teleporter waypoints are.
 
*Enemy Medics will sometimes heal disguised enemy Spies.
 
*If a Spy bot is approaching an enemy, and said enemy turns around, the Spy bot will move away until the enemy turns back.
 
*Scouts can double jump, but require waypoints for them similar to Soldiers and Demomen.
 
*Scouts can intelligently use the Bonk! Atomic Punch, retreating, using the drink, and pushing forward.
 
*Medics will now heal any class if their health is low, although Heavies and Soldiers are still prioritized.
 
*Bots will no longer instantly attack a Spy who has backstabbed another player. The bot must have seen the Spy in its line of sight or see the Spy being attacked.
 
*Bots will use the voice command, "Thanks!" after being healed by an Engineer's Dispenser or by a Medic.
 
*Bots will periodically check for Spies by turning around.
 
*RCBot2 have a "Belief" system, that dictates whether or not they think a player or bot is a Spy, and if they will either attack, or stare at them to prevent a backstab.
 
*RCBot2 can work better on complex maps like Mario Kart, plus Stock Halloween maps like plr_hightower_event, sd_doomsday_event as well as the original sd_doomsday map, whereas TFBots tend not to work.
 
  
===RCBot2 Bugs===
+
{{Bot names}}
*Due to the nature of the waypointing system, bot paths aren't as unpredictable as TFBots, and RCbot2 will often times end up running into another bot, leaving both of them stuck until either bot is killed.
 
**Similarly, Spy bots may end up bumping into a player and not moving, due to how waypointing works. They can only navigate to the set point and are on a fixed track.
 
*Engineer bots have a harder time placing down a [[Dispenser]], and will do so of their own free will.
 
*Demoman bots know if you are standing on one of their stickybomb traps, and will detonate them even if they can't see you.
 
*Engineers might place their Sentry Gun facing the wrong direction.
 
*If RCbot2 get knocked off to a location where there are no nearby waypoints, they will not move. The roof area of [[Nucleus]] is one example.
 
*Bots will also say "Thanks!" when picking up a health kit.
 
*Bots lose move speed after swimming.
 
*Bots can't predict target's moves when shooting projectiles.
 
*Medics don't stick close for long with their healing player patient, especially when UberCharged.
 
*Spies don't perform aggressively or immediately use Sapper to destroy enemy Engineer Sentry Guns and Dispensers.
 
*Some SourceMod plugins can conflict with RCBot2, such as GiveBotsCosmetics.smx, GiveBotsWeapons.smx, tf2items_manager.smx and smac_cvars.smx, but [APG]RoboCop[CL] has added the 'sm plugins unload <PLUGIN-NAME>' inside the config.ini to avoid those conflicting issues.
 
*And a sudden Team Fortress 2 Steam Update from SteamCMD could cause RCBot2 to constantly crash unless the hookinfo.ini and the 'rcbot_const_mstr_offset/rcbot_const_round_offset'  values are readjusted. Use the RCBotUpdater.exe from /rcbot2/tools folder and maybe experiment with the values, if nothing else works from the Updater tool.
 
  
Be sure to report any bugs to RCBot Website or Bots-United Discord, as Team Fortress Wiki and Valve Corporation hold no responsibility nor are affiliated with RCBot2.
+
AI bots names can also be customized by a player by typing in, for example, <kbd>tf_bot_add heavyweapons blue "Blu Hoovy"</kbd>; this example would put a [[BLU]] [[Heavy]] on the BLU team with the name "Blu Hoovy".
  
 
==Puppet bots==
 
==Puppet bots==
Puppet bots have no AI code and cannot move or act on their own. These bots can be used like puppets though: players can manipulate them to follow the player's commands such as following the player around and firing their weapons. Puppet bots are mainly used for testing purposes and can also create stunning visuals if manipulated accordingly, as seen [http://www.youtube.com/watch?v=Dn9970dxQ2g here].
+
Puppet bots have no AI code and cannot move or act on their own. These bots can be used like puppets though: players can manipulate them to follow the player's commands such as following the player around and firing their weapons. Puppet bots are mainly used for testing purposes and can also create stunning visuals if manipulated accordingly. To spawn puppet bots, {{cvar|sv_cheats}} has to be set to 1.
  
 
===Puppet bot commands===
 
===Puppet bot commands===
 +
 
Not all of the following commands work; some working commands are also omitted.  
 
Not all of the following commands work; some working commands are also omitted.  
  
Line 468: Line 326:
 
! class="header" | Description
 
! class="header" | Description
 
|-
 
|-
|{{nw|<big>'''bot'''</big>}}
+
|{{nw|<big>'''<code>bot</code>'''</big>}}
 
|This command will create a bot on the given team with the specified class and name. If team or name is omitted, they will be assigned randomly.
 
|This command will create a bot on the given team with the specified class and name. If team or name is omitted, they will be assigned randomly.
  
;Syntax: <code>bot -team <''teamname/number''> -class <''classname''> -name <''botname''> -count <''number''></code>
+
;Syntax: <code>bot [<''teamname/number''>] [<''classname''>] [<''name''>] [<''number''>]</code>
  
;Parameters:
+
;Parameters
:<code>-count ''number''</code>
+
:<code><''number''></code>
 
::Amount of bots to add.
 
::Amount of bots to add.
:<code>-team ''teamname/number''</code>
+
:<code><''teamname/number''></code>
 
::Specifies the team name or number to assign the bot. Where ''name/number'' can be ''[[RED]]'' or ''1'', ''[[BLU]]'' or ''0''
 
::Specifies the team name or number to assign the bot. Where ''name/number'' can be ''[[RED]]'' or ''1'', ''[[BLU]]'' or ''0''
:<code>-class ''classname''</code>
+
:<code><''classname''></code>
 
::The ''classname'' of the class can be ''[[Demoman]]'', ''[[Engineer]]'', ''[[Heavy]]'', ''[[Medic]]'', ''[[Pyro]]'', ''[[Scout]]'', ''[[Soldier]]'', ''[[Sniper]]'', or ''[[Spy]]''
 
::The ''classname'' of the class can be ''[[Demoman]]'', ''[[Engineer]]'', ''[[Heavy]]'', ''[[Medic]]'', ''[[Pyro]]'', ''[[Scout]]'', ''[[Soldier]]'', ''[[Sniper]]'', or ''[[Spy]]''
:<code>-teleport</code>
+
:<code><''teleport''></code>
 
::Teleports the spawned bot to where your cursor is aiming.
 
::Teleports the spawned bot to where your cursor is aiming.
:<code>-targetdummy</code>
+
:<code><''targetdummy''></code>
 
::Prevents the spawned bot from losing health.
 
::Prevents the spawned bot from losing health.
:<code>-name ''botname''</code>
+
:<code><''name''></code>
::''botname'' can be anything. If there is already someone with the same name, an incremental number (starting at 1) surrounded with parenthesis will be added to the beginning of the name. For example, joe, (1)joe, (2)joe, etc. If no name is given then the name will be "bot" followed by a number starting with 01; for example, the first bot will be bot01, the next bot02, and so on.
+
::''name'' can be anything. If there is already someone with the same name, an incremental number (starting at 1) surrounded with parenthesis will be added to the beginning of the name. For example, joe, (1)joe, (2)joe, etc. If no name is given then the name will be "bot" followed by a number starting with 01; for example, the first bot will be Bot01, the next Bot02, and so on.
;Example: <code>bot -team red -class Engineer -name joe</code>
+
;Example
 +
:<code>bot -team red -class Engineer -name joe</code>
 
|-
 
|-
|{{nw|<big>'''bot_changeclass'''</big>}}
+
|{{nw|<big>'''<code>bot_changeclass</code>'''</big>}}
 
|Force all bots to change to the specified class.
 
|Force all bots to change to the specified class.
''Does not seem to be implemented, nothing happens.''
+
 
 +
;Syntax: <code>bot_changeclass <''name''> <''classname''></code>
 +
 
 +
;Parameters
 +
:<code><''name''></code>
 +
::Name of the target bot.
 +
:<code><''classname''></code>
 +
::The ''classname'' of the class the bot will switch to. Default is "" (aka blank).
 +
;Example
 +
:<code>bot_changeclass bot01 Soldier</code>
 
|-
 
|-
|{{nw|<big>'''bot_changeteams'''</big>}}
+
|{{nw|<big>'''<code>bot_changeteams</code>'''</big>}}
 
|
 
|
 
Make all bots change teams.
 
Make all bots change teams.
 
This forces all the bots to switch teams. If a bot was on the RED team then it will now be on the BLU team and vice versa.
 
This forces all the bots to switch teams. If a bot was on the RED team then it will now be on the BLU team and vice versa.
 
|-
 
|-
|{{nw|<big>'''bot_command'''</big>}}
+
|{{nw|<big>'''<code>bot_command</code>'''</big>}}
 
|Sends specified command on behalf of specified bot.
 
|Sends specified command on behalf of specified bot.
  
;Syntax: <code>bot_command <''botname/all''> <''console command''></code>
+
;Syntax: <code>bot_command <''name/all''> <''console command''></code>
::''botname'' is the name or id of the bot to send the command to.
+
;Parameters
::''console command'' can be any of the ones listed in [[Scripting#Console Commands]], as well as some in [[Cheats]].
+
:<code><''name/all''></code>
;Example 1: bot_command bot01 "voicemenu 0 0"
+
::Name or id of the bot to send the command to. Setting this to 'all' will send the command to all the bots.
;Example 2: bot_command bot01 "taunt"
+
:<code><''console command''></code>
 
+
::Can be any of the ones listed in [[Scripting#Console Commands|console commands]], as well as some of the [[cheats]].
::The slot commands (slot1, slot2, etc.) do not work with bot_command, however with bot_forcefireweapon, all bots in that class can be made to switch to a weapon and start firing, then made to stop. Only the entire group of bots in that class can be made to do so, however.
+
;Example 1
|-
+
:<code>bot_command bot01 "voicemenu 0 0"</code>
|{{nw|<big>'''bot_defend'''</big>}}
+
;Example 2
|Set to a team number, and that team will all keep their combat shields raised.
+
:<code>bot_command bot01 "taunt"</code>
For instance, Heavies will spin their miniguns.
 
  
''Not implemented at present.''
+
::The slot commands (slot1, slot2, etc.) do not work with bot_command, however with <code>bot_forcefireweapon</code>, all bots in that class can be made to switch to a weapon and start firing, then made to stop. Only the entire group of bots in that class can be made to do so, however.
 
|-
 
|-
|{{nw|<big>'''bot_dontmove'''</big>}}
+
|{{nw|<big>'''<code>bot_dontmove</code>'''</big>}}
 
|Bots are allowed or prevented from moving.  When set to ''1'' the bots cannot move but they can still turn and jump.  Note with a combination of this command and <code>bot_mimic</code> bots can be moved to certain areas and left there.
 
|Bots are allowed or prevented from moving.  When set to ''1'' the bots cannot move but they can still turn and jump.  Note with a combination of this command and <code>bot_mimic</code> bots can be moved to certain areas and left there.
  
;Syntax: <code>bot_dontmove <''0/1''></code>
+
;Syntax: <code>bot_dontmove <''integer''></code>
::Bot is allowed to move, or not.
+
;Parameters
;Example: <code>bot_dontmove 1</code>
+
:<code><''integer''></code>
 +
::Bots will be allowed to move when set to 1. Default is 0 (disabled).
 +
;Example
 +
:<code>bot_dontmove 1</code>
 
|-
 
|-
|{{nw|<big>'''bot_flipout'''</big>}}
+
|{{nw|<big>'''<code>bot_forceattack</code>'''</big>}}
|When on, this command will make the bots fire the current weapon selected. Default is to use <code>primary_fire</code>, but if <code>bot_forceattack2</code> is set to 1 then secondary fire is used. <br>
 
''Not implemented at present.''
 
 
 
;Syntax: <code>bot_flipout <''0/1''></code>
 
::On when set to 1. Off when set to 0. <br>
 
;Example: <code>bot_flipout 1</code>
 
|-
 
|{{nw|<big>'''bot_forceattack'''</big>}}
 
 
|This will make all the bots automatically fire whatever [[weapon]] they currently have selected.  If <code>bot_forceattack2</code> is set to ''0'', then the bots will execute primary_fire.  If <code>bot_forceattack2</code> is set to ''1'', then the bots will execute secondary_fire.
 
|This will make all the bots automatically fire whatever [[weapon]] they currently have selected.  If <code>bot_forceattack2</code> is set to ''0'', then the bots will execute primary_fire.  If <code>bot_forceattack2</code> is set to ''1'', then the bots will execute secondary_fire.
  
 
Note this does nothing if <code>bot_mimic</code> is active (set to ''1'').
 
Note this does nothing if <code>bot_mimic</code> is active (set to ''1'').
  
;Syntax: <code>bot_forceattack <''0/1''></code>
+
;Syntax: <code>bot_forceattack <''integer''></code>
::Bot will not fire if set to ''0'' and fire repeatedly if set to ''1''.
+
;Parameters
;Example: <code>bot_forceattack 1</code>
+
:<code><''integer''></code>
 +
::When set to 1, all bots fire their guns. Default is 0 (disabled).
 +
;Example
 +
:<code>bot_forceattack 1</code>
 
|-
 
|-
|{{nw|<big>'''bot_forceattack2'''</big>}}
+
|{{nw|<big>'''<code>bot_forceattack2</code>'''</big>}}
 
|This will make all the bots execute secondary_fire on whatever [[weapon]] they currently have selected when <code>bot_forceattack</code> is set to ''1''.
 
|This will make all the bots execute secondary_fire on whatever [[weapon]] they currently have selected when <code>bot_forceattack</code> is set to ''1''.
  
;Syntax: <code>bot_forceattack2 <''0/1''></code>
+
;Syntax: <code>bot_forceattack2 <''integer''></code>
 +
;Parameters
 +
:<code><''integer''></code>
 
::Bot will use its weapon's secondary_fire when set to ''1'', primary_fire when set to ''0''
 
::Bot will use its weapon's secondary_fire when set to ''1'', primary_fire when set to ''0''
;Example: <code>bot_forceattack2 1</code>
+
;Example
 
+
:<code>bot_forceattack2 1</code>
 
|-
 
|-
|{{nw|<big>'''bot_forceattackon'''</big>}}
+
|{{nw|<big>'''<code>bot_forceattack_down</code>'''</big>}}
|When firing, do not tap fire, hold it down. When this command is set to 0, the bot acts like it is continuously tapping the fire button (useful for the Pistol, but not for the Heavy's Minigun). If this command is set to 1, the bots acts as if it is holding down the fire button (useful for the Heavy's Minigun). <br>
 
''Does not seem to be implemented, console returns "Unknown command".''
 
 
 
;Syntax: <code>bot_forceattackon <''0/1''></code>
 
::On when set to 1. Off when set to 0. <br>
 
;Example: <code>bot_forceattackon 1</code>
 
 
 
|-
 
|{{nw|<big>'''bot_forceattack_down'''</big>}}
 
 
|When firing, don't tap fire, hold it down. If this is set to ''0'' then the bot will act like they are continuously tapping the fire button (useful for the [[Stickybomb Launcher]]). If this is set to ''1'' then the bot will act as if it is holding down the fire button (useful for the [[Minigun]]).
 
|When firing, don't tap fire, hold it down. If this is set to ''0'' then the bot will act like they are continuously tapping the fire button (useful for the [[Stickybomb Launcher]]). If this is set to ''1'' then the bot will act as if it is holding down the fire button (useful for the [[Minigun]]).
  
 
;Syntax: <code>bot_forceattack_down <''0/1''></code>
 
;Syntax: <code>bot_forceattack_down <''0/1''></code>
::On when set to ''1'', off when set to ''0''
+
;Parameters
;Example: <code>bot_forceattack_down 1</code>
+
:<code><''integer''></code>
 +
::Either 1 or 0. Default is 0 (disabled).
 +
;Example
 +
:<code>bot_forceattack_down 1</code>
 
|-
 
|-
|{{nw|<big>'''bot_forcefireweapon'''</big>}}
+
|{{nw|<big>'''<code>bot_forcefireweapon</code>'''</big>}}
 
|Forces all bots who have the specified weapon to switch to and fire it.
 
|Forces all bots who have the specified weapon to switch to and fire it.
 
If a bot does not have this weapon, nothing happens to it (unless it is firing a different weapon, in which it stops)
 
If a bot does not have this weapon, nothing happens to it (unless it is firing a different weapon, in which it stops)
 
;Syntax: <code>bot_forcefireweapon <''weapon filename''></code>
 
;Syntax: <code>bot_forcefireweapon <''weapon filename''></code>
 
::''filename'' is usually ''tf_weapon_ <weapon name>''.
 
::''filename'' is usually ''tf_weapon_ <weapon name>''.
;Examples: <code>bot_forcefireweapon tf_weapon_fists</code> makes all [[Heavy]] bots switch to and repeatedly attack with their [[Fists]], and all other bots stop attacking.
+
;Examples
<code>bot_forcefireweapon tf_weapon_shotgun_pyro</code> makes all [[Pyro]] bots switch to and repeatedly fire their [[Shotgun]]s, and all other bots stop attacking.
+
:<code>bot_forcefireweapon tf_weapon_fists</code> makes all [[Heavy]] bots switch to and repeatedly attack with their [[Fists]], and all other bots stop attacking.
 +
:<code>bot_forcefireweapon tf_weapon_shotgun_pyro</code> makes all [[Pyro]] bots switch to and repeatedly fire their [[Shotgun]]s, and all other bots stop attacking.
  
::To make all bots stop attacking, simply specify a non-existent weapon filename. Anything without tf_weapon in it isn't a TF2 weapon, so the bots won't shoot it, for example ''bot_forcefireweapon ,,''
+
::To make all bots stop attacking, simply specify a non-existent weapon filename. Anything without tf_weapon in it isn't a TF2 weapon, so the bots won't shoot it, for example <code>''bot_forcefireweapon ,,''</code>.
 +
|-
 +
|{{nw|<big>'''<code>bot_jump</code>'''</big>}}
 +
|Force all bots to repeatedly jump.
 +
;Syntax: <code>bot_jump <''integer''></code>
 +
;Parameters
 +
:<code><''integer''></code>
 +
::All bots will repeatedly jump when set to 1. Default is 0 (disabled).
 +
;Example
 +
:<code>bot_jump 1</code>
 +
|-
 +
|{{nw|<big>'''<code>bot_crouch</code>'''</big>}}
 +
|Force all bots to hold crouch.
 +
;Syntax: <code>bot_crouch <''integer''></code>
 +
;Parameters
 +
:<code><''integer''></code>
 +
::All bots will hold crouch when set to 1. Default is 0 (disabled).
 +
;Example
 +
:<code>bot_crouch 1</code>
 +
|-
 +
|{{nw|<big>'''<code>bot_kick</code>'''</big>}}
 +
|Remove a bot by name, or an entire team, or all bots.
 +
;Syntax: <code>bot_kick <''name/team''></code>
 +
::Makes the specified bot commit suicide.
 +
;Example
 +
:<code>bot_kick bot01</code> will kick the bot named "bot01" if it exists.
 +
:<code>bot_kick red</code> will kick all the bots on the red team.
 +
:<code>bot_kick blue</code> will kick all the bots on the blu team.
 +
:<code>bot_kick all</code> will kick all the bots in the server.
 
|-
 
|-
|{{nw|<big>'''bot_kill'''</big>}}
+
|{{nw|<big>'''<code>bot_kill</code>'''</big>}}
|
+
|Kills a bot.
Kills the specified bot.
+
;Syntax: <code>bot_kill <''name''></code>
;Syntax: <code>bot_kill <''bot name''></code>
+
;Parameters
 +
:<code><''name''></code>
 
::Makes the specified bot commit suicide.
 
::Makes the specified bot commit suicide.
;Example: <code>bot_kill bot01</code>
+
;Example
 +
:<code>bot_kill bot01</code>
 
|-
 
|-
|{{nw|<big>'''bot_mirror'''</big>}}
+
|{{nw|<big>'''<code>bot_mirror</code>'''</big>}}
 
|Specified bots mirror the player's loadout (class, cosmetics, and weapons). There are a few bugs; for example, if a [[Demoman]] player has the [[Booties]] and any shield equipped, a mirrored bot will still use the [[Grenade Launcher]] and [[Stickybomb Launcher]] despite showing the Booties and shield on his model. After a mirrored bot dies, it will not retain the previous loadout, and bot_mirror must be used again.
 
|Specified bots mirror the player's loadout (class, cosmetics, and weapons). There are a few bugs; for example, if a [[Demoman]] player has the [[Booties]] and any shield equipped, a mirrored bot will still use the [[Grenade Launcher]] and [[Stickybomb Launcher]] despite showing the Booties and shield on his model. After a mirrored bot dies, it will not retain the previous loadout, and bot_mirror must be used again.
  
;Syntax: bot_mirror <''botname''>
+
;Syntax: <code>bot_mirror <''name''></code>
::Where ''botname'' is the name of the bot to mirror.
+
::Where ''name'' is the name of the bot to mirror.
;Example: bot_mirror bot91
+
;Example
 +
:<code>bot_mirror bot01</code>
 
|-
 
|-
|{{nw|<big>'''bot_mimic'''</big>}}
+
|{{nw|<big>'''<code>bot_mimic</code>'''</big>}}
 
|Bot uses usercmd of player by index.
 
|Bot uses usercmd of player by index.
 
The bot will execute all keystrokes issued by a player, mimicking movements, turns, jumps, fire, etc. It should be noted that bots will not mimic Medic calls, weapon switches, or taunts.
 
The bot will execute all keystrokes issued by a player, mimicking movements, turns, jumps, fire, etc. It should be noted that bots will not mimic Medic calls, weapon switches, or taunts.
Line 592: Line 485:
 
Note this overrides <code>bot_forceattack</code> but does not override <code>bot_dontmove</code>.
 
Note this overrides <code>bot_forceattack</code> but does not override <code>bot_dontmove</code>.
  
;Syntax: <code>bot_mimic <''0/1''></code>
+
;Syntax: <code>bot_mimic <''integer''></code>
::On when set to ''1'', off when set to ''0''
+
;Parameters
;Example: <code>bot_mimic 1</code>
+
:<code><''integer''></code>
 +
::Either 1 or 0. Default is 0 (disabled).
 +
;Example
 +
:<code>bot_mimic 1</code>
 
|-
 
|-
|{{nw|<big>'''bot_mimic_inverse'''</big>}}
+
|{{nw|<big>'''<code>bot_mimic_inverse</code>'''</big>}}
 
|
 
|
 
Inverts the movement of the bots; moving left makes the bots move right, moving forwards makes the bots move backwards, etc.
 
Inverts the movement of the bots; moving left makes the bots move right, moving forwards makes the bots move backwards, etc.
Line 602: Line 498:
 
The direction which the bot is looking is not affected.
 
The direction which the bot is looking is not affected.
  
;Syntax: <code>bot_mimic_inverse <''0/1''></code>
+
;Syntax: <code>bot_mimic_inverse <''integer''></code>
::On when set to ''1'', off when set to ''0''
+
;Parameters
;Example: <code>bot_mimic_inverse 1</code>
+
:<code><''integer''></code>
 +
::Either 1 or 0. Default is 0 (disabled).
 +
;Example
 +
:<code>bot_mimic_inverse 1</code>
 
|-
 
|-
|{{nw|<big>'''bot_mimic_yaw_offset'''</big>}}
+
|{{nw|<big>'''<code>bot_mimic_yaw_offset</code>'''</big>}}
 
|
 
|
 
Offsets the bots' yaw.
 
Offsets the bots' yaw.
Line 613: Line 512:
 
;Syntax: <code>bot_mimic_yaw_offset <''0-360''></code>
 
;Syntax: <code>bot_mimic_yaw_offset <''0-360''></code>
 
::Set the direction by specifying angle in degrees
 
::Set the direction by specifying angle in degrees
;Example: <code>bot_mimic_yaw_offset 180</code>
+
;Example
 +
:<code>bot_mimic_yaw_offset 180</code>
 
|-
 
|-
|{{nw|<big>'''bot_randomnames'''</big>}}
+
|{{nw|<big>'''<code>bot_randomnames</code>'''</big>}}
 
|
 
|
  
;Syntax: <code>bot_randomnames <''0/1''></code>
+
;Syntax: <code>bot_randomnames <''integer''></code>
::On when set to ''1'', off when set to ''0''
+
;Parameters
;Example: <code>bot_randomnames 1</code>
+
:<code><''integer''></code>
 +
::Either 1 or 0. Default is 0 (disabled).
 +
;Example
 +
:<code>bot_randomnames 1</code>
 
|-
 
|-
|{{nw|<big>'''bot_refill'''</big>}}
+
|{{nw|<big>'''<code>bot_refill</code>'''</big>}}
 
|Refills all bots' ammo (including [[metal]] for Engineers) and health counts.
 
|Refills all bots' ammo (including [[metal]] for Engineers) and health counts.
  
Syntax: <code>bot_refill</code>
+
;Syntax: <code>bot_refill</code>
 
|-
 
|-
|{{nw|<big>'''bot_saveme'''</big>}}
+
|{{nw|<big>'''<code>bot_saveme</code>'''</big>}}
|This makes all the bots call for a Medic, equivalent to issuing <code>bot_command <''botname''> "voicemenu 0 0"</code> to every bot.
+
|This makes all the bots call for a Medic, equivalent to issuing <code>bot_command <''name''> "voicemenu 0 0"</code> to every bot.
Syntax: <code>bot_saveme <''0/1''></code>
+
;Syntax: <code>bot_saveme <''integer''></code>
::On when set to ''1'', off when set to ''0''
+
;Parameters
 +
:<code><''integer''></code>
 +
::All the bots will call for a Medic when set to 1. Default is 0 (disabled).
 
|-
 
|-
|{{nw|<big>'''bot_selectweaponslot'''</big>}}
+
|{{nw|<big>'''<code>bot_selectweaponslot</code>'''</big>}}
|This makes the specified bot select the weapon in the specified weapon slot.
+
|Forces a bot to switch to the specified weapon slot. To specify which bot switches weapons, use <code>''cc_bot_selectweapon''</code> instead.
0 = primary; 1 = secondary; 2 = melee; 3 = special
 
  
;Syntax: <code>bot_selectweaponslot <''n''> <''botname''></code>
+
;Syntax: <code>bot_selectweaponslot <''n''> </code>
::Set ''n'' to weapon slot that bots should switch to.
+
;Parameters
;Example: <code>bot_selectweaponslot 2 bot12</code>
+
:<code><''n''></code>
 +
::Set ''n'' to weapon slot that bots should switch to.  
 +
::0 = primary; 1 = secondary; 2 = melee; 3 = special
 +
;Example
 +
:<code>bot_selectweaponslot 2 </code>
 
|-
 
|-
|{{nw|<big>'''bot_teleport'''</big>}}
+
|{{nw|<big>'''<code>bot_teleport</code>'''</big>}}
 
|Teleports a specified bot to a given coordinate.
 
|Teleports a specified bot to a given coordinate.
 
Map coordinates of where you are standing can be found by typing <code>Status</code> in the console.
 
Map coordinates of where you are standing can be found by typing <code>Status</code> in the console.
  
;Syntax: <code>bot_teleport <''botname''> <''X''> <''Y''> <''Z''> <''Pitch''> <''Yaw''> <''Roll''></code>
+
;Syntax: <code>bot_teleport <''name''> <''X''> <''Y''> <''Z''> <''Pitch''> <''Yaw''> <''Roll''></code>
::Where ''botname'' is the bot name or id to teleport.
+
::Where ''name'' is the name of the bot or id to teleport.
::<code>''X'' ''Y'' ''Z''</code> are the map coordinates.
+
;Parameters
::<code>''Pitch'' ''Yaw'' ''Roll''</code> is the direction the bot should face.
+
:<code><''name''></code>
;Example: <code>bot_teleport bot01 -4815 1385 -447 0 0 0</code>
+
::Name of the bot to teleport.
 +
:<code><''X''> <''Y''> <''Z''></code>  
 +
::Coordinates of the map the bot will be teleported to.
 +
:<code><''Pitch''> <''Yaw''> <''Roll''></code>
 +
::The direction the bot should face.
 +
;Example
 +
:<code>bot_teleport bot01 -4815 1385 -447 0 0 0</code>
 
|-
 
|-
|{{nw|<big>'''bot_whack'''</big>}}
+
|{{nw|<big>'''<code>bot_whack</code>'''</big>}}
 
|Delivers lethal damage from player to specified bot. This basically kills the bot with the currently selected weapon, probably used for testing during development. It is worth noting that you can only use bot_whack to kill a teammate if mp_friendlyfire is set to 1, otherwise attempting to whack a teammate will not do anything.
 
|Delivers lethal damage from player to specified bot. This basically kills the bot with the currently selected weapon, probably used for testing during development. It is worth noting that you can only use bot_whack to kill a teammate if mp_friendlyfire is set to 1, otherwise attempting to whack a teammate will not do anything.
  
;Syntax: bot_whack <''botname''>
+
;Syntax: <code>bot_whack <''name''></code>
::Where ''botname'' is the name of the bot to "whack".
+
;Parameters
;Example: bot_whack bot109
+
:<code><''name''></code>
|}
+
::Name of the bot to "whack".
 +
;Example
 +
:<code>bot_whack bot01</code>
 +
|-
 +
|{{nw|<big>'''<code>cc_bot_selectweapon</code>'''</big>}}
 +
|Forces a bot to switch to the specified weapon slot.
 +
;Syntax: <code>cc_bot_selectweapon <''name''> <''n''> </code>
 +
;Parameters
 +
:<code><''n''></code>
 +
::Set ''n'' to weapon slot that bots should switch to.
 +
::0 = primary; 1 = secondary; 2 = melee; 3 = special
 +
:<code><''name''></code>
 +
::Name of the bot that will switch weapon slot.
 +
;Example
 +
:<code>cc_bot_selectweapon bot12 2</code>
 +
|-
 +
|{{nw|<big>'''{{code|bot_hurt}}'''</big>}}
 +
|Hurt a bot by team, or all bots ("all").
  
== Update history ==
+
;Syntax: {{code|bot_hurt [<''name''>] [<''team''>] [<''damage''>]}}
{{Update history | '''{{Patch name|12|17|2009}}''' ([[WAR! Update]])
 
* Added work-in-progress Bots for beta testing in KOTH maps.
 
  
'''{{Patch name|1|6|2010}}
+
;Parameters
* Various improvements to combat behaviors.
+
:<code><''name''></code>
* In KOTH mode, Bots are now:
+
::Name of the bot to hurt.
** More likely to roam around and hunt enemies if there is lots of time left.
+
:<code><''team''></code>
** Become more likely to push for the point as time runs down, or their teammates start to capture it.
+
::Specifies the team name of the bot to hurt. Can be ''[[RED]]'', ''[[BLU]]'' or ''all''.
* Medic bots now:
+
:<code><''damage''></code>
** Opportunistically "overheal" nearby friends when they can.
+
::Specifies the amount of damage the bot will receive. If a negative number is set, it will heal (and [[overheal]]) the bot instead.
** Prioritize healing of injured nearby friends more.
+
:<code><''burn''></code>
** Don't focus on Heavies quite so exclusively.
+
::Set the bot on fire. However, the bot will not receive any afterburn damage.
** Don't spam their Medi Gun continuously at round start.
+
;Example
** Won't choose cover far below their heal target so much (koth_nucleus).
+
:<code>bot_hurt -name joe -team red -damage 150</code>
** Fight back with their Syringe Gun appropriately.
+
|}
* General bot improvements:
 
** They no longer stand still on the point when capturing or defending it.
 
** They choose more varied routes now.
 
** They choose better defensive spots around captured points.
 
** They fall back to another weapon when they entirely run out of ammo.
 
** They adjust their FOV when using zoomed in Sniper scope.
 
** They treat in-range Sentry Guns as the most dangerous threat.
 
** They fire their weapons in more realistic bursts.
 
** Engineers use their Shotgun properly.
 
* Added a "virtual mousepad" concept to rework how bots track enemy players.
 
** They now periodically estimate the position and velocity of the enemy they are tracking, instead of "locking on".
 
** Addresses the "180 spin around and fire", "Heavy bot is OP", "Sniper bot is OP", and "I can't fight a Heavy bot as a Scout" issues.
 
* Tuned Sniper spot finding algorithm to generate more diverse locations, partially .addressing the "Predictable Sniper camping spots" issue.
 
* Soldier bots are more careful to not fire rockets that will explode on nearby geometry and kill them.
 
* Fixed a bug where bots tried to heal from a Dispenser being carried by an Engineer.
 
* Tuned scoreboard logic to guard against malicious server operators spoofing bot pings to hide the "BOT" tag.
 
* Added more bot names as suggested by the TF community.
 
 
 
'''{{Patch name|4|28|2010}}
 
* Bots don't retreat to gather health as readily if they are in combat.
 
* Bots no longer retreat when moving to block a point capture.
 
* Bots should now equip an appropriate combat weapon and fight while moving to collect health.
 
* Bots who are roaming the map and hunting now chase down their victims, following them around corners.
 
* Bots that fire projectiles (ie: rockets/grenades/etc) don't hold down their fire button for a minimum time. This was causing Soldier bots to fire rockets into nearby walls as they strafed, killing themselves.
 
* Soldier bots now switch to their Shotgun after firing all four rockets when engaging an enemy.
 
* Added a few more bot names from community suggestions.
 
* Fixed a behavior loop with Engineer metal gathering.
 
 
 
'''{{Patch name|6|10|2010}} ([[Mac Update]])
 
* Added Offline Practice mode, with support for KOTH maps and Dustbowl.
 
* {{Undocumented}} Looking at a bot player for a few seconds now causes it to taunt.
 
 
 
'''{{Patch name|6|11|2010}}'''
 
* Fixed a case where servers could get stuck in an infinite loop while spawning bots.
 
* Fixed a level change crash related to Bot navigation meshes.
 
 
 
'''{{Patch name|6|14|2010}}
 
* Fixed server crash related to bots and health kits.
 
 
 
'''{{Patch name|6|16|2010}}
 
* Medic bots now respond when nearby humans call for Medic.
 
* If a Medic bot is healing you and has an ÜberCharge ready, using the voice commands "Go go go!" or "Activate Charge!" will force the Bot to activate the ÜberCharge.
 
 
 
'''{{Patch name|7|19|2010}}
 
* Improved performance of bot computations that are done when a point is captured, a round starts, or a checkpoint reached.
 
* Fixed Engineer bots infinite build-destroy behavior loop regression.
 
* Fixed Medic bots losing their charge if they touch a resupply cabinet.
 
* Fixed a crash due to having multiple types of bot systems running in-game simultaneously.
 
* Fixed bot behavior issue resulting in bot pile-ups near level 3 [[Teleporter]] entrances.
 
* Bots no longer consider sapped Sentry Guns a dangerous threat.
 
* Bots will not try to navigate through enemy spawn rooms (unless they have won the round).
 
* Engineer bots will avoid building Teleporters on steep slopes which could hinder teammate movement.
 
* Added tf_bot_pyro_always_reflect cvar. Set to 1 to make Pyro bots always reflect projectiles, regardless of difficulty level.
 
 
 
'''{{Patch name|4|14|2011}} ([[Hatless Update]])
 
* Added Spy TFBots. Spy bots have basic cloaking, diguising, sapping, and backstabbing behaviors now, and are ready to join the fight
 
* TFBots understand the basics of the Payload scenario now, and will push the cart on offense, and try to stop the cart on defense
 
* Added navigation meshes for pl_goldrush, pl_badwater, pl_upward, pl_thundermountain, and pl_hoodoo_final
 
* Improved TFBot reactions to cloaked and/or disguised enemy Spies
 
* Improved Demoman bot behaviors for planting sticky bomb traps
 
* Demoman bots will now try to move to a safe spot and lob stickybombs onto enemy sentry nests to destroy them
 
* Soldier bots switch to their Shotgun after emptying their Rocket Launcher at close/medium range
 
* TFBots will no longer hide from sapped or carried sentryguns
 
* Engineer bots are better at moving their Sentry Gun nest as the scenario changes
 
* Improved Sniper bot algorithm for finding good sniping spots for both Capture Point and Payload scenarios
 
* Sniper bots will take opportunistic shots at targets while they move to their desired sniping spot
 
* Fixed bug where Sniper bots would sometimes stand around in their spawn room doing nothing.
 
* Improved TFBot ability to find a safe vantage spot to attack enemy Sentry Guns
 
* TFBots will no longer try to use a teleporter entrance they can't actually reach
 
* Added <code>tf_bot_melee_only</code> cvar. If set to 1, all TFBots will be restricted to only using their melee weapon
 
 
 
'''{{Patch name|4|18|2011}}'''
 
* Fixed a server crash that could occur if TFBots were used across map changes
 
 
 
'''{{Patch name|5|5|2011}}''' ([[Replay Update]])
 
* {{Undocumented}} Bots now properly target the Horseless Headless Horsemann as an enemy.
 
 
 
'''{{Patch name|7|22|2011}}'''
 
* {{Undocumented}} Bots now work on CTF maps.
 
 
 
'''{{Patch name|7|26|2011}}'''
 
* Fixed a rare crash bug with the [[Demoman]] TFBot laying [[Stickybomb Launcher|stickybomb]] traps
 
 
 
'''{{Patch name|8|23|2011}}'''
 
* Fixed crash with Demoman bots trying to detonate stickybombs that had already been destroyed
 
* Added tf_bot_kill console command (syntax identical to tf_bot_kick)
 
* Bots obey melee only mode a bit better
 
* Added func_nav_avoid to allow map creators control over where bots "like" to go
 
* Fixed issue with Demoman bot reloading between each stickybomb he fired, causing him to be very slow at setting traps/destroying Sentry Guns
 
* Bots never taunt if carrying the flag now
 
* Aiming logic for Huntsman Sniper bots
 
* Sniper bots prioritize enemy Snipers more aggressively, as well as enemy Engineers now
 
* Improved Demoman bot Sentry Gun sticky bombing
 
* Bots will no longer try to use health entities assigned to the enemy team
 
* Added simplistic behaviors for Chargin' Targe, and various consumables (Bonk drink, Sandvich, etc)
 
* Medic bots stay a bit closer to their patient now
 
* Sniper bots go after very nearby enemies with their melee weapon now
 
* Added func_tfbot_hint entity to allow map creators to tell Sniper bots good places to lurk
 
* Sniper bots opportunistically fire on viable targets they encounter while on the way to their desired lurking spot
 
* Spy bots are more aggressive about backstabbing an Engineer before sapping his nest now
 
 
 
'''{{Patch name|9|6|2011}}'''
 
*Fixed a server crash related to bots
 
 
 
'''{{Patch name|10|13|2011}}''' ([[Manniversary Update & Sale]])
 
* TFBots have a percentage chance of noticing weapon fire based on their difficulty level. Easy bots are fairly oblivious, and Expert bots notice pretty much everything.
 
* TFBots now treat certain weapon attacks as "quiet" (Spy knife, cloaking/uncloaking, some melee weapons, fists, etc). "Quiet" weapons can only be heard by TFBots when nearby, and their chance of being noticed is halved if the environment is "noisy" (ie., lots of non-quiet gunfire going on in the area). This greatly improves Spies ability to backstab TFBots without the entire team immediately turning on them.
 
* Spy bot improvements:
 
** Spy bots are much better about circling around and backstabbing their victims now
 
** Improved Spy bot target selection in some situations (ie: clusters of Sentry Guns and enemy players)
 
** Spy bots will give up on an attack and retreat if an enemy Sentry Gun aims at them
 
** Spy bots now avoid nearby enemies while disguised and/or cloaked so they don't bump into them and give themselves away
 
** Spy bots now have a simple notion of when their “cover is blown" now
 
** Spy bots lead their target's position as they chase them down for a backstab now
 
** Spy bots don't go after victims until setup time has elapsed
 
** Hard and Expert Spy bots avoid looking at their prey until they get close and go for the stab
 
** Easy Spy bots don't avoid enemies, or try to get behind before stabbing
 
** Normal Spy bots don't avoid enemies
 
** Fixed bug where Spy bots would jump against the enemy spawn gates during setup time
 
* Medic bot improvements:
 
** Medic bots stick much closer to running patients now
 
** Medic bots stick much closer to their patient if they have an Ubercharge ready, or are deploying their Uber
 
** Medic bots hide from Sentryguns now, too
 
* Pyro bot improvements:
 
** Pyro bots are less "pushy" with their compression blast, but will use it against ÜberCharges and to get enemies off of a capture point
 
* {{undocumented}} Added new bot names.
 
 
 
'''{{patch name|1|26|2012}}'''
 
* Changed the way bot counts are displayed in the server browser: the bot column is now next to the player column and always visible. Bot count is no longer subtracted from maxplayers.
 
 
 
'''{{patch name|2|9|2012}}'''
 
* Heavy bot improvements:
 
** Fixed the Heavy bots not spawning in the commentary maps.
 
 
 
'''{{Patch name|3|1|2012}}'''
 
* Improved bot behaviors
 
 
 
'''{{Patch name|8|23|2012}}'''
 
*The tf_bot_add command can now create a bot with a custom name and can create a bot that isn't managed by the value of tf_bot_quota by adding the custom name and "noquota" arguments respectively
 
 
 
'''{{Patch name|9|4|2012}}'''
 
* Fixed bots not displaying in the server browser properly
 
* Blocked bots from being blasted into the tank tunnel in Mvm_Coaltown
 
* Blocked bots from being blasted into the tank tunnel in Mvm_Mannworks
 
* Fixed an issue in the Server Browser where replay bots would add to the player count in MvM.
 
* Added safeguards to prevent bots from getting stuck in certain cases in MvM.
 
 
 
'''{{Patch name|9|27|2012}}'''
 
* Fixed the tf_bot_add command using the same name for all of the bots when adding multiple bots simultaneously
 
 
 
'''{{Patch name|11|16|2012}}'''
 
* Fixed a dedicated server performance issue related to bots
 
 
 
'''{{Patch name|8|27|2013}}'''
 
* Bots can now reflect energy-based projectiles
 
* Improved bot pathing behavior around ramps
 
 
 
'''{{Patch name|11|22|2013}}'''
 
* Fixed bots trying to attack an old [[Sentry Gun]] location after the gun has been picked up by the [[Engineer]]
 
 
 
'''{{Patch name|09|27|2016}}'''
 
* Bots will now fill in for players who have abandoned, or temporarily disconnected from [[Competitive Mode|Competitive matches]]
 
  
'''{{Patch name|11|1|2017}}'''
+
== Notes ==
* Fixed bots constantly respawning during [[Training Mode|Training mode]]
+
* TFBots can also be controlled with {{code|nb_}} (e.g. {{code|nb_select}} and {{code|nb_warp_selected_here}} to teleport bots to a specific location).
* Fixed bots constantly respawning when {{cvar|[[List of useful console commands#tf_commands|tf_bot_force_class]]}} is set
 
* Fixed a case where bots would constantly respawn if {{cvar|tf_bot_spawn_use_preset_roster}} was disabled
 
* Added {{cvar|tf_bot_reevaluate_class_in_spawnroom}} convar to allow servers to disable bot reselecting their class while in spawn rooms}}
 
  
 
==References==
 
==References==

Latest revision as of 21:41, 12 December 2024

A Soldier bot in action on the Dustbowl Training map.
This article is about the computer-controlled players. For other uses, see Robot.
Human teammates might judge you, but will these soulless automatons? YES. They're not blind. But they ARE mute, so your incompetence is a secret they will take to their grave.
The Soldier

A bot is a computer-controlled player on a server. There are two types of bots in Team Fortress 2: AI bots and Puppet bots. AI bots are coded with sophisticated artificial intelligence designed to emulate player actions in game, and can be used without enabling cheats. Puppet bots have no AI coding, but are useful for testing and training. Puppet bots require the server to have cheats enabled, which also disables achievements.

Stock AI bots

The stock AI bots, or TFBots, are designed to emulate human players and are not directly controlled. Additionally, their classes are chosen at random. They use sophisticated AI code based on the PlayerBot and Infected AI featured in the Left 4 Dead series.[1] AI bots do not require the server to have cheats enabled; therefore, achievements are enabled while playing with them. There is one exception, however; Bots do not see Deathcam shots when killed; therefore, a player cannot attain Deathcam-related achievements. Also, killing a bot with a Strange weapon will not increase the weapon's kill count, unless the weapon has a Strange Part: Robots Destroyed applied to it, in which case, the kill will be added to the Strange Part and not the main counter.

AI bots can be indirectly controlled to an extent:

  • Any friendly and enemy bot that the player focuses on with their crosshair during setup time will taunt.
  • A friendly Medic bot will heal a player if they utilize the "Medic!" voice command.
  • If a Medic bot is healing and has an ÜberCharge ready, using the voice commands "Go go go!" or "Activate Charge!" will cause the bot to immediately activate his ÜberCharge.
  • A Medic bot with an ÜberCharge ready will immediately activate the charge if he or the healing target gets hurt significantly.
  • Bots will attempt to join teammates performing a partner taunt (e.g. the High Five) or a group taunt (e.g. the Conga).

Skill levels

AI bots come in four skill levels ranging from easy to expert. Below is a table with a breakdown with some differences between bot skill levels.

Pathfinding

Maps with official bot support

Map Game mode File name
Altitude Attack/Defend cp_altitude
Dustbowl Attack/Defend cp_dustbowl
Gorge Attack/Defend cp_gorge
Gorge Event Attack/Defend cp_gorge_event
Mann Manor Attack/Defend cp_manor_event
Mercenary Park Attack/Defend cp_mercenarypark
Mossrock Attack/Defend cp_mossrock
Badlands Control Point cp_badlands
Foundry Control Point cp_foundry
Granary Control Point cp_granary
Gullywash Control Point cp_gullywash_final1
Metalworks Control Point cp_metalworks
Process Control Point cp_process_final
Snakewater Control Point cp_snakewater_final1
Sunshine Control Point cp_sunshine
Vanguard Control Point cp_vanguard
Turbine Capture the Flag ctf_turbine
Badlands King of the Hill koth_badlands
Brazil King of the Hill koth_brazil
Eyeaduct King of the Hill koth_viaduct_event
Ghost Fort King of the Hill koth_lakeside_event
Kong King King of the Hill koth_king
Lakeside King of the Hill koth_lakeside_final
Laughter King of the Hill koth_slaughter_event
Lazarus King of the Hill koth_lazarus
Moldergrove King of the Hill koth_undergrove_event
Moonshine Event King of the Hill koth_moonshine_event
Nucleus King of the Hill koth_nucleus
Probed King of the Hill koth_probed
Sawmill King of the Hill koth_sawmill
Slasher King of the Hill koth_slasher
Viaduct King of the Hill koth_viaduct
Badwater Basin Payload pl_badwater
Barnblitz Payload pl_barnblitz
Bloodwater Payload pl_bloodwater
Camber Payload pl_camber
Brimstone Payload pl_fifthcurve_event
Embargo Attack/Defend pl_embargo
Enclosure Payload pl_enclosure_final
Gold Rush Payload pl_goldrush
Gravestone Payload pl_rumble_event
Hoodoo Payload pl_hoodoo_final
Pier Payload pl_pier
Precipice Payload pl_precipice_event_final
Swiftwater Payload pl_swiftwater_final1
Thunder Mountain Payload pl_thundermountain
Upward Payload pl_upward
Pier Payload pl_pier
Wutville Payload pl_wutville_event

BLU bots get stuck trying to leave one of BLU's spawn points. Therefore, BLU can only win if few or no BLU bots die when the faulty spawn point is in use.

Using bots on unsupported maps

See also: Navigation Meshes and Nav Mesh Editing on the Valve Developer Community
  1. Nav mesh editing requires cheats enabled, so type sv_cheats 1 in the console.
  2. Build the initial nav mesh using the nav_generate command.
  3. Wait while the game generates AI paths, progress is tracked in the console.
  4. Map will reload.
  5. Verify the nav mesh exists on all stages of the map by using the nav_edit 1 command, then traveling across all the stages. Use the nav_mark_walkable command on all of the stages without a nav mesh, then use the nav_generate command again to apply the changes.
  6. Optionally tweak the generated nav mesh to add missing data and remove erroneous data. Use nav_edit 1 to enter nav mesh editing mode.
  7. Reload/Restart the server (optional, but if it is not done, then achievements will be disabled).
  8. Open console and type tf_bot_add <number> as above to add bots.

WARNING: The game is likely to crash if you edit the navigation mesh with bots enabled.

Bots can be used on any map on which the above steps have been performed without having to repeat them, except for entering the tf_bot_add <number> command each time bots need to be added.

Auto-generated nav meshes work best on Control Points, King of the Hill, Payload, and Capture the Flag maps. On Mannpower maps, the bots will play as Capture the Flag, but be unable to use Grappling Hooks or intelligently use the Powerups they walk over.

Setting the value of the console command tf_bot_offense_must_push_tim to 0 allows bots to fight each other in maps without objectives that they can recognize, unless the map doesn't have any respawn room entities.

Stock maps with no official bot support

 ·  Hydro  ·  DeGroot Keep  ·  Hightower  ·  Frontier  ·  Pipeline  ·  Steel  ·  2Fort  ·  2Fort Invasion
 ·  Double Cross  ·  Landfall  ·  Sawmill (Capture the Flag)  ·  Well (Capture the Flag)  ·  5Gorge  ·  Coldfront  ·  Fastlane  ·  Freight
 ·  Powerhouse  ·  Sinshine  ·  Well  ·  Yukon  ·  Egypt  ·  Gravel Pit  ·  Junction  ·  Mountain Lab
 ·  Snowplow  ·  SnowVille  ·  Snowfall  ·  Steel  ·  Standin  ·  Borneo  ·  Cactus Canyon  ·  Frontier
 ·  Hellstone  ·  Snowycoast  ·  Swiftwater  ·  Banana Bay  ·  Helltower  ·  Hightower  ·  Nightfall  ·  Pipeline
 ·  Badlands (Arena)  ·  Byre  ·  Granary (Arena)  ·  Lumberyard  ·  Nucleus (Arena)  ·  Offblast  ·  Ravine  ·  Sawmill
 ·  Watchtower  ·  Well (Arena)  ·  Harvest  ·  Harvest Event  ·  Highpass  ·  Maple Ridge Event  ·  Suijin  ·  Carnival of Carnage
 ·  Doomsday  ·  Cloak (Control Point)  ·  Bigrock  ·  Coal Town  ·  Decoy  ·  Ghost Town  ·  Mannhattan  ·  Mannworks
 ·  Rottenburg  ·  Asteroid  ·  Foundry (Capture the Flag)  ·  Gorge (Capture the Flag)  ·  Hellfire  ·  Brickyard  ·  District  ·  Timbertown
 ·  Pit of Death  ·  Watergate

AI bot commands

For a more comprehensive list of commands, see the List of TF2 console commands and variables on the Valve Developer Community

To use AI bots on supported maps, the server administrator should type the following commands into the console (some may require sv_cheats to be set to 1):

Command Description
tf_bot_add This command will create one or more AI bots of random classes on random teams. They will also be assigned random names from a default set.
Syntax
tf_bot_add [<count>] [<class>] [<team>] [<difficulty>] [<name>] [noquota]
Parameters
<count>
Specifies the number of bots to spawn. If omitted, one bot is spawned.
Trying to create bots beyond maxplayers will fail with an error message in the console.
If mp_teams_unbalance_limit is too low, adding more bots onto one team may still result in autobalancing to even out team numbers.
<class>
The classname of the class can be Demoman, Engineer, HeavyWeapons, Medic, Pyro, Scout, Soldier, Sniper, or Spy
<team>
Specifies the team name to assign the bot, where team can be red or blue.
<difficulty>
Sets the difficulty level for the bot, where difficulty can be easy, normal, hard, or expert.
<name>
Sets the connecting bot's name.
noquota
If the exact phrase 'noquota' is present, the bot is excluded from the bot quota management system. See tf_bot_quota.
Example
tf_bot_add 3 heavyweapons red easy will add three Heavies to the RED team at the easy skill level.
tf_bot_difficulty Defines the skill of bots joining the game.
Syntax
tf_bot_difficulty <level>
Parameters
<level>
Sets the difficulty level for the bots. Values are: 0=easy, 1=normal, 2=hard, 3=expert. Default is "Normal" (1).
Example
tf_bot_difficulty 2 will set all bots created after this command to "Hard" difficulty.
tf_bot_fire_weapon_allowed Determines whether bots should fire weapons. If disabled, bots can still use certain non-damaging weapons such as the Medi Gun. As one exception, though, Medic bots will still fire their Syringe Gun. Additionally, Demoman bots will still be able to detonate existing stickies, but will not place any more.
Syntax
tf_bot_fire_weapon_allowed <integer>
Parameters
<integer>
Either 1 or 0. Default is 1 (enabled).
Example
tf_bot_fire_weapon_allowed 0 will result in bots not using their weapons, with a few exceptions.
tf_bot_force_class If set to a class name, all TFBots will respawn as that class.
Syntax
tf_bot_force_class <class>
Parameters
<class>
The classname of the class can be Demoman, Engineer, HeavyWeapons, Medic, Pyro, Scout, Soldier, Sniper, or Spy. Default is "" (aka blank).
Example
tf_bot_force_class medic will make all TFBots respawn as Medic.
tf_bot_force_jump If enabled, forces bots to repeatedly jump over and over.
Syntax
tf_bot_force_jump <integer>
Parameters
<integer>
Either 1 or 0. Default is 0 (disabled).
Example
tf_bot_force_jump 1 will force AI bots to repeatedly jump.
tf_bot_join_after_player If nonzero, bots wait until a player joins before entering the game. This only applies to quota spawned bots.
Syntax
tf_bot_join_after_player <integer>
Parameters
<integer>
Either 1 or 0. Default is 1 (enabled).
Example
tf_bot_join_after_player 0 will make TFBots join the game when added even if no players are on a team.
tf_bot_keep_class_after_death If zero, bots will always respawn as a different class.
Syntax
tf_bot_keep_class_after_death <integer>
Parameters
<integer>
Either 1 or 0. Default is 0 (disabled).
Example
tf_bot_keep_class_after_death 1 will prevent TFBots from changing class.
tf_bot_kick

This command will remove one or all AI bots.

Syntax
tf_bot_kick <name/all/team>
Parameters
<name/all/team>
Specifies the name of bot to remove, the team to remove, or all.
Example
tf_bot_kick CEDA will kick the TFBot named "CEDA" if one exists. Like tf_bot_kill, quotation marks will be needed to kick bots with names that consist of 2 or more words, such as tf_bot_kick "Black Mesa" to kick the TFBot named "Black Mesa".
tf_bot_kill

This command will kill one or all AI bots.

Syntax
tf_bot_kill <name/all/team>
Parameters
<name/all/team>
Specifies the name of bot to kill, the team to kill, or all.
Example
tf_bot_kill CEDA will kill the TFBot named "CEDA" if one exists. Quotation marks will be needed to kill bots with names that consist of 2 or more words, such as tf_bot_kill "Black Mesa" to kill the TFBot named "Black Mesa".
tf_bot_melee_only Determines whether a bot should only use melee weapons or not.
Syntax
tf_bot_melee_only <integer>
Parameters
<integer>
Either 1 or 0. Default is 0 (disabled).
Example
tf_bot_melee_only 1 will have bots using only melee weapons.
tf_bot_prefix_name_with_difficulty If nonzero, append the skill level of the bot to the bot's name
Syntax
tf_bot_prefix_name_with_difficulty <integer>
Parameters
<integer>
Either 1 or 0. Default is 0 (disabled).
Example
tf_bot_prefix_name_with_difficulty 1 will cause added bots to have names like "Normal Aimbot" and "Expert Saxton Hale".
tf_bot_quota Determines the total number of TFBots in the game. Only has effect if tf_bot_quota_mode = "fill" or "match".
Syntax
tf_bot_quota <integer>
Parameters
<integer>
Whole number between 0 and how many players the server can hold. Default is 0.
Example
tf_bot_quota 2, if tf_bot_quota_mode = match, will add two bots to the server for every one human.
tf_bot_quota_mode Determines the type of quota.
Syntax
tf_bot_quota_mode<normal/fill/match>
Parameters
normal/fill/match
If 'normal', the server will never add/remove TFBots without explicit commands and bot_quota has no effect.
If 'fill', the server will adjust bots to keep N players in the game, where N is bot_quota.
If 'match', the server will maintain a 1:N ratio of humans to bots, where N is bot_quota.
Example
tf_bot_quota_mode fill will always keep (bot_quota - # of human players) bots in the game.
tf_bot_taunt_victim_chance Determines how often a Bot will taunt a human victim.
Syntax
tf_bot_taunt_victim_chance <integer>
Parameters
<integer>
Whole number between 0 and 100. Default is 20.
Examples
tf_bot_taunt_victim_chance 0 Bots will never taunt after killing a human player.
tf_bot_taunt_victim_chance 100 Bots will always taunt after killing a human player.
tf_bot_warp_team_to_me Teleports your team's bots to your position. Requires sv_cheats 1.
Syntax
tf_bot_warp_team_to_me
Parameters
N/A

Current AI bot status

AI bots are fully released[citation needed]. Currently, all classes are working properly due to the Hatless Update, including the once-buggy Spy. AI bots only work properly for most official King of the Hill maps, some Payload maps, Attack/Defend maps Dustbowl and Gorge, Capture the Flag maps, and Mann Manor (on the latter two, bots can only be added by using the tf_bot_add command in the console). The use of AI bots on non-supported maps is possible by following certain steps; however, they will not emulate human players as well.

Bots will not work properly on any PLR map as they either can't jump over the railings on Hightower or get stuck in a random corner in spawn; and bots have a dance party on any other PLR map (this may change in the future).[citation needed]

AI bot behavior

  • Bots currently only use the default loadout (although they can be given non-Stock weapons with a custom mod/plugin).
  • Bots on Easy difficulty will rarely, if ever, use any weapon other than their primary weapon. Bots on higher difficulties will switch to and use their secondary weapon as soon as the ammunition of their primary weapon is spent, or to compensate for the distance of their target.
  • Bots currently cannot execute special jumps (such as rocket jumps) or haul buildings.
  • If a bot kills a player, they roll a chance to taunt immediately after, and if it succeeds, they will taunt even if they are under enemy fire. However, bots will not taunt if carrying the enemy intelligence. This behavior applies to Robots in Mann vs. Machine mode.
  • Spy bots (and players) are properly ignored by other bots while disguised. However, upon 'touching' any enemy bot, sapping, shooting, or Cloaking, all other bots who see it happen will declare the bot/player a Spy and won't forget who they are until they change disguises while unseen or until the bot(s) who declared them a Spy dies or feigns death with the Dead Ringer.
  • Pyro bots will use the compression blast against projectiles and opponents with unusual frequency if on difficulties other than Easy.
  • Medic bots will usually heal all other classes before Snipers (and to a lesser extent Engineers) even if the "Medic!" voice command is used.
  • Medic bots tend to favor Heavies, Soldiers, Demomen, and Pyros, if being played by a human. If no human player is one of these classes, they are not likely to be pocketed.
  • A Medic bot with an ÜberCharge ready will immediately activate the charge if he gets hurt. This behavior is used by Über Medics in Mann vs. Machine mode.
  • Bots do not attack during setup time unless they are attacked first (with the exception of Demoman bots planting stickybombs).
  • Engineer bots do not upgrade (or even remove Sappers from) their Teleporters, and sometimes don't repair their Sentry Guns even when they're not under fire.
  • Engineer bots will never repair or upgrade a friendly Engineer bot's building, unless that building is in the way of the Engineer's target.
  • Bots, excluding Engineers, Snipers, and Spies, will stay in their spawn positions on setup when attacking in a Attack/Defend map or a Payload map.
  • Spy bots, when spotted by another bot (possibly player), will not attempt to backstab and will instead switch to their Revolver and shoot while retreating.
  • Demoman bots, once they know where a Sentry Gun is (after seeing, getting shot by, or dying to one), will be able to stand out of range of the sentry and perfectly aim and time their stickybomb charges to land precisely where the Sentry Gun is. Walls and ceilings may occasionally get in the way of the stickybombs' flight path, though.
  • Sniper bots, upon scoping in and not finding a target, will use one of the "Negative" voice commands
  • Friendly Medics will tend to heal a disguised Spy.

Bugs

  • Bots may try to walk/shoot through unmovable objects such as walls.
  • Whenever a player/bot cloaks/decloaks or disguises/undisguises, the bots will 'see' players who are behind them and turn around, even if out of the bot's field of view. Note that this isn't due to any sounds made by the player (footsteps, miscellaneous weapon noises, etc.).
  • Though rarely, bots may stand inside one another during usage of an Engineer's Teleporter, and get stuck (can't move).
  • When bots use voice commands (such as "Spy!" and "Move Up!"), text versions of the voice commands do not display.
  • A Medic bot who is healing a player will not avoid enemy fire or collect health pickups, even if he is at critically low health.
  • Bots are able to move while taunting, making the Holiday Punch ineffective.
  • Recently attacked Medic bots will often fail to use their Syringe Gun to deal with enemies at non-melee range, instead switching to their Bonesaw, or even to their Medi Gun on extremely rare occasions.
  • Medic bots will fail to lead their aim or to compensate for gravity while firing the Syringe Gun. This may be due to the Syringe Gun not being properly identified as a non-hitscan weapon in the bot AI code.
  • Spy bots are able to see and follow cloaked Spies (AI or player) should one give himself away, regardless of difficulty level.
  • Even if a Spy is disguised as a class of his team (player only, as bots will never do this), enemies will still point him out as a Spy should he bump into an enemy.
  • Bots abide by Auto-balance rules. To be able to spawn bots on a specific team, you must set mp_teams_unbalance_limit to 0.
  • Engineer bots may ignore their buildings until they're destroyed.
  • Heavy bots will sometimes try to fire their Minigun even when out of ammo. (Although it seems to occur abundantly when the bot difficulty is set below Advanced)
  • Medic bots on the losing team will occasionally commit suicide during Humiliation when there are no enemies nearby. Players are unable to do the same, even using commands.
  • Setting the loadout menu's preview to BLU will cause RED bots to appear BLU.
  • Currently, bots do not work on the following types of game modes or maps, even with a generated navigation mesh. (Spies and Snipers may work, though.)
  • Bots that have their Melee weapons out will occasionally not switch to their other weapons, even if they pick up ammo.
    • This can be fixed by either killing them or just randomly.
  • After the Jungle Inferno Update, bots spawned with specific parameters (example:tf_bot_add 5 pyro blue normal) will die in their spawnrooms. This can be prevented with the command: tf_bot_reevaluate_class_in_spawnroom 0, which requires setting sv_cheats to 1.

AI bot names

The AI bots are programmed to have different names, with many of their names being references to Team Fortress 2, Valve's other works, and computer programming. Many of these names have been requested on the Steam forums.

Unused bot names

The following bot names were found in a leaked source code version of TF2, containing bot names that were never put into production for unknown reasons.

  • John Spartan
  • Leeloo Dallas Multipass
  • Sho'nuff
  • Bruce Leroy
  • CAN YOUUUUUUUUU DIG IT?!?!?!?!
  • Big Gulp, Huh?
  • Stupid Hot Dog
  • I'm your huckleberry
  • The Crocketeer


AI bots names can also be customized by a player by typing in, for example, tf_bot_add heavyweapons blue "Blu Hoovy"; this example would put a BLU Heavy on the BLU team with the name "Blu Hoovy".

Puppet bots

Puppet bots have no AI code and cannot move or act on their own. These bots can be used like puppets though: players can manipulate them to follow the player's commands such as following the player around and firing their weapons. Puppet bots are mainly used for testing purposes and can also create stunning visuals if manipulated accordingly. To spawn puppet bots, sv_cheats has to be set to 1.

Puppet bot commands

Not all of the following commands work; some working commands are also omitted.

These commands may or may not work for AI bots as well.

Note: entering the command without any values will display the command's current setting and a brief description.

Command Description
bot This command will create a bot on the given team with the specified class and name. If team or name is omitted, they will be assigned randomly.
Syntax
bot [<teamname/number>] [<classname>] [<name>] [<number>]
Parameters
<number>
Amount of bots to add.
<teamname/number>
Specifies the team name or number to assign the bot. Where name/number can be RED or 1, BLU or 0
<classname>
The classname of the class can be Demoman, Engineer, Heavy, Medic, Pyro, Scout, Soldier, Sniper, or Spy
<teleport>
Teleports the spawned bot to where your cursor is aiming.
<targetdummy>
Prevents the spawned bot from losing health.
<name>
name can be anything. If there is already someone with the same name, an incremental number (starting at 1) surrounded with parenthesis will be added to the beginning of the name. For example, joe, (1)joe, (2)joe, etc. If no name is given then the name will be "bot" followed by a number starting with 01; for example, the first bot will be Bot01, the next Bot02, and so on.
Example
bot -team red -class Engineer -name joe
bot_changeclass Force all bots to change to the specified class.
Syntax
bot_changeclass <name> <classname>
Parameters
<name>
Name of the target bot.
<classname>
The classname of the class the bot will switch to. Default is "" (aka blank).
Example
bot_changeclass bot01 Soldier
bot_changeteams

Make all bots change teams. This forces all the bots to switch teams. If a bot was on the RED team then it will now be on the BLU team and vice versa.

bot_command Sends specified command on behalf of specified bot.
Syntax
bot_command <name/all> <console command>
Parameters
<name/all>
Name or id of the bot to send the command to. Setting this to 'all' will send the command to all the bots.
<console command>
Can be any of the ones listed in console commands, as well as some of the cheats.
Example 1
bot_command bot01 "voicemenu 0 0"
Example 2
bot_command bot01 "taunt"
The slot commands (slot1, slot2, etc.) do not work with bot_command, however with bot_forcefireweapon, all bots in that class can be made to switch to a weapon and start firing, then made to stop. Only the entire group of bots in that class can be made to do so, however.
bot_dontmove Bots are allowed or prevented from moving. When set to 1 the bots cannot move but they can still turn and jump. Note with a combination of this command and bot_mimic bots can be moved to certain areas and left there.
Syntax
bot_dontmove <integer>
Parameters
<integer>
Bots will be allowed to move when set to 1. Default is 0 (disabled).
Example
bot_dontmove 1
bot_forceattack This will make all the bots automatically fire whatever weapon they currently have selected. If bot_forceattack2 is set to 0, then the bots will execute primary_fire. If bot_forceattack2 is set to 1, then the bots will execute secondary_fire.

Note this does nothing if bot_mimic is active (set to 1).

Syntax
bot_forceattack <integer>
Parameters
<integer>
When set to 1, all bots fire their guns. Default is 0 (disabled).
Example
bot_forceattack 1
bot_forceattack2 This will make all the bots execute secondary_fire on whatever weapon they currently have selected when bot_forceattack is set to 1.
Syntax
bot_forceattack2 <integer>
Parameters
<integer>
Bot will use its weapon's secondary_fire when set to 1, primary_fire when set to 0
Example
bot_forceattack2 1
bot_forceattack_down When firing, don't tap fire, hold it down. If this is set to 0 then the bot will act like they are continuously tapping the fire button (useful for the Stickybomb Launcher). If this is set to 1 then the bot will act as if it is holding down the fire button (useful for the Minigun).
Syntax
bot_forceattack_down <0/1>
Parameters
<integer>
Either 1 or 0. Default is 0 (disabled).
Example
bot_forceattack_down 1
bot_forcefireweapon Forces all bots who have the specified weapon to switch to and fire it.

If a bot does not have this weapon, nothing happens to it (unless it is firing a different weapon, in which it stops)

Syntax
bot_forcefireweapon <weapon filename>
filename is usually tf_weapon_ <weapon name>.
Examples
bot_forcefireweapon tf_weapon_fists makes all Heavy bots switch to and repeatedly attack with their Fists, and all other bots stop attacking.
bot_forcefireweapon tf_weapon_shotgun_pyro makes all Pyro bots switch to and repeatedly fire their Shotguns, and all other bots stop attacking.
To make all bots stop attacking, simply specify a non-existent weapon filename. Anything without tf_weapon in it isn't a TF2 weapon, so the bots won't shoot it, for example bot_forcefireweapon ,,.
bot_jump Force all bots to repeatedly jump.
Syntax
bot_jump <integer>
Parameters
<integer>
All bots will repeatedly jump when set to 1. Default is 0 (disabled).
Example
bot_jump 1
bot_crouch Force all bots to hold crouch.
Syntax
bot_crouch <integer>
Parameters
<integer>
All bots will hold crouch when set to 1. Default is 0 (disabled).
Example
bot_crouch 1
bot_kick Remove a bot by name, or an entire team, or all bots.
Syntax
bot_kick <name/team>
Makes the specified bot commit suicide.
Example
bot_kick bot01 will kick the bot named "bot01" if it exists.
bot_kick red will kick all the bots on the red team.
bot_kick blue will kick all the bots on the blu team.
bot_kick all will kick all the bots in the server.
bot_kill Kills a bot.
Syntax
bot_kill <name>
Parameters
<name>
Makes the specified bot commit suicide.
Example
bot_kill bot01
bot_mirror Specified bots mirror the player's loadout (class, cosmetics, and weapons). There are a few bugs; for example, if a Demoman player has the Booties and any shield equipped, a mirrored bot will still use the Grenade Launcher and Stickybomb Launcher despite showing the Booties and shield on his model. After a mirrored bot dies, it will not retain the previous loadout, and bot_mirror must be used again.
Syntax
bot_mirror <name>
Where name is the name of the bot to mirror.
Example
bot_mirror bot01
bot_mimic Bot uses usercmd of player by index.

The bot will execute all keystrokes issued by a player, mimicking movements, turns, jumps, fire, etc. It should be noted that bots will not mimic Medic calls, weapon switches, or taunts.

Note this overrides bot_forceattack but does not override bot_dontmove.

Syntax
bot_mimic <integer>
Parameters
<integer>
Either 1 or 0. Default is 0 (disabled).
Example
bot_mimic 1
bot_mimic_inverse

Inverts the movement of the bots; moving left makes the bots move right, moving forwards makes the bots move backwards, etc.

The direction which the bot is looking is not affected.

Syntax
bot_mimic_inverse <integer>
Parameters
<integer>
Either 1 or 0. Default is 0 (disabled).
Example
bot_mimic_inverse 1
bot_mimic_yaw_offset

Offsets the bots' yaw. The bots will face in a direction this angle from the player. By default this is set to 180 so that all bots will face the player. Setting this to 0 will face the bots in the same direction as the player.

Syntax
bot_mimic_yaw_offset <0-360>
Set the direction by specifying angle in degrees
Example
bot_mimic_yaw_offset 180
bot_randomnames
Syntax
bot_randomnames <integer>
Parameters
<integer>
Either 1 or 0. Default is 0 (disabled).
Example
bot_randomnames 1
bot_refill Refills all bots' ammo (including metal for Engineers) and health counts.
Syntax
bot_refill
bot_saveme This makes all the bots call for a Medic, equivalent to issuing bot_command <name> "voicemenu 0 0" to every bot.
Syntax
bot_saveme <integer>
Parameters
<integer>
All the bots will call for a Medic when set to 1. Default is 0 (disabled).
bot_selectweaponslot Forces a bot to switch to the specified weapon slot. To specify which bot switches weapons, use cc_bot_selectweapon instead.
Syntax
bot_selectweaponslot <n>
Parameters
<n>
Set n to weapon slot that bots should switch to.
0 = primary; 1 = secondary; 2 = melee; 3 = special
Example
bot_selectweaponslot 2
bot_teleport Teleports a specified bot to a given coordinate.

Map coordinates of where you are standing can be found by typing Status in the console.

Syntax
bot_teleport <name> <X> <Y> <Z> <Pitch> <Yaw> <Roll>
Where name is the name of the bot or id to teleport.
Parameters
<name>
Name of the bot to teleport.
<X> <Y> <Z>
Coordinates of the map the bot will be teleported to.
<Pitch> <Yaw> <Roll>
The direction the bot should face.
Example
bot_teleport bot01 -4815 1385 -447 0 0 0
bot_whack Delivers lethal damage from player to specified bot. This basically kills the bot with the currently selected weapon, probably used for testing during development. It is worth noting that you can only use bot_whack to kill a teammate if mp_friendlyfire is set to 1, otherwise attempting to whack a teammate will not do anything.
Syntax
bot_whack <name>
Parameters
<name>
Name of the bot to "whack".
Example
bot_whack bot01
cc_bot_selectweapon Forces a bot to switch to the specified weapon slot.
Syntax
cc_bot_selectweapon <name> <n>
Parameters
<n>
Set n to weapon slot that bots should switch to.
0 = primary; 1 = secondary; 2 = melee; 3 = special
<name>
Name of the bot that will switch weapon slot.
Example
cc_bot_selectweapon bot12 2
bot_hurt Hurt a bot by team, or all bots ("all").
Syntax
bot_hurt [<name>] [<team>] [<damage>]
Parameters
<name>
Name of the bot to hurt.
<team>
Specifies the team name of the bot to hurt. Can be RED, BLU or all.
<damage>
Specifies the amount of damage the bot will receive. If a negative number is set, it will heal (and overheal) the bot instead.
<burn>
Set the bot on fire. However, the bot will not receive any afterburn damage.
Example
bot_hurt -name joe -team red -damage 150

Notes

  • TFBots can also be controlled with nb_ (e.g. nb_select and nb_warp_selected_here to teleport bots to a specific location).

References