.
EDIT: As of 1.5, the Rogue's been reworked. Information here is likely no longer useful!
I'm not 100% certain on how stealth works. I'll collect various bits of information here.
grayswandir wrote:Here's how npcs currently work (if I've read the code right):
If they don't have a target (or a 10% chance if they do), they set their target to the closest hostile in their field of view (out to their sight range, usually 10, but blocked by walls), regardless of stealth/invisibility/etc.
When an npc loses sight of their target (from walking behind a wall, stealth, or whatever), they try to guess its position. They have a radius X that goes up by 1 each turn, starting from 1 on the first turn they fail to see you (Or 3 if they've never seen you before). They pick a random position within X spaces of your true position, and average that with whatever their last guess was. That's where they treat you as being.
Here's what I don't like about it:
- NPCs always know you're there if you enter their field of view, even if you have 9999 stealth. It starts out slightly inaccurate, but they are still alerted to your presence.
- They can divine your location if you teleport halfway across the map.
- The averaging doesn't work for large jumps. If I make a jump they'll target the space roughly halfway between for a turn, which doesn't make much sense.
So, there are two states an enemy can be in where Stealth is concerned: Alerted or Aware, based on whether they succeeded a detection check this turn.
- Alerted but exact position unknown: Enemy failed detection check, but is aware that you're nearby and will approach you for attacks. But as they don't know your exact position, they may attack or cast at incorrect squares. Enemy physical attacks suffer the 2/3 blindfighting miss chance check. Shadowstrike succeeds on these enemies.
- Aware: You are completely visible to this enemy, and they will attack your exact location directly. Shadowstrike fails.
As far as Stealth goes, it is almost incapable of actually hiding your presence from enemies as detailed by graswandir above. Enemies automagically detect you as soon as you're in LOS, but will mistake your exact location if they fail detection rolls, granting you the blindfight bonus and possible misaimed arrows/spells from casters. You can see the same behavior from enemies when you flee out of LOS quickly enough (with some form of very quick movement) and stay out of sight, and watch the enemy behavior with Track/Clairvoyance/Arcane Eye. They meander around attacking/casting on seemingly random tiles, having mistaken your location quite badly. If you can perform a short range jump without breaking stealth, enemies will probably be way off in their location guess in the same fashion.
The point of obtaining an ultra-high Stealth score is to ensure that they enemies remain uncertain of your location as much as possible, as well as ensuring Shadowstrikes can land. It will not reliably protect you. Enemies that can't see you do suffer a 2/3 miss chance separate from Defense checks, and spells can outright miss if they target the wrong tile, but that leaves a reasonable chance that attacks will come in completely unhindered, and a couple of those in a row is gonna spell trouble for you.
Questions:
- How is Stealth vs Detection checks done? It doesn't appear to be the same as Saves/Accuracy. Enemies with 15 Detection can detect a 45 Stealth power rogue even at long range pretty often.
- What happens if one enemy is alerted to your presence, but another enemy is aware? Will they communicate your exact location, or is the first enemy swinging blindly?
- If you mouseover an enemy that has 'caught sight' of you, under Target, it says Target:Character name, looking <direction>, or Target:Character, looking at you. I can't tell what this means, exactly.
If anyone knows better and can correct me, I'll edit the OP for those souls desperately googling for answers in the future.