Left 4 Dead 2

Left 4 Dead 2

Bot Healing Prevention System
49 Comments
kouga 21 Jul @ 7:01pm 
ahh. that doesnt sound worth it then, nevermind.
kurochama  [author] 21 Jul @ 4:50pm 
@Kouga , I'm not sure about that. There are several possible methods, but each might have some bugs. For example:
1. Force bots to move away: Bots will be vulnerable as they can't attack properly when under "move" command.
2. Pushback (like "Bots Avoid Witch" mod): There's a chance that they'll be thrown to the air.
3. Disable "E" button on bots: Bots will keep running close to the hanging survivor to try to use "E", but as it's failed, they will keep gathering there & become perfect targets for charger's deadly charge.
kouga 21 Jul @ 4:27pm 
can you make a mod that prevents bots from helping you up when you are hanging from a ledge? might serve some use for those who have a self revive mod going on
kurochama  [author] 2 Jul @ 10:09am 
@Saeru , if they heal you too early, they will store their medkits to the virtual inventory. Set the value of "Medic Use Prevention" for much health until bots are allowed to heal without storing their medkits to virtual inventory.
Saeru 2 Jul @ 2:39am 
Does this work to prevent bots from healing me? I'm kind of stressed out bc of their healing spam over me that doesn't allow me to walk, but I just want them to avoid healing me I don't want them to change their whole behaviour.
kouga 9 May @ 8:50pm 
This is amazing! I didnt know what I was looking for already existed. Now I wont be pestered by the bots everytime :D
kurochama  [author] 4 May @ 12:20pm 
@CodE>102 928 8218 , thanks for the review. As for the healing item when a bot dies, it's still saved in the virtual inventory, so if the bot is revived or spawned in the rescue closet, the healing item can be retrieved by shoving the bot.
>102 928 8218 4 May @ 7:33am 
中文评论 3 ————————————————————————
不过任然不知道,BOT在达到可以治疗的标准时,能否成功的重新拿回治疗道具。所以我。都是手动帮助他们拿回来的,另外此MOD也有一定风险,如果BOT没有添加,增强防御的脚本,专家难度下,在遭遇"TANK"或者“女巫”的攻击时,AI一旦死亡,那么他的治疗道具,似乎就再也拿不回来了.能否更新一下,让AI死亡后,能正常掉落道具了?
>102 928 8218 4 May @ 7:33am 
中文评论 2 ————————————————————————
第一项,一定要设置成为2,因为我除此之外,还装了一个,右键可以交换物品的MOD,如果你设置成了1,有几率会导致,BOT,将投掷道具错认为治疗道具,因而发生一直递给你投掷道具的情况。而如果你设置成了2,BOT将只会切换到治疗道具,但是无法右键传递给你,也让物品,不会存进“虚拟内存”。尽管AI与AI之间的治疗,会导致治疗道具,被放进虚拟内存。从而在场一个受伤的AI,导致所有AI都把治疗道具放进了虚拟内存,你得自己帮助他们拿出来。不过也胜过,我在被"坦克“追击时,BOT强行给我治疗的情况...。
>102 928 8218 4 May @ 7:33am 
中文评论 1————————————————————————
完美,这或许是整个L4D2,创意工坊中。真正意义上,解决了。电脑在你不该需要治疗的时候,轮流来给你治疗,让你原地罚站.
这是我的设置参数:

HealingPreventionMode 2
HealOnlyInBlackWhite 0
MedicUsePrevention 10
PillsUsePrevention 39
>102 928 8218 4 May @ 7:31am 
Comment 3: ————————————————————
I still don’t know whether bots are able to successfully retrieve their healing items once they meet the healing criteria. So I usually just help them get the items back manually.
Also, this mod comes with some risks: if your bots don’t have enhanced defense scripts, then on Expert difficulty, when facing a Tank or a Witch, once a bot dies, it seems their healing item can no longer be retrieved.
Would it be possible to update the mod so that bots drop their items properly after death?
>102 928 8218 4 May @ 7:27am 
Comment 2: ————————————————————

Make sure the first setting is set to 2. That’s crucial, because I also use a mod that allows item trading via right-click. If you set it to 1, bots might mistakenly treat throwable items as healing items, leading to a bug where they keep trying to hand you throwables. But if you set it to 2, bots will only switch to healing items but won’t be able to hand them over via right-click. This also prevents items from being stored in "virtual memory."
Although, to be fair, AI healing other AIs can still cause healing items to go into virtual memory. This can lead to a situation where a single injured AI causes all bots to store their medkits away — and you’ll have to retrieve them manually.
Still, that’s better than having a bot forcibly heal me while I’m being chased by a Tank...
>102 928 8218 4 May @ 7:27am 
Comment 1: ————————————————————

Perfect. This might be the one true solution in the entire L4D2 Workshop that genuinely fixes the issue where bots insist on healing you when you absolutely don’t need it, forcing you to stand still and do nothing.

Here are my settings:

HealingPreventionMode 2
HealOnlyInBlackWhite 0
MedicUsePrevention 10
PillsUsePrevention 39
kurochama  [author] 17 Apr @ 1:39pm 
@Jakiy , that will cause another problem. For example, bots will keep picking medkits nearby & try to heal & then lose the medkits. This will make all medkit supplies disappear one by one just because one bot tries to heal. The virtual inventory is to prevent this problem.
Jakiy 17 Apr @ 1:23pm 
Is it possible to disable the virtual inventory completely? I don't want bots to hide their medkit and it osho hide it from the HUD too.
☁️Stormy☁ 2 Dec, 2024 @ 4:39am 
Thank you for explaining that. i thought it has a bug
kurochama  [author] 1 Dec, 2024 @ 7:58pm 
@Meow , not deleted, but the medkits are stored in the virtual inventory. They won't take medkits from virtual inventory unless their health goes below the value set on the cfg file. You can also take their medkit from virtual inventory by shoving them when you don't have a medkit.
☁️Stormy☁ 1 Dec, 2024 @ 7:10pm 
not working.. the script deletes medkit as soon as they try to heal me so they tried to heal one by one and everybody lost it :(
Z 12 Jul, 2024 @ 7:35am 
I too doubt that its something from your side, but my bots have been picking up defibs before installing this one, so it was my first assumption. ty for recommendations tho
kurochama  [author] 12 Jul, 2024 @ 7:30am 
@sinner , I'm not sure whether it's a bug from here or L4B2, but I think there's a command on L4B1 & L4B2 to force bots to pick items. Probably you can use that command to order bots. Or alternatively you can use this Bot's Acid Evasion & Item Autopick . That mod has some bonus features about item autopick to force bots to pick important items like healing items, throwable etc.
Z 12 Jul, 2024 @ 7:11am 
thats exactly what happened. defib was on the ground right next to a body. none of the bots bothered touching it and just kept on moving
kurochama  [author] 12 Jul, 2024 @ 7:06am 
@sinner , did the bots not even pick defib at all? That's strange, as I didn't touch anything about defib on this mod. I only registered medkit, pills, & adrenaline on the scripts.
Z 12 Jul, 2024 @ 4:57am 
some how my bots aren't even using defib either. I have Left4Bots 2 installed too but I'm sure that's not the cause
dropkix 5 Mar, 2024 @ 5:31pm 
thanks again this is gonna be a main stay in my modlist
kurochama  [author] 5 Mar, 2024 @ 7:02am 
@Dropkix , I finished updating the new version. Now you can set conditions on black & white mode, like, if you set the value to 1, bots can still use pills & adrenaline normally. Value no. 2 is like the old version in which bots can't use all healing items until they go black & white. & the bug when bots keep shoving when they carry ammo upgrade pack should be fixed now.
kurochama  [author] 5 Mar, 2024 @ 6:05am 
@Dropkix , I never used a mod that makes bots pick ammo upgrade, so probably there might be a bug when bot carries ammo upgrade pack. I think I can fix that behavior later.

As for the black & white special condition to exclude pills, probably I can add that feature later. Currently I only make it simple by preventing bots from using all healing items, but I can add some new values later to specify whether the black & white condition is only applied on medkit or also pills/ adrenaline.
dropkix 5 Mar, 2024 @ 1:25am 
also i noticed when bots are holding ammo upgrades they just infinitely shove bots they want to give heals idk if thats a issue on my end or what
dropkix 4 Mar, 2024 @ 11:52pm 
thanks for the update. And for the black and white condition I meant is there any way to exclude the pills from it. I like the fact that they save the medkits until they are in black and white and I would like it to stay that way I just want them to use pills whenever
kurochama  [author] 4 Mar, 2024 @ 1:52pm 
@Dropkix , I just updated this mod. Now the recently joined players can pick items from virtual inventory.
kurochama  [author] 4 Mar, 2024 @ 12:59pm 
@Dropkix , about virtual inventory when player is joining, actually the items are still there, but currently I set that the items can only be taken out when a bot is shoved or bot's health meets the condition. I'll update it soon to make it so that survivor players can also take items from virtual inventory when a player joins & replaces the bot.

As for condition for black & white, check this "Heal Only In Black White" feature in the cfg file & set it to 0 to make bots heal without having to wait until they go black & white.
dropkix 4 Mar, 2024 @ 2:44am 
Also is there some way to only make it so bots just don't use medkits specifically without being in B&W? Because having a bot limp around on one hp because they refuse to take pills gets old fast
dropkix 4 Mar, 2024 @ 2:26am 
So if someone joins the game and takes over the bot then leaves is all of the bots virtual inventory intact? Or does it just vanish?
kurochama  [author] 2 Feb, 2024 @ 12:25am 
@WellDare , unlimited. Just shove the bots if you want some pills/ loots. Loots are safe in bot's virtual inventory
▼ WellDare ▼ ♫♫♫ 1 Feb, 2024 @ 10:26am 
How much times they can safe some loot?
And when they can use this?
▼ WellDare ▼ ♫♫♫ 1 Feb, 2024 @ 10:25am 
IVE GOT 6 PILLS FROM BOTS NOW
WTF?
tsoewoe 21 Jan, 2024 @ 2:06pm 
got it, thanks!
kurochama  [author] 20 Jan, 2024 @ 11:47am 
@egg , it's in "ems" folder. Go to ".../Left 4 Dead 2/left4dead2/ems/"
tsoewoe 20 Jan, 2024 @ 11:40am 
i cant figure out where this cfg file is, ive checked left4dead2\cfg, sourcemod\configs, and have even used grepWin on my l4d install and found no config for this mod.
kurochama  [author] 6 Jan, 2024 @ 11:33am 
@Fiat Punto , it's applied to both pills & medkit, & it also depends on the value you put on "Medic Use Prevention" & "Pills Use Prevention". So if you enable "Heal Only In Black White", bots will use pills & medkits only after they go black & white.
Fiat Punto 6 Jan, 2024 @ 9:57am 
Does healonlyinblackandwhite apply to pills or only to medkids?
kurochama  [author] 1 Jan, 2024 @ 7:39pm 
@Del Ferico_Exclusivo , I checked again & noticed that I still didn't include survivor players to trigger bot command reset when bots shove a player. I just updated the version, & the bug you reported should be fixed.
kurochama  [author] 1 Jan, 2024 @ 3:33pm 
@Del Ferico_Exclusivo , they only shove when they look at a survivor. On previous versions, they even didn't stop shoving (probably the bots thought that they still carried first aid kit), so I set a command reset on bots & now they only shove once when they look at a survivor & then they're back to look around for zombies. Actually I can also make them completely stop shoving a survivor, but I haven't tested it yet on the script. Maybe if the method to stop bots from shoving a survivor is free of bugs after being tested, I can add that to completely prevent bots from shoving when they have no first aid kit.
Del Ferico_Exclusivo 1 Jan, 2024 @ 1:52pm 
i just found a bug with this add-on the bots cant heal player until no30 or what number you have it set as is met they'll just shove the player .
Del Ferico_Exclusivo 1 Jan, 2024 @ 1:24pm 
ow i see thanks hopefuly you make more scripts . :steamthumbsup:
kurochama  [author] 1 Jan, 2024 @ 1:11pm 
@Del Ferico_Exclusivo , what he meant back then was chat commands where he could change the settings of each feature via chat, as he got a condition in which he could'nt access the cfg file due to certain reason of his PC settings. But he removed his comments just before we had further discussion. Probably he already solved his problem.
Del Ferico_Exclusivo 31 Dec, 2023 @ 5:42pm 
i think @Xeno means a CARVAR Command ? ...... idk
WuChan 30 Dec, 2023 @ 2:33am 
you may wanna check my discussion.
kurochama  [author] 28 Dec, 2023 @ 5:38am 
@ Xeno :] , which settings? The settings are available on a cfg file, so you can change them there.
(^^^) Xeno 28 Dec, 2023 @ 5:10am 
Maybe make it a chat commands to adjust the settings.