Creature AI
Every creature thinks with one of 7 behaviour trees. A tree is checked from the top each tick: a selector tries its children until one succeeds, a sequence runs them in order until one fails, conditions test the world and actions do something.
Boss Phased
53 creaturesMulti-phase boss AI. Features: 1. Phase transitions based on HP/time/mechanics 2. Phase-specific ability pools 3. Transition invulnerability and animations 4. Add spawning during transitions 5. Mechanic execution
Designer's notes
Complex boss behavior tree supporting industry-standard features:
Phase System: - Phases defined in creature's phases.phase_list - Each phase can enable/disable abilities - Stat modifiers apply per phase - Transitions can be invulnerable
Mechanics: - Referenced from creature's mechanics array - Can be phase-specific or always active - Execute with priority over normal abilities
Threat: - Uses threat table for target selection - Players generate threat through damage/healing - Tank classes have threat-generating abilities
Add Management: - Adds spawned during transitions - Can trigger phase transitions when killed - Inherit boss threat table initially
Enrage: - Optional hard timer - When reached, boss deals massively increased damage - Intended as DPS check
| Parameter | Meaning | Default |
|---|---|---|
enrage_damage_multiplier | Damage multiplier when enraged | 5 |
enrage_timer | Time until enrage (0 = no enrage) | 0 seconds |
leash_range | Bosses have larger leash range | 100 meters |
reset_delay | Time without threat before reset | 5 seconds |
- selectorSelector
- sequenceDeath Handler
- conditionself.hp <= 0
- condition!is_in_transition
- actionBoss Deathannounce kill true · drop loot true · play death animation true
- sequencePhase Transition
- conditionshould_transition_phase
- actionBegin Phase Transitionset invulnerable current_phase.transition.invulnerable
- sequenceTransition Sequence
- actionPlay Animationanimation current_phase.transition.animation
- actionBoss Dialoguetext current_phase.transition.dialogue
- actionSpawn Transition Adds
- actionWaitduration current_phase.transition.duration
- actionComplete Phase Transition
- sequenceIn Transition
- conditionis_in_transition
- actionWaitduration 0.1
- sequenceMechanic Execution
- conditionhas_active_mechanic
- actionExecute Mechanic
- sequenceBoss Combat
- conditionhas_valid_target
- actionApply Phase Modifiers
- selectorCombat Actions
- sequencePhase Mechanics
- conditionshould_trigger_mechanic
- actionTrigger Mechanic
- sequenceConditional Ability
- conditionhas_ready_conditional_ability_for_phase
- actionUse Conditional Ability
- sequencePhase Attack
- conditiondistance_to_target <= self.attack_range
- actionUse Phase Ability
- sequenceChase
- conditiondistance_to_target > self.attack_range
- actionMove To Target
- sequenceAcquire Target
- condition!has_valid_target
- conditionthreat_table_not_empty
- actionSet Target Highest Threat
- sequenceReset No Threat
- conditionthreat_table_empty
- conditiontime_since_combat > 5.0
- actionReset Bossheal to full true · reset phase true
- actionBoss Idle
- Alpha Chimera
- Basilisk King
- Bone Hydra
- Chitin God
- Coatl
- Aberrant Titan
- Abyssal Lord
- Adult Dragon
- Alorian Wisp Lord
- Aloria's Echo
- Alpha Werewolf
- Ancient Dragon
- Ant Queen
- Bone Colossus
- Captain Morrigan
- Carnivorous Plant
- Death Knight
- Elder Dragon
- Fungal Colossus
- Glinten, the Ledger
- Grand Inquisitor Vey
- Hive Mother
- Kodalith Archon
- Kodalith Relic Guardian
- Leviathan
- Lich
- The Erasure
- The Unnamed
- Titan of the Deep
- Death Incarnate
- Death Mantis
- Demon Prince
- Echo of the Warden
- Lithified Tank
- Resonance Choir
- Shard-Back Matriarch
- The Hollow Resonance
- Fenris, the World-Eater
- Frost Wyrm
- Goblin Chief
- Grave Titan
- Infernal Behemoth
- Lich Emperor
- Null Entity
- Primordial Drake
- Reality Eater
- Scarab Colossus
- Silk Empress
- The Unnameable
- Ur-Bear
- Venom Empress
- World-Borer
- Wyrm Sovereign
boss_phased · version 1Melee Aggressive
128 creaturesStandard aggressive melee AI. Creature will: 1. Detect enemies within aggro range 2. Call for help (if enabled) 3. Chase target to melee range 4. Select and use abilities based on weights/conditions 5. Reset if target escapes leash range
Designer's notes
This is the default behavior tree for aggressive melee creatures.
Ability Selection: - Conditional abilities (from ability_conditions) are checked first - If no conditional ability is ready, weighted random selection is used - Weights are defined in creature's ai.ability_weights
Call for Help: - If enabled, alerts creatures with same venery_category within help_range - Alerted creatures will switch to attacking the same target
Leash System: - If creature moves too far from spawn, it resets - Reset heals to full and clears all threat
| Parameter | Meaning | Default |
|---|---|---|
aggro_on_sight | Whether to aggro on sight or wait for attack | yes |
call_for_help | Whether to alert nearby allies when entering combat | no |
flee_at_hp_percent | HP percentage to flee at (0 = never flee) | 0 |
help_range | Range for call for help | 15 meters |
- selectorSelector
- sequenceDeath Handler
- conditionself.hp <= 0
- actionDie
- sequenceLeash Handler
- conditiondistance_to_spawn > self.leash_range
- actionReset To Spawnclear threat true · heal to full true
- sequenceCombat Sequence
- conditionhas_valid_target
- selectorCombat Actions
- sequenceConditional Ability
- conditionhas_ready_conditional_ability
- actionUse Conditional Ability
- sequenceIn Range Attack
- conditiondistance_to_target <= self.attack_range
- actionUse Weighted Ability
- sequenceChase Target
- conditiondistance_to_target > self.attack_range
- actionMove To Targetstop distance self.attack_range * 0.8
- sequenceAcquire Target
- condition!has_valid_target
- conditionenemy_in_range(self.aggro_range)
- selectorSelector
- sequenceCall For Help
- conditionself.call_for_help == true
- actionAlert Nearby Alliesrange self.help_range
- actionNoop
- actionSet Target Nearest Enemy
- selectorIdle Behavior
- sequencePatrol
- conditionself.patrol.type != 'stationary'
- actionPatrol
- actionIdle
- Acidic Ooze
- Alpine Stalker
- Armored Scarab
- Bandit
- Blood Wyvern
- Bog Toad
- Burrowing Horror
- Cave Bat
- Animated Armor
- Ant Soldier
- Ashen Battle-Priest
- Ashen Initiate
- Ashen Inquisitor
- Ashen Knight
- Banshee
- Basilisk
- Bloated Zombie
- Boar
- Bombardier Beetle
- Bugbear
- Cave Crawler
- Centipede
- Clockwork Sentinel
- Dire Wolf
- Dragonkin Guard
- Drake
- Drowned Captain
- Drowned Sailor
- Fire Giant
- Frost Giant
- Ghost
- Ghoul
- Giant Crab
- Giant Jellyfish
- Giant Rat
- Giant Spider
- Goblin
- Ashen Goblin
- Goblin Berserker
- Goblin Shieldbearer
- Ashen Goblin Shieldbearer
- Hellhound
- Hill Giant
- Hobgoblin
- Hobgoblin Captain
- Hornet Queen
- Ice Drake
- Iron Golem
- Kodalith Warden
- Ledger Hexbreaker
- Ledger Mender
- Ledger Reaver
- Lesser Demon
- Myconid
- Ogre
- Ogre Chieftain
- Panther
- Pirate Boarding Marine
- Plague Zombie
- Rat
- Revenant
- River Troll
- Sandworm
- Scorpion
- Sea Serpent
- Silk Weaver
- Siren
- Skeleton
- Skeleton Knight
- Smuggler Enforcer
- Spider
- Spore Pod
- Stone Golem
- Thornbush
- Tide Lurker
- Troll
- Vine Creeper
- Wasp Swarm
- Werebear
- Werewolf
- Wight
- Wolf
- Arctic Wolf
- Desert Wolf
- Duskbound Wolf
- Forest Wolf
- Imbued Wolf
- Undead Wolf
- Wraith
- Zombie
- Crystal Scarab
- Dire Bear
- Doppelganger
- Dune Strider
- Elder Treant
- Flesh Amalgam
- Frost Wolf
- Ghost Panther
- Goblin
- Green Slime
- Hyena
- Ice Troll
- Ironback Boar
- Leech Swarm
- Magma Heart
- Marauder
- Miasma Newt
- Mimic Beast
- Mist Stalker
- Moss Giant
- Mountain King
- Phantom Knight
- Plague Locust Swarm
- Razorfang Wolf
- Revenant Knight
- Sand Titan
- Shade
- Shade Bear
- Shadow Fox
- Skin Walker
- Swamp Hydra
- Tar Blob
- Tempest Eagle
- Thornback Stag
- Thundertusk Mammoth
- Titan of War
- Tunnel Wyrm
- Void Stalker
melee_aggressive · version 1Passive Flee
1 creaturesNever fights. Flees anything that damages it and forgets it once 35 m clear; roams inside its wander radius when idle.
- selectorSelector
- sequenceDeath Handler
- conditionself.hp <= 0
- actionDie
- sequenceLeash Handler
- conditiondistance_to_spawn > self.leash_range
- actionReset To Spawnclear threat true · heal to full true
- sequenceFlee
- conditionhas_valid_target
- selectorSelector
- sequenceFlee Done
- conditiondistance_to_target > 35
- actionDrop Threat
- actionFlee
- selectorIdle Behavior
- sequencePatrol
- conditionself.patrol.type != 'stationary'
- actionPatrol
- actionIdle
passive_flee · version 1Passive Until Attacked
29 creaturesPrey / neutral animal AI. Never aggros on sight; fights back when struck, flees when its HP drops to the authored flee threshold, roams when idle.
| Parameter | Meaning | Default |
|---|---|---|
flee_at_hp_percent | HP percent at or below which the creature flees instead of fighting (0 = never) | 0 percent |
- selectorSelector
- sequenceDeath Handler
- conditionself.hp <= 0
- actionDie
- sequenceLeash Handler
- conditiondistance_to_spawn > self.leash_range
- actionReset To Spawnclear threat true · heal to full true
- sequenceFlee When Hurt
- conditionhas_valid_target
- conditionself.hp <= self.flee_at_hp_percent
- selectorSelector
- sequenceFlee Done
- conditiondistance_to_target > 35
- actionDrop Threat
- actionFlee
- sequenceFight Back
- conditionhas_valid_target
- selectorCombat Actions
- sequenceIn Range Attack
- conditiondistance_to_target <= self.attack_range
- actionUse Weighted Ability
- sequenceChase Target
- conditiondistance_to_target > self.attack_range
- actionMove To Targetstop distance self.attack_range * 0.8
- selectorIdle Behavior
- sequencePatrol
- conditionself.patrol.type != 'stationary'
- actionPatrol
- actionIdle
- Bear
- Beetle
- Bison
- Chicken
- Cow
- Deer
- Goat
- Jellyfish
Manta Ray
Marlin- Mudcrab
- Pig
- Rabbit
- Reindeer
Sailfish
Sardine
Sea Turtle
Shark- Sheep
- Shore Crab
- Squirrel
- Stag
Swordfish
Tuna- Viper
- Vulture
- Mammoth
- Mountain Goat
- Snow Fox
passive_until_attacked · version 1Ranged Kite
17 creaturesRanged AI that maintains distance. Creature will: 1. Detect enemies within aggro range 2. Move to optimal attack range 3. Attack from range 4. Kite away if enemies get too close 5. Flee if HP is low (if configured)
Designer's notes
Ranged kiting behavior for archers, mages, etc.
Range Management: - min_range: Too close, will kite away - optimal_range: Preferred distance, will position here - attack_range: Maximum attack distance
Kiting: - When target is closer than min_range, moves away - Maintains line of sight while moving - Can attack while moving (if animation supports)
Flee Behavior: - If flee_at_hp_percent > 0, will flee when HP drops - Fleeing creatures ignore leash and run until safe
| Parameter | Meaning | Default |
|---|---|---|
aggro_on_sight | — | yes |
flee_at_hp_percent | HP percentage to flee at (0 = never flee) | 20 |
kite_speed_multiplier | Speed multiplier when kiting | 1 |
min_range | Minimum comfortable distance from target | 8 meters |
optimal_range | Preferred attack distance | 12 meters |
- selectorSelector
- sequenceDeath Handler
- conditionself.hp <= 0
- actionDie
- sequenceLeash Handler
- conditiondistance_to_spawn > self.leash_range
- actionReset To Spawnclear threat true · heal to full true
- sequenceFlee Behavior
- conditionself.flee_at_hp_percent > 0
- conditionself.hp_percent <= self.flee_at_hp_percent
- actionFlee From Targetflee distance 20
- sequenceCombat Sequence
- conditionhas_valid_target
- selectorRanged Combat
- sequenceKite Away
- conditiondistance_to_target < self.min_range
- actionMove Away From Targettarget distance self.optimal_range
- sequenceAttack At Range
- conditiondistance_to_target >= self.min_range
- conditiondistance_to_target <= self.attack_range
- selectorSelector
- sequenceSequence
- conditionhas_ready_conditional_ability
- actionUse Conditional Ability
- actionUse Weighted Ability
- sequenceApproach Target
- conditiondistance_to_target > self.attack_range
- actionMove To Targetstop distance self.optimal_range
- sequenceAcquire Target
- condition!has_valid_target
- conditionenemy_in_range(self.aggro_range)
- actionSet Target Nearest Enemy
- selectorIdle Behavior
- sequencePatrol
- conditionself.patrol.type != 'stationary'
- actionPatrol
- actionIdle
- Bandit Archer
- Eagle
- Goblin Archer
- Ashen Goblin Slinger
- Goblin Shaman
- Griffin
- Hawk
- Ledger Saboteur
- Ledger Scout
- Pirate Gunner
- Pirate Navigator
- Sea Snake
- Skeleton Archer
- Skeleton Mage
- Wyvern
- Goblin Archer
- Vulture Matriarch
ranged_kite · version 1Stationary Passive
2 creaturesCompletely passive, non-mobile AI. Used for: - Training dummies - Target practice - Environmental creatures
Designer's notes
Minimal behavior tree for training targets.
Features: - Never moves - Never attacks - Never dies (infinite HP or respawns instantly) - Optionally heals back to full after combat - Can display DPS tracking for practice
Use Cases: - Combat training dummies in guild halls - Practice targets at combat academies - DPS testing
| Parameter | Meaning | Default |
|---|---|---|
auto_heal | Whether to heal back to full after not being hit | yes |
heal_delay | Time after last hit before healing | 5 seconds |
show_damage_numbers | Whether to display damage numbers | yes |
track_dps | Whether to track and display DPS | yes |
- selectorSelector
- sequenceHp Reset
- conditionself.auto_heal == true
- conditiontime_since_damaged > self.heal_delay
- actionHeal To Full
- actionIdleplay ambient true
stationary_passive · version 1Stationary Reactive
8 creaturesStationary practice target that fights back. The creature will: 1. Never aggro on sight — activation comes from being damaged 2. Attack back with weighted abilities while the target is in range 3. Never move or chase 4. Deactivate via ai.disengage_after_secs once left alone
Designer's notes
Designed for the training dummies (melee, slam, breath, archer, mage, sparbot). Pair with: ai: behavior_tree: stationary_reactive disengage_after_secs: 10.0 patrol: { type: stationary } Deactivation is NOT in this tree — the AI system clears threat entries whose time_since_action exceeds disengage_after_secs, and the existing threat-empty check exits combat.
- selectorSelector
- sequenceDeath Handler
- conditionself.hp <= 0
- actionDie
- sequenceCombat Sequence
- conditionhas_valid_target
- selectorCombat Actions
- sequenceConditional Ability
- conditionhas_ready_conditional_ability
- actionUse Conditional Ability
- sequenceIn Range Attack
- conditiondistance_to_target <= self.attack_range
- actionUse Weighted Ability
- actionIdle
- actionIdleplay ambient true
stationary_reactive · version 1