MuCastleData.dat

Castle Siege event data: cycle length in days, the 9-entry state schedule that governs the Castle Siege state machine, and the NPC/monster placements for the siege map including gates, statues, Guardian Dragons, and peaceful NPCs. Requires both Common.dat EnableCastleSiege = 1 and Event.dat CastleSiegeEvent = 1.

File Location#

Data/Event/MuCastleData.dat

Loaded once at GameServer startup. Changes require a restart.

Sections#

Section 0 - Cycle Length#

0
//Cycle
7
end

Days in a full Castle Siege cycle. Shipped default: 7 (weekly). The state schedule in section 1 repeats every Cycle days. Must be greater than zero.

Section 1 - State Schedule#

1
//State   StartDay   StartHour   StartMinute
1         0          0           0
2         1          23          59
3         2          0           0
4         3          0           0
5         4          12          0
6         4          19          0
7         6          09          0
8         6          23          0
9         7          0           0
end

One row per Castle Siege state, scheduled by day-of-cycle and time-of-day. Entries are sorted by StartDay/StartHour/StartMinute; ordering must be strictly increasing after sort, and each state number must appear exactly once.

StateInternal nameDescription
1IDLE_1Pre-registration idle
2REGSIEGEGuild siege registration window
3IDLE_2Idle between registration and mark sign-up
4REGMARKMark-of-Lord sign-up window
5IDLE_3Idle between sign-up and battle notification
6NOTIFYBattle notification broadcast
7READYSIEGEPre-battle readiness window
8STARTSIEGEActive siege battle
9ENDSIEGEPost-battle tribute / result window

StartDay is day-of-cycle (0 = first day). StartHour and StartMinute are wall-clock time within that day.

Section 2 - NPC / Monster Placements#

2
//Monster   Index   DBSave   Side   DFLevel   RGLevel   MaxLife   X      Y      TX      TY      Dir
283         1       1        1      0         0         400000    94     227    -1      -1      1
...
end

One row per placement. The shipped template covers gates, statues, Guardian Dragons, the Crown Switch NPCs, and peaceful siege-map NPCs.

ColumnEffect
MonsterMonster class index from Monster.xml
IndexPlacement instance ID, unique per Monster class
DBSave1 = state persists across restarts via DataServer; 0 = always fresh; 2 = special persistence path for Crown-related NPCs
Side1 = destructible siege target (gate, statue, Guardian Dragon, Crown); 2 = peaceful siege-map NPC
DFLevelDefense upgrade level (applied to gates/statues via chaos gem upgrade; 0 = baseline)
RGLevelRegeneration upgrade level (applied to statues; 0 = baseline)
MaxLifePlacement HP override
X, YSpawn coordinates
TX, TYDestination / patrol target; -1 -1 = stationary
DirFacing direction (0-7)

Section 3 - Gate Defense-Level Upgrade Table#

3
//Level   GemCount   Zen
1         2          1000000
2         4          2000000
...
end

Per-level chaos-gem and zen cost to upgrade castle gates' defense level via the Crown Switch / siege upgrade NPC. Capped at 3 entries (defense levels 1-3). Extra rows are ignored.

ColumnEffect
LevelTarget defense level (1, 2, 3, ...)
GemCountNumber of chaos gems consumed for this step
ZenZen cost for this step

Section 4 - Statue Defense-Level Upgrade Table#

Same column layout as section 3 but applies to the Crown Statue.

Section 5 - Gate Max-HP Upgrade Table#

5
//HP   GemCount   Zen
4000   2          1000000
...
end

Per-step gate Max-HP upgrade cost.

ColumnEffect
HPAdditional Max-HP granted at this step
GemCountChaos-gem cost
ZenZen cost

Section 6 - Statue Max-HP Upgrade Table#

Same column layout as section 5 but for the Crown Statue.

Section 7 - Statue Regeneration-Level Upgrade Table#

7
//Level   GemCount   Zen
1         2          1000000
...
end

Per-level regeneration upgrade cost for the Crown Statue.

Section 8 - Gate Defense-Value Baseline#

8
//Defense
50
80
...
end

One row per defense level (index 0 = baseline level 0; subsequent rows = upgrades from section 3). The integer is the raw defense value applied to gates at that level. Capped at 4 rows (index 0 = baseline, then one row per upgrade level). Extra rows are ignored.

Section 9 - Statue Defense-Value Baseline#

Same column layout as section 8 but applied to the Crown Statue.

Cross-File Dependencies#

ValueRelated in
Master enableCommon.dat EnableCastleSiege
Event enable flagEvent.dat CastleSiegeEvent
Weapon damageEvent.dat CastleSiegeOffensiveWeaponDamage / CastleSiegeDefensiveWeaponDamage (raw HP, not percent)
Accumulated time decayEvent.dat CastleSiegeLowerAccumulatedTimeValue / CastleSiegeDecayAccumulatedTimeValue
Damage scalingCharacter.dat CastleSiegeDamageRate1/2/3
Elemental scalingCharacter.dat CastleSiegeElementalDamageRate1/2/3
CS skills outside CS mapCommon.dat EnableCsSkillsAllMaps
Map 30 (Castle Siege)MapManager.xml

Common Issues#

  • CS never enters STARTSIEGE - day/hour/minute of state 8 is later than current weekday, or Cycle mismatch
  • Guardian dragon missing - monster index in section 2 not in Monster.xml, Side misconfigured, or MaxLife is zero
  • Gates indestructible - MaxLife set too high or weapon damage in Event.dat too low
  • Cycle flips daily instead of weekly - section 0 Cycle set to 1; restore to 7
  • State overrides never unstick - CastleSiegeSpecificState in Event.dat non-zero; reset to 0 to resume automatic state progression
  • Schedule load fails silently - section 1 has a duplicated State value, or entries are out of order after sort

Last updated November 5, 2026