Left 4 Dead 2

Left 4 Dead 2

Bot Healing Prevention System
WuChan 29 Dec, 2023 @ 5:32pm
About Bot healing prevention system
I think you should remove only the medic using prevention, keep the rest. when you compile this feature into MSB, please do that.

about the bug:
1/ a bot has first aid kit and pills. when the pill is hidden in virtual inventory, bot also switch to first aid kit and it is hidden too although I already turned off medic toggle.

2/ give first aid kit with only 1 right click like giving pill (instead of tab + right click in MSB).
Last edited by WuChan; 30 Dec, 2023 @ 2:33am
< >
Showing 1-10 of 10 comments
kurochama  [developer] 30 Dec, 2023 @ 3:23am 
Originally posted by WuChan:
I think you should remove only the medic using prevention, keep the rest. when you compile this feature into MSB, please do that.

about the bug:
1/ a bot has first aid kit and pills. when the pill is hidden in virtual inventory, bot also switch to first aid kit and it is hidden too although I already turned off medic toggle.

2/ give first aid kit with only 1 right click like giving pill (instead of tab + right click in MSB).
Isn't the "Medic Use Prevention" more crucial, as it's basically the main feature to prevent the use of first aid too early? If you want to disable it, you can simply set the value to 100 or above, so bots will always use first aid, & then only preserve pills & adrenaline in "virtual inventory".

As for the feature of bots giving healing items from inventory when shoved, this is only to make the item pickup from inventory easier & at the same time to prevent bugs from MSB feature with similar "virtual inventory" system like "Medic Slot" & "Pill Slot" that use Tab + Shove to pick items from inventory.

As for compiling to MSB, probably I'll make simpler features, like only 2 features instead of 4, for medic & pills each. But I'll use different combination buttons, to prevent bugs when used together with "Medic Slot" & "Pill Slot".
Last edited by kurochama; 30 Dec, 2023 @ 3:24am
WuChan 30 Dec, 2023 @ 5:23am 
Originally posted by kurochama:
Originally posted by WuChan:
I think you should remove only the medic using prevention, keep the rest. when you compile this feature into MSB, please do that.

about the bug:
1/ a bot has first aid kit and pills. when the pill is hidden in virtual inventory, bot also switch to first aid kit and it is hidden too although I already turned off medic toggle.

2/ give first aid kit with only 1 right click like giving pill (instead of tab + right click in MSB).
Isn't the "Medic Use Prevention" more crucial, as it's basically the main feature to prevent the use of first aid too early? If you want to disable it, you can simply set the value to 100 or above, so bots will always use first aid, & then only preserve pills & adrenaline in "virtual inventory".

As for the feature of bots giving healing items from inventory when shoved, this is only to make the item pickup from inventory easier & at the same time to prevent bugs from MSB feature with similar "virtual inventory" system like "Medic Slot" & "Pill Slot" that use Tab + Shove to pick items from inventory.

As for compiling to MSB, probably I'll make simpler features, like only 2 features instead of 4, for medic & pills each. But I'll use different combination buttons, to prevent bugs when used together with "Medic Slot" & "Pill Slot".
Got it. I will test it again. but recommend that only keep pill prevention so that it may not conflict with the medic.

p,s: I changed medic prevention to 200 and it's worked. thanks.
p.s.s: it's still has small bug that when I shove bot (right click only) to get hidden pill in virtual inventory, bot will use medic (like normal). when I set number to -1, bot will switch to medic and it's hidden again.
p.s.s.s: in real game, other bots keep giving pill to injured bot and back to the loop.
Last edited by WuChan; 30 Dec, 2023 @ 7:52am
kurochama  [developer] 30 Dec, 2023 @ 3:24pm 
Originally posted by WuChan:
Originally posted by kurochama:
Isn't the "Medic Use Prevention" more crucial, as it's basically the main feature to prevent the use of first aid too early? If you want to disable it, you can simply set the value to 100 or above, so bots will always use first aid, & then only preserve pills & adrenaline in "virtual inventory".

As for the feature of bots giving healing items from inventory when shoved, this is only to make the item pickup from inventory easier & at the same time to prevent bugs from MSB feature with similar "virtual inventory" system like "Medic Slot" & "Pill Slot" that use Tab + Shove to pick items from inventory.

As for compiling to MSB, probably I'll make simpler features, like only 2 features instead of 4, for medic & pills each. But I'll use different combination buttons, to prevent bugs when used together with "Medic Slot" & "Pill Slot".
Got it. I will test it again. but recommend that only keep pill prevention so that it may not conflict with the medic.

p,s: I changed medic prevention to 200 and it's worked. thanks.
p.s.s: it's still has small bug that when I shove bot (right click only) to get hidden pill in virtual inventory, bot will use medic (like normal). when I set number to -1, bot will switch to medic and it's hidden again.
p.s.s.s: in real game, other bots keep giving pill to injured bot and back to the loop.
What value did you set on "Pills Use Prevention"? In my test, I set the value to 25 & all bots just stored the pills into the "virtual inventory" when they tried to heal when health bar was still above 25. & shoving a bot shouldn't enabke the heal on bots again. Probably it's a bug when used with "Pill Slot" on MSB, because on "Pill Slot" other survivors/ bots can pick pills from "virtual inventory" by reloading or shoving. Maybe you can try to test it again without "Pill Slot" & "Medic Slot", to figure out whether the bugs you mentioned are from this mod, or because of the combination of this mod with "Medic Slot" & "Pill Slot" from MSB. If the source of the bugs is clear, I'll be able to investigate & try to fix them faster.
WuChan 30 Dec, 2023 @ 5:20pm 
Originally posted by kurochama:
Originally posted by WuChan:
Got it. I will test it again. but recommend that only keep pill prevention so that it may not conflict with the medic.

p,s: I changed medic prevention to 200 and it's worked. thanks.
p.s.s: it's still has small bug that when I shove bot (right click only) to get hidden pill in virtual inventory, bot will use medic (like normal). when I set number to -1, bot will switch to medic and it's hidden again.
p.s.s.s: in real game, other bots keep giving pill to injured bot and back to the loop.
What value did you set on "Pills Use Prevention"? In my test, I set the value to 25 & all bots just stored the pills into the "virtual inventory" when they tried to heal when health bar was still above 25. & shoving a bot shouldn't enabke the heal on bots again. Probably it's a bug when used with "Pill Slot" on MSB, because on "Pill Slot" other survivors/ bots can pick pills from "virtual inventory" by reloading or shoving. Maybe you can try to test it again without "Pill Slot" & "Medic Slot", to figure out whether the bugs you mentioned are from this mod, or because of the combination of this mod with "Medic Slot" & "Pill Slot" from MSB. If the source of the bugs is clear, I'll be able to investigate & try to fix them faster.
So I did the test without medic/ pill slot switch. pill prevention 49. As I expected, no loop. so here's the bug:
_other bots gave their pill to injured bot. Injured bot stored all pills in virtual inventory. (seems normal)
_I shoved the injured bot (who stored pills in virtual inventory) to got back a pill, injured bot used medkit (medic prevention >= 100)/ injured bot used medkit but it's hidden like usual (medic prevention -1). (this is a little bug I found)

So I think the only bug is when player shove bot (right click) to take his/her pill, injured bot will automatically switch to medkit to use it. hope you can fix this although it's a small bug.

here's my idea about this feature: when bot's hp reach to certain point and they're shoving to other objects, injured bot can get back their pill so they can use it normally. (kinda realistic: shove zombie away to use pill to survive).

you may only change combination for stocking empty pill slot.
Last edited by WuChan; 30 Dec, 2023 @ 6:18pm
kurochama  [developer] 30 Dec, 2023 @ 6:13pm 
Originally posted by WuChan:
So I did the test without medic/ pill slot switch. pill prevention 49. As I expected, no loop. so here's the bug:
_other bots gave their pill to injured bot. Injured bot stored all pills in virtual inventory. (seems normal)
_I shoved the injured bot (who stored pills in virtual inventory) to got back a pill, injured bot used medkit (medic prevention >= 100)/ injured bot used medkit but it's hidden like usual (medic prevention -1). (this is a little bug I found)
Probably the MSB version of this mod will be adapted to "Medic Slot" & "Pill Slot", to prevent that loop bug.

As for what happened when "Medic Use Prevention" was set to >= 100 & minus, that's what "Medic Use Prevention" works. If it's set 100 or above, bots can always heal. But if it's set to 0 or even minus, bots will never be able to heal forever (they can only become walking storage to store all first aid kits they pick). If you set "Medic Use Prevention" to 0 or minus, only you or other survivor players can heal bots. Bots can still heal other players (non-bot survivors) if the "Healing Prevention Mode" is set to 1, but they can't heal other players if it's set to 2.

Originally posted by WuChan:
So I think the only bug is when player shove bot (right click) to get back pill, injured bot will automatically switch to medkit to use it. hope you can fix this although it's a small bug.
I think I'll need to check this then. Last time on my test on map 1 of Hard Rain, I only observed other bots giving pills & first aid, but I didn't give my first aid & pills yet. I'll try to test by giving my pills to bots on the next test.

Originally posted by WuChan:
here's my idea about this feature: when bot's hp reach to certain point and they're shoving to other objects, bot can get back their pill so they can use it normally. (kinda realistic: shove zombie away to use pill to survive)

may be you should change the reloading/ shoving will stock item slot into only reloading gun.
That idea is possible. Actually I also had a plan to put the feature to pick healing items when bots are taking damage, but as it might cause a bug so I put it on hold. But if it's just when shoving objects or zombies, I think I can make it happen & it shouldn't trigger a bug.

As for the change for the reloading/ shoving to only reloading, is it for this mod or for "Medic Slot" & "Pill Slot"? As far as I remember, this mod only stocks items when bots try to use them too early. Reloading will only pick items from "virtual inventory" if bot's health meets the condition of picking item..
WuChan 30 Dec, 2023 @ 6:39pm 
Originally posted by kurochama:
Originally posted by WuChan:
So I did the test without medic/ pill slot switch. pill prevention 49. As I expected, no loop. so here's the bug:
_other bots gave their pill to injured bot. Injured bot stored all pills in virtual inventory. (seems normal)
_I shoved the injured bot (who stored pills in virtual inventory) to got back a pill, injured bot used medkit (medic prevention >= 100)/ injured bot used medkit but it's hidden like usual (medic prevention -1). (this is a little bug I found)
Probably the MSB version of this mod will be adapted to "Medic Slot" & "Pill Slot", to prevent that loop bug.

As for what happened when "Medic Use Prevention" was set to >= 100 & minus, that's what "Medic Use Prevention" works. If it's set 100 or above, bots can always heal. But if it's set to 0 or even minus, bots will never be able to heal forever (they can only become walking storage to store all first aid kits they pick). If you set "Medic Use Prevention" to 0 or minus, only you or other survivor players can heal bots. Bots can still heal other players (non-bot survivors) if the "Healing Prevention Mode" is set to 1, but they can't heal other players if it's set to 2.

Originally posted by WuChan:
So I think the only bug is when player shove bot (right click) to get back pill, injured bot will automatically switch to medkit to use it. hope you can fix this although it's a small bug.
I think I'll need to check this then. Last time on my test on map 1 of Hard Rain, I only observed other bots giving pills & first aid, but I didn't give my first aid & pills yet. I'll try to test by giving my pills to bots on the next test.

Originally posted by WuChan:
here's my idea about this feature: when bot's hp reach to certain point and they're shoving to other objects, bot can get back their pill so they can use it normally. (kinda realistic: shove zombie away to use pill to survive)

may be you should change the reloading/ shoving will stock item slot into only reloading gun.
That idea is possible. Actually I also had a plan to put the feature to pick healing items when bots are taking damage, but as it might cause a bug so I put it on hold. But if it's just when shoving objects or zombies, I think I can make it happen & it shouldn't trigger a bug.

As for the change for the reloading/ shoving to only reloading, is it for this mod or for "Medic Slot" & "Pill Slot"? As far as I remember, this mod only stocks items when bots try to use them too early. Reloading will only pick items from "virtual inventory" if bot's health meets the condition of picking item..
edited my reply. in case of you haven't read it again:

only reloading for medic and pill slot, not for this prevention mod but it may cause loop again so please forget about it. here's my suggestion:
_remove medkit prevention feature bcs the original system is good enough + avoid conflict with pill prevention.

_use the condition: when bot reached to certain hp (30 < *number* < 50) and shove to other objects, bot can stock pill from virtual inventory. remove reloading gun trigger.

_change the reloading/ shoving into only reloading to stock empty grenade/ medic slot bcs I think only player can change pill slot by pressing tab + right click.
Last edited by WuChan; 30 Dec, 2023 @ 9:31pm
kurochama  [developer] 30 Dec, 2023 @ 11:29pm 
Originally posted by WuChan:
edited my reply. in case of you haven't read it again:

only reloading for medic and pill slot, not for this prevention mod but it may cause loop again so please forget about it. here's my suggestion:
_remove medkit prevention feature bcs the original system is good enough + avoid conflict with pill prevention.

_use the condition: when bot reached to certain hp (30 < *number* < 50) and shove to other objects, bot can stock pill from virtual inventory. remove reloading gun trigger.
If you want to use original system/ default L4D2, I think setting the value of "Medic Use Prevention" to 100 or higher will make it return to default L4D2 healing rules. The reason I divided the prevention mechanisms into 2 for medic & pills was to make them more flexible to configure. For example, if you want bots to use first aid kit first, then set the value of "Medic Use Prevention" higher than "Pills Use Prevention". If you want them to use pills first, then set the value of "Pills Use Prevention" higher.

As for the fixed condition to pick item from virtual inventory, that would make the settings more complicated because instead of adjusting one number, I'll have to add more adjustments on lowest margin & highest margin of the number. Probably the shoving feature will follow the numbers on medic & pills prevention instead. The current prevention settings are simpler, like, just set the value of medic prevention or pills prevention to 50 & as long as bot's health bar are equal or lower than 50, they can pick item.

Originally posted by WuChan:
_change the reloading/ shoving into only reloading to stock empty grenade/ medic slot bcs I think only player can change pill slot by pressing tab + right click.
Probably I can change the shoving so that it only works on survivor players.
kurochama  [developer] 31 Dec, 2023 @ 1:31am 
I just updated the mod & added "shoving" as a new way for bots to pick items from "virtual inventory". As for the bug when shoving/ giving pills to a bot could make a bot pick first aid & then heal, I checked this & somehow in my test, bot stored the first aid kit into the "virtual inventory" instead. I set "Medic Use Prevention" to 25, & bot's health bar was 34 when I gave him pills.
kurochama  [developer] 31 Dec, 2023 @ 6:44am 
Btw I forgot to tell you, that actually MSB has the "prototypes" of this mod. One of the features on MSB is named "Bots Use Pills First". It has similar function as "Medic Use Prevention", but instead of storing the first aid to the virtual inventory, it will force bots to take pills/ adrenaline if they have it in pill slot, & use it right away. If you want, I can modify that feature to make it work like this mod, as it would be easier to modify the existing ones than to add new features.
WuChan 31 Dec, 2023 @ 8:55am 
Originally posted by kurochama:
Btw I forgot to tell you, that actually MSB has the "prototypes" of this mod. One of the features on MSB is named "Bots Use Pills First". It has similar function as "Medic Use Prevention", but instead of storing the first aid to the virtual inventory, it will force bots to take pills/ adrenaline if they have it in pill slot, & use it right away. If you want, I can modify that feature to make it work like this mod, as it would be easier to modify the existing ones than to add new features.
I saw that feature in the last MSB update (before Grenadier mode fixed) and used it but it didn't work as I expect, so I did asked you about this prevention feature.

So if you can modify that feature in MSB, I can wait.

no bug. the mod operated good. thank you for your hard work. hope this mod can appear in MSB as a feature.
Last edited by WuChan; 31 Dec, 2023 @ 8:36pm
< >
Showing 1-10 of 10 comments
Per page: 1530 50