Left 4 Dead 2

Left 4 Dead 2

66 ratings
Bot Flame Evasion
   
Award
Favorite
Favorited
Unfavorite
Game Content: Scripts, Miscellaneous
Game Modes: Single Player, Co-op
File Size
Posted
Updated
31.928 KB
20 Nov, 2024 @ 10:05am
23 Dec, 2024 @ 6:47am
3 Change Notes ( view )

Subscribe to download
Bot Flame Evasion

In 1 collection by kurochama
Useful "Side-Dish" Mods (Especially for Bots)
46 items
Description
Common Question: "Is it possible to make bots avoid fire from molotov & gascan?"
Common Answer: "Bots can't avoid fire."
Crazy Answer: "Bots can't avoid fire, normally. But with some tricks on vscripts, it's possible to make it happen."

& here it is, a small proof. This mod allows bots to detect flame caused by other survivor very early & decide to stay away from it. The flame entity that bots can avoid are those from molotov, gascan & explosive barrel that other survivor throw/ shoot.

There's only 1 feature available on "bot flame evasion.txt" cfg file:
  1. Flame Evasion: This controls the mode of "Flame Evasion". Mode 1= Forrced Command (bots are forced to avoid flame). Mode 2= Pushback Evasion (bots will be pushed back when they're too close to flame)

Q: "Can bots avoid all flames with this? Like, flames in map 1 of Dead Center?"
A: ""Unfortunately, no. This is only to make them avoid flames from other survivor. Normally it should be possible to make them avoid from flames in a map, but that might need nav block instead, to block bot's navigation. & this might or might not cause another bug."

So, with this mod, you don't need to worry anymore about bots standing still on pool of flame. & this mod also breaks the common beliefs abput how it's impossible to make bots avoid flame. This can also become an example, to motivate other modders to make impossible things on bots possible.

Other mods useful for bots:
  • Bot Acid Evasion: The twin brother of this mod. It makes bots avoid acid early the moment it drops on the ground

  • Capped Fall Damage: Set your own max fall damage, or set it for bots to protect them by reducing or even nullifying fall damage when falling from long ladders.

  • Bot Healing Prevention System: Prevents bots from healing too early by storing the healing items to virtual inventory when bots try to heal.

  • Anti Traps: Nullifies damages from traps in custom campaigns. It can be set to only bots, to protect them from trap damage so they'll live longer.

NOTES:
  • A video preview will be added later.
  • The warped bots when taking friendlyfire damage on the video is not because of this mod, but from other mod.
  • A weaknees of Mode 1: Bots sometimes can run far enough from players, but they'll return in less than 3 seconds after the flame is off. Press "TAB + RELOAD" in case if you want bots to return immediately.
  • A weaknees of Mode 2: In a close room/ area where bots can be cornered, the pushback effect when avoiding flame can trap bots in the corner until the flame is off.
47 Comments
kurochama  [author] 22 Feb @ 5:45am 
@Jakiy , to avoid tank, there's "BOT_CMD_RETREAT" bot command to order bots to avoid tank. But this command alone can't prevent bots from reviving incapped survivor when tank is still nearby. The solution to prevent them from reviving the incapped would be either blocking their nav around the incapped survivor temporarily, or use a bot command "BOT_CMD_MOVE" to force them to retreat. Btw, I think L4B2 already has this solution on the latest update, by blocking bot's nav on incapped survivor. You can check there.
As for avoiding rock throw, it's a bit tricky, but it should be possible by either making bots change the running direction once the rock is thrown, or simply just making them run far enough till they're out of the rock throw range.
Jakiy 22 Feb @ 4:41am 
Is it possible to make the bots avoid the tank and its rock throw? Especially when a player get incap, they will try to revive no matter what.
maiaterix 1 Feb @ 7:04pm 
Esta super :steamthumbsup:
kurochama  [author] 4 Jan @ 5:19pm 
@CaptPatrick01 , use mode 2 then. Mode 1 sometimes makes bots run to the other side of the fires (that's why it looks like they're running into the fires). As for mode 2, bots will be pushed back, away from fire. I used mode 2 quite often when testing regularly, & I think bots have better evasion on mode 2. For mode 1, probably I'll try to alter the running directions so they won't run to the other side of fire.
CaptPatrick01 4 Jan @ 4:56pm 
They've been running from molotov fires, but for some reason this mod is making them run _towards_ gas can and explosive barrel fires.
kurochama  [author] 20 Dec, 2024 @ 12:56pm 
@Wenda , mode 2 uses pushback, so it depends on the area where there's fire. If the area is wide enough, bots will be pushed away from the fire, but if it's in a small room where the fire covers almost the whole room, they will be pushed to the corner & trapped there. I explained this weakness on the "notes" on the description. But based on my tests in several custom campaigns, mode 2 gives more chance to avoid fire than mode 1, as mode 2 is active instantly when bots detect fire caused by other survivor's molotov or gascan.
I STAPLE TAPEWORMS ON MY 20 Dec, 2024 @ 12:02pm 
mode 2 seems to still have the same issue, except they teleport through to the other side rather than walk. they also seem to just stand there more often
I STAPLE TAPEWORMS ON MY 18 Dec, 2024 @ 9:03am 
i switched to 2 after
kurochama  [author] 18 Dec, 2024 @ 8:56am 
@Wenda , did you use mode 1? Sometimes bots do that on mode 1. Mode 2 (pushback) should be safer for bots as they just get pushed back away from the fire.
I STAPLE TAPEWORMS ON MY 18 Dec, 2024 @ 8:29am 
im having an issue with this where, bots will be at the edge of the fire and take damage but will then run through the fire to escape through the other side.