Left 4 Dead 2

Left 4 Dead 2

(MSC) AG3 Survivor Smart Bots
78 Comments
RΞBΞCCA ⁧⁧ ✔ 18 Jan @ 7:09pm 
it works, didn't use it for very long but they're beasts at fighting and avoiding damage. the wonky stuff was when they can't decide whether they want the defib or the heatlhpack and get stuck switching them till you move. they also crouch whenever they're in your line of sight to avoid friendly fire. decent, but maybe too crazy at kicking butt lol
Mekalygie 8 Jun, 2024 @ 2:18pm 
Hi! I just wanted to say how grateful I am for this mod! While it's not perfect, it is already so much better than the vanilla bots. Thanks to you, I have finally been able to successfuly play and beat the campaigns on Expert for the first time in over a decade of playing this game!
You are very good at what you do, please keep working on this game, and thank you so much for doing this!
Граф Трахула 17 Apr, 2024 @ 11:38pm 
the command to use a defibrillator on the bot does not work.
BunnyMonster 4 Mar, 2024 @ 6:38pm 
make the aim a bit more realistic than just aimbot for the bots
Market Pluh 20 Dec, 2023 @ 10:48pm 
this is almost perfect if the bots dont pick up defib over medkit
so here's my suggestion: bots only pick defib when a player is dead
or the bots have a defib pocket
Black Wolf 2 Jul, 2023 @ 9:54pm 
please fix: they prefer to pick up defibs rather than medkits, sometimes though they'll pick the medkits back but immediately re-pick the defib, painful to deal with.
RiceIsNice 10 Jun, 2023 @ 9:09pm 
if they see medkit and defib they start spam picking it up
Baka Baka 3 Jun, 2023 @ 9:49am 
This mod is amazing! I'm playing RH8 DUO with nick, it's awesome!
L_M 2 Jun, 2023 @ 7:45am 
this bot is preventing them to heal themself

can u fix it?
[FoRcE]army_guy3  [author] 30 May, 2023 @ 11:56am 
If someone wants to make a thumbnail, let me know. :P
devlos 29 May, 2023 @ 11:17pm 
When are you gonna change that thumbnail army_guy3 , the only reason this does not have 100K subs is because off that thumbnail cause this shit is amazing tbh. :steamthumbsup:
tom 6 Feb, 2023 @ 10:06pm 
ohhh ok, i understand
Shadowysn 6 Feb, 2023 @ 9:55pm 
A more simplified version of the author's comment is that the code for allowing what items bots should pick up does not specify what bot is trying to pick up the item.
Since the author does not know which bot it is, they cannot check if the bot has the defibrillator in their inventory.
And if they cannot check the bot's inventory, then the only things they can do without creating a new potentially-buggy system of item searching is let them pick up the medkit at all times or ignore the medkit at all times.
[FoRcE]army_guy3  [author] 6 Feb, 2023 @ 9:48pm 
It isn't a bug and it isn't a feature.

The script runs code to pick up the defib... The default game AI tells it to grab the medkit because AI don't like defibs...

The callback that allows us to tell the bot if they can pick something up or not doesn't let us know which bot it is... I can selectively guess, block it all, or allow it all..

Like I said.. The l4d2 devs need to add additional variables for the callback to let me choose.
tom 6 Feb, 2023 @ 8:04pm 
idek if this bug or a feature in ur bot script cuz its kinda bothers me
tom 6 Feb, 2023 @ 8:03pm 
i made a video what i meant by this bug https://streamable.com/a0tnc1
tom 6 Feb, 2023 @ 7:56pm 
idk how to explain it properly, but its pretty annoying when im playing versus with bots and they'll just do it and get stuck there.
tom 6 Feb, 2023 @ 7:55pm 
i mean, if the bot has a medkit on its back and finds a defibs on the ground the bot will keep picking up the defibs and then dropping and picking up and medkit. basicly like a loop
[FoRcE]army_guy3  [author] 6 Feb, 2023 @ 7:36pm 
Prevent what from happening? Picking up defibs?
tom 6 Feb, 2023 @ 5:33pm 
also the bots have this weird silent aim bug, even if the special/common infected in the bot's pov their able to shoot them and look back where they previously looked at
tom 6 Feb, 2023 @ 5:24pm 
@[FoRcE]army_guy3 how come when other ai mods works fine with dedib? but this one doesnt?
cant u just like remove the code line in ur script? to prevent that from happening.
[FoRcE]army_guy3  [author] 6 Feb, 2023 @ 1:15pm 
New update released - Fixed an issue that prevented some explosives from taking damage. Additional check was added to make sure the algorithm is being used for only bots.
[FoRcE]army_guy3  [author] 6 Feb, 2023 @ 1:08pm 
Which bugs are you referring to?

The bots picking up medkits over and over is dependent on l4d2 dev team adding an additional variable for the callback. I currently have access to whether a bot can pick up an item.. I don't have access to which bot it is for..

The callback was never designed for what I'm using it for. They like the idea of my requested changes, but ultimately who knows what changes will make it to the game.
tom 6 Feb, 2023 @ 2:58am 
r u gonna fix those common bug issues?
[FoRcE]army_guy3  [author] 6 Feb, 2023 @ 2:12am 
The AI have a problem with CommandABot that can lock up the bot to become uncommandable until the reset is triggered. I've tried to fix this but it happens so randomly that I can't tell if it's fixed or not.

From what I can tell the CommandABot boolean value that is returned may be returning true even when it fails..

As for the rock dodging algorithm, I had a more advanced algorithm but it caused the game to freeze for around 10 ms as it processed and that just won't do.. I settled for a less advanced algorithm that calculates rock trajectory and chooses a relative axis offset to attempt to dodge the rock.

The spawn closet algorithm tries to find the nearest active spawn closet on the flow that the bots can get to.
[FoRcE]army_guy3  [author] 6 Feb, 2023 @ 2:12am 
Hey peeps.

Due to limitations with vscripts, I'm having trouble finding a fix for some of the issues you've come across.

I have requested additional changes to the l4d2 dev team, but ultimately it isn't my decision so we'll see.

Life has been hell and I haven't really been scripting much these days.. I do plan on working on the new release for this plugin, but it's more of a side project than a priority atm.
Lyica. 21 Dec, 2022 @ 6:54pm 
This script is hella good on Survival. definitely would highly recommend if you want to get all gold medals. Wouldn't say the same for campaign though. Pain in the ass to manage these bots. And also they won't heal if they are below 30 hp. but yeah this script is still alpha, i'm sure this would get fixed and improve. i think it would possibly surpass some other Improved AI Mods.
tom 2 Dec, 2022 @ 6:23am 
theres pretty much alot of bugs on this script, so ima just name it all

bots wont heal they will just hold and stand there holding the medkit
bots will autodrop/autoequip dedib

thats the only few i know
Pluvillion 23 Nov, 2022 @ 6:10am 
I hope for them to not shuffle between defib and medkit as well. Nick was pretty low on Swamp Fever (unfortunate boomed + Tank) and all he did was shuffle the kits back and forth without healing himself.
Pluvillion 23 Nov, 2022 @ 5:53am 
Bless this mod. I just wish only one bot carried a defib.
Amainy 20 Nov, 2022 @ 8:29pm 
propane tank that had been picked up can not be detonated by gunshot. very weird bug
(^^^) Xeno 17 Nov, 2022 @ 9:10am 
I think too many bot behaviours can cause them to bug out; for example, in the Tank Rock Shooting Algorithm, from what I see while testing it, the bots just stand there waiting to get hit, and in the Rescue Closet, the Smart Wait Algorithm sometimes goes further back from the start.
[FoRcE]army_guy3  [author] 3 Nov, 2022 @ 9:53am 
There is three algorithms for bot gas can (Not counting AI command data).

First is data collection of nozzle data to calculate required information. Entity collection, ray tracing, nav data, ect.

Second is to throw gascans near nozzle when they get close enough to it.

Third is to pour gascans into the nozzle. The bots will not execute this third behavior until a human player pours the first gascan into a nozzle. The /bot_pour command overrides this and tells them they can begin the third.
tom 2 Nov, 2022 @ 11:16pm 
btw, do i have to manually active the '/bot_pour' each time i change the map? or the bot will auto start gas can
[FoRcE]army_guy3  [author] 1 Nov, 2022 @ 11:06pm 
nozzle detection calculates where the nozzle is and generates the data for the bot to be able to pour the gas themselves.
tom 1 Nov, 2022 @ 10:55pm 
btw i dont get the 'nozzle detection' feature, what does that actually do?
tom 1 Nov, 2022 @ 10:31pm 
[TF] Jack Bauer ︻デ▬——
i agree with you, the bots has insane aimbotting skills.
ͲҒ Jack Bauer ︻デ▬—— 1 Nov, 2022 @ 12:20pm 
I was spectating a coop match with only bots (via jointeam 1).

About the grenades, smilzo's Left 4 Bots has a pretty decent grenade throwing algorithm which could serve as inspiration. ;)
[FoRcE]army_guy3  [author] 1 Nov, 2022 @ 10:46am 
Even then that doesn't take into account map spawns. It turned into more work that I wanted to do for little yield. I could add code to just throw molotovs at tanks but then they wouldn't so much be smart bots as opposed to "gamble on a possible restart" bots.

You won't see any updates for MSC for a while, My current projects involve adding c++ game code to alien swarm: reactive drop. I've added RGB text chat support, and I'm currently working on adding custom colored laser sights.

I have many projects that I manage (over 100), and most of them I don't get paid anything. If you want a script prioritized to be worked on, Send me some money with a note of which script you'd like to be prioritized. RL comes first before any programming so I can't promise anything, but your chances of an update would be higher.
[FoRcE]army_guy3  [author] 1 Nov, 2022 @ 10:46am 
hey peeps,
I can make a note of adding the ability to disable/enable settings of the script. The script was never tested for versus so I'm not sure what behavior would cause them to get locked like this. Was this an all bot team?

I can look into changing crouching settings when fighting tank.

I don't believe I programmed anything in this script that tells bots to leave the saferoom without grabbing weapons. I did think about adding support for bots throwing grenades, but too much can go wrong. On top of the algorthim to calculate the angle and throw path, I'd have to program an additional algorithm to detect navdata, deadends, threat locations, player locations, ect.. Then I'd need another algorithm to detect if the grenade should actually be used.
ͲҒ Jack Bauer ︻デ▬—— 1 Nov, 2022 @ 7:29am 
Is there a way to toggle features/modules on/off in this addon? Because many people dislike the gear transfer thing and autograb... I've also noticed that in an all bot game, they will leave the safe/starting room so fast that they don't even pick guns and medkits. They also don't seem to use grenades. Instead they rely on their OP aimbot. It would be great to be possible to control this behavior. ;)
ͲҒ Jack Bauer ︻デ▬—— 1 Nov, 2022 @ 6:41am 
Hax
Connor 29 Oct, 2022 @ 11:02pm 
Great mod but can you make bots not crouching when fighting the tank, cuz they're always crouch and go down later (expert mode).
tom 25 Oct, 2022 @ 12:58am 
ok its still happening with other ai mods im using
tom 25 Oct, 2022 @ 12:48am 
nvm dw
i remeber i had a plug causing this issue, sorry
tom 25 Oct, 2022 @ 12:42am 
well this only happens to this mod, are u able to remove the defib script line, it cuzs the script to bug out in versus mode
[FoRcE]army_guy3  [author] 22 Oct, 2022 @ 7:19pm 
Default AI tells the bots to replace defibs with medkits whenever they can.

That is hardcoded into the game.

The algorithm attempts to get bots to take defibs, but the default AI does kick in and attempt to get rid of all defibs.
tom 22 Oct, 2022 @ 6:35pm 
ok so, idk if its a bug or not, the bots will repeatly take the def and the medkit at the same time and repeatly grabing and dropping it
[FoRcE]army_guy3  [author] 20 Oct, 2022 @ 8:03am 
I never made a function to enable the debugging data as I just enabled and disabled the variables as needed in testing.

If you want to enable it, you can turn on sv_cheats in offline map mode, and enable the variables inside the g_Scope_MSC_Survivor_Smart_Bots scope with ent_fire command.

DEBUGDRAW_SHOWSMOKERTONGUEDATA <- false;
DEBUGDRAW_SHOWCHARGERCHARGINGDATA <- false;
DEBUGDRAW_SHOWGASCANNOZZLEDATA <- false;
DEBUGDRAW_SHOWAREADANGERDATA <- false;
DEBUGDRAW_CHARGERDRAWTIME <- 3.0;
DEBUGDRAW_SHOWRESCUECLOSETDATA <- false;
DEBUGDRAW_SHOWTANKROCKDATA <- false;

example would be:
ent_fire !self runscriptcode "g_Scope_MSC_Survivor_Smart_Bots.DEBUGDRAW_SHOWSMOKERTONGUEDATA=true"
tom 20 Oct, 2022 @ 2:16am 
hey army_guy, hope u feeling better!
my question is, which command is it to see the debugs? like the showcasing in ur vidoes