Left 4 Dead 2

Left 4 Dead 2

Bot AI Improvements
 This topic has been pinned, so it's probably important
T-Rizzle  [developer] 14 Oct, 2022 @ 4:56am
Changing Addon Settings
This addon has customizable cvars, here is a list of said cvars and what they change. You can find these files in \steamapps\common\Left 4 Dead 2\left4dead2\ems\botaifix\cfg

If you can't find const.nut and/or the settings.txt they should automatically be created when you load into a local server or single-player match

In the const.nut file has 1 cvar, "Note the null at the end of the document can be safely removed."

const BOTAIFIX_THINK_RATE = 0.1
This is how fast the addon runs the think function. I would not recommend setting it higher than 1 second as some of the addon's features may not work properly.

In the settings.txt has 20 cvars, "If you were to accidentally delete one of the cvars the addon will automatically use the default values posted here."

load_convars = 0
This will load the sb_ cvars I have set for this addon using these cvars bots are better teammates for harder difficulties.

allow_deadstopping = 1
If set to 1 bots will be allowed to attempt to deadstop jockeys and hunters

improved_revive_ai = 1
If set to 1 bots will stop reviving you when a tank and/or common infected is nearby

improved_melee_ai = 1
If set to 1 bots will automatically determine when its a good idea to chase after enemies or if they should stay close to the group. NOTE: Sometimes the AI makes bad choices, I have no control over this as that is a vanilla AI bug rather than this addon.

tactical_crouching = 1
If set to 1 bots are allowed to crouch when attacking far away SI and common infected.

t1_shove = 1
If set to 1 bots with T1 shotguns and css snipers have a chance to shove after shooting to allow them to shoot faster.

improved_pistol_usage = 1
If set to 1 bots will use their secondary weapons when attacking far away common infected to save ammo. Bots will also reload their secondary weapons when not in combat.

common_revive_abandon_distance = 50
This is the distance at where bots will abandon revives if a common infected gets too close.

melee_distance = 150
This is the distance where bots pull out their melee weapons or chainsaws if they have one.

melee_attack_distance = 50
This is the distance where bots attack nearby common infected with melee weapons. Bots are forced to hold their attack button if they have a chainsaw.

shove_distance = 50
This is the distance where bots shove nearby common infected.

max_melee = 2
This is how many bots should have a melee weapon.

crouch_distance = 2000
This is the maximum distance at where bots are allowed to crouch when attacking far away common infected

stand_distance = 400
This is the minimum distance at where bots are allowed to crouch when attacking far away common infected.

melee_abandon_distance = 200
This is the distance where bots swap back to their primary weapon if they have one, this also affects sniper bots making them swap from their pistols to their primary weapon if the infected get too far.

close_player_distance = 400
This is how close a bot needs to be to an alive human player in order to crouch this also determines how far away bots can chase after common infected targets with melee weapons.

special_shove_distance = 100
This is how close a jockey or hunter needs to be in order for a bot to attempt to dead-stop them.

spit_uncrouch_distance = 200
This stops bots from crouching if they are too close to an spitter's acid patch.

tank_flee_distance = 400
This is the distance that I force bots to move backwards and disable their ability to move forward.

tank_revive_abandon_distance = 400
This is the distance when bots should stop attempting to revive players if their is an active tank.

incap_shoot_distance = 200
This is the distance when bots will be forced to shoot common infected. This cvar only forces the bot to press its attack button and aim at nearby common infected, this doesn’t check if the bot can see said common infected, “or the bots won’t shoot through teammates,” so at higher distances bots will shoot at walls.
Last edited by T-Rizzle; 11 Dec, 2024 @ 11:08am