電腦人BOT

From Team Fortress Wiki
< Bots
Revision as of 09:45, 14 January 2011 by ArikamaI (talk | contribs)
Jump to: navigation, search
File:Tr dustbowl0003.jpg
一個火箭兵電腦人。在Dustbowl的訓練地圖內。
我的拳頭!它們真的是用做的!
重裝兵電腦人對自己的認知

在TF2的電腦人(BOT),有兩種模式:「人工智慧電腦人」和「標靶電腦人」。人工智慧電腦人是以一連串複雜的程式碼做出來,在遊戲中模仿真人玩家,可對戰的人工智慧。標靶電腦人就沒有人工智慧程式碼,只會呆站在原地,但他們在玩家測試武器或當標靶時很有用。標靶電腦人需要伺服器開啟作弊碼才能使用。這意味著在使用這種電腦人時,成就並不會被達成。

人工智慧電腦人(簡稱AI BOT)

AI Bot是被設計來模仿人類玩家,動作自主,讓真人可和它們對戰的電腦人。除此之外,他們選兵種時是隨機挑伺服器選的。它們使用了和惡靈勢力系列裡的AI相同的複雜程式碼。[1]AI Bot不需要伺服器開啟作弊碼就能使用,因此,你在和它們對戰時,成就仍可以達成。

AI Bots也有一些經常會出現的行為:

  • 準備時間(Setup time)時,有在你的準心上的AI電腦人都會做嘲諷動作。
  • 如果你按下請求治療鈕(預設E鍵),任何同隊的醫護兵電腦人都會過來醫治你。.
  • 如果一個醫護兵正醫治你,而且醫療槍電量也達100%時,按下"Go go go!"(Z-3)或"Activate Charge!"(X-7)聲音指令會讓那個醫護兵電腦人啟動他的醫療槍無敵。

現在人工智慧BOT的情況:

AI Bots are in beta testing and will become more sophisticated as they are updated. Currently, not all classes have proper AI support, a good example being the Spy. Spy bots will run away from the player or other enemies if they are approached while facing them and will never use their Cloak. Bots can only play as a Spy in Highlander mode, by typing "tf_bot_force_class Spy" into the 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 (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 emulate human players as well.

Note: A pack of pre-made bot meshes has been compiled for many popular maps.

在沒AI BOT支援的地圖叫出電腦人: :

  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 to add bots

You can use bots on any map on which you have performed the above steps without having to repeat them, except for entering the "tf_bot_add <number>" command each time you want to add bots.

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

AI電腦人特徵

  • 電腦人目前為止不能使用任何非基本武器,或是戴上帽子和配帶其他物品
  • 電腦人目前為止不會跳躍火箭跳黏彈跳
  • 如果電腦人成功殺了一個玩家,它們很有可能會當場做出嘲諷,即使他們仍被敵方攻擊時也一樣。
  • 當敵隊的電腦人看到你所操控的已偽裝的Spy,他會持續看著你,但不會攻擊,除非你主動攻擊或是撞到敵人。
  • 電腦人控制的Pyro會很頻繁的使用壓縮氣爆來反彈飛行物。

AI Bot指令

在有支援AI Bot的地圖中使用AI Bot,伺服器的管理員應該會在控制台(console:按下~鍵打開)打入以下指令:

指令碼 功用描述
tf_bot_add 這指令會在地圖中叫出一個或更多個隨機兵種,隨機隊伍的電腦人。他們會以"設計過的名子"被命名。
語法
tf_bot_add [<count>] [<class>] [<team>] [<difficulty>]
參數
<count>
設定有多少個電腦人會被叫出。如果忽略這項,就只會有一個BOT被叫出。
設定數字時要注意真人玩家和電腦人總人數的最大值。如果伺服器的人數最大值為24,只有一名真人玩家時,你應該只叫出最多23名AI BOT。超過的話會讓叫出的BOT站在原地。
<class>
設定兵種名稱。應打入:DemomanEngineerHeavyweaponsMedicPyroScoutSoldierSniperSpy
<team>
設定電腦人應加入哪個隊伍。會是:redblue
<difficulty>
設定電腦人的實力,難度。鍵入:easynormal 或hard
例子
tf_bot_add red 3 heavyweapons easy ---> 會叫出3個難度簡單的重裝兵到紅隊。
tf_bot_difficulty 設定所有加入的電腦人的難度。
語法
tf_bot_difficulty <level>
參數
<level>
設定所有加入的電腦人的難度。參數會是: 0=簡單,1=中等,2=難,3=專家。預設值是中等(1)。
例子
tf_bot_difficulty 2 --->會使這段指令後所有叫出的電腦人的難度為"難"。
tf_bot_force_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.

標靶電腦人

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.

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, Heavy, 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的名子

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.

;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

更新紀錄

January 6, 2010 Patch

  • Various improvements to combat behaviors.
  • 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 Medi Gun continuously at round start.
    • Won't choose cover far below their heal target so much (koth_nucleus).
    • 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 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".
    • 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.

April 28, 2010 Patch

  • 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.

June 10, 2010 Patch

  • Looking at a bot player for a few seconds now causes it to taunt.

June 14, 2010 Patch

  • Fixed server crash related to bots and health kits.

June 16, 2010 Patch

  • 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.

July 19, 2010 Patch

  • 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 Sentry Guns 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.

參考