How to make the AI squad less annoying

  • Thread starter Thread starter AndroidXP
  • Start date Start date
A

AndroidXP

Guest
Didn't find anything on this particular subject, so I hope it hasn't been posted before.

But, if you now think I'll ask how to make 'em less annoying, you're WRONG! :eek: Actually I will present you an easy solution.

There are two things that I really hate about the squad AI:
1) Their "gathering around you" in cramped spaces
2) Their "auto follow you" ~15 seconds after you've sent them to a certain location

The first one isn't too bad as the squad is also pretty good at getting out of your way most of the time, but the second one really drives me nuts. You've all experienced such a situation: you know that there's an ambush around the corner which needs human tactics to overcome without casualties (and if it's only a simple hopper). So you order your squad to a safe corner and start to defuse the hostile situation. Right when you're about to outwit the trap you hear the hated "FOLLOW FREEMAN!" and the squad runs into its misery, causing general mayhem and high losses.


So I started to dig around in the SDK and after some searching I found cure for the itch. And the best is, it's a simple cvar :D

player_squad_autosummon_time

This cvar controls how long the squad will wait before it automatically returns to you. The default value is "5" but for the final result you have to multiply it with 3 (dunno why, though). For example if you set it to "60", the squad will wait a whooping three minutes before it will return to you. Enough time to clear the way or prepare an attack. Also if you move in cramped spaces, you can order them to sit in a corner so collecting all those ammo packs now only takes a third of the normal time - no more group hug, finally.

The squad will start to auto follow you if you move too far away, though (which actually isn't a bad idea IMO). But these things can also be controlled (oh joy):

player_squad_autosummon_move_tolerance (default: 20)
This controls the distance you can move away before the squad will go into "auto follow" mode again. I have no idea how to translate the value into an understandable number but the higher it is the more far away you can move.

player_squad_autosummon_player_tolerance (default: 10)
If you're closer than this value to a point you ordered the squad to go to, the squad will return to follow mode.
Example: you're at point A and order the squad to point B. If you now move around and come closer than 10 "whatever" to point B, the squad will follow you again.

player_squad_autosummon_time_after_combat (default: 8)
This time must pass by after the squad has last seen an enemy (or has last taken damage) before any "auto follow" calls are accepted again. This makes the squad wait longer at a certain point when there are enemies around somewhere. You can simply ignore this value. If you want to use it, it generally has to be greater than the autosummon_time cvar to make an effect.

Hope this helps any of you.
 
Yay, thanks a lot, AndroidXP! It's great, must check now :]
 
I've come out of long term lurking just to say thanks for that fantastic bit information.
 
or you could just turn the squad to "permenent stay" mode by changing the following to either a 0 or a 1 (opposite of what it is set at currently)

player_squad_transient_commands

it shuld say "squad stationed" when you click c... they stay there untill you hit c again to make them "squad following".

ALSO the following will add ALL citizens on the map to your squad (makes them all try to follow you).

ent_fire npc_citizen SetSquad player_squad

you can see the squad they are currently in by typing "npc_combat" while pointing at a unit (it also shows health), I have it as my "mouse5 on my logitech mouse).

however, only 4 at a time will attempt to go to where you tell them, the others will either stay where they are during "stationd" mode, or follow you like they normally do in "follow" mode.
 
It gets really cool when you have 40 citizens following you around, especially during the parts when you fight striders.
 
Man, that is a NICE first post. Welcome to the forum!
 
Say that, hypothetically, someone (not me, haha!) had no idea to access the commands you write about. How would this hypothetical person (not me, I reiterate) go about changing the configuration thingies you describe.
 
Very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very nice information AndroidXP!!!!!!!1111oneone :D :D

will save it all :)

Mediocity you (no I mean your hypothetical friend) open this file with a text editor:
c:\program files\Steam\SteamApps\your@email\half-life 2\hl2\cfgconfig.cfg
then type in bind x "npc_combat" and it will be set to always be set when u press x

for the rest you just add them like he writes them but change the following number to what you think is right.
you can also change it ingame by accessing the console. To access the console if you have a non us keyboard you have to change the -bind "`" "toggleconsole"- line to something like bind "z" "toggleconsole"

Hope you can use this Im sort of in a hurry and have to go + sleepy :-P

exellent info!
 
@Mediocrity:
Play Games -> right click "Half Life 2" -> Properties -> Launch Options -> enter "-console" -> OK -> Close

Then start HL² normally. You can now access the console via the "~" key (or whatever key is below ESC on your keyboard).

Alternative:
Go to your "Steam\SteamApps\[email protected]\half-life 2\hl2\cfg" directory and create a file named "autoexec.cfg" (if it's not already there). Open this file and add the commands I mentioned above.

If you're this far you can also add "con_enable 1" and bind a different key to toggleconsole ("bind F7 toggleconsole", for example - everything without the " of course), just for the case when the key below ESC doesn't work (which is the case for most german keyboards).

/E: OW, too slow :E

The cvar Ultimape mentioned also works of course. If I had known what "transient" means before looking it up in a dictionary I would probably have reported this cvar anyways ( :angel: )
 
wow. i just spend an hour trawling around for a post like this. why is no one else other than me mortified by the stupidity of rebel squad ai? O_O anyway.. thanks for this, now i can get back to (don't)follow freeman.
 
commandre said:
wow. i just spend an hour trawling around for a post like this. why is no one else other than me mortified by the stupidity of rebel squad ai? O_O anyway.. thanks for this, now i can get back to (don't)follow freeman.
I guess I was the only person that didn't have a problem with the squads! If they ever got in my way , I just looked to the side, hit C *I think, been forever* and continue on my way :D

PS nice pheonix down, at least it was a thread that others might enjoy reading :)
 
Very nice post!

I enjoyed the squad combat in HL2 moreso than in any other game, but I was also wishing for a way to make my squadmembers sit where they are.

BTW, is it just me, or will pressing C when pointing at your feet return them to the follow mode? If so, I'd rather set the auto-return time to like 5 minutes so they never auto-return and so that I can simply get them back whenever I want by pressing C at my position.
 
Back
Top