Left 4 Dead 2

Left 4 Dead 2

Bot Flame Evasion
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.
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://steamhost.cn/steamcommunity_com/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://steamhost.cn/steamcommunity_com/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
TBK Duy 26 Nov, 2024 @ 8:48am 
Haha, okay i see now. I actually have bot immune to fire sourcemod plugin myself. But i always want to see a workshop version, guess not lol
kurochama  [author] 26 Nov, 2024 @ 8:39am 
@TBK Duy , making bots immune to fire is possible, but they'll still fall back when stepping on fire. So even if I add this mode, it can't make bots pass through fire just to follow you. It would be different if the mode is "Warp Mode" in which bots will be immediately warped behind players when stepping on fire.
kurochama  [author] 26 Nov, 2024 @ 8:35am 
@Bane , that's very strange. I never added anything inside the vscript file except for a logic timer to make bots detect fire from survivors. I tested several times with more than 30 script mods in a full play in some custom campaigns (like Pier Pressure, Big Wat) & I found no such bugs you mentioned. So I suspected that it must be one or some of your script mods that triggered those bugs.
Bane 26 Nov, 2024 @ 8:04am 
Okay, sorry unsubscribed, I don't know why, but ever since I subscribed the game is broken. Specials cheat and continually spawn too fast and halfway through the tank fight it suddenly starts the second wave of infected and the helicopter suddenly arrives during the second tank fight. It did not do this once before I subscribed to this
TBK Duy 26 Nov, 2024 @ 12:40am 
@kurochama Not only fire from the map. But from teammate as well, I use Left 4 Bots 2, they throw molotov on themself sometime and get killed on their own, or players fault. Either way, let just say I'd like to have fire damage disable to bot globally, because sometime they got blocked by fire, and can't keep up with players
kurochama  [author] 25 Nov, 2024 @ 8:45pm 
@Bane , you can give a try. The only problems most of the time are what I mentioned on the "Notes" above. So in most cases, bots should be able to run immediately from molotov & gascan fire as long as there's enough space for them to run away.
Bane 25 Nov, 2024 @ 8:12pm 
Going to test this , but it looks really useful. When I play Fallen I often throw a molo up the ladder on the finale and bots kept walking into it like moths
kurochama  [author] 23 Nov, 2024 @ 3:21am 
@TBK Duy , You can use Anti Traps instead if it's fire from a map. Anything from a map other than zombies that can harm a survivor is categorized as a trap on "Anti Trap", so if you set the "Anti Trap" mode on bots, they won't take damage from anything harmful from a map, including fire.
TBK Duy 22 Nov, 2024 @ 11:47pm 
Can you add Mode 3: No fire damage ? Is cheating i know, but is an optional feature i would like to use
something something house 20 Nov, 2024 @ 4:48pm 
this is useful thanks kuro:D
kurochama  [author] 20 Nov, 2024 @ 12:56pm 
@Demo , thanks :steamhappy: . Feel free to let me know if you find any problems/ bugs other than those I mentioned on "Notes".
Demo 20 Nov, 2024 @ 12:14pm 
Instant favorite :cozybethesda: