Difference between revisions of "Bots"
Lordgeorge16 (talk | contribs) (→AI Bots) |
Lordgeorge16 (talk | contribs) (→AI Bots) |
||
Line 7: | Line 7: | ||
AI bots can take the place of human players. They can only be spawned, they cannot be directly controlled. In addition, you cannot choose which class of bot to spawn -- they are randomly chosen by the game. | AI bots can take the place of human players. They can only be spawned, they cannot be directly controlled. In addition, you cannot choose which class of bot to spawn -- they are randomly chosen by the game. | ||
− | However, bots either as certain classes or as any class can be somewhat indirectly controlled, to a certain extent: any friendly bot that you place your crosshair over during the [[setup time]] will taunt automatically, also and more importantly, a bot [[ | + | However, bots either as certain classes or as any class can be somewhat indirectly controlled, to a certain extent: any friendly bot that you place your crosshair over during the [[setup time]] will taunt automatically, also and more importantly, a bot [[Medic]] will heal you if you press the "Medic!" [[voice command]]. (Default key is "E" on PC.) If a Medic Bot is healing you and has an [[ÜberCharge]] ready, use the voice commands "Go go go!" (default keys are Z, then 3 on PC.) or "Activate Charge!" (default keys are X, then 7 on PC.) to force the Bot to activate his currently unused ÜberCharge. |
As of this writing: | As of this writing: | ||
*They are still in beta testing, in other words, they are currently incomplete and are becoming more and more sophisticated the more they become patched. | *They are still in beta testing, in other words, they are currently incomplete and are becoming more and more sophisticated the more they become patched. | ||
− | *Not all classes | + | *Not all classes have proper AI, a perfect example of this is the [[Spy]]. It is probable that a human spy has complex behavior that is too complicated to be effectively simulated by an AI code. Valve is most likely still working on this. When playing with bots, the Spy will only be used when playing in Highlander mode, which can be activated by typing ''mp_highlander 1'' into the Developer's Console before you choose the team to play as. 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 poor at ambushing. |
− | * | + | *AI Bots only work properly for most official [[Maps#King of the Hill|KOTH]] maps, and [[cp_dustbowl]], other than both koth_[[harvest]] variants. But for these maps, they do not require cheats to be enabled, therefore human players can gain [[achievements]] while using them. On other maps, they will simply sit in the spawn room and will attack any enemy that enters, which can only be done by the ''noclip'' command or on a map that has no team restrictions on spawn rooms. |
*Bots currently can not, or will not [[jump]], [[rocketjump]] or [[stickyjump]] on purpose in any form of way. | *Bots currently can not, or will not [[jump]], [[rocketjump]] or [[stickyjump]] on purpose in any form of way. | ||
*Bots currently can not use or equip unlockable content: including unlockable [[weapons]], [[hats]], [[miscellaneous]] items or any other cosmetic items. | *Bots currently can not use or equip unlockable content: including unlockable [[weapons]], [[hats]], [[miscellaneous]] items or any other cosmetic items. |
Revision as of 00:25, 29 July 2010
There are two types of bots in TF2:
- The first type has sophisticated AI code, based on the Infected AI in Left 4 Dead[1]. They are intelligent enough to replace human players in most cases. They do not require the server to have cheats enabled, therefore human players can gain achievements while playing with them.
- The second type has no AI code -- they are simply puppets which you can spawn and order to do things, such as follow you around and fire their weapons. They are useful for testing or for indulging in antisocial fantasies. They require the server to have cheats enabled, therefore human players cannot gain achievements while playing with them.
Contents
- 1 AI Bots
- 2 AI Bot Commands
- 3 Bot names
- 4 AI Bot Related Patches
- 5 Puppet Bots
- 6 Puppet Bot Commands
- 6.1 bot
- 6.2 bot_changeclass
- 6.3 bot_changeteams
- 6.4 bot_command
- 6.5 bot_defend
- 6.6 bot_dontmove
- 6.7 bot_forceattack
- 6.8 bot_forceattack2
- 6.9 bot_forceattack_down
- 6.10 bot_forcefireweapon
- 6.11 bot_kill
- 6.12 bot_mimic
- 6.13 bot_mimic_yaw_offset
- 6.14 bot_randomnames
- 6.15 bot_refill
- 6.16 bot_saveme
- 6.17 bot_selectweaponslot
- 6.18 bot_teleport
- 6.19 bot_whack
- 7 Useful aliases and binds
- 8 Example Scripts
- 9 References
AI Bots
AI bots can take the place of human players. They can only be spawned, they cannot be directly controlled. In addition, you cannot choose which class of bot to spawn -- they are randomly chosen by the game.
However, bots either as certain classes or as any class can be somewhat indirectly controlled, to a certain extent: any friendly bot that you place your crosshair over during the setup time will taunt automatically, also and more importantly, a bot Medic will heal you if you press the "Medic!" voice command. (Default key is "E" on PC.) If a Medic Bot is healing you and has an ÜberCharge ready, use the voice commands "Go go go!" (default keys are Z, then 3 on PC.) or "Activate Charge!" (default keys are X, then 7 on PC.) to force the Bot to activate his currently unused ÜberCharge.
As of this writing:
- They are still in beta testing, in other words, they are currently incomplete and are becoming more and more sophisticated the more they become patched.
- Not all classes have proper AI, a perfect example of this is the Spy. It is probable that a human spy has complex behavior that is too complicated to be effectively simulated by an AI code. Valve is most likely still working on this. When playing with bots, the Spy will only be used when playing in Highlander mode, which can be activated by typing mp_highlander 1 into the Developer's Console before you choose the team to play as. 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 poor at ambushing.
- AI Bots only work properly for most official KOTH maps, and cp_dustbowl, other than both koth_harvest variants. But for these maps, they do not require cheats to be enabled, therefore human players can gain achievements while using them. On other maps, they will simply sit in the spawn room and will attack any enemy that enters, which can only be done by the noclip command or on a map that has no team restrictions on spawn rooms.
- Bots currently can not, or will not jump, rocketjump or stickyjump on purpose in any form of way.
- Bots currently can not use or equip unlockable content: including unlockable weapons, hats, miscellaneous items or any other cosmetic items.
- They seem to work fine on pl_upward if the user previously created npc navigation meshes, however, the navigation meshes are not official and they do not as of yet work very well on other payload maps(Based on this new information it is possible that in the near future, one of the next gamemodes to feature bots will be payload.)
AI Bot Commands
To use AI bots on supported maps, the server administrator simply opens a console and types in the following command:
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.
|
tf_bot_difficulty |
Defines the skill of bots joining the game.
|
tf_bot_force_class |
If set to a class name, all TFBots will respawn as that class.
|
tf_bot_join_after_player |
If nonzero, bots wait until a player joins before entering the game.
|
tf_bot_keep_class_after_death |
If zero, bots will always respawn as a different class.
|
tf_bot_kick |
This command will remove one or all AI bots.
|
tf_bot_prefix_name_with_difficulty |
If nonzero, append the skill level of the bot to the bot's name
|
tf_bot_quota |
Determines the total number of tf bots in the game. Only has effect is "tf_bot_quota_mode" = "fill" or "match".
|
tf_bot_quota_mode |
Determines the type of quota.
|
It is possible to use AI bots on non-supported maps, but results will vary. First, the server must have cheats enabled (which means human players cannot gain achievements), and second, you must generate bot pathing which causes the map to restart, and third, this pathing generally does not work well after all that. However, if you still wish to use bots on unsupported maps, here is how:
- 1) Type sv_cheats 1
- 2) Type nav_generate
- 3) Wait a few minutes while the game works out where and how to use the bots
- 4) Map will exit and reload (navigation is saved, so no need to repeat previous step)
- 5) Open console and type tf_bot_add <number> as above
Additionally, a pack of pre-made bot meshes has been compiled for many popular maps.
Note: Bots do not work on Capture the Flag or Payload maps even if the above tutorial is used until a new update is released that gives them extra code.
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 Half-Life. They also include some references to Team Fortress and the fandom as well. Many of these names have been requested on the Steam forums.
- AimBot
- AmNot
- Aperture Science Prototype XR7
- BeepBeepBoop
- Big Mean Mother Hubbard
- Black Mesa
- BoomerBile
- Cannon Fodder
- CEDA
- Chell
- Chucklenuts
- Companion Cube
- CreditToTeam
- CRITRAWKETS
- Crowbar
- CryBaby
- CrySomeMore
- C++
- Delicious Cake
- DeadHead
- Divide by Zero
- Dog
- Force of Nature
- Gentlemanne of Leisure
- GlaDOS
- GutsAndGlory!
- Hat-Wearing MAN
- Headful of Eyeballs
- Herr Doktor
- HI THERE
- Hostage
- Humans Are Weak
- H@XX0RZ
- I LIVE!
- IvanTheSpaceBiker
- Kaboom!
- LOS LOS LOS
- Maggot
- Mann Co.
- Me
- Mindless Electrons
- MoreGun
- Nom Nom Nom
- Not Me
- Numnutz
- One-Man Cheeseburger Apocalypse
- Pow!
- RageQuit
- Screamin' Eagles
- Still Alive
- SomeDude
- Someone Else
- Soulless
- TAAAAANK!
- Target Practice
- ThatGuy
- THEM
- Tiny Baby Man
- Totally Not A Bot
- The Combine
- The Freeman
- The G-Man
- trigger_hurt
- WITCH
- ZAWMBEEZ
- Ze Ubermensch
- Zepheniah Mann
- 0xDEADBEEF
- 10001011101
AI Bot Related Patches
initial release: December 17, 2009 Patch
- Added work-in-progress TF Bots for beta testing in KOTH maps (blog post coming with more info)
- Fixed the TFBots not reacting correctly to stun effects
- In KOTH mode, Bots are now
- More likely to roam around and hunt enemies if there is lots of time left
- Become more likely to push for the point as time runs down, or their teammates start to capture it
- Medic bots now
- Opportunistically "overheal" nearby friends when they can
- Prioritize healing of injured nearby friends more
- Don't focus on Heavies quite so exclusively
- Don't spam their Medigun continuously at round start
- Won't choose cover far below their heal target so much (koth_nucleus)
- Fight back with their syringe-gun appropriately
- Various improvements to combat behaviors
- 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 Sentries as the most dangerous threat
- They fire their weapons is 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"
- After rotating beyond a maximum angle, they will pause for a fraction of a second to re-center their "virtual mouse"
- Allows for over/undershoot "slop" in aiming. Looks more natural, and allows skilled players to dodge
- Addresses the "180 spin around and fire", "Heavy bot is OP", "Sniper 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
- Added "bots" to the server's sv_tags convar if the server is running bots
- 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.
- Soldiers 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.
- Added Training, with support for General gameplay & Soldier class training for now. (with bots)
- Added Offline Practice mode, with support for KOTH maps and Dustbowl.(with bots)
Part 2:
- Fixed training servers showing up in the server browser for other users
- Fixed a crash related to level changes while playing a game with bots
- Looking at a bot player for some seconds now causes it to taunt.
- 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.
- Fixed server crash related to bots and health kits
- TFBot Changes
- Medics now respond when nearby humans call for Medic
- If a Medic Bot is healing you and has an ÜberCharge ready, use the voice commands "Go go go!" or "Activate Charge!" to force the Bot to activate the ÜberCharge
- TF Bot Changes
- Improved performance of bot computations that are done when a point is captured, a round starts, or a checkpoint reached.
- Fixed Engineer bot 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 sentries a dangerous threat
- Bots will not try to navigate through enemy spawn rooms (unless they have won the round)
- Bot Engineers will avoid building teleporters on steep slopes which can hinder teammate movement
- Added tf_bot_pyro_always_reflect cvar. Set to 1 to make Pyro bots always reflect projectiles, regardless of difficulty level.
Puppet Bots
Puppet bots have no AI code and so cannot replace human players. They do 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.
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 watching an army of perfect soldiers firing their rockets in unison, or gibbing a dozen helpless enemies at once with pipebombs.
Because they require the server to have cheats enabled, human players cannot gain achievements while using these bots.
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.
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.
|
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.
|
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_forceattack |
This will make all the bots automatically fire whatever weapon they currently have selected. If Note this does nothing if
|
bot_forceattack2 |
This will make all the bots execute secondary_fire on whatever weapon they currently have selected when
|
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).
|
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)
|
bot_kill |
Kills the specified bot.
|
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_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.
|
bot_randomnames |
This will add text to bot names, apparently used for testing during development, some examples: "Yet more Bot names, medium size", "Another bot", "This is a medium Bot", "This is a super long bot name t"
|
bot_refill |
Refills all bots' Ammo counts, including Metal for Engineers. Syntax: |
bot_saveme |
This makes all the bots call for a Medic, equivalent to issuing
|
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.
|
bot_teleport |
Teleports a specified bot to a given coordinate.
Map coordinates of where you are standing can be found by typing
|
bot_whack |
Deliver lethal damage from player to specified bot. This basically kills the bot with the currently selected weapon, probably used for testing during development.
|
Useful aliases and binds
sv_lan 1
sv_cheats 1
mp_teams_unbalance_limit 0
alias +bot_shoot_primary "bot_selectweaponslot 0; bot_forceattack 1"
alias -bot_shoot_primary "bot_selectweaponslot 0; bot_forceattack 0"
alias +bot_shoot_secondary "bot_selectweaponslot 1; bot_forceattack 1"
alias -bot_shoot_secondary "bot_selectweaponslot 1; bot_forceattack 0"
bind n +bot_shoot_primary
bind m +bot_shoot_secondary
Pressing n will cause the bot to switch to its primary weapon and fire once. Pressing m will cause the bot to switch to its secondary weapon and fire once. Press each key repeatedly to fire repeatedly. If you want to use secondary fire for a particular weapon (e.g. detonate demoman sticky bombs or bat a ball from the sandman), type in bot_forceattack2 1
in the console to enable secondary fire, then press the bound key, then bot_forceattack2 0
to switch back to primary fire. Of course you could also bind these to a key...
Example Scripts
- Create a server and load a map (Gravelpit works well as a map since there is just the one respawn room, or the achievement maps with the open spawn areas).
- Join as a BLU Engineer and stay in the respawn room.
- Bring down console and type:
- sv_cheats 1
- mp_teams_unbalance_limit 0
- bot -class Engineer
- bot_mimic_yaw_offset 0
- bot_mimic 1
- This will spawn a BLU Engineer bot by the name of "bot01" which will do what you do, including walking around and selecting/firing weapons. However, it will not build anything if you build it. You can make it select the build menu, but cannot actually select a menu item when you do. Thankfully, there is the BUILD command and the
bot_command
that can make the bot issue commands.
- Bring down console and type:
- bot_command bot01 "build 3"
- This will start the build process with the Engineer holding his toolbox, the bot should be seeing the blueprint now.
- Close the console and press your fire button - this will start the Sentry building. Keep pressing the fire button to make the bot hit the Sentry with his Wrench to build it faster, and if you want add Metal to it. If you want to increase the Sentry's level then you need to give the bot more Metal with the
bot_refill
console command.
Other examples
- The following will create a red medic and a red soldier who fire continously until they are out of ammo. The medic ends up with a medigun set to heal any other player who passes them or an enemy spy. The soldier ends up bashing away with his melee weapon unless he ends up above a supply of ammunition I which case he will continually fire rockets (good for deflection practice).
- sv_cheats 1
- mp_teams_unbalance_limit 0
- bot -team red -class medic
- bot -team red -class soldier
- bot_mimic 0
- bot_forceattack 1
- bot_selectweaponslot 1
- sv_cheats 0
- retry
- The following will create a red sniper who continously scopes in and a red spy who cloaks and decloaks. The retry after turning sv_cheats off gives you a clean session.
- sv_cheats 1
- mp_teams_unbalance_limit 0
- bot -team red -class sniper
- bot -team red -class spy
- bot_selectweaponslot 1
- bot_mimic 0
- bot_forceattack 1
- bot_forceattack2 1
- sv_cheats 0
- retry
- The following gives you three red scouts and three red heavies.
- sv_cheats 1
- mp_teams_unbalance_limit 0
- bot -team red -class scout
- bot -team red -class scout
- bot -team red -class scout
- bot -team red -class heavyweapons
- bot -team red -class heavyweapons
- bot -team red -class heavyweapons
- sv_cheats 0
- retry
References
Languages: | English · العربية · čeština · dansk · Deutsch · español · suomi · français · magyar · italiano · 日本語 · 한국어 · Nederlands · polski · português do Brasil · română · русский · svenska · Türkçe · 中文(简体) · 中文(繁體) |