Monster Configuration
The Monster system controls all NPC and monster behavior in the game including spawning, stats, AI, and skills.
Configuration Files
Core Monster Definitions
Monster stats, levels, resistances, regen time
Spawn Configuration
Directory containing per-map spawn files (e.g., 000 - Lorencia.xml, 002 - Devias.xml)
Directory for Castle Siege server spawn files (used if GAMESERVER_TYPE ≠ 0)
Kanturu event map spawns (loaded separately by Kanturu system)
How spawns load: The server scans either MonsterSetBase/ or MonsterSetBaseCS/ directory (depending on server type) and loads ALL .xml files found. There is no master registry file - files load alphabetically.
Monster Skills
Assigns skills to specific monsters
Defines skill behaviors (targeting, scope, delay)
Defines skill effects (damage, debuffs, buffs)
Advanced AI System
Assigns AI personalities to monster spawns
Defines complete AI personalities (links automata to actions)
State machine definitions (when to change behavior)
Atomic AI actions (what to do in each state)
Global AI rules (currently unused)
AI System vs Basic Spawns: Most monsters use basic spawns from MonsterSetBase files. The AI system (MonsterAI*.xml) is only used for advanced boss mechanics and special monster behaviors.
File Location
All monster configs are in: GameServer/Data/Monster/
Basic spawn files are in: GameServer/Data/Monster/MonsterSetBase/ (directory with per-map XML files)
How spawns load: The GameServer scans MonsterSetBase/ directory and loads ALL .xml files found. Each file is named by map number and name (e.g., 000 - Lorencia.xml, 002 - Devias.xml). There is no master registry file controlling which maps load.
Workflow Overview
Adding a New Monster
Define stats in Monster.xml - Add
<Info>entry with unique Index, stats, resistances, RegenTimeAssign skills (optional) in MonsterSkill.xml - Add
<Monster>entry linking monster Index to skill unitsConfigure spawns - Choose one method:
Basic spawn: Edit appropriate map file in MonsterSetBase/ directory
Advanced AI spawn: Create entries in MonsterAIGroup.xml with AI personality
Modifying Monster Behavior
Change stats - Edit Monster.xml (Level, Life, DamageMin/Max, Defense, etc.)
Change spawn density - Edit Count attribute in map-specific MonsterSetBase/*.xml file (Type 1 or 3 only)
Change spawn locations - Edit X/Y (and TX/TY for Type 1/3) coordinates in map-specific file
Change respawn time - Edit RegenTime in Monster.xml (in seconds, server multiplies by 1000)
Add/remove skills - Edit MonsterSkill.xml (add or remove
<Monster>entry)Change AI behavior - Edit MonsterAIGroup.xml (for AI-controlled monsters only)
Creating Custom Skills
Define effects in MonsterSkillElement.xml - Create Element entries
Define behavior in MonsterSkillUnit.xml - Create Unit entry referencing Elements
Assign to monster in MonsterSkill.xml - Reference Unit index
Important Concepts
Spawn File Loading Behavior
The GameServer loads monster configuration files at startup in this order:
KanturuMonsterSetBase.xml- Kanturu event spawnsAll MonsterAI files (Automata, Element, Group, Rule, Unit)
Monster.xml- Monster stat definitionsEither
MonsterSetBase/*.xml(normal server) ORMonsterSetBaseCS/*.xml(Castle Siege server)All MonsterSkill files (Element, Unit, Skill)
Spawn directory loading behavior:
Server scans the appropriate spawn directory and loads ALL
.xmlfiles foundFiles are processed in alphabetical order by filename
If you add a new map spawn file, just place it in the directory - no registry file needed
No master spawn registry file exists
Server Type: Which spawn directory loads depends on the GAMESERVER_TYPE compile flag. Type 0 = Normal (uses MonsterSetBase/), Type 1+ = Castle Siege (uses MonsterSetBaseCS/).
No Master Registry: There is NO master spawn registry file. The documentation claim that "MonsterSetBase.xml references per-map files" is incorrect. The server scans the directory and loads all XML files directly.
Monster Index
Every monster has a unique Index number used throughout all configs:
0-99: Common monsters (Bull Fighter, Spider, etc.)
200-299: NPCs (Trainers, merchants, guards)
300+: Special monsters and bosses
Spawn Types
0
Fixed position
NPCs, guards, bosses
1
Random within range (uses TX/TY)
Normal monster groups
2
Random spot (±3 from X/Y)
Scattered spawns
3
Event spawns (uses TX/TY)
Blood Castle, Devil Square
4
Noble monsters
Special boss spawns
Type 1 vs Type 2: Type 1 spawns require TX/TY coordinates defining a spawn area. Type 2 randomly offsets the X/Y coordinates by ±3 tiles at load time (no TX/TY needed).
Skills System
Skills are modular:
Elements define effects (damage, stun, heal)
Units combine Elements into a complete skill
MonsterSkill assigns Units to monsters
A monster can have up to 6 skill unit slots.
Dependencies
Basic Monster System
Skill System
Advanced AI System
Common Tasks
Increase Monster Difficulty
Edit Monster.xml - Increase Level, DamageMin/Max, Defense
Optionally add skills in MonsterSkill.xml
Add Boss Spawn
Ensure boss exists in Monster.xml with proper stats
Add Type="0" entry in appropriate map file with fixed X/Y
Set high RegenTime in Monster.xml (e.g., 3600 = 1 hour)
Create Monster-Dense Zone
Find the appropriate map file in
GameServer/Data/Monster/MonsterSetBase/directoryAdd multiple
Type="1"entries with sameClassattributeSet
Countattribute to desired density (e.g.,Count="20"for 20 monsters per spawn point)Define spawn area with
X,Y,TX,TYcoordinates (monsters spawn randomly within this rectangle)
Disable Monster Skills
Find monster Index in MonsterSkill.xml
Change UnitType/UnitIndex to "*" (wildcard) to disable slots
Or remove entire Monster entry
Next Steps
Monster Stats Configuration - Define monster attributes
Monster Spawning - Configure spawn locations and density
Monster Skills - Assign and create monster skills
Last updated