Left 4 Dead 2

Left 4 Dead 2

71 ratings
Bot's Acid Evasion and Item Auto Pickup
   
Award
Favorite
Favorited
Unfavorite
Survivors: Survivors
Game Content: Scripts, Miscellaneous
Game Modes: Single Player, Co-op
File Size
Posted
43.547 KB
4 Feb, 2024 @ 8:22pm
1 Change Note ( view )

Subscribe to download
Bot's Acid Evasion and Item Auto Pickup

In 1 collection by kurochama
Useful "Side-Dish" Mods (Especially for Bots)
61 items
Description
As the title said, this mod gives bots 2 features that the original L4D2 doesn't have. "Acid Evasion" is bot's ability to immediately run from acid when it falls on the ground. Normally bots love to stay until they get hit by acid before they start to move. Even some bot mods also still have this bot's behaviors though they could make bots avoid acid more frequently. But on this mod, they will have like 90% chance to avoid acid! The rest 10% is when they're unlucky to get cornered or run in wrong way, but this rarely happens.

As for "Item Auto Pickup", this makes bots pick items automatically when the items is in the radius of auto pickup. This can solve problems with bots refusing to pick items due to bot navigation error on some custom campaigns.

Here are the features in "bot acid evasion.txt" cfg:
  1. Acid Evasion: The main feature to enable bot's acid evasion
  2. Acid Escape Timer: The sub feature of "Acid Evasion" that controls how long the bots will run away from acid.
  3. Acid Standby Timer: The sub feature of "Acid Evasion" that controls how long the bots will remain standby on one place to wait until the acid disappears.
  4. Item Auto Pickup: The main feature to enable bot's auto item pickup.
  5. Item Auto Pick Range: The sub feature of "Item Auto Pickup" that controls the range of item auto pickup. The value is the range of the auto pickup.
  6. Item Auto Give: Bots will automatically give items to players simply when players in in close range (melee range). The value affects which items to gve (first aid kit only, or with throwable, pills & primary guns).

As the settings of "Acid Evasion" have to be set correctly,
here's the simple tutorial of how to configure it
:
  • "Acid Escape Timer" makes bots run in the duration of the value of this feature & at the same time triggers standby state, this should be set lower than the value of "Acid Standby Timer" to prevent unwanted bugs.
  • "Acid Standby Timer" makes bots move again by the end of the duration, so it must be set higher than "Acid Escape Timer" to prevent unwanted bugs.
  • Set the value of both sub features with the difference of 1 or 2 seconds. For example: "AcidEscapeTimer 3", "AcidStandbyTimer 5"

With this mod, you'll have better bots at avoiding acid & at the same time very kind bots that will voluntarily give you their items when you don't have them :D .

Notes:
  • A video preview will be added later.
  • Some known bugs on "Item Auto Pickup" feature:
    - Bots can duplicate items sometimes (imagine 3 bots pressing E on the same item at the same time).
    - Bots can always pick throwables when they're close to the throwable spawn spot, so basically bots become grenadiers or grenade suppliers with unlimited supplies if they camp near throwable spawn spot.
    - "Item Auto Pickup" also makes bots prefer T2 guns over T1 guns, theywill switch to T2 immediately when they're close to it even if the T2 gun is low of ammo or empty. This will be fixed later. & you can also set "Item Auto Pickup" to 2 to make bots pick item automatically when players hold TAB button.
Popular Discussions View All (1)
4
21 Feb @ 6:38pm
PINNED: Bug Report Section
kurochama
40 Comments
kurochama  [author] 8 Aug @ 1:29am 
@ trijun_heisei , it should be possible, but I still don't have a plan to make such mod, because usually some bot mods already provide features to let bots pick items (for example, on "Left 4 Bots", you can order a bot to pick an item). So, to prevent that bug of bots picking & dropping weapons continuously when using other bot mods like "Left 4 Bots", you can set the value of "Item Auto Pickup" to 2, so bots will only pick items if you hold TAB when bots are near the items.
trijun_heisei 7 Aug @ 4:49pm 
@kurochama So if you separated this addon, and then added suggestion B, would it be possible?
kurochama  [author] 7 Aug @ 4:14pm 
@trijun_heisei , you can set the value to 2. If the value is set to 2, bots only pick items automatically when player holds TAB/ SCORE button. So with this, bots won't repeatedly pick & drop weapons when using other bot mod like L4B2.
Actually the original plan back then was to set different items on each value, like 1= pills/ adrenaline only, 2= pills + medkit, 3= pills + medkit + grenade, 4= pills + medkit + grenade + weapon. But as the main feature here was acid evasion, so I just simplified the "Auto Pickup" to pick all items they don't have instead.
trijun_heisei 7 Aug @ 2:49pm 
This mod is great. However, I have an issue with the "Item Auto Pickup" feature. Especially combined with Left 4 Bots 2. It causes the bots to repeatedly drop a weapon they currently have, swap it with a new weapon that they are told to not use (in this instance the scout sniper), and picking up the weapon they had previously.

Here are some of my suggestions of fixing this issue:
A: Update this mod to have a list of weapons they use or avoid (like L4B2)
B: Make a 4th value for "ItemAutoPickup" that allows the bots to only pick up items and NOT weapons

Hope you're able to fix these issues.
kurochama  [author] 23 Jul @ 6:25pm 
@Brian , 2 or 3 is the most ideal value for "Acid Escape Timer", as higher value might cause problems in maps that have some pits or take place on the rooftop. & the reason why they stop is probably because they go into standby mode after running for certain duration set on "Acid Escape Timer" (this is also why sometimes setting the value to 3 is better than 2, as bots have 3 seconds to run from acid before they go into standby mode).
As for bots getting stuck, probably other bot mods caused that. I played "Gravitation" custom map recently, & they escaped from acid several times without getting stuck even when using "Sprint System" to allow bots to sprint.
Brian 23 Jul @ 5:49pm 
@kurochama, I understand how the Acid Escape Timer works now. That defines how far away the bots will run from Spitter Acid. I think they run too far away when I have that set at 3 instead of 2. Sometimes it looks like they get stuck in the acid and can't move at all. I'm assuming that's just a navigation problem. I've seen them get stuck in custom maps for a few seconds even if there is no Spitter Acid on the ground.
kurochama  [author] 23 Jul @ 1:14am 
@Brian , the mechanisms are like this:
- If "Acid Escape Timer" is set to 3, bots will keep running for 3 seconds before they go into standby mode. If it's set to 5, bots will run for 5 seconds.
- If "Acid Escape Timer" is set to 3 & then ""Acid Standby Timer" is set to 5, bots will keep running for 3 seconds, & then they stand still. After 5 seconds, they'll gather to player's location again.
So, if you want bots to run farther, increase the value of "Acid Escape Timer", but this shouldn't exceed "Acid Standby Timer" (the value of "Acid Standby Timer" must be bigger than "Acid Escape Timer")
Brian 23 Jul @ 12:22am 
@kurochama, Acid Escape Timer is set at 2. That causes me to think bots will stand in Spitter Acid for no longer than two seconds. Acid Standy Timer is set at 5. That makes me think bots will stand in one place for five seconds after they have avoided Spitter Acid. Are those assumptions correct?
kurochama  [author] 22 Jul @ 11:02pm 
@ Brian , the acid damage is the default L4D2 damage. I didin't change that on this mod. As for the wait time, it's controlled by "Acid Standby Time". While "Acid Escape Time" controls how long bots will run from acid, "Acid Standby Time" controls how long bots will stand still.
Brian 22 Jul @ 10:43pm 
I've had this mod installed for a while. The bot players do take less damage from the Spitter. My only advice would be for a person to increase the Acid Standby Timer to 7 or 8. Valve didn't optimize that setting. Sometimes the bot players don't wait long enough when there's Spitter Acid on the ground. They start moving again and walk into the acid before it evaporates.