> 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/castledeepevent.md).

# CastleDeepEvent

<mark style="color:green;">Monster waves that invade the Castle Siege during the siege. This event always takes place on the Castle Siege map—it cannot be configured to run on any other map. The file contains 4 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;">`3`</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 — start schedule</mark>

| Column                                            | Accepted Values | Description                                                                |
| ------------------------------------------------- | --------------- | -------------------------------------------------------------------------- |
| Year / Month / Day / DoW / Hour / Minute / Second | Number or `*`   | Scheduled start time for the event. `*` = any value (cron-style schedule). |

### <mark style="color:yellow;">Section 1 — available scenarios</mark>

| Column    | Accepted Values                         | Description                                                                                                                                                                        |
| --------- | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Group     | Number identifying an invasion scenario | Each `Group` is a complete and independent invasion scenario (its waves are defined in Blocks 2 and 3). Every time the event starts, the server randomly selects **one** scenario. |
| SpawnRate | Number                                  | Selection weight for this scenario (see notes—it is not an exact percentage).                                                                                                      |

### <mark style="color:yellow;">Section 2 — wave spawn timing</mark>

| Column      | Accepted Values                            | Description                                 |
| ----------- | ------------------------------------------ | ------------------------------------------- |
| Index       | Number matching a `Group` from Block 1     | Which scenario this wave belongs to.        |
| Group       | Wave number, in sequence (1, 2, 3...)      | The order of this wave within the scenario. |
| SpawnMinute | Number, in minutes since the event started | The minute at which this wave spawns.       |

### <mark style="color:yellow;">Section 3 — monsters in each wave</mark>

| Column  | Accepted Values                        | Description                                                                                |
| ------- | -------------------------------------- | ------------------------------------------------------------------------------------------ |
| Index   | Number matching a `Group` from Block 1 | Which scenario this monster belongs to.                                                    |
| Group   | Wave number (matches Block 2)          | Which wave this monster belongs to.                                                        |
| Monster | Monster class number                   | The monster that spawns in this wave.                                                      |
| Count   | Number                                 | How many of this monster spawn.                                                            |
| X / Y   | Coordinates                            | Where the monsters spawn.                                                                  |
| TX / TY | Coordinates                            | The destination the monsters move toward after spawning (e.g., the castle gate or statue). |

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

* This event runs **only** during the Castle Siege and **only** on the Castle Siege map. There is no option in this file to change that.
* Each time the event starts, the server randomly selects one `Group` (scenario) from Block 1. `SpawnRate` is **not** a percentage that must total 100. Instead, the server repeatedly evaluates the available scenarios until one is selected, so scenarios with higher `SpawnRate` values are chosen more often, but there is no simple "100% divided among the scenarios" formula.
* The total duration of the event is **not** defined in this file. It is determined by the server's general Castle Siege duration settings.

\ <br>
