> For the complete documentation index, see [llms.txt](https://changelog.matrixemulator.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://changelog.matrixemulator.com/welcome/server/muserver/data/event/chaoscastle.md).

# ChaosCastle

<mark style="color:green;">Complete configuration for the Chaos Castle event. The file contains 6 blocks, each starting with the block number (</mark><mark style="color:green;">`0`</mark> <mark style="color:green;"></mark><mark style="color:green;">to</mark> <mark style="color:green;"></mark><mark style="color:green;">`5`</mark><mark style="color:green;">) on its own line and ending with</mark> <mark style="color:green;"></mark><mark style="color:green;">`end`</mark><mark style="color:green;">.</mark>

### <mark style="color:yellow;">Section 0 — general timers</mark>

| Column      | Accepted Values    | Description                                                              |
| ----------- | ------------------ | ------------------------------------------------------------------------ |
| WarningTime | Number, in minutes | How long before the event starts the countdown warning begins to appear. |
| NotifyTime  | Number, in minutes | Duration of the waiting/entry phase before the event starts.             |
| EventTime   | Number, in minutes | Duration of the event itself.                                            |
| CloseTime   | Number, in minutes | Duration of the closing phase after the event ends.                      |

### <mark style="color:yellow;">Section 1 — start schedule</mark>

| Column                                            | Accepted Values | Description                                                               |
| ------------------------------------------------- | --------------- | ------------------------------------------------------------------------- |
| Year / Month / Day / DoW / Hour / Minute / Second | Number or `*`   | One scheduled start time per line. `*` = any value (cron-style schedule). |

### <mark style="color:yellow;">Section 2 — experience (per castle level)</mark>

| Column           | Accepted Values    | Description                                                      |
| ---------------- | ------------------ | ---------------------------------------------------------------- |
| Level            | Number from 0 to 6 | Chaos Castle level.                                              |
| ExperienceTable1 | Number             | Experience awarded **per player killed** (PvP) during the event. |
| ExperienceTable2 | Number             | Experience awarded **per monster killed** during the event.      |

### <mark style="color:yellow;">Section 3 — coin rewards (winner only)</mark>

| Column | Accepted Values    | Description                                      |
| ------ | ------------------ | ------------------------------------------------ |
| Level  | Number from 0 to 6 | Castle level.                                    |
| WC     | Number             | Bonus WCoinC awarded to the event winner.        |
| WP     | Number             | Bonus WCoinP awarded to the event winner.        |
| GP     | Number             | Bonus Goblin Points awarded to the event winner. |

### <mark style="color:yellow;">Section 4 — minimum and maximum level/reset requirements</mark>

| Column                  | Accepted Values    | Description                                                                               |
| ----------------------- | ------------------ | ----------------------------------------------------------------------------------------- |
| Level                   | Number from 0 to 5 | Castle level.                                                                             |
| NormalMin / NormalMax   | Number             | Allowed range for first-class characters (Dark Wizard, Dark Knight, Fairy Elf, Summoner). |
| SpecialMin / SpecialMax | Number             | Allowed range for special classes (Magic Gladiator, Dark Lord, Rage Fighter).             |

### <mark style="color:yellow;">Section 5 — entry cost</mark>

| Column | Accepted Values    | Description                             |
| ------ | ------------------ | --------------------------------------- |
| Level  | Number from 0 to 6 | Castle level.                           |
| Cost   | Number, in Zen     | Entry cost for this Chaos Castle level. |

### <mark style="color:yellow;">Notes</mark>

* Unlike what the column names in Block 2 might suggest (similar to `BloodCastle.dat`), **`ExperienceTable1` and `ExperienceTable2` are not "winner vs. everyone else."** Instead, they represent experience awarded **per player killed** and **per monster killed**, respectively. Every participant earns experience according to the number of kills they achieve.
* The coin rewards in Block 3 and the special reward item (linked to the "Chaos Castle 1" through "Chaos Castle 7" entries in [EventItemBagManager.txt](https://chatgpt.com/EventItemBagManager.txt.md)) are awarded to **a single winner only**. Unlike Blood Castle, there is no party sharing.
* All timers in Block 0 are measured in **minutes**.
* The entry cost in Block 5 is charged in Zen when entering the event, in addition to consuming the required entry item from the player's inventory. Players flagged as Outlaws (high PK level) may also be prevented from entering, depending on another server configuration.
* The requirement used to allow entry—**Level**, **Reset**, or **Master Reset**—is defined by the `ChaosCastleEnterType` option in `Event.dat`, not in this file.
