Thread: how does stealth work? View Single Post
 January 15, 2020, 15:02 #6 DavidMedley Knight   Join Date: Oct 2019 Posts: 586 Monster Awareness Ratings I'm going to relate what my research has tentatively discovered. Confirmation or correction greatly appreciated. I'm sure I'm missing something, based on experiments. Question: What do the monster "awareness" ratings mean in game terms? Answer: The descriptions given in monster recall correspond to values between 0 and 255. The table below shows what a monster race's "sleepiness" is based on that description. Code: Min Max Description 0 0 is ever vigilant for 1 1 is vigilant for 2 3 is very observant of 4 5 is observant of 6 10 is fairly observant of 11 25 takes a while to see 26 45 takes quite a while to see 46 75 tends to overlook 76 95 pays little attention to 96 200 pays very little attention to 201 255 prefers to ignore When an individual monster is created in the dungeon (not summoned) it starts with a personalized sleepiness equal to RS*2+1d(RS*10) where RS is racial sleepiness. The level 1 "wild dog" has racial sleepiness 10, so each one will start with 20+1d100 individual sleepiness. Each time a monster would normally get a turn, you have a chance to disturb its sleep. You must be within its detection range. If you do disturb it, its sleepiness goes down by 1 (or more if you're closer than 50 feet). If the monster reaches 0 sleepiness it wakes up. The chance for you to disturb a monster is 100% at stealth 0 or less, and decreases by almost exactly 50% for every 3 points of stealth, up to 28 where the minimum of about 0.20% is reached. -------- But by that description, monsters would sleep about 10x too much!! So I must be missing something. Here's the code that I'm pretty sure converts the racial sleep into individual sleep (I need better terms there, as well). Code: /* Enforce sleeping if needed */ if (sleep && race->sleep) { int val = race->sleep; mon->m_timed[MON_TMD_SLEEP] = ((val * 2) + randint1(val * 10)); }