The L4B commands can be sent via chat or via console.
If via console, the command must be prefixed with the l4b
trigger.
Example:
scripted_user_func l4b,bots,lead
If via chat, the prefix is !l4b
, but you can also omit the prefix entirely.
Example:
!l4b nick heal
nick heal
The following commands are in this format: <botsource> <command> [parameter]
<botsource> can be:
- bot (the bot is automatically selected)
- bots (all the bots)
- botname (name of the bot)
[parameter] is optional and depends on the command.
Admin Command | Description |
---|---|
<botsource> die | The order is executed immediately. The bot(s) will die. If 'bot' botsource is used, the selected bot will be the bot you are looking at. NOTE: only the admins can use this command. |
<botsource> dump | The order is executed immediately. The bot(s) will print all their L4B2 AI data to the console (for debugging purposes). If 'bot' botsource is used, the selected bot will be the bot you are looking at. NOTE: only the admins can use this command. |
<botsource> pause | The order is executed immediately. The bot(s) will be forced to start a pause (for debugging purposes). If 'bot' botsource is used, the selected bot will be the bot you are looking at. NOTE: only the admins can use this command. |
User Command | Description |
---|---|
<botsource> automation [switch] | The order is executed immediately. If 'current' [switch] is used (or [switch] is empty), the automation system will start the current task(s). If 'all' [switch] is used, the automation system will start the current task(s) and will automatically start the next ones. If 'stop' [switch] is used, the automation system will stop the current task(s) and the automatic execution of the next ones (if previously started with 'all'). NOTE: 'botsource' is ignored, it can be either 'bots', 'bot' or 'botname', the result is the same. |
<botsource> carry | The order is added to the given bot(s) orders queue. The bot(s) will pick and hold the carriable item (gnome, gascan, cola, etc.) you are looking at. |
<botsource> come | The order is added to the given bot(s) orders queue. The bot(s) will come to your current location (alias of '<botsource> goto me'). |
<botsource> deploy | The order is added to the given bot(s) orders queue or executed immediately. The bot(s) will go pick the deployable item (ammo upgrade packs) you are looking at and deploy it immediately. If you aren't looking at any item and the bot already has a deployable item in his inventory, he will deploy that item immediately. |
<botsource> destroy | The order is added to the given bot(s) orders queue. The bot(s) will go shoot the gascans you are looking at to destroy the barricade. |
<botsource> follow [target] | The order is added to the given bot(s) orders queue. The bot(s) will start following you (if [target] isn't specified) or the given target survivor. You can also use the keyword 'me' as the 'target' to make the bot(s) follow you. |
<botsource> give | The order is executed immediately. The bot will give you one item from their pills/throwable/medkit inventory slot if your slot is empty. 'bot' and 'bots' botsources are the same here, the first available bot is selected. |
<botsource> goto [target] | The order is added to the given bot(s) orders queue. The bot(s) will go to the location you are looking at (if [target] isn't specified) or to the current target's position. 'target' can be another survivor or the keyword 'me' to come to you. |
<botsource> heal [target] | The order is added to the given bot(s) orders queue. The bot(s) will heal himself/themselves (if [target] isn't specified) or the target survivor. 'target' can also be the bot himself or the keyword 'me' to heal you. |
<botsource> hurry | The order is executed immediately. The bot(s) L4B2 AI will stop doing anything for 'hurry_time' seconds. Basically they will cancel any pending action/order and ignore pickups, defibs, throws etc. for that amount of time. |
<botsource> lead | The order is added to the given bot(s) orders queue. The bot(s) will start leading the way following the map's flow. |
<botsource> lock [off] | The order is executed immediately. If no [off] parameter is specified, the bot(s) will start shooting the same target you shoot until you stop it with the [off] parameter (any value). This command can be useful to make the bots shoot at the non standard scripted bosses in custom maps or items they wouldn't normally shoot. |
<botsource> move | Alias of '<botsource> cancel all'. |
<botsource> scavenge [switch] | The order is added to the given bot(s) orders queue (if [switch] is not specified) or it's executed immediately (if 'start/stop' switch is used). The bot(s) will scavenge the item you are looking at (gascan, cola bottles) if a pour target is active and [switch] isn't specified. You can give this order to any bot, including the ones who aren't already scavenging automatically. If 'start/stop' switch is used, the command will start/stop the scavenge process. In this case the botsource parameter is ignored, the scavenge bot(s) are always selected automatically. |
<botsource> swap | The order is executed immediately. You will swap the item you are holding (only for items from the pills/throwable/medkit inventory slots) with the selected bot. 'bot' and 'bots' botsources will both select the bot you are looking at. |
<botsource> tempheal | The order is executed immediately. The bot(s) will use their pain pils/adrenaline. If 'bot' botsource is used, the selected bot will be the bot you are looking at. |
<botsource> throw [item] | The order is executed immediately. The bot(s) will throw their throwable item to the location you are looking at. The bot(s) must have the given [item] type (if [item] is specified). |
<botsource> use | The order is added to the given bot(s) orders queue. The bot(s) will use the entity (pickup item / press button etc.) you are looking at. |
<botsource> usereset | The order is executed immediately. The bot(s) will stop using the weapons picked up via 'use' order and will go back to its weapon preferences / team weapon rules. |
<botsource> wait [location] | The order is added to the given bot(s) orders queue. If [location] is not specified, the bot(s) will hold his/their current position. If 'here' [location] is used, the bot(s) will hold position at your current location. If 'there' [location] is used, the bot(s) will hold position at the location you are looking at. |
<botsource> warp [location] | The order is executed immediately. If [location] is not specified or 'here' [location] is used, the bot(s) will teleport to your current location. If 'there' [location] is used, the bot(s) will teleport to the location you are looking at. If 'move' [location] is used, the bot(s) will teleport to their current MOVE location (if any). If 'bot' botsource is used, the selected bot will be the bot you are looking at. |
<botsource> witch | The order is added to the given bot(s) orders queue. The bot(s) will try to kill the witch you are looking at. |
To cancel all or some of the order use: <botsource> cancel [switch]
<botsource> can be:
- bots (all the bots)
- botname (name of the bot)
"bot" botsource is not allowed here.
[switch] is optional and can be:
Switch | Description |
---|---|
current | The given bot(s) will abort his/their current order and will proceed with the next one in the queue (if any) |
ordertype | The given bot(s) will abort all his/their orders (current and queued ones) of type ordertype Example: coach cancel lead |
orders | The given bot(s) will abort all his/their orders (current and queued ones) of any type |
defib | The given bot(s) will abort any pending defib task. "botname cancel defib" is temporary (the bot will retry). "bots cancel defib" is permanent (currently dead survivors will be abandoned) |
all (or empty) | The given bot(s) will abort everything (orders, current pick-up, anything) |
From the game just type:
!l4b help
to see the list of the allowed commands and:
!l4b help <command>
For the info on that command.
The orders that are added to the bot's queue are automatically executed according to their priorities:
Order | Priority |
---|---|
carry | 0 |
follow | 0 |
lead | 0 |
scavenge | 0 |
goto | 1 |
wait | 1 |
deploy | 2 |
heal | 2 |
use | 2 |
destroy | 2 |
witch | 3 |
Orders with higher priority are executed first.
Orders with the same priority are executed with the same order as they have been received.
The next order in the queue is not executed until the current order is not finished or cancelled (Example: coach cancel current
).
To select the bot for the command via vocalizer you can look at the bot and use the "Look" vocalizer line (like in L4B1). However that vocalizer line is very inconsistent, sometimes your character fails to call the bot and will say "Weapons here" or something else, depending on what is in your field of view.
So i added a command to simplify this process: botselect [botname]
botname is the name of the bot you want to select. If you omit it, the addon will automatically select the bot closest to your crosshair.
The !l4b
trigger is mandatory if you use this command via chat but you may want to use the console version instead and bind it to some key on the keyboard:
bind "KEY" "scripted_user_func l4b,botselect"
Vocalizer line | Vocalizer command | L4B2 command 1 | L4B2 command 2 |
---|---|---|---|
Lead | PlayerLeadOn | bots lead | botname lead |
Wait | PlayerWaitHere | bots wait | botname wait |
GO | PlayerEmphaticGo | bots goto | botname goto |
Witch | PlayerWarnWitch | bot witch | botname witch |
Move | PlayerMoveOn | bot use | botname use |
Stay Together | PlayerStayTogether | bots cancel | botname cancel |
Follow me | PlayerFollowMe | bot follow me | botname follow me |
Suggest Heal | iMT_PlayerSuggestHealth | bots heal | botname heal |
Ask health | AskForHealth2 | bot heal me | botname heal me |
I'm here! | PlayerAnswerLostCall | bot give | botname give |
Hello | iMT_PlayerHello | bot swap | botname swap |
Hurry | PlayerHurryUp | bots hurry | botname hurry |
I'm with you | PlayerImWithYou | bots automation all | botname automation all |
You can change these bindings by editing the file ems/left4bots2/cfg/vocalizer.txt
.
Each line in the file is in the format: <vocalizer command> = <l4b2 command1>,<l4b2 command2>
<l4b2 command1> and <l4b2 command2> must be the complete commands as you type them in chat (without the !l4b
trigger).
<l4b2 command1> is the command that will be used when no bot is selected.
<l4b2 command2> is for the command after selecting the bot. Here you can use the keyword botname
which will be replaced by the name of the selected bot.
As Admin you can inspect/change any L4B2 setting directly from the game via settings
command:
!l4b settings dodge_spit
!l4b settings dodge_spit 0
If you don't remember the correct name of the settings you can use the findsettings
command to list all the setting names matching the given text:
!l4b findsettings dodge
Preference files in the weapons
cfg folder are reloaded at the beginning of each round but as admin you can force a reload with the reloadweapons
command for one specific bot or all of them:
!l4b reloadweapons coach
!l4b reloadweapons all