stealth checks megapost


Ask fellow adventurers how to stay alive in the deep, dark, dangerous dungeon below, or share your own accumulated wisdom.

Crypt Cleanser

Posts: 689

Joined: Saturday, 12th December 2015, 23:54

Post Monday, 7th February 2022, 05:34

stealth checks megapost

You probably know that stealth reduces the chance that a monster notices you, but you probably don't know all of the details about how it works, because a lot of them are weird and obscure. Luckily, I had to look them up recently so you can just read this cool post about it. If you want to read the code yourself, the relevant functions are check_awaken in shout.cc and player_stealth in player.cc. One other thing worth mentioning at the beginning is that displayed stealth pips are 50 stealth each and the display rounds up, so the first few pips of stealth can easily mislead you about how much value you're actually getting.

Stealth is checked once for every monster in line of sight after each action you take, regardless of the action's duration. First off, if the monster can't see your location or was put to sleep by ensorcelled hibernation as your last action, it automatically fails to notice you. If neither of those things is true and you're berserk or have the no stealth mutation, it automatically notices you. Otherwise, perform a stealth check based on the monster's perception and the character's stealth.

Monster perception is calculated as follows. Start with 10 + HD + 4 per level of intelligence above brainless (so 4 for animal intelligence and 8 for human intelligence). Then add or subtract the following:
  • +15 if the monster is wandering but you are designated as their target
  • -75 if you're invisible to the monster
  • -10 if the monster is asleep due to ensorcelled hibernation
  • +10 if the monster is asleep and not natural holiness
Lastly, if perception is less than 4, set it to 4.

Some example perception values:
  • Sleeping non-hibernating Sigmund when you are not invisible: 21
  • Wandering yak when you are not invisible: 36
  • Dormant Orb of Fire: 58

Player stealth calculation is a lot more complicated but here we go. Firstly, if you're berserk, have the no stealth mutation, or have 0 dex, you have 0 stealth no matter what. Otherwise, you start with dex * 3 + stealth skill * 15. Then apply the following operations in order:
  • If confused, divide by 3 (this is integer division, not rounded, and so is every other division operation in this section)
  • subtract body armour encumbrance^2 * 2/3 (unlike ev penalty, this is not reduced by armour skill)
  • add/subtract 50 for each positive/negative stealth pip from artifact stealth properties and add 50 for each stealth ego from non-artifact sources
  • multiply by 2 if you have xom's stealth duration effect
  • add 1/3rd of a stealth pip per level of nightstalker mutation (currently bugged - you get 48 at level 3 instead of 50 due to integer division in the wrong place)
  • add 50 per level of thin skeletal structure, camouflage, or translucent skin mutation
  • subtract 50 if you are radiating silence (this only applies if you are the source of the silence)
  • If you are a bloodless vampire, add 100
  • If you're on a water tile and have the nimble swimmer mutation, add 50
  • If you're in water, can't swim, and aren't large, divide by 2
  • If you're backlit by corona, halo, contam, or sticky flame, multiply by 2/5
  • If you have an umbra, multiply by (Dith piety + 200) / 200 for divine umbra or 3/2 for ring of shadows - if you have both, multiply by whichever is larger
  • If you are in shadow form, multiply by 2
  • If you're worshiping Qazlal and have 1* (ie 30) or greater piety, multiply by (200 - min(160,piety)) / 170
  • If you are carrying the orb, divide by 3
  • Lastly, if your stealth is negative, set it to 0

After doing those calculations, the actual check is really simple. The odds of a monster noticing you are (perception + 1) / stealth. Since perception is always at least 4, the first 5 points of stealth are basically useless for passing stealth checks. Additionally, once you have stealth above the monster's perception, each additional point of stealth provides less of an increase to your chance to pass a stealth check than the previous one. Combined with increasing skill costs, stealth skill for the purpose of passing stealth checks can have pretty sharply diminishing returns. On the other hand, 50 stealth is already enough to keep Sigmund asleep for one turn more than half the time, and a lot of characters start with more than that. Naturally it's a bit harder if you have to make multiple stealth checks consecutively, since each one is an independent roll, or at once, since monsters can shout and wake each other up.

tl;dr - stealth checks are very complicated and it doesn't take very much stealth to keep something asleep at decent odds for one turn.

For this message the author Hellmonk has received thanks: 3
GreyMage, Lici_the_Crawler, Sprucery
User avatar

Crypt Cleanser

Posts: 732

Joined: Monday, 24th April 2017, 11:46

Post Monday, 7th February 2022, 09:45

Re: stealth checks megapost

Thanks for this information, which is extremely helpful. It somewhat confirms that accumulating masses of Stealth pips is quite a trap that makes the cloak-and-dagger stabber so untenable as a strategy in dcss. You can have a bloodless Vampire with full Dith piety and insane Dexterity and Stealth mastered (if you live that long) - you walk into a room with ten monsters and never make it beyond stabbing one or two before the whole lot wakes up and surrounds you. Better to invest that experience in other skills that help you dealing with wide-awake enemies.
Maɟaŋ

Ziggurat Zagger

Posts: 5382

Joined: Friday, 25th November 2011, 07:36

Post Thursday, 10th February 2022, 03:31

Re: stealth checks megapost

The main thing that stealth does is makes it annoying to tab after wandering monsters when you worship Cheibriados. You get an automatic 2-3 pips of stealth due to the +15 dex (which is only about 1 pip, but you had some natural dex, etc etc), and then you tab after a monster wandering away, and it only gets further and further away. I usually just shout.

Zot Zealot

Posts: 1004

Joined: Thursday, 16th August 2018, 21:19

Post Thursday, 10th February 2022, 09:14

Re: stealth checks megapost

Stealth also randomly stops monsters from tracking you, which really helps to avoid getting swarmed.

Return to Dungeon Crawling Advice

Who is online

Users browsing this forum: No registered users and 10 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.