AI behaviour from Half Life 2 to GMOD, info_node_hint question
6 replies, posted
So I've been trying to make a standoff scenario in GMOD with Hammer where several info_node_hints with the correct hint group are being used to tell the AI where suitable cover is located in my map, and I've run into two related issues:
1) The npc_combine_s aren't using crouch-lean idle anims on HINT_TACTICAL_COVER_LOW (Crouch Cover Low) nodes. Rebels do theirs mostly correctly.
2) Both npc_citizens and npc_combine_s aren't using standing lean anims on HINT_TACTICAL_COVER_MEDIUM nodes and instead just stand there oddly, looking as if they've been glitched out and can't use the ACT_COVER_MED animation set. They still prioritize moving to these nodes.
And to note: Both NPC types can crouch walk correctly to the Cover Low nodes, and that's the only correct behaviour I've seen from the combine soldiers.
So here's my question: Is the AI slightly broken from transition to GMOD from HL2? Or am i doing something wrong? I don't think my combine soldier models have been altered in any way but i'll check shortly and disable what few addons i'm currently using.
I am using ai_goal_standoff and 1 ai_battleline in my scenario in case anyone is wondering. Not that it influences their behaviour too much in practice.
My temporary solution is to use scripted sequences that force-play the correct animations in the right spots with npc-activated triggers, but i'd rather not do this clunky method. Any help would be greatly appreciated.
If the problem is in the animations being changed from hl2 to gmod, i think i can fix them if that's the solution. If simple LUA helps i will try my best to do that also!
I am too seeking answers for AI behavior, but I think I can offer some insight with what research I did...
I heard that using cover nodes like "HINT_TACTICAL_COVER_LOW" and "HINT_TACTICAL_COVER_MEDIUM" can cause problems, especially "HINT_TACTICAL_COVER_LOW" is siad it should be used sparingly...
What i discovered is that AI is usually decent at finding their own cover, as long as you at least have some standard nodes around it. It is a bit more taxing to let the AI figure out it's own cover, but when dealing with such a broad range of AI, I believe it's best not to use such specific hints.
Yeah, the AI 'should' be the same. Which is why i'm wondering why this is happening.
The AI also try to use the cover (and stay in it, acting odd, not attacking) way too much, but i'm less concerned about that. Just want some fluid animations for a more natural looking fight that is actually complex in structure.
I'm gonna quickly move the map to HL2 and run it from there to see if the AI work properly in that game.
I have checked HL2's maps to see if anything's different but its not! That game doesn't even use HINT_TACTICAL_COVER_MEDIUM almost at all and still gets the desired affect! Its as if the AI recognize tall cover without info node hints at all in hl2... like it says on the developer wiki...
Glad someone replied after almost a week though!
That's why you don't find those hints in HL2 all that much... in all honesty, those cover hint types were only meant for the Combine on specific occasions, that's also why rebels will struggle to use those cover hints.
I don't know about you, but the combat on my map is pretty fluid, if you check out this video I posted as demonstration on my thread. This is done with some bare bones nodes... I did actually redesign my nodes around doors for better doorway tactics then what is demonstrated here. Hopefully though this will provide a good comparison to help your understanding of the AI behavior.
https://www.youtube.com/watch?v=jz1hCAzV0y4
Here is something I did that actually helped my door cramming issue a lot... is using this chart:
https://developer.valvesoftware.com/w/images/f/fe/Door_nodepattern.png
I just inserted nodes on the sides and put nodes in the front and back.
Now I know the optimal way to have AI properly navigate doors.
Thanks for trying to help, but nothing in your map/video is new to me - i already understand and have worked behavior demonstrated in that map.
Override Jump Permission, hint groups, assaults, standoffs, battle lines, all that behavior i understand.
Have you played half life 2 without gmod? Because i'm referring to very specific behavior (more accurately, animations in response to standoff situations) that combine and rebels demonstrate in that game.
I might post a screenshot of this shortly so you can see exactly what i'm talking about.
BTW i can now pretty much confirm that gmod is bugged/different and does not (by default) support the behavior i'm referring to, having tested actual hl2 maps in unaltered gmod.
Still looking for a fix, so if anyone has good suggestions please let me know!
Hmm, I have played every half-life but I have never really fully observed the AI behavior in HL2... I was always impressed by their amazing squad tactics though, I would even say it's some of the best AI I have worked with, they kind of remind me of F.E.A.R 1....
Anyways, you are most definitely right about the AI being watered down in GMOD... the AI in my map will sometimes lose track of their targets. This only really occurs when I have several AI in a room away from the battle, and usually only 1 or 2 will just stand there. I haven't used any cover hints... but usually they aren't too bad at finding cover. Also, as stated by you, the Entrance/Exit pinches don't work. I think the AI in GMOD atleast has their primary tactics, they still will get behind you, flank you, use props as cover (even if they are placed by the player), ..etc.
I couldn't tell you why the AI would be different, it could be that GMOD doesn't mount some of the code the AI use in the hints. Or perhaps the AI was watered down on purpose to save performance? I mean you can have a ton of AI at once without running into performance issues in GMOD.
Either way... it might be best to accept that GMOD AI is different and you will probably just have to accommodate by allowing the AI to just do what ever... Perhaps add more AI to make up for the lack of performance. With the attention span problem, if at least one Combine is in combat, he should report it to his allies, this should grab the attentions of the NPCs that doze off. As far as your cover hints go, I would probably just leave them normal nodes... it might not be fancy, but it at least it wont hook them. I know that the GMOD AI will still go in and out of cover to reload and do pop shots, or coordinate with mates to reload while one fires. Like I said, they still have their primary tactics.
At least if you do make the nodes a bit plane, it will allow for players to use custom AI that might not use hint nodes like that.
Sorry, you need to Log In to post a reply to this thread.