> For the complete documentation index, see [llms.txt](https://organized-chaos.gitbook.io/organized-chaos-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://organized-chaos.gitbook.io/organized-chaos-docs/the-lost-treasure/configuration-files.md).

# Configuration files

Which file in the config folder holds which setting.

Everything you can change lives in the `config/` folder. Nothing outside that folder needs editing, and the rest of the resource ships encrypted.

Restart the resource after any change: `restart lost_treasure`.

## Which file holds what

| File                          | Sent to players? | What it holds                                                                               |
| ----------------------------- | ---------------- | ------------------------------------------------------------------------------------------- |
| `config/config.lua`           | **yes**          | Machines and how a player reaches them, the command, the blip, the name, the debug switches |
| `config/locales.lua`          | **yes**          | The words the client prints itself: prompt, blip, chat and key-binding help                 |
| `config/server/server.lua`    | no               | Economy, cashier, betting, database, maintenance, anti-abuse, commands, history             |
| `config/server/game.lua`      | no               | Grid, win mode and tiers, max win, cascades, feature buy                                    |
| `config/server/interface.lua` | no               | Logo, artwork, palette, fonts, front panel, timings                                         |
| `config/server/symbols.lua`   | no               | The symbols and their weights                                                               |
| `config/server/payouts.lua`   | no               | The paytable                                                                                |
| `config/server/features.lua`  | no               | Ground, chests, bombs, multiplier meter, free spins                                         |
| `config/server/bank.lua`      | no               | The house bank and its retention                                                            |
| `config/server/admin.lua`     | no               | Who may use the staff dashboard, and what it shows                                          |
| `config/server/discord.lua`   | no               | Discord logging                                                                             |
| `config/server/locales.lua`   | no               | Every other word: the server's messages, the whole interface, the dashboard                 |

{% hint style="danger" %}
The two files directly in `config/` are downloaded by every player, who can read them. Never put a secret into them, such as a webhook URL. Everything in `config/server/` stays on the server.
{% endhint %}

## Blocks that are split over two files

Three blocks start in `config/config.lua` and continue in a server file, because the client needs one or two of their keys:

| Block             | In `config/config.lua`            | The rest                      |
| ----------------- | --------------------------------- | ----------------------------- |
| `Config.Branding` | `Name`                            | `config/server/interface.lua` |
| `Config.Security` | `RecheckDistance`, `RecheckSlack` | `config/server/server.lua`    |
| `Config.Admin`    | `Enabled`, `Key`                  | `config/server/admin.lua`     |

The names stay the same wherever a key is. `Config.Bank.RetainPercent` is `Config.Bank.RetainPercent`, whichever file it is in.

## The maths

The settings in `config/server/symbols.lua`, `config/server/payouts.lua` and `config/server/features.lua` change the game's return. The shipped values are tuned to about 95.5% return to player with a maximum win of 10,000 times the bet.

{% hint style="warning" %}
Do not edit these casually. A small change to a symbol weight or a chest reward can move the return by many points in either direction. Each block carries a comment that says what it does to the return.
{% endhint %}

The settings with the largest effect, in rough order:

| Setting                                              | Effect                                                            |
| ---------------------------------------------------- | ----------------------------------------------------------------- |
| `Config.Treasure.RewardScale`                        | The master dial for the return                                    |
| `Config.Treasure.Rewards`, the tier 3 crimson weight | Makes the 10,000x win reachable but rare                          |
| `Config.Ground.PersistInBaseGame`                    | Large increase. A layer dug over many rounds opens the big chests |
| `Config.FreeSpins.*.GroundPersists`                  | Large decrease when turned off                                    |
| `Config.Ground.InitialCoverage`                      | Below 1.0 makes every chest easier                                |
| `Config.Symbols` weights                             | A lopsided reel inflates the return badly                         |
| `Config.Multiplier.Max`                              | The meter compounds across a feature                              |

`Config.Bonus.DetonateOnLanding` is not a tuning dial. Setting it to `false` switches the whole feature economy off.

If you want a fixed share for the house whatever the maths does, use the [House bank](/organized-chaos-docs/the-lost-treasure/house-bank.md) instead of changing the odds.
