# Configuration

Every setting in config.lua.

## Configuration file

Everything is in `config.lua`. Restart `wd_rememberme` after changing it.

The resource checks a few limits when it starts. If a value is out of range, the server console shows an error and the resource stays unavailable until you fix it; the rules are listed with each setting below.

## Setup

| Setting | Default | What it does |
| --- | --- | --- |
| `Config.Framework` | `'auto'` | `'qbox'`, `'qb'` or `'esx'`. `auto` needs exactly one of them running |
| `Config.Appearance` | `'auto'` | Your appearance resource, or `auto`. Only used for a startup check; worn clothing is always read directly |
| `Config.UI` | `'builtin'` | `'builtin'` for the memory book, or `'ox_lib'` for ox_lib dialogs |
| `Config.Target` | `'none'` | `'none'`, `'ox_target'` or `'qb-target'` |
| `Config.Locale` | `'en'` | Language of everything players see: a file in `locales/`. See [Translations](#/docs/wd_rememberme/configuration?section=translations) |

## Commands and key

| Setting | Default | What it does |
| --- | --- | --- |
| `Config.Commands.remember` | `'remember'` | Command to remember or rename the person you are looking at. The built-in memory book shows this name in its hints |
| `Config.Commands.manage` | `'memories'` | Command to open the memory book |
| `Config.RevealKey` | `'LMENU'` | Default hold-to-reveal key (Left Alt) |

`RevealKey` is only the default. FiveM saves each player's own key binding, so changing it later does not affect players who have already joined. They can rebind it under **Settings → Key Bindings → FiveM**.

## Distances

| Setting | Default | What it does |
| --- | --- | --- |
| `Config.RevealDistance` | `8.0` | Metres within which labels appear |
| `Config.InteractionDistance` | `2.5` | Metres within which `/remember` and the target option work. Must not be more than `RevealDistance` |
| `Config.IdCardDistance` | `3.0` | Metres between two players for the [ID card export](#/docs/wd_rememberme/exports?section=id-cards). Must not be more than `RevealDistance` |

## Labels

| Setting | Default | What it does |
| --- | --- | --- |
| `Config.MaxLabels` | `8` | Most labels shown at once, from 1 to 24. People nearest the middle of the screen come first |
| `Config.RefreshMs` | `1000` | Milliseconds between label updates from the server while the key is held. Minimum 500 |
| `Config.LabelTtlMs` | `1500` | Milliseconds a label is kept without an update. Must be at least `RefreshMs` |
| `Config.ProbeTimeoutMs` | `900` | Milliseconds to wait for the other player's clothing check. No answer in time counts as a covered face |

`Config.Label` sets how labels look:

| Setting | Default | What it does |
| --- | --- | --- |
| `scale` | `0.30` | Text size |
| `focusScale` | `0.37` | Text size of the highlighted person, nearest the middle of the screen |
| `height` | `0.30` | Metres above the head |
| `color` | `{ 230, 235, 243, 235 }` | Text colour as red, green, blue, opacity (0–255) |
| `focusColor` | `{ 255, 195, 100, 255 }` | Colour of the highlighted person |
| `crowdSpacing` | `0.035` | How far overlapping labels move up, so they never cover a face |

## Limits

| Setting | Default | What it does |
| --- | --- | --- |
| `Config.Input.alias` | `64` | Longest alias, in characters. Maximum 64 |
| `Config.Input.note` | `500` | Longest note, in characters. Maximum 500 |
| `Config.MaxRecords` | `500` | Most people one character can remember |
| `Config.RateLimit.capacity` | `10` | Requests a player can make in a burst |
| `Config.RateLimit.refillPerSecond` | `4` | Requests per second a player regains after a burst |

Limits count characters, not bytes, so an accented letter or most emoji count as one. Lowering a limit does not shorten anything already saved; the next edit must fit the new limit.

## Masks and clothing

`Config.Masks` and `Config.ClothingRules` decide which clothing hides a face. See [Masks & disguises](#/docs/wd_rememberme/clothing).

## Translations

Everything players see comes from `locales/en.lua`: notifications, overhead labels, ox_lib dialogs, the target option, the key binding name and the built-in memory book (the `ui` table). To add a language:

1. Copy `locales/en.lua` to `locales/<code>.lua`, for example `locales/fr.lua`.
2. Change `Locales.en = {` at the top to `Locales.fr = {`, and set `lang = 'fr'` inside the `ui` table.
3. Translate the text on the right of each `=`. Keep placeholders such as `%s`, `%d`, `%.1f` and `{command}` exactly once each, in the same order.
4. Set `Config.Locale = 'fr'` and restart `wd_rememberme`.

```lua config.lua
Config.Locale = 'fr' -- loads locales/fr.lua
```

Phrases you leave out fall back to English, so a partial translation is safe. If `Config.Locale` names a file that does not exist, the server console shows `Unknown Config.Locale: add locales/fr.lua` and the resource stays unavailable until you fix it.

- **Overhead labels** are drawn by GTA, so do not use `~` in `labelCovered` or `labelUnknown`.
- **ID cards.** `idCard` and `idDob` are written into notes when the [ID card export](#/docs/wd_rememberme/exports?section=id-cards) runs. Changing them later does not rewrite notes that already exist.
- **Key binding name.** FiveM stores `keyMapping` when a player first joins, so a new translation may not show for players who already have the binding.

Console messages for server owners are always in English.

## Files you can edit

The resource is protected by FiveM asset escrow. These files stay open so you can adapt it to your server:

| File | Use it to |
| --- | --- |
| `config.lua` | Change every setting on this page |
| `locales/*.lua` | Translate or reword everything players see. See [Translations](#/docs/wd_rememberme/configuration?section=translations) |
| `shared/locale.lua` | Change how phrases are looked up and fall back to English |
| `bridge/server.lua` | Change how a character is identified, for a custom multicharacter |
| `bridge/appearance_server.lua` | Check clothing from your own server-side outfit data. See [Privacy & limits](#/docs/wd_rememberme/privacy?section=server-side-clothing-checks) |
| `bridge/appearance_client.lua`, `bridge/ui_client.lua` | Adjust the appearance and ox_lib integrations |
| `client/targets.lua` | Change the target menu option |
| `shared/recognition.lua` | Change how masks and clothing rules are combined |
