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

# InvasionManager

<mark style="color:green;">Configuration for invasion events (Skeleton King, Red Dragons, Golden Monsters, White Wizard, Medusa, etc.). Supports up to 30 independent invasions (</mark><mark style="color:green;">`Index`</mark> <mark style="color:green;"></mark><mark style="color:green;">from 0 to 29). 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                                                                                                          |
| ---------------------------------------------------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------- |
| Index                                                      | Number from 0 to 29 | Which invasion this schedule entry belongs to.                                                                       |
| Year / Month / DayMonth / DayWeek / Hour / Minute / Second | Number or `*`       | A scheduled start time. `*` = any value (cron-style schedule). The same invasion may have multiple schedule entries. |

### <mark style="color:yellow;">Section 1 — general invasion settings</mark>

<table data-search="false"><thead><tr><th>Column</th><th>Accepted Values</th><th>Description</th></tr></thead><tbody><tr><td>Index</td><td>Number from 0 to 29</td><td>The invasion configured by this entry.</td></tr><tr><td>PreWarningMsg</td><td>Message number</td><td>Message broadcast before the invasion begins.</td></tr><tr><td>PreWarningTime</td><td>Number, in minutes</td><td>How long before the invasion starts the warning message is sent.</td></tr><tr><td>StartMessage</td><td>Message number or <code>*</code></td><td>Message broadcast when the invasion begins. <code>*</code> = no message.</td></tr><tr><td>EndMessage</td><td>Message number or <code>*</code></td><td>Message broadcast when the invasion ends. <code>*</code> = no message.</td></tr><tr><td>MonsterIndex</td><td>Monster class number</td><td>The main boss of the invasion (used in status messages).</td></tr><tr><td>DeathMessage</td><td>Message number</td><td>Message broadcast when the boss is defeated.</td></tr><tr><td>Duration</td><td>Number, in seconds</td><td>Total duration of the invasion.</td></tr><tr><td>Effect</td><td><code>0</code>, <code>1</code>, or <code>3</code></td><td>Announcement visual effect: <code>1</code> = flying Red Dragon, <code>3</code> = flying Golden Dragon, <code>0</code> = no special effect.</td></tr><tr><td>InvasionName</td><td>Text enclosed in quotes</td><td>Name of the invasion, displayed in the event UI and messages.</td></tr></tbody></table>

### <mark style="color:yellow;">Section 2 — invasion monster spawn locations</mark>

| Column | Accepted Values     | Description                                                                                                                                 |
| ------ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Index  | Number from 0 to 29 | Which invasion this spawn point belongs to.                                                                                                 |
| Group  | Number from 0 to 19 | Spawn group. Must match the `Group` value in Block 3 to determine which monsters spawn here.                                                |
| Map    | Map number          | The map where this monster group spawns.                                                                                                    |
| Value  | Number              | Spawn point index within the map (multiple entries with the same `Map` but different `Value` represent different spawn points on that map). |

### <mark style="color:yellow;">Section 3 — monsters spawned by each group</mark>

| Column    | Accepted Values                       | Description                                                                                                                                                                   |
| --------- | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Index     | Number from 0 to 29                   | Which invasion this monster belongs to.                                                                                                                                       |
| Group     | Number from 0 to 19 (matches Block 2) | The spawn group where this monster appears.                                                                                                                                   |
| Monster   | Monster class number                  | The monster spawned by this group.                                                                                                                                            |
| RegenType | `0` or any other number               | `0` = the monster does not respawn during the invasion (it spawns only once). Any other value = the monster respawns periodically, using `RegenTyme` as the respawn interval. |
| RegenTyme | Number, in milliseconds               | Respawn interval, used only when `RegenType` is not `0`.                                                                                                                      |

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

* A complete invasion is identified by the same `Index` across all four blocks. The `Index` does **not** represent a specific monster—it identifies the invasion itself (e.g., `Index 0` = Skeleton King, `Index 4` = Medusa in the default file). The behavior of each invasion is defined by the remaining blocks.
* With `RegenType = 0` (used by all bosses in the default file), the monster spawns only once during the invasion. If it is killed before the event ends, it will not respawn.
* The Golden Monsters (Golden Titan, Golden Soldier, etc.), as well as the White Wizard and Medusa in the default file, use multiple `Group` entries simply to distribute different monsters and spawn locations within the same invasion. These groups do **not** represent different difficulty levels.
