Proposal: Simple stealth mechanic

OVERVIEW
Currently in CDDA, stealth mechanics are barebone and current zombie behaviors are unintuitive. Methods that new players typically try to use to escape detection, such as skirting around treelines or moving from cover to cover, do not work. Zombies notice you immediately as you enter their sight line. This kind of behavior is unintuitive, as you would typically expect zombies to be slow to react. Another behavior that is extremely intuitive is that you can be 41 tiles from a zombie and never be noticed, but you take one step closer and are guaranteed to be noticed. This proposal introduces zombie awareness mechanics that smooths out the detection curve and implements the below intuitions.

It is intuitive to:

  • Expect zombies to be less likely to notice you while far away, and more likely to notice you up close. The closer you are, the more likely, and there is not a hard threshold between not noticing and noticing.
  • Think that ā€œif iā€™m crouching itā€™s hard for zombies to notice meā€ or ā€œzombies are attracted to moving things, so if iā€™m running, theyā€™re more likely to notice meā€.
  • Be able to skirt around trees and bushes without zombies noticing.
  • Walk behind cover and behind bushes (even without crouching) and expect zombies to be less likely to notice you.
  • Accidentally walk around a corner and not draw aggro from every single zombie in the intersection (but it would make sense for a couple to see you).

This mechanic will only interact with vision mechanics. No changes will be made to other methods of detection, like scent and sound.

Proposed mechanic:
Each turn you are within sight range of a zombie and you are able to be seen, the zombie has a chance to become aware of you, instead of being immediately aware of you.

This chance is influenced by:
- How far away you are from the zombie.
- Whether you are crouched, walking or running.
- Whether you are behind cover.
- Your dexterity.
- Items (clothing, tools, etc)

DETAILS
The chance for a zombie to notice you, given distance away from zombie:
1 - (Distance / (ZombieViewDistance / Modifiers))^2

Modifiers = Stance Modifier * Cover Modifier * Misc Modifiers

Hereā€™s what the formula looks like, chance of detection vs distance away from zombie.

Modifiers=1

Modifiers=0.5

Explanation:
The abstract of the formula is the farther you are from the zombie, the less likely for the zombie to notice you, in a negative parabolic curve, starting at 100% chance to notice next to the zombie, dropping off slowly, then quickly as it approaches the edge of zombie distance, where it is 0%. Iā€™ve tried out a couple of different formulas, I think that this is the simplest and most intuitive one. Please feel free to offer a better formula.

Why a parabolic curve and not linear?
This is to ensure that when you are near the zombie, it should be nearly impossible for zombies to not notice you after a turn or two.

Modifiers:
Initial value is 1, and is stacked multiplicatively with different modifiers.

Modifiers affect the distance that the zombie stops being able to see you. Intuitively, you can think of it as a multiplier to the zombie vision range (itā€™s not actually). For example, a modifier of 0.5 means that you can be half the distance from the zombie and retain the same chance to escape detection as you were with a modifier of 1. The reverse is true, if your modifier is 2 then it is as if youā€™re standing at the halfway point between you and the zombie.

When modifier <1, you can be noticed by zombies from further than 40 tiles, but this behavior would make it possible for zombies to see you before you can see them, so any chance beyond 40 tiles is clamped to 0%.

Modifiers stack multiplicatively.

  • Stance modifier: When crouching: 0.75, when running: 1/0.75. Essentially, crouch walking reduces the distance before you have a chance to be seen by 25%, so 10 tiles.

  • Cover modifier: When behind cover (not crouched), 1 - coverage%. Example: if youā€™re standing behind a cover with 75% coverage, itā€™s as if the zombie can only see a quarter of you so you would not be noticed unless youā€™re very close (10 tiles in this case).

Misc modifiers:

  • Dexterity. Numbers TBD (maybe Ā± 0.05 per point above or below default?)
  • Items. Example: ghillie suits. Note: Iā€™m not going to add new items that interact with this mechanic, however I will add the framework for them (likely just a new tag for items or a new stat).
  • Tentative: Modified by a skill (survival? or maybe a new one?).
  • Tentative: Modified by encumbrance?
  • Tentative: A modifier for standing still?

Potential problem:

  • Makes the game even easier because zombies will see you much less often than before. Iā€™m already seeing a ton of complaints about this game being too easy. Not a huge problem though, numbers can be tweaked for balance, e.g. zombie vision can be extended to 50 instead or zombie chance to notice you can be increased from the proposed numbers.
  • Please suggest more problems.

I will be working on implementing these changes, any feedback for the proposal is welcomed. Specific numbers are not final, I will need to playtest them. Thanks everyone.

2 Likes

I am not sure what one can find wrong with current stance.

Monsters that can see, see you in their sight range. Visibility can be obstructed by crouching behind obstacles and light conditions.

Monsters that can hear will hear if you make noise.

Monsters that can smell can follow you by smell.

Problems:

  1. A lot of the numbers seem to be somewhat arbitrary with no real explanation behind them.

  2. The fact that with this formula you can reduce zombies effective sight range just by wearing camo and crouching is too big a nerve to zombies. This would mean that you can very early on in the game just by finding some camo clothing and crouching be effectively invisible in the middle of the street. Than you just throw some rocks around to make some noise and you can effectively herd the undead around and loot a town relatively safely in brought daylight.

1 Like

There is definitely room for better stealth, although Iā€™m not completely sure about your exact mechanic yet. I think the current cover/cover% system for being completely hidden works well, but thatā€™s not a stealth system, thatā€™s just hiding.

I think we might focus on creating a ā€˜camouflageā€™ attribute for clothing and mutations, and a json entity for camouflage groupings, which would reduce your effective visibility based on adjacent terrain with the correct grouping (and probably based on that terrainā€™s cover score), and your current combined camouflage score. Some clothing might have penalties (evac jacket with bright reflective striping eg).

The same coding could be used for monsters, so that shady zombies camouflage into the night rather than just going invisible, and triffids could be harder to spot in a forest. This would give perception a lot more to do.

11 Likes

I would be all for a system like that. Anything to give perception a reason to exist is also nice. And itā€™s better than the current method of just Solid Snaking around in a cardboard box.

Thank you, everyone, for your feedback.

Thereā€™s nothing wrong with the current stance system, I like being able to choose between crouch/walk/run. This change only complements that system by adding additional nuance. The problem that this change tries to fix is that current detection by visibility system is too jarring and unintuitive. You are either in vision range or not in vision range. This change would add more nuance and risk/reward for sneaking past zombies. Instead of thinking ā€œI can never sneak past that zombie because he is too closeā€, you would think ā€œit is risky and the zombie might see me, but I can handle that riskā€. The risk factor adds an additional layer of decision making that the player must tackle with.

These numbers are not final, they will need to be play tested and decided upon for balance reasons. These are numbers I simply eyeballed for simplicity and to give an example.

I agree, itā€™s possible to nerf zombies too much. It is a balance problem and will need to be considered. However, I am only proposing core ideas, any balance issues can be dealt with during implementation. I might decide to make stealth stacking have diminishing returns, increase zombies base vision range, etcā€¦

That is one of the thing I considered when thinking up a stealth mechanic, and I think that that method of implementing stealth is very similar to the one I am proposing. My proposal focuses more on probability rather than just floating values, which is easier to conceptualize and understand for players and modders. Itā€™s easier to conceptualize ā€œputting this item on will let me stand 50% closer to zombiesā€ than ā€œputting this item on will increase my camouflage points by 5ā€. Itā€™s more transparent. And anyways, I think that it would be easy to implement camouflage and camouflage grouping as you said with my proposal, as there is a simple knob that you can turn in my formula that makes you easier to see or harder to see. You can easily do something like ā€œif youā€™re near adjacent terrain grouping, reduce the detection modifier (which would make it harder for zombies to see you)ā€.

2 Likes

Would be very cool. It would make woods more dangerous (I can already see the giant spiders and shadow cats jumping out from behind a tree) and harder to hunt in. It would also be cool to give a new dimension to many monster types with things like juggernauts and hulks being easy to spot but things like shady enemies and predator enemies turning into boogie men that jump out of the bushes.

Could be partially remedied by making the calculations for spotting chances different for different monsters. Creatures that are alive should have a much higher chance of spotting you on account of having fully functioning brains and completely healthy sensory organs. Intelligent zombies or varieties with better senses should also have a higher chance of spotting you. So feral humans, zombie masters and necromancers, screamers and the hunter types would be the first to spot you and go after you while the normal zombies, brutes and hulks still think you are a bush. (crouching in the middle of the street with a gillie suit and fooling all of the braindead zombies around seems somewhat reasonable but the moment a feral human sees you they should realise something is up)

1 Like

That could extend to the extreme end of camoflauge as well, like the FB51 optical cloak. The average zombie probably wouldnā€™t be smart enough to figure out the distorted shimmering light walking in the street is a person. A feral or a mutant might investigate since theyā€™ve got a bit more upper brain activity. There could be some buffer space between where they think they see something, possibly influenced by how fast youā€™re moving, and where they actually see you. It could vary from enemy to enemy.