Bot generator: Difference between revisions
Jump to navigation
Jump to search
Warning:
Note:values <= 0 will cause an infinite amount of bots to spawn.
Note:Despite claiming to require a target, the input does not use it or require it.
Bug:Appears to only remove half of the bots spawned? [todo tested in ?]
m (Updated old entity format to {{this is a}}. This action was perfomed by a bot.) |
(Updated keyvalues to match FGD (seriously, valve had better documentation) and add some stuff that was missing from the FGD as well. I kept some descriptions from the previous version because they were better.) |
||
Line 1: | Line 1: | ||
{{this is a|e0|game=tf2|name=bot_generator}} | {{this is a|e0|game=tf2|name=bot_generator}} | ||
Line 8: | Line 5: | ||
==Keyvalues== | ==Keyvalues== | ||
{{KV|Team|choices|Which team this generator is for.}} | {{KV|Team|intn=team|choices|Which team this generator is for.}} | ||
{{KV|Class|choices|Pick the class to spawn. Picking a | :* auto : Any | ||
{{KV| | :* red : Red | ||
{{KV| | :* blue : Blue | ||
{{KV|Action Point|target_destination|Set this to have the bot travel to a specific | :* spectate : Spectator {{!fgd}} | ||
{{KV| | {{KV|Class|intn=class|choices|Pick the class to spawn. Picking a specific class will override bot_roster restrictions.}} | ||
{{KV| | :* auto : Any | ||
:* scout : Scout | |||
{{KV|Disable Dodging| | :* sniper : Sniper | ||
{{KV| | :* soldier : Soldier | ||
{{KV|Use Spawn Point| | :* demoman : Demoman | ||
{{KV|Difficulty|choices|Set the generated bots' difficulty to this value.}} | :* medic : Medic | ||
:* heavyweapons : Heavy | |||
:* pyro : Pyro | |||
:* spy : Spy | |||
:* engineer : Engineer | |||
{{KV|Count|intn=count|integer|The maximum number of bots to spawn from this generator. | |||
{{note|values <{{=}} 0 will cause an infinite amount of bots to spawn.}}}} | |||
{{KV|Max Active|intn=maxActive|integer|Maximum number of bots from this generator that can be active at once from this generator.}} | |||
{{KV|Interval|intn=interval|float|Number of seconds between bots spawning from this generator.}} | |||
{{KV|Action Point|intn=action_point|target_destination|Set this to have the bot travel to a specific {{ent|bot_action_point}} upon spawning if the proper Spawn Command to be set.}} | |||
{{KV|Initial Command|intn=initial_command|choices|Command the bot should execute upon spawning. No command is executed if left blank}} | |||
:* goto action point : Go to specified Action Point | |||
:* taunt : Taunt | |||
:* despawn : Leave the game | |||
:* cloak : If Spy, Cloak | |||
:* uncloak : If Spy, Uncloak | |||
:* attack sentry at next action point : Attack sentry gun at next action point | |||
:* disguise : If Spy, Disguse | |||
{{KV|Suppress Fire|intn=suppressFire|bool|Setting this to Yes will make the bots not attack.}} | |||
{{KV|Disable Dodging|intn=disableDodge|bool|Setting this to Yes will prevent the bots from making erratic movements in an effort to dodge.}} | |||
{{KV|Action on Death|intn=actionOnDeath|integer|When a bot dies, it will do one of these.}} | |||
:* 0 : Respawn as usual | |||
:* 1 : Remove self | |||
:* 2 : Move to Spectator team | |||
{{KV|Move to Spectator Team on Death?|intn=spectateOnDeath|bool|This has been superseded by "Action on Death", and is no longer functional.|deprecated=1}} | |||
{{KV|Use Team Spawn Point|intn=useTeamSpawnPoint|bool|Setting this to Yes will make the bots spawn from an {{ent|info_player_teamspawn}} instead of this generator.}} | |||
{{KV|Retain Buildings After Disconnect|intn=retainBuildings|bool|If set, any buildings (sentries, sappers, etc) built by bots from this generator will not be destroyed when their owners are removed.}} | |||
{{KV|Difficulty|intn=difficulty|choices|Set the generated bots' difficulty to this value.}} | |||
:* -1 : Default | |||
:* 0 : Easy | :* 0 : Easy | ||
:* 1 : Normal | :* 1 : Normal | ||
:* 2 : Hard | :* 2 : Hard | ||
:* 3 : Expert | :* 3 : Expert | ||
{{KV|Don't spawn bots unless triggered|intn=spawnOnlyWhenTriggered|bool|If this is set, you must use the SpawnBot input to have any bots spawn.}} | |||
{{KV BaseEntity}} | {{KV BaseEntity}} | ||
==Flags== | |||
{{Fl|1|Spawned Bots Ignore Enemy Scouts}} | |||
{{Fl|2|Spawned Bots Ignore Enemy Soldiers}} | |||
{{Fl|4|Spawned Bots Ignore Enemy Pyros}} | |||
{{Fl|8|Spawned Bots Ignore Enemy Demomen}} | |||
{{Fl|16|Spawned Bots Ignore Enemy Heavies}} | |||
{{Fl|32|Spawned Bots Ignore Enemy Medics}} | |||
{{Fl|64|Spawned Bots Ignore Enemy Engineers}} | |||
{{Fl|128|Spawned Bots Ignore Enemy Snipers}} | |||
{{Fl|256|Spawned Bots Ignore Enemy Spies}} | |||
{{Fl|512|Spawned Bots Ignore Enemy Sentry Guns}} | |||
{{Fl|1024|Spawned Bots Ignore Scenario Goals}} | |||
==Inputs== | ==Inputs== | ||
{{IO| | {{IO|SetSuppressFire|Set whether spawned TFBots should attack.|param=bool|}} | ||
{{IO| | {{IO|SetDisableDodge|Set whether spawned TFBots should dodge.|param=bool}} | ||
{{IO| | {{IO|SetDifficulty|Change the skill level of spawned TFBots.|param=integer}} | ||
{{IO|CommandGoToActionPoint|Commands all bots spawned by this generator to go to the specified {{ent|bot_action_point}}.|param=target}} | |||
{{IO| | {{IO|SetAttentionFocus|All bots spawned by this generator will focus exclusively on this entity. If the entity is a {{ent|bot_action_point}}, entities within that point's radius will be attended to.|param=target}} | ||
{{IO| | {{IO|ClearAttentionFocus|Remove attention focus restrictions from bots spawned by this generator. | ||
{{IO| | {{note|Despite claiming to require a target, the input does not use it or require it.}}|param=target}} | ||
{{IO| | {{IO|SpawnBot|Attempt to spawn a bot within the rules specified.}} | ||
{{IO| | {{IO|RemoveBots|Force remove any bots this entity spawned. | ||
{{bug|Appears to only remove half of the bots spawned?}}}} | |||
{{I TFTeam}} | |||
{{I EnableDisable}} | |||
{{I BaseEntity}} | {{I BaseEntity}} | ||
==Outputs== | ==Outputs== | ||
{{IO|OnSpawned}} | {{IO|OnSpawned|Sent when the bot generator has spawned a TFBot,}} | ||
{{IO|OnExpended}} | {{IO|OnExpended|Sent when the bot generator has reached its limit of the bots it can create.}} | ||
{{IO|OnBotKilled|Sent when a bot associated with this bot generator is killed.}} | |||
{{O BaseEntity}} | {{O BaseEntity}} |
Revision as of 19:14, 2 May 2024
bot_generator
is an e0 available in Team Fortress 2.

- The {{{game}}} parameter is inconsistent with the name defined by the {{tf2}} template. This can most likely be fixed by setting the value of the {{{game}}} parameter to Team Fortress 2.
If a parameter is consistent but you're still seeing this warning, it may be an issue with the template itself. Please discuss it on the template's talk page.
Entity description
bot_generator generates bots.
Keyvalues
- Team (team) <choices>
- Which team this generator is for.
- auto : Any
- red : Red
- blue : Blue
- spectate : Spectator !FGD
- Class (class) <choices>
- Pick the class to spawn. Picking a specific class will override bot_roster restrictions.
- auto : Any
- scout : Scout
- sniper : Sniper
- soldier : Soldier
- demoman : Demoman
- medic : Medic
- heavyweapons : Heavy
- pyro : Pyro
- spy : Spy
- engineer : Engineer
- Count (count) <integer>
- The maximum number of bots to spawn from this generator.

- Max Active (maxActive) <integer>
- Maximum number of bots from this generator that can be active at once from this generator.
- Interval (interval) <float>
- Number of seconds between bots spawning from this generator.
- Action Point (action_point) <targetname>
- Set this to have the bot travel to a specific bot_action_point upon spawning if the proper Spawn Command to be set.
- Initial Command (initial_command) <choices>
- Command the bot should execute upon spawning. No command is executed if left blank
- goto action point : Go to specified Action Point
- taunt : Taunt
- despawn : Leave the game
- cloak : If Spy, Cloak
- uncloak : If Spy, Uncloak
- attack sentry at next action point : Attack sentry gun at next action point
- disguise : If Spy, Disguse
- Suppress Fire (suppressFire) <boolean>
- Setting this to Yes will make the bots not attack.
- Disable Dodging (disableDodge) <boolean>
- Setting this to Yes will prevent the bots from making erratic movements in an effort to dodge.
- Action on Death (actionOnDeath) <integer>
- When a bot dies, it will do one of these.
- 0 : Respawn as usual
- 1 : Remove self
- 2 : Move to Spectator team
Move to Spectator Team on Death? (spectateOnDeath) <boolean>- Deprecated.
This has been superseded by "Action on Death", and is no longer functional.
- Use Team Spawn Point (useTeamSpawnPoint) <boolean>
- Setting this to Yes will make the bots spawn from an info_player_teamspawn instead of this generator.
- Retain Buildings After Disconnect (retainBuildings) <boolean>
- If set, any buildings (sentries, sappers, etc) built by bots from this generator will not be destroyed when their owners are removed.
- Difficulty (difficulty) <choices>
- Set the generated bots' difficulty to this value.
- -1 : Default
- 0 : Easy
- 1 : Normal
- 2 : Hard
- 3 : Expert
- Don't spawn bots unless triggered (spawnOnlyWhenTriggered) <boolean>
- If this is set, you must use the SpawnBot input to have any bots spawn.
Flags
- Spawned Bots Ignore Enemy Scouts : [1]
- Spawned Bots Ignore Enemy Soldiers : [2]
- Spawned Bots Ignore Enemy Pyros : [4]
- Spawned Bots Ignore Enemy Demomen : [8]
- Spawned Bots Ignore Enemy Heavies : [16]
- Spawned Bots Ignore Enemy Medics : [32]
- Spawned Bots Ignore Enemy Engineers : [64]
- Spawned Bots Ignore Enemy Snipers : [128]
- Spawned Bots Ignore Enemy Spies : [256]
- Spawned Bots Ignore Enemy Sentry Guns : [512]
- Spawned Bots Ignore Scenario Goals : [1024]
Inputs
- SetSuppressFire <boolean >
- Set whether spawned TFBots should attack.
- SetDisableDodge <boolean >
- Set whether spawned TFBots should dodge.
- SetDifficulty <integer >
- Change the skill level of spawned TFBots.
- CommandGoToActionPoint <targetname >
- Commands all bots spawned by this generator to go to the specified bot_action_point.
- SetAttentionFocus <targetname >
- All bots spawned by this generator will focus exclusively on this entity. If the entity is a bot_action_point, entities within that point's radius will be attended to.
- ClearAttentionFocus <targetname >
- Remove attention focus restrictions from bots spawned by this generator.

- SpawnBot
- Attempt to spawn a bot within the rules specified.
- RemoveBots
- Force remove any bots this entity spawned.

EnableDisable:
- Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.
Outputs
- OnSpawned
- Sent when the bot generator has spawned a TFBot,
- OnExpended
- Sent when the bot generator has reached its limit of the bots it can create.
- OnBotKilled
- Sent when a bot associated with this bot generator is killed.