Left 4 Dead 2

Left 4 Dead 2

Bot AI Improvements
 This topic has been pinned, so it's probably important
T-Rizzle  [developer] 15 Sep, 2022 @ 7:18am
Bugs
Post any bugs you have with the addon here!
Before posting about a bug with the mod please check Known Bugs before posting about the bug you have because I may already be aware of it.
Last edited by T-Rizzle; 26 Oct, 2022 @ 7:19am
< >
Showing 1-15 of 136 comments
tom 13 Oct, 2022 @ 3:07am 
some reason when the bot that has a melee weapon will just keep using it on the tank instead of walking away and shooting, but it'll just swing the melee at the tank instead.
T-Rizzle  [developer] 13 Oct, 2022 @ 6:08am 
Originally posted by meow:
some reason when the bot that has a melee weapon will just keep using it on the tank instead of walking away and shooting, but it'll just swing the melee at the tank instead.
Odd, don’t worry it shouldn’t be too hard to make a fix for this.
tom 13 Oct, 2022 @ 10:22pm 
Originally posted by T-Rizzle:
Originally posted by meow:
some reason when the bot that has a melee weapon will just keep using it on the tank instead of walking away and shooting, but it'll just swing the melee at the tank instead.
Odd, don’t worry it shouldn’t be too hard to make a fix for this.
also, the bots will try to revive when the tank is near the downed survivor.
can you make it so it will fight the tank instead of tryign to get to revive the down player next to the tank. thxs!
T-Rizzle  [developer] 14 Oct, 2022 @ 4:53am 
Originally posted by meow:
Originally posted by T-Rizzle:
Odd, don’t worry it shouldn’t be too hard to make a fix for this.
also, the bots will try to revive when the tank is near the downed survivor.
can you make it so it will fight the tank instead of tryign to get to revive the down player next to the tank. thxs!
I force the retreat command as well as abandoning the revive action but the way the bots are programmed they are forced to revive incapacitated survivors over anything else. This is something that I can only make a band-aid fix for, such as when they attempt to revive the player I force the bot so stop the revive and flee. I wish I could more but I would need source code access.
The tool I use is CommandABot this allows me to manipulate bot behavior, but the command CAN and WILL be overridden by the original programming of the bot. If the current state of the bot is higher than the command.

Example: retreat < liberate incapacitated survivor

Liberate Incapacitated Survivor overrides the retreat command
Last edited by T-Rizzle; 14 Oct, 2022 @ 5:03am
Jariner 15 Oct, 2022 @ 12:27pm 
Please fix the lag caused by this weird error in the console, "SCRIPT PERF WARNING --- "<lambda or free run script>" ran long at 13.319748ms"
tom 15 Oct, 2022 @ 4:27pm 
Originally posted by Jarin:
Please fix the lag caused by this weird error in the console, "SCRIPT PERF WARNING --- "<lambda or free run script>" ran long at 13.319748ms"
yeah i got it aswell it spammed my console every 1 second. rlly annoying
T-Rizzle  [developer] 15 Oct, 2022 @ 5:49pm 
Originally posted by meow:
Originally posted by Jarin:
Please fix the lag caused by this weird error in the console, "SCRIPT PERF WARNING --- "<lambda or free run script>" ran long at 13.319748ms"
yeah i got it aswell it spammed my console every 1 second. rlly annoying
This addon runs on the think function. The think function can run every, 0.0333 seconds on entities, “except for player entities where it is capped at 0.0666 seconds,” because of the amount of functions in this addon sometimes runs longer than the game would like and because of it the game issues a warning through the console.

The only side effect that comes from this is the game might lag every now and then.

What you can do on your side:
Having a high quality computer or dedicated server can fix this. (This is only a suggestion, I'm not expecting everyone to have a high quality gaming laptop like Me)
Only the mod creator (Me) can truly fix this by optimizing the code to help it run faster.
Don't worry about it my top priority is to help this addon run smoother, I even postponed the recent update just to optimize this addon's code.
Last edited by T-Rizzle; 15 Oct, 2022 @ 5:53pm
T-Rizzle  [developer] 15 Oct, 2022 @ 6:06pm 
Originally posted by T-Rizzle:
Originally posted by meow:
yeah i got it aswell it spammed my console every 1 second. rlly annoying
This addon runs on the think function. The think function can run every, 0.0333 seconds on entities, “except for player entities where it is capped at 0.0666 seconds,” because of the amount of functions in this addon sometimes runs longer than the game would like and because of it the game issues a warning through the console.

The only side effect that comes from this is the game might lag every now and then.

What you can do on your side:
Having a high quality computer or dedicated server can fix this. (This is only a suggestion, I'm not expecting everyone to have a high quality gaming laptop like Me)
Only the mod creator (Me) can truly fix this by optimizing the code to help it run faster.
Don't worry about it my top priority is to help this addon run smoother, I even postponed the recent update just to optimize this addon's code.
I have an idea on how to fix this, I was going to make the addon have changeable settings. I will make it so you can set how fast the think function runs so I don't have to force everyone to play with the same think rate. This will allow even people with low-end PC use this addon. What do you think about this fix?
tom 16 Oct, 2022 @ 1:27am 
Originally posted by T-Rizzle:
Originally posted by T-Rizzle:
This addon runs on the think function. The think function can run every, 0.0333 seconds on entities, “except for player entities where it is capped at 0.0666 seconds,” because of the amount of functions in this addon sometimes runs longer than the game would like and because of it the game issues a warning through the console.

The only side effect that comes from this is the game might lag every now and then.

What you can do on your side:
Having a high quality computer or dedicated server can fix this. (This is only a suggestion, I'm not expecting everyone to have a high quality gaming laptop like Me)
Only the mod creator (Me) can truly fix this by optimizing the code to help it run faster.
Don't worry about it my top priority is to help this addon run smoother, I even postponed the recent update just to optimize this addon's code.
I have an idea on how to fix this, I was going to make the addon have changeable settings. I will make it so you can set how fast the think function runs so I don't have to force everyone to play with the same think rate. This will allow even people with low-end PC use this addon. What do you think about this fix?
sounds great!
hong1165 1 Nov, 2022 @ 2:51am 
There is a bug with some of mutation scripts are being discarded whenever one or more player controls the survivors with this add-on installed. I have tested on 'Special Delivery Versus'(by Rayman1103) custom mutation on single player. After I start as survivors, pipe bombs haven't changed to molotovs, however this doesn't happen when all survivors are bots. Can you check what scripts are causing this issue?
Last edited by hong1165; 1 Nov, 2022 @ 2:54am
T-Rizzle  [developer] 1 Nov, 2022 @ 5:02am 
Originally posted by hong1165:
There is a bug with some of mutation scripts are being discarded whenever one or more player controls the survivors with this add-on installed. I have tested on 'Special Delivery Versus'(by Rayman1103) custom mutation on single player. After I start as survivors, pipe bombs haven't changed to molotovs, however this doesn't happen when all survivors are bots. Can you check what scripts are causing this issue?
Odd, this addon shouldn’t conflict with anything, but I may be wrong. I will try to see if I can recreate this bug. If it is possible when you load into a mutation can you open up the developer console and report any errors that appear. Errors are any line that are red. Also does the issue only appear when their is a human on the survivor team or for the first round of the mutation.
hong1165 1 Nov, 2022 @ 12:19pm 
Originally posted by T-Rizzle:
Originally posted by hong1165:
There is a bug with some of mutation scripts are being discarded whenever one or more player controls the survivors with this add-on installed. I have tested on 'Special Delivery Versus'(by Rayman1103) custom mutation on single player. After I start as survivors, pipe bombs haven't changed to molotovs, however this doesn't happen when all survivors are bots. Can you check what scripts are causing this issue?
Odd, this addon shouldn’t conflict with anything, but I may be wrong. I will try to see if I can recreate this bug. If it is possible when you load into a mutation can you open up the developer console and report any errors that appear. Errors are any line that are red. Also does the issue only appear when their is a human on the survivor team or for the first round of the mutation.
That issue appeared when there are human on survivor team at start of every round. Also I've found warning logs on every load of maps such;

AN ERROR HAS OCCURED [the index 'think_rate' does not exist]

CALLSTACK
*FUNCTION [unknown()] scripts/vscripts/botaifix.nut line [192]
*FUNCTION [ScriptMode_Init()] c:/program files/steam/steamapps/common/left 4 dead 2/left4dead2/addons/workshop/2859700506.vpk/scripts/vscripts/scriptedmode_addon.nut line [75]

LOCALS
[compiledscript] CLOSURE
[textString] "const think_rate = 0.5
"
[fileContents] ARRAY
[mapname] "c9m1_alleys"
[modename] "specialdeliveryvs"
[this] TABLE
[bScriptedModeValid] true
[mapname] "c9m1_alleys"
[modename] "specialdeliveryvs"
[this] TABLE;
T-Rizzle  [developer] 1 Nov, 2022 @ 12:30pm 
Originally posted by hong1165:
Originally posted by T-Rizzle:
Odd, this addon shouldn’t conflict with anything, but I may be wrong. I will try to see if I can recreate this bug. If it is possible when you load into a mutation can you open up the developer console and report any errors that appear. Errors are any line that are red. Also does the issue only appear when their is a human on the survivor team or for the first round of the mutation.
That issue appeared when there are human on survivor team at start of every round. Also I've found warning logs on every load of maps such;

AN ERROR HAS OCCURED [the index 'think_rate' does not exist]

CALLSTACK
*FUNCTION [unknown()] scripts/vscripts/botaifix.nut line [192]
*FUNCTION [ScriptMode_Init()] c:/program files/steam/steamapps/common/left 4 dead 2/left4dead2/addons/workshop/2859700506.vpk/scripts/vscripts/scriptedmode_addon.nut line [75]

LOCALS
[compiledscript] CLOSURE
[textString] "const think_rate = 0.5
"
[fileContents] ARRAY
[mapname] "c9m1_alleys"
[modename] "specialdeliveryvs"
[this] TABLE
[bScriptedModeValid] true
[mapname] "c9m1_alleys"
[modename] "specialdeliveryvs"
[this] TABLE;
It appears that your const.nut is corrupted. You should delete it and let this addon recreate it. This should fix the error. This may even the the reason for the bug in the first place.
It seems that my bots will refuse to help anyone up once I have this installed. I even tried the left4bots use command and they flat out won't help me or anyone else up. I'm wondering if it's because of infected being present on the map period regardless of proximity?

It also seems like throwing a molotov or shooting gas cans now breaks the ai completely where they refuse to move or shoot while the fire is active.
T-Rizzle  [developer] 6 Nov, 2022 @ 8:38am 
Originally posted by ルエンハイド:
It seems that my bots will refuse to help anyone up once I have this installed. I even tried the left4bots use command and they flat out won't help me or anyone else up. I'm wondering if it's because of infected being present on the map period regardless of proximity?

It also seems like throwing a molotov or shooting gas cans now breaks the ai completely where they refuse to move or shoot while the fire is active.
Odd, I use this mod daily and I don't have any problems, "I am using the beta version though." I will install the current version and see what might be the problem.
< >
Showing 1-15 of 136 comments
Per page: 1530 50