Difference between revisions of "Bots"

From Team Fortress Wiki
Jump to: navigation, search
m (AI Bots)
(clean up)
Line 1: Line 1:
{{Rewrite}}
 
 
[[Image:Tr_dustbowl0003.jpg|right|thumb|300px|A bot [[Soldier]] in action on the [[Dustbowl (Training)|Dustbowl Training]] map]]
 
[[Image:Tr_dustbowl0003.jpg|right|thumb|300px|A bot [[Soldier]] in action on the [[Dustbowl (Training)|Dustbowl Training]] map]]
There are two types of '''bots''' in TF2:
+
There are two types of '''bots''' in TF2, AI Bots and Puppet Bots. AI Bots are coded with sophisticated artificial intelligence, designed to emulate player actions in game. Regular use of these bots does not disable achievements. Puppet Bots have no AI coding, and are useful for testing and training.  They require the server to have [[Cheats]] enabled, disabling [[Achievements]].
* The first type is AI Bots. They are coded with sophisticated artificial intelligence designed to emulate player actions in game. Regular use of these bots does not disable achievements.
 
*The second type is Puppet Bots. They have no AI coding, and are useful for testing and training.  They require the server to have [[cheats]] enabled, disabling [[achievements]].
 
  
 
==AI Bots==
 
==AI Bots==
AI bots can take the place of human players.  They can only be spawned and cannot be directly controlled. In addition, you cannot choose which class of bot to spawn -- they are randomly chosen by the game. They use sophisticated AI code, based on the PlayerBot and Infected AI in the Left 4 Dead series <ref>[http://teamfortress.com/post.php?id=3279 Team Fortress Official Blog - Erectin a dispenser]</ref>.  They do not require the server to have cheats enabled, therefore human players can gain achievements while playing with them.
+
AI Bots take the place of human players and can only be spawned into the game but not directly controlled. Additionally, their classes are randomly chosen by the game. AI Bots 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, human players can gain achievements while playing with them.
  
However, bots can be indirectly controlled to a certain extent:  
+
AI Bots can be indirectly controlled to a certain extent:  
* Any friendly bot that you place your crosshair over during the [[setup time]] will taunt automatically,
+
* Any friendly bot that you place your crosshair over during the [[Setup time]] will taunt automatically.
* A [[Medic]] bot will heal you if you press the "Medic!" [[voice command]].  
+
* A [[Medic]] bot will heal you if you press the "Medic!" [[Voice commands|Voice command]].  
* 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 his stored ÜberCharge.
+
* 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 his stored ÜberCharge.
  
 
===Current AI Bot Status===   
 
===Current AI Bot Status===   
 +
AI Bots are in beta testing and will become more sophisticated as they are updated. Currently, not all classes have proper AI; a good example of this is the [[Spy]]. Spy bots will run away from the player or other enemy bots if they are approached while facing them and will never use their [[Cloak]]. Bots can only be a Spy in [[List of game modes#Highlander|Highlander]] mode, by typing ''"tf_bot_force_class Spy"'' into the [http://developer.valvesoftware.com/wiki/Developer_Console Developer's Console], or by setting class restrictions with a third party program.
 +
AI Bots only work properly for most official [[King of the Hill]] maps, some [[Payload]] maps, [[Dustbowl]], and [[Mann Manor]] (although bots can only be added by using the tf_bot_add command). The use of AI bots on non-supported maps is possible by following certain steps; however, they will not mimic human players as well.
  
* They are still in beta testing. Therefore, they are incomplete and will become more sophisticated as they are patched.
+
====Using Bots on Unsupported Maps====
* Not all classes have proper AI; a perfect example of this is the [[Spy]]. When playing with bots, the Spy will only be used when playing in [[List of game modes#Highlander|Highlander]] mode, by typing ''tf_bot_force_class Spy'' into the Developer's Console, or by setting class restrictions with a third party program.
+
# Type "sv_cheats 1" in console
* AI bots only work properly for most official [[Maps#King of the Hill|King of the Hill]] maps, some [[Maps#Payload|Payload]] maps, [[Dustbowl]] and [[Mann Manor]] (though it can only be played with bots using the tf_bot_add command). On other maps, they will simply sit in the spawn room and will attack any enemy that enters.
+
# Type "nav_generate" in console
* Bots currently can not use or equip unlockable content: including any [[weapons]] in the drop system, [[hats]], [[miscellaneous]] items or any other form of cosmetic item.
+
# Wait while the game generates AI paths
* It is possible to use AI bots on non-supported maps, but results will vary. To do this, the server must have cheats enabled (players will not be able to earn achievements), and bot pathing must be generated.
+
# Map will reload (navigation has been saved and the previous step doesn't need to be repeated)
 
 
The method for using Bots on unsupported maps:
 
 
 
# Type sv_cheats 1
 
# Type nav_generate
 
# Wait a few minutes while the game generates AI paths
 
# Map will exit and reload (navigation is saved, so no need to repeat previous step)
 
 
# Open console and type ''tf_bot_add <number>'' as above
 
# Open console and type ''tf_bot_add <number>'' as above
  
* Bots do not work on [[Capture the Flag]] maps even if the above tutorial is used.
+
''Note: Bots do not work on [[Capture the Flag]] maps, even if the above tutorial is followed.''
  
===AI Bot Behavior===
+
====AI Bot Behavior====
*It is very easy to tell a disguised Spy bot from a regular bot.  Disguised Spy bots will run away from the player or other enemy bots while facing them if they are approached.  They will also never use Cloak and are terrible at ambushing.
+
* Bots currently can not use or equip unlockable content: including any non-standard [[Weapons]], any [[Hats]], or any [[Miscellaneous items]].  
*Bots currently can not, or will not [[jump]], [[rocketjump]] or [[stickyjump]] on purpose in any way or form.
+
* Bots currently can not [[Jumping|jump]], [[Rocketjump#Rocket jumps|rocket jump]] or [[Stickyjump#Sticky_jumps|sticky jump]] purposefully.
*They react with unlockable weapons in the same way they would react with what weapon it replaces in the loadout spot. However certain loadouts may cause confusion. (Ex. Attempting to use the SMG with the Razorback equipped)
+
* Bots will taunt after killing the player, even if they are under enemy fire.
*No matter their battle condition (if they are under or on fire), bots will not hesitate to taunt when they kill you.
+
* When a bot sees a disguised enemy Spy, they tend to watch the Spy's movement. The bot will not attack the disguised Spy unless the Spy preforms a hostile action or bumps into one of the bots.
*When a bot sees a player that is a disguised enemy Spy, they tend to stare at and watch the player's every move, as if they know he is a Spy. However, they will not attack the disguised Spy unless the Spy preforms a hostile action, or bumps into one of the bots.
 
  
 
===AI Bot Commands===
 
===AI Bot Commands===
To use AI bots on supported maps, the server administrator opens the console and types in the following commands:
+
To use AI bots on supported maps, the server administrator types in the following commands in console:
  
 
{| class="wikitable grid"
 
{| class="wikitable grid"
Line 163: Line 154:
  
 
==Puppet Bots==
 
==Puppet Bots==
Puppet bots have no AI code, and therefore cannot replace human players.  They can not move or act on their own. You can use them like puppets though, manipulating them to do things such as follow you around and fire their weapons.
+
Puppet bots have no AI code and can't 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 follow the player around and fire their weapon. Puppet Bots are mainly used for testing purposes, and can create stunning visuals if manipulated accordingly.
  
They are mainly useful for testing, and with a hint of imagination and creativity; making stunning visuals.  They are also good for the sheer fun of manipulating groups into coreographed attacks.
+
===Puppet Bot Commands===
 +
Not all of the following commands work; for clarity, the complete list of commands is included.  
  
Because they require the server to have cheats enabled, achievements are disabled.
+
''Note: entering the command without any values will display the command's current setting and a brief description.''
 
 
===Puppet Bot Commands===
 
Some of these commands work and some don't. For clarity, the complete list is included.  Note that for all commands, entering the command without any options will display the command's current setting and a brief (one line) help.
 
  
 
{| class="wikitable grid"
 
{| class="wikitable grid"
Line 285: Line 274:
  
 
===AI Bot Names===
 
===AI Bot Names===
The AI bots are programmed to have different names. A lot of their names are references to many of Valve's works, such as, but not limited to, Portal, Left 4 Dead and its sequel, and the Half-Life series. They also include some references to Team Fortress and the fandom as well. Many of these names have been requested on the Steam forums. <!--If you encounter other names that aren't on the list, please add them-->
+
The AI Bots are programmed to have different names, with many of their names being references to Valve's other works. They also include some references to Team Fortress as well. Many of these names have been requested on the Steam forums. <!--If you encounter other names that aren't on the list, please add them-->
 
{|
 
{|
 
| valign="top" |
 
| valign="top" |

Revision as of 01:32, 9 November 2010

There are two types of bots in TF2, AI Bots and Puppet Bots. AI Bots are coded with sophisticated artificial intelligence, designed to emulate player actions in game. Regular use of these bots does not disable achievements. Puppet Bots have no AI coding, and are useful for testing and training. They require the server to have Cheats enabled, disabling Achievements.

AI Bots

AI Bots take the place of human players and can only be spawned into the game but not directly controlled. Additionally, their classes are randomly chosen by the game. AI Bots 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, human players can gain achievements while playing with them.

AI Bots can be indirectly controlled to a certain extent:

  • Any friendly bot that you place your crosshair over during the Setup time will taunt automatically.
  • A Medic bot will heal you if you press the "Medic!" Voice command.
  • 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 his stored ÜberCharge.

Current AI Bot Status

AI Bots are in beta testing and will become more sophisticated as they are updated. Currently, not all classes have proper AI; a good example of this is the Spy. Spy bots will run away from the player or other enemy bots if they are approached while facing them and will never use their Cloak. Bots can only be a Spy in Highlander mode, by typing "tf_bot_force_class Spy" into the Developer's Console, or by setting class restrictions with a third party program. AI Bots only work properly for most official King of the Hill maps, some Payload maps, Dustbowl, and Mann Manor (although bots can only be added by using the tf_bot_add command). The use of AI bots on non-supported maps is possible by following certain steps; however, they will not mimic human players as well.

Using Bots on Unsupported Maps

  1. Type "sv_cheats 1" in console
  2. Type "nav_generate" in console
  3. Wait while the game generates AI paths
  4. Map will reload (navigation has been saved and the previous step doesn't need to be repeated)
  5. Open console and type tf_bot_add <number> as above

Note: Bots do not work on Capture the Flag maps, even if the above tutorial is followed.

AI Bot Behavior

  • Bots currently can not use or equip unlockable content: including any non-standard Weapons, any Hats, or any Miscellaneous items.
  • Bots currently can not jump, rocket jump or sticky jump purposefully.
  • Bots will taunt after killing the player, even if they are under enemy fire.
  • When a bot sees a disguised enemy Spy, they tend to watch the Spy's movement. The bot will not attack the disguised Spy unless the Spy preforms a hostile action or bumps into one of the bots.

AI Bot Commands

To use AI bots on supported maps, the server administrator types in the following commands in console:

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 amusing human-like names.
Syntax
tf_bot_add [<count>] [<class>] [<team>] [<difficulty>]
Parameters
<count>
Specifies the number of bots to spawn. If omitted, one bot is spawned.
As of this writing, specifying a number greater than the maximum number of players, including any human players, causes the bots to freeze. Thus if you have a 24 player server (the default), and one human player, do not spawn more than 23 bots.
<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, or hard.
Example
tf_bot_add red 3 heavyweapons 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_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_join_after_player If nonzero, bots wait until a player joins before entering the game.
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>
Parameters
<name/all>
Specifies the name of bot to remove or all.
Example
tf_bot_kick CEDA will kick the TFbot named "CEDA" if one exists.
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 "1 Aimbot" (normal) and "3 Saxton Hale" (expert).
tf_bot_quota Determines the total number of tf bots in the game. Only has effect is "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.

Notes

Puppet Bots

Puppet bots have no AI code and can't 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 follow the player around and fire their weapon. Puppet Bots are mainly used for testing purposes, and can create stunning visuals if manipulated accordingly.

Puppet Bot Commands

Not all of the following commands work; for clarity, the complete list of commands is included.

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 -team <teamname/number> -class <classname> -name <botname>
Parameters
-team teamname/number
Specifies the team name or number to assign the bot. Where name/number can be RED or 1, BLU or 0
-class classname
The classname of the class can be Demoman, Engineer, HeavyWeapons, Medic, Pyro, Scout, Soldier, Sniper, or Spy
-name botname
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.
Example
bot -team red -class Engineer -name joe
bot_changeclass Force all bots to change to the specified class.

Does not seem to be implemented, nothing happens.

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 <botname> <console command>
botname is the name or id of the bot to send the command to.
console command can be any of the ones listed in Scripting#Console Commands.
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, you can make all bots in that class switch to that weapon and start firing, then make them stop. You can only make the entire group of bots in that class switch to that weapon, however.
bot_defend Set to a team number, and that team will all keep their combat shields raised.

For instance, Heavies will spin their miniguns.

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 you can move bots to where you want them and leave them there.
Syntax
bot_dontmove <0/1>
Bot is allowed to move, or not.
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 <0/1>
Bot will not fire if set to 0 and fire repeatedly if set to 1.
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 <0/1>
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 Pistol, but not for the Heavy's Minigun). If this is set to 1 then the bot will act as if it is holding down the fire button (useful for the Heavy).
Syntax
bot_forceattack_down <0/1>
On when set to 1, off when set to 0
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 ,,
Bots' loadouts cannot be changed, therefore you cannot make them fire unlockable weapons.
bot_kill

Kills the specified bot.

Syntax
bot_kill <bot name>
Makes the specified bot commit suicide.
Example
bot_kill 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.

Note this overrides bot_forceattack but does not override bot_dontmove.

Syntax
bot_mimic <0/1>
On when set to 1, off when set to 0
Example
bot_mimic 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

AI Bot Names

The AI Bots are programmed to have different names, with many of their names being references to Valve's other works. They also include some references to Team Fortress as well. Many of these names have been requested on the Steam forums.

  • Pow!
  • RageQuit
  • Saxton Hale
  • Screamin' Eagles
  • SMELLY UNFORTUNATE
  • Still Alive[12]
  • SomeDude
  • Someone Else
  • Soulless
  • TAAAAANK![13]
  • Target Practice
  • ThatGuy
  • The Administrator
  • THEM
  • Tiny Baby Man
  • Totally Not A Bot
  • The Combine[14]
  • The Freeman[15]
  • The G-Man[16]
  • trigger_hurt
  • WITCH[17]
  • ZAWMBEEZ
  • Ze Ubermensch
  • Zepheniah Mann
  • 0xDEADBEEF
  • 10001011101
;Syntax: bot_randomnames <0/1>
On when set to 1, off when set to 0
Example
bot_randomnames 1
bot_refill Refills all bots' Ammo counts, including Metal for Engineers.

Syntax: bot_refill

bot_saveme This makes all the bots call for a Medic, equivalent to issuing bot_command <botname> "voicemenu 0 0" to every bot.

Syntax: bot_saveme <0/1>

On when set to 1, off when set to 0
bot_selectweaponslot This makes the first bot select weapon in specified weapon slot.

0 = primary; 1 = secondary; 2 = melee; 3 = special Note this only works for the first bot spawned. There doesn't seem to be a way to specify other bots.

Syntax
bot_selectweaponslot <n>
Set n to weapon slot that bots should switch to.
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 <botname> <X> <Y> <Z> <Pitch> <Yaw> <Roll>
Where botname is the bot name or id to teleport.
X Y Z are the map coordinates.
Pitch Yaw Roll is 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.
Syntax
bot_whack <botname>
Where botname is the name of bot to "whack".
Example
bot_whack bot109

References