Stealth System - mganzarcik/fabulae GitHub Wiki
Any character in the game can enter a stealth mode and start sneaking. Sneaking characters move at sneaking speed, which is different from normal speed and defined by their race.
When stealth becomes activated, view cones of all characters in sight become visible. View cones of hostile characters will be rendered red. Length of the view cones is half of the sight radius, they are 90 degrees wide and always oriented according to the character orientation.

Moving while sneaking during combat costs twice as much as normal.
Enemies will not initiate combat if the PCs stay outside of their view cones and the PCs make a stealth check. The PC must make a new stealth check every time he or she walks over 10 tiles (configurable) inside enemy sight radius (this counter is reset if a character leaves the sight radius and then returns). This means that stationary PCs outside of enemy view cones are not going to be detected at all.
Once the PC enters an enemy view cone, he will be immediately detected unless invisible. Invisible characters will only get detected if the invisibility is dispelled or its duration runs out.
All characters get a 20% bonus (configurable) to their stealth check if in darkness. Darkness is defined as ambient light equal to night light and in no direct light.
Using any object while in the stealth mode and inside enemy radius triggers additional stealth check with penalties depending on the type of action performed (the penalties are configurable):
Action | Penalty |
---|---|
Pick up item | 0 |
Lock picking | -15 |
Disarming a trap | -15 |
Open container | -30 |
Open / Close door | -30 |
Cast spell / Use perk | -30 |
Talk to non hostile NPC | -45 |
Failing a trap disarm when sneaking in enemy radius automatically triggers combat.
Attacking when sneaking stops the character from sneaking and starts combat.
Starting a combat for any other reason also stops all player characters from sneaking.