Left 4 Dead 2

Left 4 Dead 2

Bot AI Improvements
 This topic has been pinned, so it's probably important
T-Rizzle  [developer] Oct 20, 2022 @ 5:42am
Addons Cvars
//If you think their should be any changes please let me know!
Convars.SetValue("allow_all_bot_survivor_team", 1);
Convars.SetValue("sb_all_bot_game", 1);
Convars.SetValue("sb_allow_shoot_through_survivors", 0);
//This stops bots from shooting through teammates
Convars.SetValue("sb_battlestation_give_up_range_from_human", 550);
Convars.SetValue("sb_battlestation_human_hold_time", 0.01);
Convars.SetValue("sb_debug_apoproach_wait_time", 0);
//I just noticed that the l4d2 devs misspelled approach, it still works as intended though
Convars.SetValue("sb_close_checkpoint_door_interval", 0.5);
//Is this too low of a number?
Convars.SetValue("sb_enforce_proximity_lookat_timeout", 0);
//This might be too low
Convars.SetValue("sb_combat_saccade_speed", 2250);
//This is the bots "mouse sensitivity" when their is a horde or special infected
Convars.SetValue("sb_enforce_proximity_range", 10000);
//This stops bots from teleporting to the group if they get too far
Convars.SetValue("sb_far_hearing_range", 3000);
//This is how far bots can "hear"
Convars.SetValue("sb_friend_immobilized_reaction_time_expert", 0.1);
//Bots should still have a reaction time
Convars.SetValue("sb_friend_immobilized_reaction_time_hard", 0.1);
//Bots should still have a reaction time
Convars.SetValue("sb_friend_immobilized_reaction_time_normal", 0.1);
//Bots should still have a reaction time
Convars.SetValue("sb_friend_immobilized_reaction_time_vs", 0.1);
//Bots should still have a reaction time
Convars.SetValue("sb_locomotion_wait_threshold", 0);
//I think this is how long a bot must stand still before it can move again
Convars.SetValue("sb_max_battlestation_range_from_human", 300);
Convars.SetValue("sb_max_scavenge_separation", 2000);
//This is how far away bots are allowed to scavenge for supplies
Convars.SetValue("sb_near_hearing_range", 2500);
//This is the range when a bot hears something that they should be worried about
Convars.SetValue("sb_neighbor_range", 100);
//This is how close a bot needs to be to another survivor in order for the bot to feel safe
Convars.SetValue("sb_normal_saccade_speed", 1500);
//This is the bots "mouse sensitivity" when they are not fighting a horde, attacking wandering common infected is a good example of when this is used
Convars.SetValue("sb_path_lookahead_range", 300);
//Minimum range movement goal must be along path
Convars.SetValue("sb_reachability_cache_lifetime", 0);
//This is how long a bot will consider an area walkable, if said area becomes blocked or hazardous the bot will not mark it unsafe until this time has passed
Convars.SetValue("sb_rescue_vehicle_loading_range", 30);
//This is how close a bot will try to be to an escape vehicle
Convars.SetValue("sb_separation_danger_max_range", 550);
//If a player or bot gets this far from the group a bot will goto them to prevent them from being alone
Convars.SetValue("sb_separation_danger_min_range ", 150);
//If a bot gets this far from the group the bot will focus on getting back to the group
Convars.SetValue("sb_separation_range", 550);
//This is how far apart each player and bot should be from each other, doesn't work very often
Convars.SetValue("sb_sidestep_for_horde", 1);
//Bots will sidestep during hordes to acquire new infected targets
Convars.SetValue("sb_temp_health_consider_factor", 0.8);
//Temp health will be multipled by this when bots consider who needs healing
Convars.SetValue("sb_close_threat_range", 50);
//This causes bots to focus on the one zombie that enters this range until said zombie is either dead or has left said range
Convars.SetValue("sb_threat_close_range", 50);
//This causes bots to not waste time aiming at infected if they enter this range even if when the bot will miss said shot
Convars.SetValue("sb_threat_exposure_stop", 300000);
//Unknown what this does yet
Convars.SetValue("sb_threat_exposure_walk", 150000);
//Unknown what this does yet
Convars.SetValue("sb_threat_far_range", 2500);
//Bots will only attack zombies in this range if they are a part of a horde or are a special infected
Convars.SetValue("sb_threat_medium_range", 2000);
//Bots will attack zombies at this range even if they are not attacking the group, aka wanders will be considered threats
Convars.SetValue("sb_threat_very_close_range", 50);
//This causes bots to fire their weapons at infected if they enter this range even if the bot will miss said shot
Convars.SetValue("sb_threat_very_far_range", 3000);
//Any infected past this range are not considered as threats to the bots even if they are a boss infected
Convars.SetValue("sb_toughness_buffer", 15);
//When a bot considers who needs healing they add the specified HP to themselves when considering who needs healing
Convars.SetValue("sb_vomit_blind_time", 2);
//Bots should shove for a few seconds after being covered in boomer bile
Convars.SetValue("sv_consistency", 0);
//This helps with players not being able to join your server
Last edited by T-Rizzle; Aug 14, 2024 @ 3:37pm
< >
Showing 1-11 of 11 comments
sans shapiro Dec 20, 2022 @ 6:14am 
I'd set sb_allow_shoot_through_survivors and sb_sidestep_for_horde to their default values, since bot-on-bot friendly fire doesn't inflict aim punch, and leaving it off hurts their ability to cover their teammates.
Sidestepping in my time spent with it on just made them fidgety friendly fire magnets on Expert.
I personally add sb_min_attention_notice_time 0 to my L4B config to make them quicker to pass off throwables to me out of combat, too.
T-Rizzle  [developer] Dec 20, 2022 @ 12:33pm 
Originally posted by sans shapiro:
I'd set sb_allow_shoot_through_survivors and sb_sidestep_for_horde to their default values, since bot-on-bot friendly fire doesn't inflict aim punch, and leaving it off hurts their ability to cover their teammates.
Sidestepping in my time spent with it on just made them fidgety friendly fire magnets on Expert.
I personally add sb_min_attention_notice_time 0 to my L4B config to make them quicker to pass off throwables to me out of combat, too.
I have sb_allow_shoot_through_survivors set to 0 mostly because I hate it when bots try to shoot though me and make it impossible to shoot infected. I also have it set to 0 because I normally play with bots being able to cause friendly fire damage.

I have sb_sidestep_for_horde to 1 because it makes the bots better at dealing with nearby common infected. They will move left and right to make sure they are always fighting a common infected during a horde. This also makes bot retreat/move backwards when surrounded by infected.
带娃高手 Mar 17, 2023 @ 6:05pm 
where to use it
T-Rizzle  [developer] Mar 17, 2023 @ 6:07pm 
Originally posted by 趣味巅峰服主死妈:
where to use it
I'm afraid I don't under stand what you are asking?
Pluvillion May 18, 2023 @ 8:38am 
I have my own sb_XXXX cvars in the .cfg. Do I have to remove them to avoid conflicts?
T-Rizzle  [developer] May 18, 2023 @ 1:11pm 
Originally posted by Pluvillion:
I have my own sb_XXXX cvars in the .cfg. Do I have to remove them to avoid conflicts?
If you set load_convars to 0 in this addon’s settings.txt you don’t have to remove your cvars.
Last edited by T-Rizzle; May 18, 2023 @ 1:11pm
Zero_hunter Feb 11, 2024 @ 4:03am 
Hi, I tried to create a convars file and set load convars to 1. Some features worked, except for changing max ammo for T3 weapons (GL and M60). Is this supposed to happen?
T-Rizzle  [developer] Feb 11, 2024 @ 8:54am 
Originally posted by Zero_hunter:
Hi, I tried to create a convars file and set load convars to 1. Some features worked, except for changing max ammo for T3 weapons (GL and M60). Is this supposed to happen?
@Zero_hunter
When you set load_convars to 1 in MY ADDON. It loads convars I set internally. If you want to use your own convars you need to change MY ADDON's load_convars to 0. You can use your own custom set of convars by changing the convars.txt in Left For Bots!

Sorry if there was any confusion!!!:health:
Last edited by T-Rizzle; Feb 11, 2024 @ 8:55am
Zero_hunter Feb 11, 2024 @ 9:26am 
Originally posted by T-Rizzle:
Originally posted by Zero_hunter:
Hi, I tried to create a convars file and set load convars to 1. Some features worked, except for changing max ammo for T3 weapons (GL and M60). Is this supposed to happen?
@Zero_hunter
When you set load_convars to 1 in MY ADDON. It loads convars I set internally. If you want to use your own convars you need to change MY ADDON's load_convars to 0. You can use your own custom set of convars by changing the convars.txt in Left For Bots!

Sorry if there was any confusion!!!:health:
Thank you for your reply. That makes senses perfectly. Actually, I am currently using three addons at the same time as shown from a guide I found on Youtube that included: Left 4 Bots, Competitive Bots, and Bots AI Improvement (which is your addon). I was using only Left 4 Bots for a while with my own custom convars, but then I need bots to be even better for Expert games. The problem is that when I set load_convars to 0, I can't run my custom convars in Left 4 Bots, as it is required to be at 0 for Competitive Bots addon to run. That's why I thought that making my own convars in YOUR ADDON might work. I guess I will need to use separate scripts for T3 weapons.
Enzo the Catto Oct 27, 2024 @ 1:24am 
So after I set load_convars 0
All I need to do now is creat a file convars.txt and all set right?
T-Rizzle  [developer] Oct 27, 2024 @ 9:21am 
Originally posted by Enzo the Catto:
So after I set load_convars 0
All I need to do now is creat a file convars.txt and all set right?
Yes and No, My addon doesn't have a convars.txt. file. Left for Bots and Left for Bots 2 should have a convars.txt file. You can edit and create one in either addon's config folders. There should be more info on how to do this in the respective addon's workshop pages.
< >
Showing 1-11 of 11 comments
Per page: 1530 50