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

# Configuration

General options are in `config.lua`. These cover access, time, cycle, blackouts, alerts, overrides and compatibility. Region weather, presets and tablet settings are saved in the database.

| Option                          | What it controls                                                         |
| ------------------------------- | ------------------------------------------------------------------------ |
| `Config.Access`                 | Who can use the tablet, by job or identifier.                            |
| `Config.AdminKey`               | Optional key that opens the tablet.                                      |
| `Config.TabletItem`             | Optional item that opens the tablet.                                     |
| `Config.Cycle.ZoneTransition`   | How the weather blends when a player crosses into a new region.          |
| `Config.DefaultRegion`          | Region used for zones that aren't listed.                                |
| `Config.Blackout.Storm`         | Starting values for storm blackouts. The tablet changes them after that. |
| `Config.Defaults.Notifications` | Whether notifications start on for new players. Off by default.          |
| `Config.Indoor`                 | Mutes rain inside interiors.                                             |
| `Config.Overrides`              | Fixed weather, time or power for an MLO, without code.                   |
| `Config.Compat`                 | qb-weathersync commands and the `SetWeatherAllRegions` option.           |
| `Config.Webhook.Url`            | Discord webhook. Every admin change from the History tab is posted here. |

### Files

| File                  | What it's for                                               |
| --------------------- | ----------------------------------------------------------- |
| `config.lua`          | General options.                                            |
| `shared/regions.lua`  | Regions, zone codes and default cycles.                     |
| `shared/weathers.lua` | Weather types, icons, temperatures and natural transitions. |
| `shared/presets.lua`  | Presets added to the database on first start.               |
| `shared/settings.lua` | Widget settings schema.                                     |
| `locales/en.lua`      | Text for notifications, commands and history.               |
| `html/`               | Tablet, widget and settings UI.                             |

> 💡 Keep `Config.Webhook.Url` on the server, and don't commit it to a public repository.
