• General questions on HL2 AI and navigation.
    14 replies, posted
Just to clarify I am not new to hammer... I am just new to the way AI works. I am making a level for Garry's Mod and I want it to be good with AI. I did a lot of research yesterday on nodegraphs and such which gave me the basis I needed to lay down some pretty good navigation. However, there are somethings the AI does that I just don't get. I really would like to know from people with experience in this, as to how I should go about making fairly professional navigation. Keep in mind, this map is mostly utilitarian, so the navigation for the majority is only gonna serve a range standard NPCs... I am making plans for an AI war room, which will have EVERY type of navigation possible... So, if you have deign tips for that, I would be grateful. (Half-Life 2 NPCs only of course) First thing is, I started placing hints half way through all my doors with "Entrance / Exit Pinch" as it's type. When I am in game I see improvements, but I also still see the AI cram at the door way, which will make AI that is trying to retreat back through the door get stuck... it usually happens when I have like 10 rebels on one side and 10 combine on the other... I don't know how much AI the game can handle in general... but I know that these hints are supposed to keep the AI from using the node until no on else is going to use it. Example of node placement: https://files.facepunch.com/forum/upload/293415/79e6f21b-0528-4099-8049-78e60ed3dab1/navDoor.png The AI will also do the same thing for cover, all though not all the time, but I have seen them fight for cover... This only really happens when I have a lot of AI. The only reason why I don't have any cover hints is because I heard it causes issues with other AI that isn't Combine trans-humans Example of node placement: https://files.facepunch.com/forum/upload/293415/2a6e2f7f-ca03-4f5b-b6f7-7dc73a0b8515/navCover.png The last major thing for the time being, is there any special way to help the AI climb ladders/ledges and help them get down? I set up "Override jump permission" hints and linked them together, although they do use them, sometimes they wont... I will see them run off to a corner and stare at the threat through the wall. And, how can I get NPCs to climb up on things? I know there is a "info_node_climb" but I hear it's only used by fast zombies. I don't really want to just build a ramp, but I don't mind knowing if there is some hammer contraption I can make so the AI can get up on ledges. Example of ledge/node placement: https://files.facepunch.com/forum/upload/293415/47798744-b7da-42e9-9039-5ca1a12cd527/navLedge.png Honestly... ANY tips about AI is helpful, there is a lot about them I don't understand. If you wish to send me any examples of stuff you might have made in the past for AI, those also would be very helpful, just not necessary. Thank you.
Here is a demonstration of the AI behavior in my map. You will see that they actually do pretty good. You will see where they jam at the door way, but they usually solve the issue on their own. Of course, you will also see where NPCs can't really climb as far I know. https://www.youtube.com/watch?v=jz1hCAzV0y4
As far as i know, some npcs doesnt have animations or behaviors for climbing and stuff like that.
Oh yes, I very much do that. I have some Valve maps that I decompiled just to see, and a lot of the AI's unique animations/behviors are done on scripted events.... I am certain I can force the NPCs to climb the ladder through a sequence... Only issue is... Once they reach the trigger they would HAVE to climb, and it would conflict with the AI's tactical behavior, plus, cause some more issues.... I couldn't find an example of an NPC climbing a ladder either, so I it seems valve designed there levels around it... I only see ladders in places that are out of combat or at transition points. To be fair... When making open maps like this, it's expected that there is just gonna be limitations.... I could just be simple and place a ramp made from NPC Clip material just so the AI can Harry Potter where ever they want... But that wouldn't be fun...
Hey again! Some (most) NPCs have a higher jump-down than jump-up distance, so that will be why - some can't jump up properly either. Metrocops, rebels, combine soldiers and regular zombies have this restriction i know. Your nodes are properly configured if some NPCs are in fact using it. In addition, i don't think civil protection or soldiers have a scripted sequence-able animation that represents climbing up, so you might have to stick with a one-way jumping system.
This post was meant for here.. duh 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.
And if you tried to play HL2 maps in Garrys Mod, maybe you have spotted that 90% of maps are broken. So we can see that AI in Garrys Mod works dank and not like in HL2.
I think you could use this for climbing kinda thing https://youtu.be/qpeDBPPn0I0?t=1m47s obviously it won't use animations but you won't add boring ramp, it may look dumb but player climbing looks dumb too
Hey, thats actually pretty snazzy, only problem is, the players could do it too.
I have been doing a lot of experimenting... Unfortunately, AI just can't climb like players can, even with adjustments... it would have to be basically full on stairs in NPC clip.... To be honest... I might just make a ramp for the AI to climb up and down.. I don't know the max slope they can climb... but perhaps I can make it somewhat believable...
Seems to happen when they try to go down, it looks like they actually will try to use that link which then marks it unusable, since they can't get there from the top... Is there maybe a way to make the node truly one way? So they know to ignore that link when they are already at the top?
I believe you will have to make it ramp. I suggest you just get another ladder model and tilt it + add npc clip.
I will consider changing the latter to a ramp... but I have concocted one last contraption for the AI... Basically a trigger will disable the link as soon as they get up... that only has one draw back, it means only 1 NPC at a time can be at the top in order to use the ladder... But..... This is a build map, and as fancy as I want to be... it may just be much better to use a ramp... it will take more space, however it will take a lot less entities...
At the end of the day, Half Life 2 never used tall two-way ladders or ledges for NPCs, which probably explains why there isn't an easy solution for this problem, unfortunately. Mostly, overwatch soldiers descended from somewhere higher up (through override jump nodes or scripted sequences for 'fancy' rappelling) and cannot backtrack to their high-up starting position, to force constant aggression. Look at some of the latter city 17 maps to see how they did this in action. A very unnecessary costly, ambitious way to force npc climbing would be to use an invisible func_tracktrain to lift/drop them to certain places, by parenting them to the moving object. I know this works from experience, but wouldn't recommend it for a large sandbox map.
I figured as much, I gave up and conformed to the ADA standards for the NPCs... I guess the NPCs were never intended for a sandbox environment. Which is totally fine, by the end of the day it only saves on entity data. At least I can make them jump up on small ledges though... https://files.facepunch.com/forum/upload/293415/f84f7961-fe8f-4616-b604-795736a8bcbf/20180711162033_1.jpg
Sorry, you need to Log In to post a reply to this thread.