MonsterSetBase

Monster spawn locations, density, and respawn patterns

Controls where and how monsters spawn across all maps. Uses a master registry file that references per-map spawn files.

File Location

Master registry: GameServer/Data/Monster/MonsterSetBase.xml

Per-map spawns: GameServer/Data/Monster/MonsterSetBase/*.xml (one file per map)

Dependencies

Depends On
Purpose

Spawns reference monster stats by Class (Index)

Used By
Purpose

Map loading

Server reads spawn files during map initialization

File Structure

MonsterSetBase.xml (Master Registry - NOT USED)

The main file exists for legacy/compatibility but is NOT loaded by the server. All spawns are loaded from per-map files in the MonsterSetBase/ folder.

<?xml version="1.0" ?>
<MonsterSetBase>
  <!-- This file is NOT read by the server -->
  <!-- All spawns come from MonsterSetBase/*.xml files -->
</MonsterSetBase>
circle-exclamation

Per-Map Spawn Files

Each map has its own file: MonsterSetBase/000 - Lorencia.xml, MonsterSetBase/001 - Dungeon.xml, etc.

Map numbers match the game's internal map IDs (00 = Lorencia, 01 = Dungeon, 02 = Devias, etc.).

Spawn Entry Attributes

Attribute
Type
Description

Type

int

Spawn type (see Spawn Types below)

Class

int

Monster Index from Monster.xml

Map

int

Map number (00 = Lorencia, 01 = Dungeon, etc.)

Dis

int

Roaming distance from spawn point (in tiles)

X

int

Spawn X coordinate

Y

int

Spawn Y coordinate

TX

int

Target X coordinate (Type 1/3 only) - defines spawn area with X

TY

int

Target Y coordinate (Type 1/3 only) - defines spawn area with Y

Dir

int

Facing direction (0-7, or -1 for random)

Count

int

Number of monsters to spawn (Type 1/3 only, minimum 1 if 0)

Value

int

Event identifier (Type 3 only) - used by Invasion Manager to filter spawns

Comment

string

Description (optional, for admin reference)

Spawn Types

Type
Name
Behavior
Use Case

0

Fixed

Single monster at exact X/Y, respawns at same location

NPCs, guards, stationary bosses

1

Group

Count monsters spawn randomly between (X,Y) and (TX,TY), each respawns at random location in area

Normal hunting zones

2

Spot

Single monster spawns at random location in X/Y±3 range (randomized at server start, then fixed)

Scattered individual spawns

3

Event

Count monsters for invasion events, uses Value for event filtering

Invasion Manager, White Wizard events

4

Event Fixed

Single monster for event systems, spawns at exact X/Y

Blood Castle, Devil Square, Illusion Temple

Type 0: Fixed Spawn

  • Spawns exactly 1 monster at X=122, Y=110

  • Dis="00" means monster cannot move (stuck in place)

  • Dir="03" faces south (0=north, 1=NE, 2=east, 3=SE, etc.)

  • Use for NPCs and bosses at specific locations

Type 1: Group Spawn

  • Spawns 7 spiders randomly within a 10-tile radius of (187,121)

  • TX/TY define the spawn area bounds (if different from X/Y, creates rectangular area)

  • Dis="10" allows monsters to roam 10 tiles from their spawn point

  • Dir="-1" means random facing direction

  • Use for normal monster packs in hunting zones

Type 2: Spot Spawn

  • Spawns 1 monster at a random location within X±3, Y±3 tiles

  • Important: Location is randomized ONCE when server starts, then becomes fixed

  • After death, monster respawns at the same randomized location (not re-randomized)

  • Good for scattered individual monsters that shouldn't cluster

  • Commonly used in Noria for BeetleMonster and ForestMonster

Type 3: Event Spawn (Invasion Manager)

  • Similar to Type 1 but controlled by Invasion Manager and event systems

  • Count monsters spawn randomly between (X,Y) and (TX,TY)

  • Value attribute is used by event systems to filter/identify spawn groups

  • Used by White Wizard invasions and custom event systems

  • NOT directly used by Blood Castle, Devil Square (they use Type 4)

Type 4: Event Fixed Spawn

  • Single monster at exact X/Y for event systems

  • Behaves like Type 0 but filtered by event code (Type 3/4 are excluded from normal spawns)

  • Used by Blood Castle, Devil Square, Illusion Temple, Imperial Guardian, Raklion

  • Event systems programmatically control when these spawns are activated

Direction Values

Dir
Direction
Dir
Direction

0

North (↑)

4

South (↓)

1

Northeast (↗)

5

Southwest (↙)

2

East (→)

6

West (←)

3

Southeast (↘)

7

Northwest (↖)

-1

Random

Important Behavior

Spawn Timing

circle-info

Initial spawn: All Type 0, 1, and 2 monsters spawn when the GameServer starts and loads maps. Type 3 and 4 are skipped during normal spawn and only activated by event systems.

Respawn: After death, monsters respawn based on their RegenTime in Monster.xml. The respawn location depends on spawn type:

  • Type 0/4: Exact same X/Y location

  • Type 1/3: New random location within the spawn area

  • Type 2: Same randomized location (not re-randomized)

Coordinate System

  • Coordinates are in tiles (not pixels)

  • Origin (0,0) is typically top-left corner

  • Maximum coordinates vary by map (usually 255x255 or similar)

  • Invalid coordinates = monster spawns but is unreachable/invisible

Dis (Roaming Distance)

  • Dis="00" = Monster cannot move (stays at spawn point)

  • Dis="10" = Monster can wander up to 10 tiles from spawn point before AI forces return

  • Distance is calculated as Euclidean distance from spawn point (sqrt formula)

  • Too high Dis on maps with walls = monsters may appear to walk through walls when returning

  • NPCs should always have Dis="00" to prevent walking away

circle-exclamation

Count Behavior

Type 1 and 3 spawn exactly Count monsters:

  • Count="007" spawns 7 monsters

  • Count="000" spawns 1 monster (zero is converted to 1 automatically)

  • Each monster spawns at a random point within the spawn area

  • When one dies, it respawns at a new random location in the same area (Type 1/3 only)

TX/TY as Spawn Area

For Type 1/3, (X,Y) and (TX,TY) define a rectangular spawn area:

  • If TX=X and TY=Y, spawns are clustered around that point

  • If TX≠X or TY≠Y, spawns are spread across the rectangle

  • Example: X="100" Y="100" TX="120" TY="120" = 20x20 tile spawn zone

  • The system tries up to 100 times to find a walkable location in the area

Event Spawn Filtering (Type 3/4)

circle-info

Type 3 and 4 spawns are NOT included in the normal monster spawn during map initialization. They are filtered out and only activated by event systems:

  • Type 3: Invasion Manager uses the Value attribute to match spawn groups

  • Type 4: Blood Castle, Devil Square, Illusion Temple, Imperial Guardian, and Raklion use MonsterClass and Map to find specific spawns

This allows event monsters to be defined alongside normal monsters without interfering with regular gameplay.

Examples

Spawns Trainer NPC at fixed location in Lorencia, cannot move (Dis=0), faces southeast.

Per-Map Spawn Files

Each map has its own spawn file. Common maps:

Map ID
File
Map Name

00

000 - Lorencia.xml

Lorencia

01

001 - Dungeon.xml

Dungeon

02

002 - Devias.xml

Devias

03

003 - Noria.xml

Noria

04

004 - Lost Tower.xml

Lost Tower

07

007 - Atlans.xml

Atlans

08

008 - Tarkan.xml

Tarkan

11-17

011 - Blood Castle 1.xml to 017 - Blood Castle 7.xml

Blood Castle

24-29

024 - Kalima 1.xml to 029 - Kalima 6.xml

Kalima

37-39

037 - Kanturu 1.xml to 039 - Kanturu 3.xml

Kanturu

circle-info

When adding spawns to a map, edit the corresponding map file (e.g., 000 - Lorencia.xml for Lorencia spawns), not the master MonsterSetBase.xml.

Common Tasks

Add Monster Spawn to Map

  1. Find the map file (e.g., 002 - Devias.xml)

  2. Add a new <Monster> entry

  3. Set Type (usually 1 for monster groups)

  4. Set Class to monster Index from Monster.xml

  5. Set X/Y coordinates and Count

Increase Monster Density

Find existing spawn entries and increase Count:

Create Dense Hunting Zone

Add multiple spawn entries with overlapping areas:

Creates 45 Hell Hounds across overlapping zones for intense hunting.

Remove Monster from Map

Delete or comment out the spawn entry:

Move Boss Location

Change X and Y coordinates:

Common Issues

circle-exclamation
circle-exclamation
circle-exclamation
circle-info

Dis too high causes wall clipping. If monsters appear to walk through walls, reduce their Dis value to keep them within the intended area. The pathfinding return-to-spawn logic can cause monsters to walk through obstacles.

circle-exclamation
triangle-exclamation
circle-info

LoadMapFolder behavior: The server loads all .xml files from MonsterSetBase/ or MonsterSetBaseCS/ folder (depending on server type). The master MonsterSetBase.xml file is NOT loaded - all spawns come from per-map files in the folder.

Last updated