DungeonSettlers.wiki

Monster Detection & Aggro

Steam

How does a monster notice your settlers, and what can you do about it? This page is read straight from the game's tables (DS_B.0.4.29) and the code dump; each number names the constant it comes from, and anything the data cannot confirm is flagged as such. Try the interactive detection-range calculator to plug in a specific monster.

The detection model what actually happens

Detection is vision-based and grid-based. Every unit - your settlers and every monster alike - carries a Vision Range stat that defines the set of floor tiles it can currently see, with walls blocking the view. When a monster's visible tiles include one of your units it starts to notice you (the Awaring state) and then commits to the attack. There is no separate hearing or noise sense in the code.

A monster runs through three combat states (from the dump's CombatState enum, driven every time a unit moves by MoveApplier.RefreshUnitCombatState):

  1. Unawared - idle or patrolling; it has not seen you.
  2. Awaring - one of your units has entered its sight.
  3. In Combat - it locks on and engages.

A unit that spots a foe goes Awaring and carries Surprised; when that wears off it enters In Combat. If the foe leaves its sight while it is still surprised, it drops back to Unawared without fighting. Taking a hit puts a unit straight into combat.

The tables also define an Awareness build-up (1 per in-game minute, 5 to enter combat), but the game code in this build never reads those values.

The custom AI is built on Behavior Designer trees whose distance/vision checks (CheckEnemyDistance, CheckCombatTargetInRange) read the same grid vision data - not 3D cone-of-vision raycasts.

Vision Range the spotting radius

Vision Range is the core number. The game's own description: "The range in which the unit reveals nearby areas and can spot enemies." It does double duty - it reveals fog of war for your side and it is the radius a monster uses to spot you. It is measured in tiles and traced with line-of-sight, so a wall between you and a monster blocks it (VisionDataHandler.GetVisiblePositions).

Values are the authored per-unit numbers in UnitTable. Most units see 8 tiles; the EyeBall sees a long 16, while a Abyss Gloth Pup is nearsighted at 4. Player-side units default to 7 (StatusValueTable). The growth table's own base of 5 (GAMESYSTEM_Unit_Growth_..._VisionRange) is never read by the game code.

Aggro and threat engaging, and who gets hit

Two aggro constants sit in the tables. Neither is read by the game code:

The awareness, aggro range, aggro correction, guard reduction and critical damage constants of GameSystemTable are not read by the game code in this build.

  • Aggro Range: the tables say 8 tiles.
  • Aggro Correction: the tables say melee x1.3, ranged x1.

Game code reads a GameSystemTable value by its full key string (SystemVar). None of the listed keys has a string literal or a SystemVar property in the dump, so changing them changes nothing in play.

There is no leash timer and no walk back to a spawn point. A monster in combat returns to Unawared, and drops its target, as soon as none of your units is near its room and no foe is inside its combat area.

Day and night your sight shrinks after dark

The dungeon runs on a day/night clock. Daytime is 06:00 to 20:00 (GAMESYSTEM_Campaign_DayTimes); outside that window it is night.

At night the game gives your own units and allies Night Time, which cuts Vision Range by 3 tiles. Monsters never get it: a standard 8-tile monster still sees 8 tiles at night, while your settlers see less. The Night Vision affecter adds +3 Vision Range for whoever carries it.

The table also holds a day/night vision constant (GAMESYSTEM_Campaign_DayNightVisionDiffrence = 3), but the game code in this build never reads it; the penalty comes from the Night Time effect.

Stealth described, not wired

Stealth reads like the one hard counter to detection. The in-game text: "Remain undetected and untargetable. This effect ends immediately if you deal damage to an enemy."

The Stealth Potion puts a timed Stealth effect on the drinker, but no game code reads that effect, so in this build it does not hide you, does not stop targeting, and is not removed when you deal damage. The effect adjusts no stat and no game code checks it, so the hiding and the break-on-damage in its description are not wired up in this build. Defined in the data but not currently granted by any obtainable item, trait or skill.

The Perception myth name vs. effect

It is natural to assume the Perception stat sharpens how far your units see - the name and flavour ("sharpens senses") both suggest it. The data does not back that up.

In this build Perception's StatusValueTable coefficient for Vision Range is 0, and the stat's own tooltip lists only Physical Attack, Magic Attack, Critical Chance and Cooking. A growth constant (...MajorStatToFinalStatFactor_VisionRange = 0.02) would tie Perception to sight at 0.02 per point, but the game code never reads it: Vision Range is a fixed base plus effects and gear. So the Perception Fortify / Perception Weaken environment conditions (±30% Perception) and the +3 Perception Elixir are combat buffs, not detection modifiers.

What raises or lowers detection the summary

Everything above in one table. "Effect" is from the monster's point of view - how easily it picks you up.

FactorEffectWhat the data shows
Monster's Vision RangevariesEach unit carries its own sight radius (UnitTable.VisionRange): from 4 (Abyss Gloth Pup) up to 16 (EyeBall), most sit at 8. Bigger radius = it spots you from farther off.
Line of sight (walls)lowersSight is traced tile by tile in a straight line, and wall tiles stop it (VisionDataHandler.GetVisiblePositions); a plain impassable tile does not. Breaking line of sight around a corner hides you even at point-blank range.
Nightyour side only -3From 20:00 to 06:00 your own units and allies carry Night Time: -3 Vision Range. Monsters never get it, so night does not shorten a monster's reach at all.
Night Vision (affecter)restores +3Adds +3 Vision Range (Night Vision), exactly cancelling the night penalty. Granted by Night Watchman.
Stealth (affecter)no effectStealth: "Remain undetected and untargetable. This effect ends immediately if you deal damage to an enemy." The Stealth Potion puts a timed Stealth effect on the drinker, but no game code reads that effect, so in this build it does not hide you, does not stop targeting, and is not removed when you deal damage. Defined in the data but not currently granted by any obtainable item, trait or skill.
Aggro Rangenot usedThe tables define an aggro range of 8 tiles, but the game code in this build never reads it.
Attack type (melee vs ranged)not usedThe tables define an aggro factor of melee x1.3 and ranged x1, but the game code in this build never reads it, so melee draws no extra aggro through it.
Perception (Fortify / Weaken / Elixir)no effectDespite the name, the Perception stat governs Physical & Magic Attack, Critical Chance and Cooking - the game computes Vision Range as a fixed base plus effects and gear, with no Perception term. So Perception Fortify / Perception Weaken (±30%) and the +3 Perception Elixir do not change detection in this build.

Playing around it practical read

  • Corners beat distance. Line of sight is the only hard, always-on limiter. A wall hides you at any range; open ground does not, even far away.
  • Scout the outliers. A EyeBall (16-tile sight) will open on you from across a room, while you can slip within a few tiles of a Abyss Gloth Pup (4-tile sight). Most things sit at 8.
  • Night favours the monsters. At night your units see 3 tiles less while monsters see as far as by day - bring Night Vision if it is available.
  • Do not count on Stealth. The Stealth effect is not checked by any game code in this build, so it does not break contact.
Related: Combat Formulas · Difficulty · Talents & stats · Game Constants (raw table values).