Callout System (Player calls out on certain events), Stealth module
4 replies, posted
[B][highlight]I don't want the Callout System anymore, disregard the title[/highlight]
Self Sufficient AI[/B]
In Garry's Mod, the only AI you will ever notice during gameplay is the NPC thinking one of a few things. I will list these things below and also state what I think would be a very good replacement for them. This is most specifically for Combine.
[B]Idle[/B] - "I see nothing of interest, I'm gonna stand here." - Replace this with the NPC thinking of objectives for itself. Are there any enemies in a direct line of sight? If so, let's go find and kill them. What props are near me? If any are close enough, let's check them and stay close so they might double as cover should anything bad happen. What's around them? There could be an enemy hiding behind these.
[B]Alert[/B] - "I heard/saw/noticed a threat. However, I just can't see it. I will stand here and probably forget about it soon." - Replace this with the NPC instantly going to the direct location of a threat. If he finds no threat, walk around and check for threats, then go idle (see above).
[B]Combat[/B] - "I am in a combat situation. I know I saw a threat and we are now exchanging gunfire." - NPC should constantly think as if he is in combat. Fire at any immediate threats and run to any in a direct line of sight. Constantly walk around as if searching for any threats. Eventually go to alert mode or check less frequently, then just go idle.
NPCs should act as if they are in a group. If they can see other NPCs that are friendly (or otherwise, the same kind of NPC) then they should follow them around and the only exception they shouldn't is if they are moving to a threat, in which they will all be moving there anyway. However if they are just strolling around they should attempt to stay together.
As I said before, they should make objectives for themselves. Objectives would be things like killing every threat (or otherwise dispersing them) and linking up with other NPCs. If there's no threat, they should go back to where they were initially spawned and stand around.
[B]Alert Levels[/B] - In a lot of games an alert system is in place where the higher it is, the more the enemy is aware of your exploits. This could be an invisibly operating system and even an admin controlled one, maybe via console command (ai_alert low/lowpatrol/med/high). Let me explain:
Low: NPCs are completely unaware of any threats. They will generally stand around and do nothing. They will occasionally go into the next stage. If they spot or hear a threat, instantly go to high alert.
Low, with patrols: NPCs are unaware of any threats, however they will be patrolling to try and find one. If no threat is found they will eventually return to where they came from (aka where they spawned).
Medium: NPCs know there is a threat. They are trying to find it. Most NPCs are patrolling. If they can't find the threat, drop to low level alert.
High: NPCs know there is a threat and where it is. They are rushing to get to it and when they get to where the threat was last noticed (if it was lost in the maze of a city's alleyways for example) then they will search a certain radius around that. If no threat is spotted, go back to medium alert.
[B]
Stealth Module[/B]
For a while I've tried coping with Source's pseudo-stealth system, but for no more can I take the peripheral senses of the NPCs. As smart as the Combine are supposed to be, it's kinda lame you can't engage in any kind of stealth stuff with them - they see you behind them and so on. So here's my suggestions: A stealth system would work best if it was a bunch of small features packed in to change the way NPCs interact with players a little.
Some of this stuff definitely sounds to me like it would require the map to have AI nodes. So be it. I only play noded maps and if maps aren't noded I can just node them myself anyway.
[LIST]
[*]NPCs will not notice you if you are behind them
[*]NPCs will notice you if you fire a gun
[*]NPCs will notice friendly deaths
[/LIST]
[B]NPCs will not notice you if you are behind them
[/B]NPCs shouldn't know you're there if you're behind them. Yeah, sure, you make footstep sounds, but it's just not fair that little to no times can you stealth kill! GMod is a game of choice! And sometimes, we choose to try and be stealth. Combine field of vision should only be a cone of 50 degrees in front of them because of the small eyeholes they have. If you are out of that cone, they should not notice you. If it is possible the cone should be parented to their heads so that when they turn their heads in their idle animation, they might be able to see you if you're there. If not, it should just point straight in front of them. Of course, it shouldn't go through props, the world, and so on.
[B]NPCs will notice you if you fire a gun[/B]
If you shoot a gun anywhere in the map, NPCs should make haste to come to you or get a line of sight on where the shot was fired. This would be a great way to set up ambushes for NPCs - as you know it's pretty much impossible to spawn a bunch of NPCs and make them run to you. So you could set up a defense and fire your gun into the air like a maniac, and they would race to assault you! How cool that would be, right?
[B]NPCs will notice friendly deaths[/B]
When a friendly NPC dies, NPCs should run to where he died. For example, you kill a Combine somewhere in the map, and there are 5 Combine across the map somewhere. They will run across the map to him. I am very sure of the Combine's advanced technology to be able to locate allied units at all times, and I am very sure they would try to investigate/avenge them if a death occurs. While this does hinder stealth fighting a little, you can always try and find a place to hide before others show up or something.
That's all I really have for now and I couldn't think of anything else I would want. I'm aware it's a lot and would probably be a challenge maybe even for the best coders of the community, but I am seriously interested to see if somebody could make this, I would just have way too much fun with it and I'm sure a ton of other people would.
One final note: I hope that the systems will only be in one script for each (callout system, stealth system) for ease of access (like alert.lua and stealth.lua would be the two files for the two systems).
Whoa this would be pretty cool for battles, movies, or just messing around. It would also be cool to have a setting that makes the AI you spawn friendly or hostile.
Great idea. I would love to see this done. Hopefully somebody feels like picking this up.
Make this now! I would like some sort of stealth mission as a sniper.
Bump
Sorry, you need to Log In to post a reply to this thread.