> For the complete documentation index, see [llms.txt](https://titans.gitbook.io/titans/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://titans.gitbook.io/titans/invasion-events.md).

# Invasion Events

````
# Invasion Events and Global Panic

The **Invasion system** is a dynamic, server-wide threat engine where player performance affects the entire world.

If the community fails to defeat Invaders, the server becomes more dangerous over time. If players successfully defend the server, the global threat level can decrease.

---

# Global Panic / Heat

The server tracks a global **Heat** level from `0%` to `100%`.

Heat represents how badly the community is failing to contain Invaders.

| Heat Level | Meaning |
|---:|---|
| `0%` | The server is stable. Invader pressure is low. |
| `25%` | The world is becoming unstable. |
| `50%` | Invaders are becoming more common. |
| `75%` | The server is in serious danger. |
| `100%` | Maximum panic. Invader activity is at its most dangerous. |

{% hint style="warning" %}
Higher Heat levels can increase future Invader spawn chances, making the world more dangerous until players successfully defeat Invaders and lower the panic level.
{% endhint %}

---

## How Heat Changes

| Action | Result |
|---|---|
| Invader despawns undefeated | Heat increases. |
| Invader is defeated by the community | Heat decreases. |

The amount of Heat gained or lost is configured inside each Invader's JSON file.

For example, an Invader may increase Heat by `40` on failure and decrease Heat by `20` on victory.

```json
"panic": {
  "heatIncreaseOnFailure": 40,
  "heatDecreaseOnSuccess": 20
}
````

***

### Effects of High Heat

High Heat acts as a global danger multiplier.

As Heat rises, future Invaders can become more likely to appear. This creates a snowball effect where repeated failures make the world increasingly dangerous.

| Heat State   | Server Impact                              |
| ------------ | ------------------------------------------ |
| Low Heat     | Normal Invader activity.                   |
| Medium Heat  | Increased Invader pressure.                |
| High Heat    | Invaders become much more common.          |
| Maximum Heat | The server enters a dangerous panic state. |

***

## Admin Commands

Use these commands to view or manually control the server's panic level.

| Command                              | Description                                        |
| ------------------------------------ | -------------------------------------------------- |
| `/titans invaders panic get`         | View the current server panic level.               |
| `/titans invaders panic set <0-100>` | Manually set the Heat level between `0` and `100`. |

### Example

```
/titans invaders panic get
```

Displays the current global panic level.

```
/titans invaders panic set 50
```

Sets the server Heat level to `50%`.

***

## Invasion Events

**Invasion Events** are scheduled server-wide events where specific Invaders become more common or the world is locked into special conditions.

Events can be used for limited-time boss weeks, seasonal invasions, server-wide disasters, or admin-triggered world events.

***

### Event Config Location

Invasion Event JSON files are stored in:

```
config/titans/invasion_events/
```

Each file inside this folder can define a separate invasion event.

***

## Event Configuration Options

| Option                  | Description                                                                   |
| ----------------------- | ----------------------------------------------------------------------------- |
| `name`                  | The display name of the event.                                                |
| `enabled`               | Whether this event is active and allowed to run.                              |
| `startTimeMillis`       | Timestamp for when the event should start.                                    |
| `endTimeMillis`         | Timestamp for when the event should end.                                      |
| `targetInvaders`        | List of Invader IDs affected by the event. Use `ALL` to target every Invader. |
| `spawnChanceMultiplier` | Multiplies the spawn chance of targeted Invaders during the event.            |
| `globalWeatherLock`     | Forces the server into a specific weather type for the event duration.        |
| `announcementMessage`   | Message broadcasted to the server when the event triggers.                    |

***

### Time Settings

`startTimeMillis` and `endTimeMillis` use millisecond timestamps.

| Value         | Meaning                                  |
| ------------- | ---------------------------------------- |
| `0`           | Active forever while enabled.            |
| Any timestamp | Event starts or ends at that exact time. |

{% hint style="info" %}\
If both `startTimeMillis` and `endTimeMillis` are set to `0`, the event can remain active forever as long as `enabled` is set to `true`.\
{% endhint %}

***

### Target Invaders

`targetInvaders` controls which Invaders are affected by the event.

```
"targetInvaders": ["kyogre"]
```

This only affects the Invader with the ID `kyogre`.

```
"targetInvaders": ["ALL"]
```

This affects every Invader.

***

### Spawn Chance Multiplier

`spawnChanceMultiplier` boosts the spawn rate of targeted Invaders during the event.

| Value  | Effect               |
| ------ | -------------------- |
| `1.0`  | Normal spawn chance. |
| `2.0`  | 2x spawn chance.     |
| `5.0`  | 5x spawn chance.     |
| `10.0` | 10x spawn chance.    |

Example:

```
"spawnChanceMultiplier": 5.0
```

This makes targeted Invaders `5x` more likely to spawn while the event is active.

***

### Global Weather Lock

`globalWeatherLock` forces the entire server into a specific weather condition for the event duration.

| Value     | Effect                |
| --------- | --------------------- |
| `RAIN`    | Forces rain.          |
| `THUNDER` | Forces thunderstorms. |
| `CLEAR`   | Forces clear weather. |

Example:

```
"globalWeatherLock": "RAIN"
```

This locks the server into rainy weather while the event is active.

***

## Example Config

```
{
  "name": "The Deep Sea Week",
  "enabled": true,
  "startTimeMillis": 1714176000000,
  "endTimeMillis": 1714780800000,
  "targetInvaders": [
    "kyogre"
  ],
  "spawnChanceMultiplier": 5.0,
  "globalWeatherLock": "RAIN",
  "announcementMessage": "&b[EVENT] The oceans rise! Kyogre sightings have drastically increased."
}
```

***

## Example Breakdown

### The Deep Sea Week

This event creates a limited-time Kyogre invasion event.

During the event:

* Kyogre has a much higher spawn chance.
* The server is locked into rainy weather.
* A custom event announcement is broadcasted to players.

***

### Event Settings

| Setting          | Value               |
| ---------------- | ------------------- |
| Name             | `The Deep Sea Week` |
| Enabled          | `true`              |
| Target Invader   | `kyogre`            |
| Spawn Multiplier | `5.0x`              |
| Weather Lock     | `RAIN`              |

***

### Event Announcement

When the event activates, the server broadcasts:

```
&b[EVENT] The oceans rise! Kyogre sightings have drastically increased.
```

In-game, this message appears with Minecraft color formatting.

***

## Admin Commands

Use these commands to check active events or reload event files.

| Command                       | Description                                                   |
| ----------------------------- | ------------------------------------------------------------- |
| `/titans invaders event list` | View currently active scheduled invasion events.              |
| `/titans invaders reload`     | Reload all Invader and event files from the config directory. |

***

## Recommended Usage

Use Invasion Events to create special server moments such as:

| Event Type      | Example                                                     |
| --------------- | ----------------------------------------------------------- |
| Boss Week       | A specific Invader has increased spawns for several days.   |
| Server Disaster | Weather is locked and dangerous Invaders appear more often. |
| Seasonal Event  | Special Invaders become more common during holidays.        |
| Admin Event     | Staff manually start or reload special invasion content.    |

***

## Quick Summary

| System              | Purpose                                                                                                                      |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| Global Panic / Heat | Tracks how dangerous the world has become based on player success or failure.                                                |
| Heat Increase       | Happens when Invaders despawn undefeated.                                                                                    |
| Heat Decrease       | Happens when Invaders are defeated.                                                                                          |
| Invasion Events     | Scheduled periods that boost certain Invaders or lock world conditions.                                                      |
| Event Config Folder | `config/titans/invasion_events/`                                                                                             |
| Main Admin Commands | `/titans invaders panic get`, `/titans invaders panic set <0-100>`, `/titans invaders event list`, `/titans invaders reload` |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://titans.gitbook.io/titans/invasion-events.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
