📑MuCastleData
Configuration for the Castle Siege event: cycle duration, phase schedule, and the castle's defense NPCs (gates, statues, towers, etc.). The file contains 3 blocks, each starting with the block number (0 to 2) on its own line and ending with end.
Section 0 — cycle duration
Cycle
Number, in days
Number of days between each Castle Siege cycle (registration → siege → results).
Section 1 — cycle phase schedule
State
Sequential number (1, 2, 3...)
The phase of the Castle Siege cycle. The order and behavior of each phase are hardcoded in the server.
StartDay / StartHour / StartMinute
Number
When this phase begins, relative to the start of the cycle (day 0, hour 0). This is not an absolute clock time.
Section 2 — castle defense NPCs
Monster
Monster class number
The defense NPC (gate, statue, tower, etc.).
Index
Number, unique in combination with Monster
Identifies this specific instance of the NPC.
DBSave
0 or 1
Whether this NPC's current HP is saved and restored across server restarts.
Side
Number
The faction/group this NPC belongs to (statue and gate defenders use one value, while support NPCs use another).
DFLevel
Number from 0 to 3
Initial defense level of the NPC (the castle owner can upgrade it later).
RGLevel
Number from 0 to 3
Initial HP regeneration level of the NPC (also upgradeable by the castle owner).
MaxLife
Number
Maximum HP of the NPC.
X / Y
Coordinates
Where the NPC spawns.
TX / TY
Coordinates or -1
Destination the NPC walks to after spawning. -1 = remains at its spawn position.
Dir
Number from 0 to 7
Direction the NPC faces.
Notes
The header comment inside the original file lists the columns as
Monster Index Side DBSave ..., but the server actually reads them in the orderMonster Index DBSave Side .... In other words, the 3rd column isDBSaveand the 4th isSide, the opposite of what the comment suggests. The table above reflects the actual order used by the server, as confirmed inCastleSiege.cpp.StartDay,StartHour, andStartMinutein Block 1 are offsets relative to the beginning of the Castle Siege cycle, not fixed clock times. This is why the values increase from one row to the next (for example:0 0 0, then1 23 59, then2 0 0, etc.) until the full cycle duration defined byCycleis reached.DFLevelandRGLevelare only the initial values assigned to each NPC when a new Castle Siege cycle begins. During the preparation phase, the castle owner can spend resources to upgrade these levels through another game system.
Last updated