Left 4 Dead 2

Left 4 Dead 2

Left 4 Bots (Improved A.I.)
 This topic has been pinned, so it's probably important
smilzo  [developer] Nov 10, 2020 @ 11:13pm
Bugs
Use this thread to report bugs in the Left 4 Bots addon, but please, make sure to follow these steps:

1. Disable all the addons (except this one and Left 4 Lib). If the issue persists you can proceed to step 2, otherwise it's just one of the other addons that might be incompatible.

2. Disable Left 4 Bots and Left 4 Lib, restart the game, re-enable them and check if the issue persists.

3. Delete the content of the "ems/left4bots" folder (or rename the folder so you have a backup) and try again.

4. Make sure it's not one of the issues listed below or just a vanilla AI thing. If it's not or you aren't 100% sure, proceed to step 5.

5. Report the bug but pls, add as many details as you can, also check the console for vscript errors. Even better if you can record and post a video of the issue.


The following are some known issues that ARE NOT Left 4 Bots bugs:

Left 4 Bots and Admin System stopped working since the October 22 update
No worries, as i also said in the changelog, you just need to install this addon:
https://steamcommunity.com/workshop/filedetails/?id=2634208272

Bots are dumb
Sometimes the bots just stare at you while you get destroyed by a special infected, sometimes they prefer to go revive the downed survivor at the other side of the map even if you are down next to them, sometimes they mindlessly run to revive a survivor even if there is a giant tank in their path and sometimes they do other stupid things.
These issues are a thing even without the addon and unfortunately i cannot fix them but luckily, most of the times, you can avoid these issues just by being a good team leader. Always stick with them, help them and make sure they're always in the best conditions so they can help you back when you need it.

The bots stopped shooting the common infected
This is a very old bug of the game (not caused by this addon). When you throw a pipe bomb you will probably notice that the bots stop shooting the commons until the bomb explodes. This bug gets worse if you or someone else throws a pipe bomb while in the end saferoom and the door is closed before the pipe bomb explodes. When this happens the bots will remain bugged for the entire next chapter. It also happens when you quit the session while an active pipe bomb is on the ground and then you start another one without restarting the game.

Unfortunately i cannot fix this bug with a mod, only the devs can fix it. The only thing you can do to avoid this bug is to make sure not to close the end saferoom door if there is a pipe bomb ticking on the ground, wait until it explodes.

There seem to be another way to avoid the bug completely by joining a random public game before you host your game. Just join, wait for the map to load then disconnect (not quit) and now you can host your own game. I cannot guarantee it works every time, it is pretty inconsistent but if it works, when you throw a pipe bomb the bots will not stop shooting. That means that you are also safe when closing the saferoom door.

Issues with sourcemod / metamod
If you have issues make sure SM and MM are updated to the latest stable versions.
If they are updated and you stll having issues, it is possible that you have incompatible plugins installed.
If you find the incompatible plugins / addons, post here for the other people to know, thanks.

Windows dedicated server crashes when changing map via console
It also happens when joining the server via lobby.
Unfortunately it's a bug of the windows version of the L4D2 dedicated server (linux version doesn't seem to be affected) and it happens when the cvars "allow_all_bot_survivor_team" and "sb_all_bot_game" are set to "1".
There is nothing i can do about it because it's in the server's source code but you can prevent it by removing the lines
allow_all_bot_survivor_team 1 sb_all_bot_game 1
from the "convars.txt" file (or you can just move to a linux DS).
Last edited by smilzo; Jan 4, 2022 @ 6:24am
< >
Showing 1-15 of 742 comments
Princess LadyRain Nov 11, 2020 @ 12:04am 
AN ERROR HAS OCCURED [the index 'GoToEnt' does not exist]

CALLSTACK
*FUNCTION [unknown()] scripts/vscripts/left4bots.nut line [2199]
*FUNCTION [unknown()] scripts/vscripts/left4bots.nut line [1057]
*FUNCTION [unknown()] scripts/vscripts/left4bots_events.nut line [193]
*FUNCTION [__RunEventCallbacks()] unnamed line [211]
*FUNCTION [__RunGameEventCallbacks()] unnamed line [218]

LOCALS
[scope] NULL
[attacker] INSTANCE
[bot] INSTANCE
[this] TABLE
[params] TABLE
[attacker] INSTANCE
[player] INSTANCE
[this] TABLE
[attacker] INSTANCE
[player] INSTANCE
[params] TABLE
[this] TABLE
[funcName] "OnGameEvent_player_hurt"
[idx] 0
[useTable] TABLE
[bWarnIfMissing] false
[globalTableName] "GameEventCallbacks"
[prefix] "OnGameEvent_"
[params] TABLE
[event] "player_hurt"
[this] TABLE
[params] TABLE
[event] "player_hurt"
[this] TABLE
smilzo  [developer] Nov 11, 2020 @ 8:01am 
Originally posted by Princess LadyRain:
AN ERROR HAS OCCURED [the index 'GoToEnt' does not exist]

CALLSTACK
*FUNCTION [unknown()] scripts/vscripts/left4bots.nut line [2199]
*FUNCTION [unknown()] scripts/vscripts/left4bots.nut line [1057]
*FUNCTION [unknown()] scripts/vscripts/left4bots_events.nut line [193]
*FUNCTION [__RunEventCallbacks()] unnamed line [211]
*FUNCTION [__RunGameEventCallbacks()] unnamed line [218]

LOCALS
[scope] NULL
[attacker] INSTANCE
[bot] INSTANCE
[this] TABLE
[params] TABLE
[attacker] INSTANCE
[player] INSTANCE
[this] TABLE
[attacker] INSTANCE
[player] INSTANCE
[params] TABLE
[this] TABLE
[funcName] "OnGameEvent_player_hurt"
[idx] 0
[useTable] TABLE
[bWarnIfMissing] false
[globalTableName] "GameEventCallbacks"
[prefix] "OnGameEvent_"
[params] TABLE
[event] "player_hurt"
[this] TABLE
[params] TABLE
[event] "player_hurt"
[this] TABLE
Do you have sourcemod or any other vscript addon installed?
Mocha Nov 11, 2020 @ 10:45am 
Most of the time i cant swap grenades/molotovs/biles with the bots for some reason, no matter the distance or the situation (They can give me their grenades if i dont have any, though)

Thank you for making this mod! Its great!
smilzo  [developer] Nov 11, 2020 @ 10:52am 
Originally posted by MighTea:
Most of the time i cant swap grenades/molotovs/biles with the bots for some reason, no matter the distance or the situation (They can give me their grenades if i dont have any, though)

Thank you for making this mod! Its great!
Yeah i need to improve this. Thx for reporting.
Princess LadyRain Nov 11, 2020 @ 10:57am 
Originally posted by Goben:
Originally posted by Princess LadyRain:
AN ERROR HAS OCCURED [the index 'GoToEnt' does not exist]

CALLSTACK
*FUNCTION [unknown()] scripts/vscripts/left4bots.nut line [2199]
*FUNCTION [unknown()] scripts/vscripts/left4bots.nut line [1057]
*FUNCTION [unknown()] scripts/vscripts/left4bots_events.nut line [193]
*FUNCTION [__RunEventCallbacks()] unnamed line [211]
*FUNCTION [__RunGameEventCallbacks()] unnamed line [218]

LOCALS
[scope] NULL
[attacker] INSTANCE
[bot] INSTANCE
[this] TABLE
[params] TABLE
[attacker] INSTANCE
[player] INSTANCE
[this] TABLE
[attacker] INSTANCE
[player] INSTANCE
[params] TABLE
[this] TABLE
[funcName] "OnGameEvent_player_hurt"
[idx] 0
[useTable] TABLE
[bWarnIfMissing] false
[globalTableName] "GameEventCallbacks"
[prefix] "OnGameEvent_"
[params] TABLE
[event] "player_hurt"
[this] TABLE
[params] TABLE
[event] "player_hurt"
[this] TABLE
Do you have sourcemod or any other vscript addon installed?
Yeah, I ended up figuring out it was Sourcemod that was doing it. The only other vscript add-on I think I have is the Michael Bay pack, but I even turned that off thinking it was causing issues, but apparently it's something with Sourcemod. I'll probably end up going through my plugins to see which is conflicting with it later.
smilzo  [developer] Nov 11, 2020 @ 11:06am 
Originally posted by Princess LadyRain:
Originally posted by Goben:
Do you have sourcemod or any other vscript addon installed?
Yeah, I ended up figuring out it was Sourcemod that was doing it. The only other vscript add-on I think I have is the Michael Bay pack, but I even turned that off thinking it was causing issues, but apparently it's something with Sourcemod. I'll probably end up going through my plugins to see which is conflicting with it later.
Ok, let me know if you find which one is causing it.
Princess LadyRain Nov 11, 2020 @ 12:55pm 
Originally posted by Goben:
Originally posted by Princess LadyRain:
Yeah, I ended up figuring out it was Sourcemod that was doing it. The only other vscript add-on I think I have is the Michael Bay pack, but I even turned that off thinking it was causing issues, but apparently it's something with Sourcemod. I'll probably end up going through my plugins to see which is conflicting with it later.
Ok, let me know if you find which one is causing it.
First plugin I remove and it works now. I don't know where I got it from other than it was somewhere on github, but the plugin.smx's name is aihard.
HK-47 Nov 11, 2020 @ 1:41pm 
As I said in the comments before (one got deleted it seems), this is incompatible with SourceMod and MetaMod stable versions and up-to-date dedicated server. With or without SourceMod plugins for me doesn't make any difference -- it always crashes the server. I hope you can fix it.
Last edited by HK-47; Nov 11, 2020 @ 1:42pm
Robert Nov 11, 2020 @ 3:48pm 
the bots don't really defend themselves when they are in the position in the sacrifice finale after i yelled LEAD ON with the vocalizer
YourMADjesty Nov 11, 2020 @ 6:17pm 
1) Keep crashing my dedicated server right at the start, slowly filtering our my plugins and finally found out it conflict with [L4D2] Points System (v1.8.0, 2016-04-11).

2) it keep on generating a file 'srcds_assert_20201112101423_1.mdmp' whenever I closed my srcds.
Last edited by YourMADjesty; Nov 11, 2020 @ 6:18pm
I have a problem with conflicts between your mod with that of the source mod (the plugin l4d_gear_transfer) the bots get buggy attacking your kits and not delivering your items to the player. Would you have any way to fix this or help me?
smilzo  [developer] Nov 12, 2020 @ 1:01am 
Originally posted by HK-47:
As I said in the comments before (one got deleted it seems), this is incompatible with SourceMod and MetaMod stable versions and up-to-date dedicated server. With or without SourceMod plugins for me doesn't make any difference -- it always crashes the server. I hope you can fix it.
Your comment is still in the comment section i believe. I finally tried to install sourcemod and metamod (latest versions) on my test dedicated server with no plugin except the ones included in the installation i managed to play 2 entire campaigns (The Last Stand and The Passing) without any issue.
If you really removed all the plugins then it's probably the SM MM version.

Originally posted by YourMADjesty:
1) Keep crashing my dedicated server right at the start, slowly filtering our my plugins and finally found out it conflict with [L4D2] Points System (v1.8.0, 2016-04-11).

2) it keep on generating a file 'srcds_assert_20201112101423_1.mdmp' whenever I closed my srcds.
I haven't tried that plugin but it's highly possible that some plugin is not compatible with this addon.
There are hundreds plugins out there, i can't make it compatible with every one, sorry.
smilzo  [developer] Nov 12, 2020 @ 1:14am 
Originally posted by Robert:
the bots don't really defend themselves when they are in the position in the sacrifice finale after i yelled LEAD ON with the vocalizer
The problem is in the limitations of the bot commands that the devs gave to the modders. When they are given the move command the bots don't attack the infected around, which is good for making them carry the gascans but if we had another command to tell them to attack while moving, half of the code of my addon wasn't even needed.
I made them go in a pause state when they are surrounded by more than 2 commons or there are specials around or teammates to help. While in pause they return to their normal AI behavior and can shoot the infected, but they also move back to you. This is why i suggest to clear the area around the generators before sending the bots for the activation.

Originally posted by ℭ𝔯𝔞𝔪𝔲𝔰𝔟𝔬:
I have a problem with conflicts between your mod with that of the source mod (the plugin l4d_gear_transfer) the bots get buggy attacking your kits and not delivering your items to the player. Would you have any way to fix this or help me?
I don't know how that plugin works. Have you tried setting the options "nades_give", "nades_bots_give" and "medkits_bots_give" to "0" in the settings.txt file?
Jinxie Nov 12, 2020 @ 7:37am 
I'm finding an issue related to commanding the bots to activate the 3 generators for the chaos generator. Using "Lead" sends them to the generator but then using "Go" Sends them straight back to my standing position instead of turning on their designated generator. I'm not running any plugins and the majority of my mods are disabled besides Ion's Vocalizer and this mod. Any ideas?
Edit: I've also found an issue where bots don't go to sacrifice themselves with the lead or bots go command. Kind of looked like a pathing issue where Bill was hugging the left side and couldn't jump down. Happened in two tests.
Last edited by Jinxie; Nov 12, 2020 @ 8:16am
Matadito Nov 12, 2020 @ 10:01am 
sometimes bots stay in specific places like stairs or edges
< >
Showing 1-15 of 742 comments
Per page: 1530 50