Left 4 Dead 2

Left 4 Dead 2

102 ratings
Bot Healing Prevention System
   
Award
Favorite
Favorited
Unfavorite
Game Content: Scripts
Game Modes: Single Player, Co-op
Items: Medkit, Pills
File Size
Posted
Updated
150.607 KB
27 Dec, 2023 @ 8:21am
24 May, 2024 @ 5:19am
12 Change Notes ( view )

Subscribe to download
Bot Healing Prevention System

In 1 collection by kurochama
Useful "Side-Dish" Mods (Especially for Bots)
46 items
Description
As the title said, this mod prevents bots from healing too early by using a special feature "Virtual Inventory". What is "Virtual Inventory"? "Virtual Inventory" is a cfg file used to store data in game.

As bot's healing behavior is kind of hardcoded, & no matter how many times you stop bots from healing by using bot commands or disabling bot's buttons, or quickly switching to other items when they want to heal, bots will insist on switching to first aid kit or pills to heal. That's why, the "Virtual Inventory" was implemented to "hide" bot's first aid kit, pills & adrenaline if they want to use them too early. So if a bot tries to heal himself or other bot, he'll lose the first aid kit & the first aid kit is stored in the "Virtual Inventory". Once bots meet the conditions of healing, anytime they reload their guns or shove any objects, they'll automatically pick the first aid kits & pills stored in "Virtual Inventory". The items stored in "Virtual Inventory" won't disappear unless a player disconnects or starts a new campaign.

Here are some features available in "bot healing prevention cfg.txt" file:
- Healing Prevention Mode: This controls whether bots are prevented only when trying to heal themselves/ other bots, or when trying to heal other players.
- Heal Only In Black White: This controls whether bots are allowed to heal only when they're in white & black or not.
- Medic Use Prevention: The value of this feature affects how much health left until bots are allowed to heal (Example: value no 30 allows bots to heal only when their health bar is 30 left).
- Pills Use Prevention: Same as "Medic Use Prevention" but for pills & adrenaline shot.

Some additional features:
- Walking Storage: As bots have ability to store first aid kits, adrenaline & pills when they use them too early, they can store as many items as possible in "Virtual Inventory". So, if bots keep stealing first aid kits & store them all in "Virtual Inventory", just let them do it, as you can take the items by using the next feature below.
- Take item from Virtual Inventory by shoving a bot: If you remember which bot keeps storing items in "Virtual Inventory", you can shove that bot to get items that you don't have (example: if you don't have first aid & bot has first aid in "Virtual Inventory", you'll take a first aid kit).

So with this mod, you only need to protect the bots who have items in "Virtual Inventory".

Notes:
- The healing prevention is only applied on bots. Players can still heal bots anytime they want.
- Video preview might be added later when I feel like uploading it.
- Let me know if you find any bugs on the "Virtual Inventory".
Popular Discussions View All (2)
10
31 Dec, 2023 @ 8:55am
About Bot healing prevention system
WuChan
0
5 Aug @ 6:45am
Possible to balance items between bots?
暮雨初晴
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