Monster AI System - How Dimraeth Monsters Think
Deep-dive into Dimraeth monster AI: temperament, allegiance, daily schedules, combat routines, empowerment modifiers and out-of-combat behaviour.
Dimraeth’s monsters are not spawn-and-chase bots. Behind them sits a full behaviour architecture in the MonsterBehaviour family of classes — one of the most detailed AI systems found in an indie-scale ARPG. This guide maps every layer.
The behaviour stack
| Layer | Class | What it does |
|---|---|---|
| Core state | Monster / MonsterState |
Network-synced state machine (Netcode NetworkVariables) |
| Behaviour brain | MonsterBehaviour + MonsterBehaviourLibrary |
Routes between states |
| In combat | MonsterInCombatBehaviour |
Target selection, ability usage |
| Out of combat | MonsterOutOfCombatBehaviour |
Wandering, returning home |
| Focus | MonsterFocusBehaviour |
What distracts the monster |
| Reset | MonsterResetBehaviour |
Leashing back to spawn |
| Personality | MonsterTemperament / MonsterAllegiance |
Aggression profile and faction |
| Schedule | MonsterSchedule / MonsterRoutine / MonsterRoutineAction |
Daily scripted activity |
| Reactions | MonsterConditionalModifier / MonsterReaction |
Triggered responses to events |
Temperament and allegiance
Every monster type carries a MonsterTemperament (how readily it enters combat) and a MonsterAllegiance (which faction it belongs to). This is why Deer and Rabbits flee while Goblins engage on sight — allegiance drives target legality, not just aggro radius.
Daily schedules
MonsterSchedule and MonsterRoutine mean monsters have scripted daily lives outside combat — patrol paths, sleep periods (SleepingDroop is literally a sleeping variant), and area anchoring. Killing a monster in its routine state versus its combat state can behave differently.
Named encounter routines
The CombatRoutine enum maps species to authored encounter scripts:
DryadEncounterRoutine,CorruptedTreantEncounterRoutineDroopSwarmRoutine,DroopKingEncounterRoutineWolfEncounterRoutine,TreantEncounterRoutine,RivercallerRoutine
Each routine is a choreographed fight — adds, phases, positioning — not just stat scaling. Boss-tier monsters additionally use BossStage, BossInvulnerability and BossCameraStage for phase management and cinematic camera work.
Empowerment — the elite affix system
Elite monsters can roll one of 12 EmpowermentType affixes: Brutal, Venomous, Swift, Frostbound, Flamecaller, StormAura, Spiteful and more. The Monster class carries a full empowerment state block (EmpowermentModifier, aura spawning, shield timers) synced to clients — so elites visibly telegraph their affix with an aura and icon.
Difficulty scaling
MonsterDifficultyOverride + MonsterStatWeighting allow per-spawn stat remixing, and MultiplayerDamageScaling scales the fight with party size. Allegiance checks keep empowered monsters from breaking faction logic when charmed or taunted.
Data caveats
Exact numbers (HP, damage, temperament thresholds) live in ScriptableObject assets, not code. What the code proves is the architecture — every mechanism above is a real class with real fields, not inference.
Related Entries
guides
Character Creation - Races, Classes and Archetypes
Dimraeth character creation explained: 20 races, class definitions, 54 archetypes, starting spells per layer, and the appearance customization system.
guides
Combat Mechanics - Stats, Damage Types and Stacking Effects
How combat works in Dimraeth: the 104-stat system, 13 damage types, 12 elements, stacking effects, critical mechanics and the rune word-attack layer.
guides
Multiplayer Architecture - Netcode, Relay and Anti-Tamper
How Dimraeth networking works: Unity Netcode for GameObjects over Unity Relay, Facepunch Steamworks integration, obfuscated network values and co-op systems.
Was this helpful?
Thanks for the feedback!