Left 4 Dead 2

Left 4 Dead 2

Bot Flame Evasion
62 Comments
kurochama  [author] 27 Oct @ 7:11pm 
@ Poolsup (TH) , I just updated. Now bots can avoid from fireworkcrate explosion. However, they still can't avoid the fireworks on the Dark Carnival Stage. Probably I'll check the entity for firework on the stage later, as it's different from the one from fireworkcrate.
Poolsup (TH) 27 Oct @ 5:17am 
i'said look in finale on dark carnival map about fireline stage/firework stage ignore custom campaign
kurochama  [author] 27 Oct @ 12:27am 
@Poolsup (TH) , as I said before, firework uses different fire type, so bots can't detect it. As for fire barrel, they can detect it as long as it's exploded because of a survivor. I tested just recently in some custom campaigns with many fire barrels & they're pushed back when they're too close to the fire. If you want to test, try "Alien Trilogy" campaign, as that one has many fire barrels even in 1st map. Probably I'll do some tests again soon, especially to check the fire type on fireworkcrate.
Poolsup (TH) 27 Oct @ 12:13am 
and another one the fire barrel the bot got stuck into fire barrel start taking damage slowing
Poolsup (TH) 27 Oct @ 12:10am 
and second phase the firework pop up on middle stage mic the bot near to middle
Poolsup (TH) 27 Oct @ 12:09am 
on first phase
Poolsup (TH) 27 Oct @ 12:09am 
i'saw bot walk into fireline on stage is stop moving
kurochama  [author] 26 Oct @ 11:07pm 
@Poolsup (TH) , firework is an exception. Bots only avoid flame covered the ground, but not the firework. Firework has different entity from the flame caused by molotov, gascan & explosive barrel so that's why bots can't detect it. There might be some tricks to make them avoid fireworks caused by exploding a fireworkcrate, but probably it might cause some small bugs.
Poolsup (TH) 26 Oct @ 10:06pm 
firework set on stage have two fire pop out the bot can't walk up and drop down stage
Poolsup (TH) 26 Oct @ 10:05pm 
but finale in dark carnival map the stage fire on edge
kurochama  [author] 26 Oct @ 10:02pm 
@Poolsup (TH) , they can avoid it, as long as the culprit blowing up the barrel is another survivor. They just can't detect flame that comes from a map, like for example, map 1 of Dead Center.
Poolsup (TH) 26 Oct @ 9:41pm 
even explode barrel
Poolsup (TH) 26 Oct @ 9:41pm 
but they bot don't avoid fire object not molotov
Bane 4 Oct @ 1:53am 
Just recently tested this again and now it does not cause problems, thank you
Yorukaze 12 Sep @ 7:59am 
Honestly, it would be great if someone figured out to make the bots dodge before the rock is thrown so they can avoid rock in close range aswell.
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.
Doc903 9 Dec, 2024 @ 6:31pm 
Ah, yeah, I could see that being a big performance drop.
kurochama  [author] 9 Dec, 2024 @ 5:37pm 
@Darko , thanks. I'm glad that you like this mod.

@Doc903 , this may require nax block, to block common infected. It should be possible to be made, but this will spawn a nav block entity anytime flame is triggered by a survivor via molotov of shooting a gascan/ barrel, & that might cause a problem when the entity limit is reached.
Doc903 9 Dec, 2024 @ 5:30pm 
Can this be done to infected, too? Imagine the infected re-routing to avoid a molotov chokepoint.
Darko 7 Dec, 2024 @ 11:22am 
Awesome mod. Instant favorite. A must-have add-on for singleplayer.

Though in my experience it has a 10% chance of failure. Fore example, after a holdout event Francis got incapped and I accidentally shot a gascan nearby and then Zoey and Louis rushed towards him to save him, the three of them dying in seconds [Expert difficulty]. At that moment I was experimenting with Left 4 Bots 2 + Competitive Bots. I tried to test that again multiple times by incapping myself after throwing a molotov in the middle to see if they crossed the fire; thankfully they did not. I also tested it with Left 4 Bots 2 + Cruel Bots and no issue.
kurochama  [author] 30 Nov, 2024 @ 10:43pm 
@Bane , here's the video for "Dead Vacation" finale, with "Bot Flame Evasion": https://www.youtube.com/watch?v=26qYrDFDPzM&feature=youtu.be
You can check at minute 1:40 to see how I threw molotov & bots avioided with auto pushback (mode 2). & mods I used:
- Merciless Bots
- Item Drop Bonus
- Item Randomizer
- Bot Acid Evasion
- Bot Flame Evasion
- Ak47 Paladin
- Rifle with M203
- Mp5 with Smoke GL
- Fullblast Autoshotgun
- Desperado Dual Pistols
- Funny Guns
- Gun Collectors Lite
- Demolition Gunners
- Survivor Item Swap & Drop
- Celestial Melee Weapons
- Sentry Floating Turret
- Etc (there were around 30 script mods active, too many to mention all here)
Even with all those script mods, this "Bot Flame Evasion" worked with normal finale. So, probably there's one or some of your mods that messed with other vscript files & caused the bugged finale. You can try "reverse search" for that.
kurochama  [author] 30 Nov, 2024 @ 7:52pm 
@Bane , btw could you send me the workshop link for "Dead Resort"? I tried to find it via google but I could only find "Last Resort". The closer one I could think of is "Dead Vacation", as that also has a finale where some parts of the building crumble & collapses. If that's the campaign, probably I can also test a play on last 2 maps, just to check whether the bug will also happen to my play or not.
kurochama  [author] 30 Nov, 2024 @ 7:14pm 
@Bane , it's very strange as I just finished playing "Disturbed in the Suburb" from the beginning till the finale with this mod enabled, & the finale was normal. If only I could see the list of mods you were using when that bug happened, probably I could also search the source of the bug in a reverse way, like, instead of disabling this mod, I'll try to disable other mods one by one, or every 10-20 mods to save time until I get the problematic ones & then I'll check the vscript files inside. At least that's the method I'd do. Anyway, actually I also ever met such bug few years ago when I messed with vscript files other than "director_base", "mapspawn", & "scriptedmode". So my suspicion would be some mods that messed with other vscript files.
Bane 30 Nov, 2024 @ 6:51pm 
Unfortunately it's still causing issues, in particular the rescue vehicle often arrives during the 2nd tank fight. Sometimes the tank music will just stop for no reason. Other times it starts the post tank wave of zombies during the first tank fight. As soon as I remove the addon it goes back to normal. This is deadly in campaigns like Dead Resort as the building collapses as soon as the rescue vehicle arrives killing you if you are still fighting
kurochama  [author] 27 Nov, 2024 @ 6:46pm 
@Bane , so now it worked in your play? It's good to hear that. Probably the main cause was the script that I had put on "director_base_addon.nut" before.
Bane 27 Nov, 2024 @ 6:10pm 
I think it is better now, I played 3 campaigns without any issue
TBK Duy 26 Nov, 2024 @ 9:18pm 
Thank you, but i'd still prefer a mod because i'm super lazy :steamhappy:
kurochama  [author] 26 Nov, 2024 @ 9:10pm 
@TBK Duy , you can try "Anti Traps" now, as I updated value no. 0.5.
kurochama  [author] 26 Nov, 2024 @ 8:21pm 
@TBK Duy , writing alias on console is actually simple enough. For example, you only need to write 3 lines like this on console to bind "v" key as toggle on/ off for hold button on USE:
alias "touch+" "+use; bind v touch-"
alias "touch-" "-use; bind v touch+"
bind "v" "touch+"

You can keep the format of these 3 lines on a notepad or phone notepad, so anytime you play at cyber game, you can set your hold button. As for the mod version, it might need a timer function, or some event functions related to pressing USE button.
TBK Duy 26 Nov, 2024 @ 8:00pm 
Well i'd like to have my friends or randoms to enable it as well, so i think a mod would be more suitable. Also, i'm not at home gaming PC often, so when i go to cyber game i have to do bunch of stuff to install sourcemod. A workshop mod is sure helpful saving a lot of time
kurochama  [author] 26 Nov, 2024 @ 7:44pm 
@Bane , I just updated the mod with "IncludeScript" instead. You can test it again. It should no longer cause conflict or trigger bugs, as most of script mods also use "IncludeScript" on "director_base_addon.nut". Let me know theresult.

@TBK Duy , did you mean holding button like holding E button when pressing some generator buttons etc? I think this can be done with "alias" command on console, so there's no need to use a mod. It can be made via mod too, in fact, as there's a netprops to force a button on a survivor.
TBK Duy 26 Nov, 2024 @ 7:33pm 
Off-topic, can you also make a mods that auto hold buttons for you instead? Like this: https://forums.alliedmods.net/showthread.php?p=2770377
Bane 26 Nov, 2024 @ 7:24pm 
@kurochama, I'll definitely check if you do that, like I said, I really liked how they evade the fire
kurochama  [author] 26 Nov, 2024 @ 6:58pm 
@TBK Duy , probably it won't be long to add one, but it will be a special value in decimals (like 0.5), as the effects are also a special case.
TBK Duy 26 Nov, 2024 @ 6:35pm 
Well then, it depends on you i guess, you can add that option on "Anti Traps" if you want to, and i will start to use it as soon as it added
kurochama  [author] 26 Nov, 2024 @ 6:29pm 
@Bane , the "director_base_addon.nut" also only contains one script to spawn a logic timer containing vscript file for "Flame Evasion". It's pretty strange as even I couldn't re-create the same bugs by using L4B2 & "Rise Talker" together, so there's high possibility that the director part of other mods or plugins got broken just because of the logic timer. Probably I can alternate it by using "IncludeScript" instead on the "director_base_addon.nut" (which should be more stable & bug free), but I'm not sure if that would fix the bugs in your case, as I still can't re-create the same situations.
Bane 26 Nov, 2024 @ 6:13pm 
@Kurochama Left 4 Bots 2 has not been updated since June. I had no issues with the Special infected or the game until after I subscribed yesterday. The game has gone back to normal after unsubscribing. It's a shame really, because this does what it says it does really well. I think the problem is the director part of the addon
kurochama  [author] 26 Nov, 2024 @ 12:17pm 
@Bane , is this the "Rise Talker" you used?
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2462741269

I used that along with L4B2 & other script mods on Hard Rain map 1. & here's the demo file: https://drive.google.com/file/d/1_T79d2DcSmWGmMc8ut3OTzxojKrlx-LD/view?usp=sharing
You can put the demo file inside that zip in the same location of "addonlist.txt", & type on console "playdemo filename" to view the demo of my test play. The special infected there just spawned normally. So, I'm pretty sure that neither this mod nor L4B2 or Rise Talker that I used above caused the bugs in your case. I'm not sure about plugins (in case if you used some sourcemods), or probably some local mods. But somehow I couldn't re-create the same situations as yours even with the same mods you mentioned. It's pretty strange.
kurochama  [author] 26 Nov, 2024 @ 10:08am 
@Bane , I'm not sure if this has something to do with your bugs, but one of replies there told about similar situations as yours: https://gtm.steamproxy.vip/app/550/discussions/0/4628106985313757779/?tscn=1732640182
Maybe it's just a pure coincidence.
kurochama  [author] 26 Nov, 2024 @ 10:04am 
@TBK Duy , it's possible on "Anti Traps" (if I wanted to add a new mode for this), but not here, as the only way to make bots completely ignore fire & even step into fire is via "AllowTakeDamage" function, & "Anti Traps" uses that function.

@Bane , I'll soon try to re-create the same situations as yours then. It would be better if you could also provide in which map those bugs were triggered so I can completely re-create the same situations to check the bugs.
Bane 26 Nov, 2024 @ 9:28am 
@kurochama The only script mods I use are Left 4 bots 2 and the RISE talker