Bots/zh-hans

From Team Fortress Wiki
< Bots
Revision as of 20:46, 25 December 2010 by Nafoul (talk | contribs) (木偶机器人指令)
Jump to: navigation, search
File:Tr dustbowl0003.jpg
一个士兵机器人在沙尘暴训练地图中活动。
我的拳头可是用钢铁做的!
重机枪手机器人的自我描述

BOT,又称机器人或电脑玩家;在军团要塞2中有两种机器人:智能机器人以及木偶机器人。智能机器人使用了先进的人工智能代码进行编程,因此他们能学习玩家们在游戏中的动作。木偶机器人没有人工智能因此它们不会进行活动,但是它们对游戏测试以及训练有着显著帮助。若要使用木偶机器人,则必须在建立服务器时开启作弊模式,此时将不能完成成就。

智能机器人

智能机器人能够学习玩家的动作并且不会受玩家直接控制。同时,他们都是以随机方式选择兵种的。他们使用复杂的人工智能代码编程,即使用求生之路中生还者机器人以及被感染者机器人的代码设置[1] 添加智能机器人不需要服务器开启作弊模式,因此可以借此完成各种成就。

智能机器人在以下情况能够间接被玩家进行一定程度的控制:

  • 准备时间内,任何被你准心指着的机器人会摆出嘲讽动作,需要玩家也进行嘲讽。
  • 当你使用"Medic!" 语音指令时,附近的己方医生机器人会为你治疗。
  • 当为你治疗的医生机器人的超级冲锋就绪时,使用"Go go go!"或者"Activate Charge!"语音指令会让其启动超级冲锋。

目前智能机器人的情况

智能机器人目前还算是在测试阶段而且随着每次游戏更新智能机器人都会得到一定改进。目前,并不是所有兵种都具有完善的AI智能,间谍就是个好例子。当玩家或者敌人望着间谍机器人时,他就会立刻跑开,而且也从不使用隐身功能。目前可以通过创建高地兵团模式地图、在控制台中输入代码"tf_bot_force_class Spy"或是使用第三方软件来为游戏中增加间谍机器人。 大多数的山丘之王模式地图、某些炸弹推车地图、沙尘暴以及麦恩庄园能添加智能机器人(通过在控制台输入tf_bot_add指令来添加机器人)。其他地图也可以使用这个方法添加机器人;但它们无法正常行动。

注:目前已经有一些较为流行的地图被添加了机器人网格

在不支持机器人的地图中添加机器人的步骤

  1. 在控制台中输入"sv_cheats 1"
  2. 在控制台中输入"nav_generate"
  3. 等待系统为地图绘制路径点
  4. 重新载入地图(如果路径点已保存则不用重复之前步骤)
  5. 打开控制台,输入"tf_bot_add <number>"来选择添加机器人的数目

注:即使使用以上步骤,目前也无法在情报争夺模式地图中正常使用机器人

智能机器人的行为

  • 目前还不能为机器人装备成就物品,例如:非默认武器、各种帽子或是其他物品
  • 目前机器人还不懂得使用跳跃火箭跳或是黏弹跳
  • 机器人在杀死玩家后,有几率立刻进行嘲讽,而且就算暴露在敌人火力下也会照做不误。
  • 如果机器人看见已经伪装的地方间谍,它会盯着那名间谍。机器人不会立刻攻击那名间谍直到间谍进行攻击,或是间谍和敌人撞在一起。
  • 火焰兵机器人会频繁使用压缩空气爆破来反弹敌方的火箭、榴弹等。

智能机器人指令

为了在能使用智能机器人的地图中添加机器人,服务器管理员应在控制台中输入以下命令:

指令 说明
tf_bot_add 这个指令用于给双方队伍随机添加机器人,机器人的职业也是随机的。而且它们拥有有趣的名字。
指令语法
tf_bot_add [<count>] [<class>] [<team>] [<difficulty>]
参数说明
<count>
加上这个参数会为服务器添加指定数量的机器人。如果不加这个参数,则每次只会增加一个机器人。
使用这个参数时,如果添加的数目比服务器剩余位置还要多,例如一个24人服务器中有1名玩家,此时要想添加的机器人数目为25,那么只会在服务器中添加23个机器人。
<class>
此处所要填写的为机器人的兵种英文名称,例如Demoman, Engineer, HeavyWeapons, Medic, Pyro, Scout, Soldier, Sniper或是Spy
<team>
此处要填写的是想要机器人加入的队伍英文名称,例如red或者blue
<difficulty>
此处填写的是机器人的难度等级,例如easy, normal或者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 如果填写一个兵种名称,则所有机器人都会选择此兵种。
指令语法
tf_bot_force_class <class>
参数说明
<class>
class处可以填写以下职业名称Demoman, Engineer, HeavyWeapons, Medic, Pyro, Scout, Soldier, Sniper或是Spy。默认情况下是随机选择兵种。
例如
tf_bot_force_class medic意为所有机器人都会选择医生。
tf_bot_join_after_player 如果参数不为零,则机器人将会在玩家加入游戏后跟随加入。
指令语法
tf_bot_join_after_player <integer>
参数说明
<integer>
此处可以填写 1 或者 0. 默认是 1 (即机器人会等待玩家)。
例子
tf_bot_join_after_player 0意为即使没有玩家加入游戏,也会添加机器人。
tf_bot_keep_class_after_death 如果参数为0,那么每次机器人重生时都会重新选择职业。
指令语法
tf_bot_keep_class_after_death <integer>
参数说明
<integer>
可以填写 1 或者 0。默认为0(开启此功能)。
例子
tf_bot_keep_class_after_death 1意为不允许机器人更换兵种。
tf_bot_kick

这个指令能将机器人踢出服务器。

指令语法
tf_bot_kick <name/all>
参数说明
<name/all>
填写想要踢出的机器人名称或是踢出所有机器人。
例子
tf_bot_kick CEDA意为将名称为"CEDA"的机器人踢出。
tf_bot_prefix_name_with_difficulty 如果参数不为零,则会在机器人名称之前添加其技能等级代码。
指令语法
tf_bot_prefix_name_with_difficulty <integer>
参数说明
<integer>
可以填写 1 或者 0。默认为0(不开启此功能)。
例子
tf_bot_prefix_name_with_difficulty 1以为机器人的名字会变为"1 Aimbot" (普通难度)或是"3 Saxton Hale" (专家难度).
tf_bot_quota 这个指令是用来决定服务器中机器人玩家的数目的,其非默认参数设置只有两种:"tf_bot_quota_mode" = "fill" or "match".
指令语法
tf_bot_quota <integer>
参数说明
<integer>
设定的数字为0至服务器最大人数之间的一个数字。默认为0。
例子
tf_bot_quota 2,如果tf_bot_quota_mode 设置为 match,则每有一名玩家加入服务器时,就添加2个机器人。服务器中每加入一名玩家时则会自动添加2个机器人。
tf_bot_quota_mode 决定机器人的分配类型。
指令语法
tf_bot_quota_mode<normal/fill/match>
参数说明
normal/fill/match
如果为'normal',服务器则不会增加或踢出任何机器人,除非有明确的指令;bot_quota的指令也无效。
如果为'fill',服务器则会根据玩家人数,按照1:1的比例增加机器人玩家。
如果为'match',则服务器会根据玩家人数按照1:N的比例增加机器人,此处N是指 bot_quota 设定的参数。
例子
tf_bot_quota_mode fill意为服务器永远保持与玩家人数相同数量的机器人玩家。

木偶机器人

木偶机器人没有AI程序所以不会自行运动。这类机器人就像牵线木偶一样,玩家可以通过指令来控制他们的行为,例如跟随玩家动作或是开火。木偶机器人只要被用于测试方面,如果使用恰当的指令,还可利用它们制作惊人的视觉效果。

木偶机器人指令

并不是所有指令都有效果,但为了明确,下面列表中列出了所有的指令。

注: 只输入指令的主体部分但不输入参数部分时,并不会使指令生效,而且还会得到个间接的指令说明。

指令 说明
bot 使用这个指令时会为服务器中添加一个机器人,如果没有明确参数设定时,机器人则会随机选择的兵种与团队。
指令语法
bot -team <teamname/number> -class <classname> -name <botname>
参数说明
-team teamname/number
指定机器人的添加数目与加入的团队。name/number可以设置为RED或是1BLU或是0
-class classname
classname可设置为Demoman, Engineer, HeavyWeapons, Medic, Pyro, Scout, Soldier, Sniper以及Spy
-name botname
botname可以设置为任何参数。如果出现同名的机器人,则会在所有同名机器人前面增加一个数字来区分彼此(从1开始),从最早加入的那个机器人开始编号。例如, joe, (1)joe, (2)joe, 等等。如果不指定名字,则所有加入的机器人都已"bot"加上数字进行命。数字从01开始编号; 例如,第一个加入的机器人名字为 bot01,第二个为bot02,后面以此类推。
例子
bot -team red -class Engineer -name joe这个代码的意思是:为红队添加一名工程师机器人,名字为joe。
bot_changeclass 强制所有机器人选择指定的兵种类型。

此命令好像还不能正常使用。

bot_changeteams

让所有机器人强制更换团队。 这会强制所有的机器人交换团队,例如一个在红队的机器人更换到蓝队去,反之亦然。

bot_command 命令指定的机器人做出特定的行为。
指令语法
bot_command <botname> <console command>
botname填入的是你想要命令的机器人的名称。
console command填入的是你想要机器人所做的事情的指令,请查看控制台指令.
例子 1
bot_command bot01 "voicemenu 0 0" 命令机器人01号使用语音菜单中的0 0选项
例子2 2
bot_command bot01 "taunt" 命令机器人01号使用嘲讽动作
切换指令与bot_command不能同时生效,但是使用bot_forcefireweapon指令,可以让所有机器人切换到指定武器并且不停开火,也可以让它们停止开火。当然,你只能强制命令指定并种类型的机器人这么做。
bot_defend 指定特定团队的所有机器人进行防御,此时指定队伍的所有机器人都将处于防御状态。

例如,重机枪手机器人使它们的机枪旋转起来。

bot_dontmove 允许或禁止机器人进行移动。当指令设置为1时,所以机器人都不能够移动但它们依然能转身和跳跃。配合这个bot_mimic指令,你可以把机器人带到你想它们去的地方并且让它们呆在那里不动。
指令语法
bot_dontmove <0/1>
允许或禁止机器人进行移动。
例子
bot_dontmove 1意为禁止所有机器人移动
bot_forceattack 这会强制所有机器人开火,无论它们手上使用的是什么武器。如果bot_forceattack2指令设置成0,那么机器人会使用主武器开火。如果设置成1,那它们则使用副武器开火。

如果bot_mimic指令生效时(设置成1),那么强制开火指令就不会生效。

指令语法
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.

;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