Jump to content
entspeak

Zombie AI proposal

Recommended Posts

I mentioned this in a thread about 1.7.5.1 and thought it might be good to make a suggestion thread for it.

I have an idea about the zombie AI. I feel that the way that they handle sight and sound should be different in terms of aggro. I'm not sure how the AI works in the coding (I've looked at it, but it's all gibberish to me - lol). But, if what I propose is possible, I think it would solve some of the issues the community has had with the zombies in DayZ.

The basic premise:

As a general rule, zombies should aggro when they recognize food - meaning based on sight. If they see a player, they aggro. This should always be the case.

Sound, however, should be handled differently. Really loud sounds may aggro zombies for a bit, but if they don't see food after a short bit of time, they should calm back down. If a zombie hears a quieter sound, it should simply be attracted to it - like they currently are to flares. It would also be great if, when zombies hear something, they moved toward the position at which the sound occurred and not the originator of the sound (unless they see him).

And sight and sound should be separate things to a zombie - meaning that they will break off moving toward a sound if they see a player... any player - even if that player didn't make the noise, they then aggro on that player. Sight should be given priority when it comes to aggro. And louder noises should trump softer ones. If a zombie is turning toward you because it hears you walking, but someone fires a Lee Enfield... the zombie should aggro on the Lee Enfield noise and you should pray that the noise doesn't put you in the path of the zombie.

So, how might this work specifically? Like so:

Firing a weapon: Weapons seem to fall into these categories when it comes to noise - None (though, it's not really none), Low, Moderate, High and Very High.

Weapons that are Moderate and above, should aggro zombies within hearing distance. This aggro should make them run toward the sound for 10 seconds. If, however, in that 10 seconds, they don't see any players to munch on, the aggro should stop and they should continue slowly on the path toward the sound.

Low noise weapons should only attract zombies and not aggro them unless the zombie is within 20m of the noise - in which case, the zombie aggro will follow the rules of the louder weapons. If, while turning toward a noise, the zombie sees a player, it then will aggro on that player - even if that player wasn't the source of the noise.

Silenced weapons should never aggro zombies and only attract zombies within hearing range of the weapon (you'd pretty much have to be firing right next to one to attract it's attention).

Actually, BigMike had an idea that I think would be much better: two zones for hearing a shot from all weapons - one that aggro's and one that simply attracts zombies. Since, as I understand it, audible range is based on the ammo, you could have an aggro range as a percentage of the audible range. As an example: 9mm pistols would aggro zombies at 40% of the audible range for zombies (about 20m or so), .45's at 50%, Stanag based guns at 60%, Lee Enfield at 85%, etc... Zombies outside those ranges, but still within audible range for zombies would still be attracted to the sound, but not aggro (unless they hear another zombie nearby aggro - at which point, they follow the zombie hearing zombie guidelines.)

Movement: If a zombie hears a player moving, they should be attracted to it, but only aggro when they see a player - even if that player isn't the one making the noise. But, I also think that if you get too close to them (1m?) they should aggro on you - sensing you. They should also aggro if you run into them.

Engine noise: Engine noise should aggro the zombies within hearing distance toward the sound of the engine - changing their path toward any player they see on the way. Once the engine is off (or idling), the aggro ceases after 10 seconds if the zombies don't see a player. Turning on a car and idling shouldn't aggro zombies outside a 10m range, but should attract them (maybe the range could be adjusted based on the vehicle... the range at which a zed would aggro when starting a V3S is greater than they would when starting a Skoda, for example). Of course, if a zombie sees a player in the vehicle, they should aggro.

The exception to all of this is the bicycle... which should only attract zombies that hear it, but not aggro them unless they see a player. Personally, I think that the noise from bicycles should also be a bit quieter to be more realistic.

Vehicle Repair and Refuel: The sound of repairing a vehicle should only aggro zombies within 20m, but attract them beyond that, if they can still hear it. The sound of refueling should only attract zombies, and they aggro if they see a player.

Zombies hearing other Zombies: If a zombie hears another one aggro, that noise should only attract them toward the aggroing zombie... and they will only aggro themselves based upon the above guidelines for sound or if they see a player.

With all of this, zombies should lose complete interest in a noise a minute or so after the noise is gone... they, in essence, forget why they were going that particular direction and continue on mindlessly.

The benefit to the above system is that it keeps the zombies relevant and a threat, but not overpowered. It makes them more like the zombies that we know from films. It makes it very dangerous, but not totally suicidal to fire a weapon around zombies. It also impacts team play in that your shots may cause a zombie to aggro on a nearby teammate who happens to be the first one the zombie sees as it turns toward the sound.

Thoughts, suggestions? Is this something that can be done with the AI code? Or is it too complex for the engine?

Edited by entspeak
  • Like 15

Share this post


Link to post
Share on other sites

I made a thread on reddit about zombie AI. I basically said, like you, that sight should trigger aggro, but sound should only cause interest in certain directions. So sounds would direct them, but they'd only attack and pursue as long as they have direct visual contact.

I also proposed, that grabbing would add to the immersion, as running right next to the zombies would be impossible, creating a larger area for each zombie to cover, blocking roads easier. In general, making zombies slower, but in a way that they build a circle around you closing in, rather than usain-bolt you through chernarus.

I still like these zombies best. But then I thought, that the zombies, are the main part of the game, Rockets Game, So he should decide, in my opinion, how he wants the zombies to be. Rocket will definitely listen to the community, but I also believe he already has a very good image in his head on how he wants the zombies to be. He said he talked a lot about the virus-issues with his brother and I doubt that these were the only zombie-related talks he had lately. No matter how much I would love slow-grabbing-zombies, I am even more excited to find out what kind of Zombies Dean has in his Head.

My personal AI-Preferences therefor are:

1) Whatever Rocket has in his head

2) Slow, grabbing, biting, classic movie zombies

3) improved, less glitchy, coordinated versions of mod-zombies

Edited by liquidmind

Share this post


Link to post
Share on other sites

I made a thread on reddit about zombie AI. I basically said, like you, that sight should trigger aggro, but sound should only cause interest in certain directions. So sounds would direct them, but they'd only attack and pursue as long as they have direct visual contact.

I also proposed, that grabbing would add to the immersion, as running right next to the zombies would be impossible, creating a larger area for each zombie to cover, blocking roads easier. In general, making zombies slower, but in a way that they build a circle around you closing in, rather than usain-bolt you through chernarus.

I still like these zombies best. But then I thought, that the zombies, are the main part of the game, Rockets Game, So he should decide, in my opinion, how he wants the zombies to be. Rocket will definitely listen to the community, but I also believe he already has a very good image in his head on how he wants the zombies to be. He said he talked a lot about the virus-issues with his brother and I doubt that these were the only zombie-related talks he had lately. No matter how much I would love slow-grabbing-zombies, I am even more excited to find out what kind of Zombies Dean has in his Head.

My personal AI-Preferences therefor are:

1) Whatever Rocket has in his head

2) Slow, grabbing, biting, classic movie zombies

3) improved, less glitchy, coordinated versions of mod-zombies

They are infected (28 Days later etc.) and so would be fast and bolt straight for you rather than Romero Zombies. Hence why body shots count.

I like the idea about differentiating between sight and sound ranges.

  • Like 2

Share this post


Link to post
Share on other sites

They are infected (28 Days later etc.) and so would be fast and bolt straight for you rather than Romero Zombies. Hence why body shots count.

I like the idea about differentiating between sight and sound ranges.

In viewing the latest dev blog video, I agree that, speed-wise, Rocket seems to prefer the 28 Days Later type zeds and the SA zeds will likely be more akin to those. They were even watching clips from the film for inspiration.

In thinking further, I think they should aggro if you get too close to them... or if you run into them. Otherwise, they would be way to easy to deal with at night. Maybe 1m away? This gets you within hatchet distance, but if you miss, you could be in trouble. All this combined with the "sensing" that they already have to players, chemlights, flares, fire, etc... would make it very interesting.

I'm glad people like the idea. And, if I've missed something or there's some flaw to it, let me know.

Edited by entspeak

Share this post


Link to post
Share on other sites

Yes, but silencers should be realistic.

They're not THAT quiet. They should be slightly quieter than your average gunshot.

Share this post


Link to post
Share on other sites

I have a suggestion to add on actually, rather than having zombies 'pursue' for 10 seconds for when they hear a noise, they walk/run to the point of origin.

As an example, Survivor is behind a wall with a gate nearby with a zombie loitering on the other side of the wall. Survivor breaks out into a run and heads into the house, 'stepping on a twig' near the gate. The zombie turns and walks into the yard, finds nothing and goes back to loitering but stays in the yard within eyesight of the door. Survivor sees the zombie through a window as hes looting the house but is unarmed, so he goes to the door and throws a empty can/bottle out the door and over the wall, hitting a wall across the street, drawing the zombie away, allowing the survivor to sneak/run out.

Another Example, Survivor in a UAZ is being chased by bandits on dirtbikes, Survivor speeds into Cherno and gets out of his UAZ without turning off the engine and runs for cover in a building. Bandits stop outside town and park their vehicles in the bush and pursue on foot. All zombies in hearing range of the UAZ are walking to it and staying nearby because of the engine noise and the bandits try thinning out the crowd with silenced weapons to try and get the UAZ. Survivor sneaks up behind the bandits and fires at them, shooting them in the legs with a Lee before running off for one of their bikes while the crippled bandits are being swarmed by zombies from his UAZ and zombies within earshot of his Lee.

Yet another example/suggestion: Weapons have 2 different audible ranges, say the 1911 has an audible range of 100m (just for simplicity and the example) Player fires off a few rounds and all zombies within 25m or 50m start running towards his position while all other zombies within 100m start walking to his position.

  • Like 2

Share this post


Link to post
Share on other sites

Yes, but silencers should be realistic.

They're not THAT quiet. They should be slightly quieter than your average gunshot.

they are that quiet with subsonic rounds, with supersonic ones they still make a sonic boom (i am now of course talking about genuinely silenced weapons like MP5SD6 or a 9mm with a silencer. M4-A1 and other assault rifles still make a decent amount of noise).

Share this post


Link to post
Share on other sites

I have a suggestion to add on actually, rather than having zombies 'pursue' for 10 seconds for when they hear a noise, they walk/run to the point of origin.

This is actually my hope... that zombies will head toward the point at which a sound occurred and not "pursue" something they don't see. That for loud weapons, zombies will aggro toward the position at which the sound occurred and not the originator of the noise (unless they see him). The 10 seconds was the amount of time they would aggro on the way to that position before calming down if no player could be seen.

For example: a player fires a Lee Enfield from the tree line outside a town and ducks behind a tree trunk. A zombie on the edge of town hears the Lee Enfield and aggros toward the sound. Running for 10 seconds, it doesn't see a player and gets half way to the tree line. The aggro stops and it continues walking toward the treeline to the point at which the sound occurred. The player has shifted position and is no longer at that point. Another example. The same player fires the Lee Enfield from the same spot in the tree line. The zombie aggros toward the noise. Another player emerges from the tree line closer to the town and in LOS of the aggro'd zombie. The zombie changes course toward that player, forgetting about the original sound it heard.

Another Example, Survivor in a UAZ is being chased by bandits on dirtbikes, Survivor speeds into Cherno and gets out of his UAZ without turning off the engine and runs for cover in a building. Bandits stop outside town and park their vehicles in the bush and pursue on foot. All zombies in hearing range of the UAZ are walking to it and staying nearby because of the engine noise and the bandits try thinning out the crowd with silenced weapons to try and get the UAZ. Survivor sneaks up behind the bandits and fires at them, shooting them in the legs with a Lee before running off for one of their bikes while the crippled bandits are being swarmed by zombies from his UAZ and zombies

within earshot of his Lee.

A Lee Enfield should be louder than the sound of an idling engine, unfortunately, and louder sounds should trump quieter ones. So, in this instance, the survivor would pull the aggro off the UAZ toward himself after the first shot. Any non-SD gun shot would be louder than an idling engine. So, he'd likely only get one of the bandits before causing them to aggro toward his firing position and attacking any players they might see on the way.

But, that brings up a good point that I missed, thanks! An idling engine should only attract zombies and not aggro them unless they are within 10m. So, if you turn on a car, it doesn't aggro all the zombies around, but attracts them. But, if they see a player in the car, they should aggro. I've updated the original post to reflect this.

Yet another example/suggestion: Weapons have 2 different audible ranges, say the 1911 has an audible range of 100m (just for simplicity and the example) Player fires off a few rounds and all zombies within 25m or 50m start running towards his position while all other zombies within 100m start walking to his position.

I do have that in the proposal for low noise weapons, but perhaps that could be expanded to all weapons. This may be something that could be variable on an ammo by ammo basis (audible range appears to be primarily determined by the ammo in game.) For example, 9mm pistols would aggro zombies at 40% of the audible range for zombies (about 20m or so), .45's at 50%, Stanag based guns at 60%, Lee Enfield at 85%, etc... Zombies outside those ranges, but still within audible range for zombies would still be attracted to the sound, but not aggro (unless they hear another zombie nearby aggro - at which point, they follow the zombie hearing zombie guidelines.) Does that sound good? Edited by entspeak
  • Like 1

Share this post


Link to post
Share on other sites

I'm wondering if, as an additional benefit, this proposal might also reduce cpu load - especially if zombies only run to the position at which the sound was heard unless they see a player.

Can someone tell me, is it easier on CPU strain to have zombies fix on a single position when they hear something and move toward it than it is for them to track and move toward the player as he moves even if they don't see him? Might this proposal reduce the cpu load of aggro'ing zombies in cases where the aggro is based on sound, because, if they don't see a player, they don't have to update the player's position? Am I wrong about how that works and the impact on a player's CPU?

Edited by entspeak

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×