Monster tracking and stealth


Although the central place for design discussion is ##crawl-dev on freenode, some may find it helpful to discuss requests and suggestions here first.

User avatar

Ziggurat Zagger

Posts: 5832

Joined: Thursday, 10th February 2011, 18:30

Post Wednesday, 2nd May 2012, 16:14

Monster tracking and stealth

QUESTION Do doors aid stealth / escaping / discourage tracking?

I get those layouts with all the rooms and doors. I start running away and closing doors behind me. Sometimes I get 2 doors closed behind me, but the monster is still hot on my trail; I would like to know if, other than the delay caused by closing and opening the doors, if closing doors might create a delay in tracking; possibly discourage following if

1) the door was not closed in view of the monster.
2) the door did not make a sound (did not "Loudly Creak") when closed.

I do not know if the monsters tracking me accounts for these conditions.
"Be aware that a lot of people on this forum, such as mageykun and XuaXua, have a habit of making things up." - minmay a.k.a. duvessa
Did I make a lame complaint? Check for Bingo!
Totally gracious CSDC Season 2 Division 4 Champeen!
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Wednesday, 2nd May 2012, 17:33

Re: The 'Questions too small to need their own thread' threa

XuaXua wrote:QUESTION Do doors aid stealth / escaping / discourage tracking?

The pursuit code is simplistic. I posted a short explanation on mantis a while ago:

Monsters have decent pathfinding as long as their target is in their LOS. Once it loses sight, it goes to the last seen position. Once there, if it still cannot see you, there's a stealth check (one chance in stealth / 3). If monster succeed its rolls, it keeps tracking you for a duration which depends on its intelligence. If it fails the roll, it starts wandering.


I think there's room for improvement here. To answer your question, it will help losing the monster if it makes it not see you when it reaches the last seen position (and hence, forcing a new stealth check).
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Wednesday, 2nd May 2012, 18:14

Re: The 'Questions too small to need their own thread' threa

galehar wrote:I think there's room for improvement here. To answer your question, it will help losing the monster if it makes it not see you when it reaches the last seen position (and hence, forcing a new stealth check).

The stealth check looked kind of clunky to me. (3 in Stealth Skill chance) Does it really not take into account any of the other things that affect total stealth? If not, a character 3 or less Stealth would always fail that check.

Ziggurat Zagger

Posts: 5382

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

Post Wednesday, 2nd May 2012, 18:29

Re: The 'Questions too small to need their own thread' threa

Many of my characters have 0 stealth skill (and wear heavy plate)...would a 1 in 0/3 succeed every time? They will chase forever? Maybe I should train stealth to 6? unless it counts remainders, that would mean stealth 0 to 5 are all ineffective? Although I imagine that at least since 0.10, it probably does count fractions...is it at least true that a stealth of 0 means forever chasing?

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Wednesday, 2nd May 2012, 18:39

Re: The 'Questions too small to need their own thread' threa

tasonir wrote:Many of my characters have 0 stealth skill (and wear heavy plate)...would a 1 in 0/3 succeed every time? They will chase forever? Maybe I should train stealth to 6? unless it counts remainders, that would mean stealth 0 to 5 are all ineffective? Although I imagine that at least since 0.10, it probably does count fractions...is it at least true that a stealth of 0 means forever chasing?

Well, the actual code looks like x_chance_in_y(300, you.skill(SK_STEALTH, 100)) so it's multiplying everything by 100 first.

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Wednesday, 2nd May 2012, 19:54

Re: Monster tracking and stealth

Thank you to whoever moved this over here. We were quickly getting away from questions too small to need their own thread. :)

To continue:
My beef is that there's an elaborate function that takes into account player species, stats, mutations, equipment, enchantments, ambient noise, etc. to figure out your stealth value. All that is ignored when monsters are looking for you.
User avatar

Dungeon Master

Posts: 431

Joined: Tuesday, 13th September 2011, 17:34

Post Wednesday, 2nd May 2012, 20:08

Re: Monster tracking and stealth

The check in question is only for if they get to where you were and can't see you, to see if they pick up your trail. If this check is being made, by definition you are nowhere nearby, so most of the normal factors shouldn't have anything to do with it (but maybe some of them should, I guess); they're not trying to see or hear you, just... look for footprints, or maybe smell where you've gone. Having a TSO halo or shouting will make you much less stealthy... but they're not going to make your footprints any more noticeable once you've moved along. Conversely, your plate-wearing naga has no concept of how to hide his trail, so even if you move quietly and are hard to pick out in the dark, you leave a huge, obvious snake trail in the dust - you're not going to be losing anyone.
User avatar

Vestibule Violator

Posts: 1459

Joined: Sunday, 19th December 2010, 05:45

Location: New England

Post Wednesday, 2nd May 2012, 20:13

Re: Monster tracking and stealth

So levitating characters get a free pass because they don't leave footprints? :p

Seriously, you need to have some kind of composite abstraction towards your trail. Assume plate makes you leave deeper footprints. And stealth score applies to ranger style cover your tracks skills as well as moving quietly. Etc.
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Wednesday, 2nd May 2012, 20:14

Re: The 'Questions too small to need their own thread' threa

BlackSheep wrote:Thank you to whoever moved this over here

Yeah, I did.

BlackSheep wrote:The stealth check looked kind of clunky to me.

Yeah, it's terrible. The fact that it checks the stealth skill instead of the actual player stealth is not even the worst thing. For example, foe_memory is decremented by 1 each time the monster move. And it's initialised by a random value between 50 and 149 each time the monster sees you (assuming normal intelligence).
So assuming a stealth skill < 3, you need to stay away of the monster's sight for at least 50 turns to loose it. On the other hand, if you have decent stealth, it will quickly fail a check and go back to wandering.
Also, if the monster fails the check, it goes back to wandering. And if it succeeds, it knows your exact location, no matter where you are. It's all or nothing, there's no middle ground.

I thought about changing it, but never got around to it. Here is my idea:
* When the monster lose sight of you, it goes to the last position it saw you. If it doesn't see you, its next target is a random cell in a circle around you. The circle's radius depends on your stealth and your distance to the monster. If you're close and noisy, it's likely to come in your direction. If you're stealthy and far away, it will probably wander in your general direction, but unlikely to find you.
* Regarding monster's foe_memory, I'm not sure what to do. Maybe it should be reduced by you.time_taken instead of by 1. Numbers need adjustment too. Or player's stealth and distance could also affect the rate of foe_memory's reduction.


It could be an implementable. The coding is quite simple, most of the work is about figuring out good formulae, testing and balancing.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

For this message the author galehar has received thanks:
BlackSheep
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Wednesday, 2nd May 2012, 20:20

Re: Monster tracking and stealth

ontoclasm wrote:The check in question is only for if they get to where you were and can't see you, to see if they pick up your trail. If this check is being made, by definition you are nowhere nearby, so most of the normal factors shouldn't have anything to do with it (but maybe some of them should, I guess); they're not trying to see or hear you, just... look for footprints, or maybe smell where you've gone.

You make some assumptions here. The monster has just seen you, you're not at the other end of the map. Realistically, using sounds, trails or scent depend on which kind of monster is tracking you. But we don't really want to differentiate visual/audible stealth, so let's keep it simple.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Return to Game Design Discussion

Who is online

Users browsing this forum: No registered users and 25 guests

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