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

# Configuration

Player settings are changed in the in-game menu, not in config. `config.lua` only holds the command name, zone and street timings, and text strings.

### Where everything else is set

| File                     | What it controls                                                                          |
| ------------------------ | ----------------------------------------------------------------------------------------- |
| `shared/settings.lua`    | The defaults a new player starts with, and the schema the server validates saves against. |
| `client/main.lua`        | Spawn and ready checks, sample rates, and when the HUD hides.                             |
| `server/main.lua`        | Table name, identifier type, and save and load cooldowns.                                 |
| `html/script.js`         | Compass behaviour: `SIMPLE_POINTS`, `SIMPLE_SLIDE`, strip width and smoothing.            |
| `html/style.css` `:root` | Palette, corner radii, sizes and positions.                                               |

### When the HUD shows

Nothing is drawn until the player is fully spawned and in control. It hides again whenever that stops being true, such as during character selection, spawn cameras, player switches, screen fades or loading. These checks are the `SPAWN_NEEDS_*` constants at the top of `client/main.lua`.

If you freeze players, for example for jail or scenes, and still want the HUD, set `SPAWN_NEEDS_UNFROZEN` to `false`.

### Security

Every save is validated on the server against `SBSettings.Schema`. Unknown keys are dropped and bad values reset to defaults. Saves are rate limited, and database loads are cached and throttled.
