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.
| State | Internal name | Description |
|---|---|---|
| 1 | IDLE_1 | Pre-registration idle |
| 2 | REGSIEGE | Guild siege registration window |
| 3 | IDLE_2 | Idle between registration and mark sign-up |
| 4 | REGMARK | Mark-of-Lord sign-up window |
| 5 | IDLE_3 | Idle between sign-up and battle notification |
| 6 | NOTIFY | Battle notification broadcast |
| 7 | READYSIEGE | Pre-battle readiness window |
| 8 | STARTSIEGE | Active siege battle |
| 9 | ENDSIEGE | Post-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.
| Column | Effect |
|---|---|
Monster | Monster class index from Monster.xml |
Index | Placement instance ID, unique per Monster class |
DBSave | 1 = state persists across restarts via DataServer; 0 = always fresh; 2 = special persistence path for Crown-related NPCs |
Side | 1 = destructible siege target (gate, statue, Guardian Dragon, Crown); 2 = peaceful siege-map NPC |
DFLevel | Defense upgrade level (applied to gates/statues via chaos gem upgrade; 0 = baseline) |
RGLevel | Regeneration upgrade level (applied to statues; 0 = baseline) |
MaxLife | Placement HP override |
X, Y | Spawn coordinates |
TX, TY | Destination / patrol target; -1 -1 = stationary |
Dir | Facing 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.
| Column | Effect |
|---|---|
Level | Target defense level (1, 2, 3, ...) |
GemCount | Number of chaos gems consumed for this step |
Zen | Zen 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.
| Column | Effect |
|---|---|
HP | Additional Max-HP granted at this step |
GemCount | Chaos-gem cost |
Zen | Zen 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#
| Value | Related in |
|---|---|
| Master enable | Common.dat EnableCastleSiege |
| Event enable flag | Event.dat CastleSiegeEvent |
| Weapon damage | Event.dat CastleSiegeOffensiveWeaponDamage / CastleSiegeDefensiveWeaponDamage (raw HP, not percent) |
| Accumulated time decay | Event.dat CastleSiegeLowerAccumulatedTimeValue / CastleSiegeDecayAccumulatedTimeValue |
| Damage scaling | Character.dat CastleSiegeDamageRate1/2/3 |
| Elemental scaling | Character.dat CastleSiegeElementalDamageRate1/2/3 |
| CS skills outside CS map | Common.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
Cyclemismatch - Guardian dragon missing - monster index in section 2 not in Monster.xml,
Sidemisconfigured, orMaxLifeis zero - Gates indestructible -
MaxLifeset too high or weapon damage in Event.dat too low - Cycle flips daily instead of weekly - section 0
Cycleset to1; restore to7 - State overrides never unstick -
CastleSiegeSpecificStatein Event.dat non-zero; reset to0to resume automatic state progression - Schedule load fails silently - section 1 has a duplicated
Statevalue, or entries are out of order after sort