Half-Life 2

Half-Life 2

26 ratings
Tweaking Squad AI
By Red Eagle LXIX
This guide will allow you to tweak the AI of your squad to be far less annoying.

The Squad AI in Half Life 2 and the Episodes can get quite annoying at times.

After getting stuck under fire multiple times due to them climbing right up my backside even after being ordered to stand still and hold a position I got fed up and decided to do some digging.
I've found several settings that can be adjusted via the dev console that can make the AI for Squads far less annoying.

The biggest complaints of course being that you can order your squad to hold a position but in just a short few second they start to saying Follow Freeman and chasing you down.
This occurs because by default the squad waits only 15 seconds before running after you.
We can fix this and how far you are allowed to move and how close you can get to a squad that is holding a position without triggering them to say Follow Freeman and chasing you down.

The settings tested that had an impact did not require sv_cheats and thus can be modified and still gain achievements.
   
Award
Favorite
Favorited
Unfavorite
Enabling and accessing the Developer Console
First, you must have the Dev Console enabled.
Then you can bring up the developer console with the Assigned key (usually the ` or ~ key) and adjust the settings listed below.
Each setting has a different effect and to be quite honest the only one I really use is the player_squad_autosummon_time.

Enabling the Dev console:
1). So Start the game.
2). Hit Options.
3). Click the Keyboard Tab.
4). Click the Advanced button.
5). Make sure there is a check in the box for "Enable developer console"
6). Use the assigned key (usually the ` or ~ key) to open the developer console.
Settings
For each of the below setting you can just enter the Setting and a new value as a line in the developer console.
You can also just copy and paste the line that shows the setting and the default value to just restore the setting back to default.
You can also check the current value of a setting by entering that into the console without a value such as typing "player_squad_autosummon_time" without quotes will display what the value is currently set at.

Each item below is set to show the setting and the default value just as they would be entered in the game:
Setting Default_Value
player_squad_autosummon_time 5
Ok, I know what you're thinking. I said they wait 15 seconds but the default value I listed is 5.
This is a quirk or design decision of the game/engine that the value is multiplied by 3.
So with the default of 5 multiplied by 3 that gives the 15 seconds that the squad will wait.
This is generally the only setting I bother adjusting.
I recommend setting this value to something between 10 and 20 which will give 30-60 seconds depending on your tastes as to how soon after being told to hold position you want the squad to start chasing you down again.
The Squad will still follow you if you move too far away. That can be adjusted with another setting below.
player_squad_autosummon_time_after_combat 8
This setting controls howlong after the squad has seen an enemy or taken damage before they will start chasing after you again.
Just like the autosummon_time this value is multiplied by 3 to get the real number of seconds.
If this setting is less than player_squad_autosummon_time it has no effect.
player_squad_autosummon_move_tolerance 20
This setting controls how far you can move away from the squad before they start following you again.
I could find no definition of what the value itself means for this setting, but bigger values means you can walk further away from the squad before they come chasing you down again.
If I adjust this I only boost it to 30. Between this and the prior listed settings the only problem I've noted is occasionally I've lost my squad. As I find them annoying anyway this didn't concern me. You may wish to tweak the values if you really like your squad.
player_squad_autosummon_player_tolerance 10
This setting controls how close you can move to the squad before they recognize you and try to follow you again.
So if you get closer than 10 units (just like player_squad_autosummon_move_tolerance I could find no definition of the unit distance) then the squad will start following you.
For this setting, lower values allow you to get closer to the squad without triggering them to start following you again.
Generally I've not bothered tweaking this setting at all.
player_squad_double_tap_time 0.25
This setting controls how quick/slow one has to double-tap the squad command key to get them to start following you again.
Lower values mean you have to double-tap the squad key faster to engage the squad into following you again by command.
Higher values means you have longer to double-tap the key and have the squad return to following you immediately.
player_squad_autosummon_debug 0
I am unsure of this setting as changing it to a 1 had no discernable effect while sv_cheats was disabled. No testing was done with cheats enabled to preserve achievements.
player_squad_transient_commands 1
I am unsure of this setting as changing it to a 0 had no discernable effect. No testing was done with cheats enabled to preserve achievements.
7 Comments
Respiro X Dec 2, 2024 @ 7:50pm 
Is there a way to increase the maximum amount of squad members you can have on your squad?
just a guy Feb 19, 2021 @ 10:56pm 
at last i dont have to hear "reload mr,freeman"
Shephard Apr 18, 2020 @ 10:41am 
Additionally
add to autoexec.cfg

player_squad_transient_commands 0
Shephard Apr 18, 2020 @ 10:39am 
This what I use in my autoexec.cfg
It works perfectly. Point to an area where you want them, press C, they stay for as long as you want until you press C again.

npc_citizen_auto_player_squad 1
npc_citizen_auto_player_squad_allow_use 1

Aoi Blue Dec 1, 2013 @ 3:50pm 
player_squad_autosummon_debug is a "debug spew" command. If consistant with other debug commands it should spew text to the console and/or log whenever the squad autosummon events are triggered.

I would have to actually test it to see if it works, though. Many of these commands are disabled without another "main" debug spew command enabled. Some are also a bitmask.

The vast majority of the debug commands are undocumented.
A Wet Pancake Sep 11, 2013 @ 11:07pm 
true
choomah töm. Sep 5, 2013 @ 12:08am 
thanks.