> For the complete documentation index, see [llms.txt](https://tefox-scripts.gitbook.io/tefox-scripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tefox-scripts.gitbook.io/tefox-scripts-docs/tefox-scripts-documentation/tefox_restartalert/configuration.md). Agents can also search and read this documentation through its [MCP server](https://tefox-scripts.gitbook.io/tefox-scripts-docs/~gitbook/mcp).

# Configuration

All settings are in <mark style="color:$info;">`config.lua`</mark><mark style="color:$info;">.</mark>

### General

| Option                | Description                                           |
| --------------------- | ----------------------------------------------------- |
| `Config.CheckUpdates` | Checks for new versions on server start               |
| `Config.Debug`        | Prints debug information in F8 and the server console |
| `Config.Framework`    | Your framework                                        |

### Scheduled Restart Disaster

```lua
Config.DefaultDisaster = "random"
```

Available values: `tsunami`, `tornado`, `lightning`, `earthquake`, `random`.

With `random`, a different disaster is picked each time, and the same one never plays twice in a row.

{% hint style="info" %}
This option only applies to automatic txAdmin restarts. Admins can still start any disaster manually with `/startalert`.
{% endhint %}

### txAdmin Integration

```lua
Config.TxAdmin = {
    Enabled = true,
    StartBefore = 5,
}
```

| Option        | Description                                                 |
| ------------- | ----------------------------------------------------------- |
| `Enabled`     | Starts the disaster automatically before scheduled restarts |
| `StartBefore` | Minutes before the restart the disaster begins              |

Works with both daily scheduled restarts and the **Schedule Restart** button in txAdmin. If a scheduled restart is skipped, the disaster stops automatically.

### Permissions

Add the players allowed to use the commands to <mark style="color:$info;">`Config.Allowed`</mark>, using their Discord ID or License:

```lua
Config.Allowed = {
    "discord:123456789012345678",
    "license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
}
```

### Disaster Settings

Each disaster has its own section that you can fine-tune:

* `Config.Tsunami`: water height, duration and NPC behavior
* `Config.Tornado`: number of tornadoes, chase behavior, wind, debris and indoor blackouts
* `Config.Lightning`: strike interval, player strikes, vehicle and pole hits, fires
* `Config.Earthquake`: waves, aftershocks, camera shake, falling poles, glass, hydrants and NPC reactions

Every option is explained inside `config.lua`.
