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

# Configuration

Every option in the Quicks config.lua, with its default.

All options are in `config.lua`. Restart the resource after a change: `restart quicks`.

## Language

| Option          | Default | Meaning                                                    |
| --------------- | ------- | ---------------------------------------------------------- |
| `Config.Locale` | `'en'`  | Language, `'en'` or `'de'`. The texts are in `locales.lua` |

## Tables

| Option                  | Default                                                     | Meaning                                                                                                                                        |
| ----------------------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `Config.Tables`         | one table on Legion Square                                  | Fixed tables. `coords` is the centre on the ground, `heading` the way it faces                                                                 |
| `Config.SnapToGround`   | `true`                                                      | Put the table on the ground under `coords` instead of exactly at its height                                                                    |
| `Config.RenderDistance` | `45.0`                                                      | Metres from which a table, its chairs and the dice are drawn                                                                                   |
| `Config.Label`          | `false`                                                     | Text over the table for players standing close. Off by default because it is drawn every frame                                                 |
| `Config.Blip`           | `{ enabled = true, sprite = 680, colour = 3, scale = 0.8 }` | Map blip for every table                                                                                                                       |
| `Config.Marker`         | `enabled = false`                                           | Marker over free chairs, with `type`, `scale`, `height` and `colour` (red, green, blue, alpha). Off by default because it is drawn every frame |
| `Config.SeatDistance`   | `1.2`                                                       | Metres from a free chair at which sitting down is offered                                                                                      |
| `Config.SitScenario`    | `'PROP_HUMAN_SEAT_CHAIR_MP_PLAYER'`                         | How a seated player sits                                                                                                                       |
| `Config.SitOffsetZ`     | `0.5`                                                       | How far above the ground a seated player's hips are. Change it if the ped sits too high or too low                                             |
| `Config.WatchDistance`  | `3.5`                                                       | Metres from the table's centre within which a game can be watched                                                                              |
| `Config.Camera`         | `true`                                                      | The camera over the table for seated players. `false` for none                                                                                 |
| `Config.CameraFov`      | `45.0`                                                      | Its field of view                                                                                                                              |

Blip sprites and colours are listed in the [FiveM blips reference](https://docs.fivem.net/docs/game-references/blips/), marker types in the [markers reference](https://docs.fivem.net/docs/game-references/markers/).

## Rules

| Option                 | Default | Meaning                                                                                 |
| ---------------------- | ------- | --------------------------------------------------------------------------------------- |
| `Config.MinPlayers`    | `1`     | How many players are needed to start, 1 to 4. With 1 a player can fill in a sheet alone |
| `Config.LockAt`        | `5`     | Crosses a row needs before its last number, and with it the lock, may be crossed        |
| `Config.LockedRows`    | `2`     | Locked rows that end the game                                                           |
| `Config.Penalties`     | `4`     | Penalties of one player that end the game                                               |
| `Config.PenaltyPoints` | `5`     | Points a penalty costs                                                                  |

See [Rules](/organized-chaos-docs/quicks/rules.md) for how these play out.

## Turn timer

| Option                | Default              | Meaning                                                                                                                |
| --------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `Config.TurnTime`     | `30`                 | Seconds for each step of a turn a table starts out with: the throw, the white dice, the coloured die. `0` for no limit |
| `Config.TurnTimes`    | `{ 15, 30, 45, 60 }` | The times on offer in the lobby. `{}` leaves it at `Config.TurnTime`                                                   |
| `Config.TimerWarning` | `5`                  | Seconds left from which the clock turns red and pulses                                                                 |

## Computer players

| Option               | Default                           | Meaning                                                                           |
| -------------------- | --------------------------------- | --------------------------------------------------------------------------------- |
| `Config.Bots`        | `true`                            | Allow computer players                                                            |
| `Config.BotDelay`    | `{ 1000, 2200 }`                  | Thinking time before the computer throws or decides, in milliseconds, from and to |
| `Config.BotLevel`    | `2`                               | Strength of a newly added computer. 1 easy, 2 medium, 3 hard                      |
| `Config.BotStep`     | `1800`                            | Milliseconds after a throw before the computer does anything with it              |
| `Config.BotPeds`     | four business peds                | The peds that sit in for the computers, by seat. `{}` leaves the chairs empty     |
| `Config.BotScenario` | `'PROP_HUMAN_SEAT_CHAIR_UPRIGHT'` | How those peds sit                                                                |

{% hint style="info" %}
Keep `Config.BotStep` at least one second longer than the `time` in `Config.ShakeAnim`. Otherwise the computer goes on before the dice have landed on the table.
{% endhint %}

## Leaderboard and reactions

| Option                    | Default     | Meaning                                                             |
| ------------------------- | ----------- | ------------------------------------------------------------------- |
| `Config.Stats`            | `true`      | Records and the leaderboard. Needs `oxmysql`                        |
| `Config.LeaderboardSize`  | `10`        | How many of the best games the leaderboard shows                    |
| `Config.Reactions`        | six entries | The reactions a seated player can click. Up to eight, `{}` for none |
| `Config.ReactionCooldown` | `2000`      | Milliseconds a player has to wait before the next one               |

## Connection, sound and animation

| Option                 | Default                                                     | Meaning                                                                                                          |
| ---------------------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `Config.ReconnectTime` | `120`                                                       | Seconds a seat is kept after a lost connection. `0` drops the player at once                                     |
| `Config.Sounds`        | `true`                                                      | Sounds of the dice for players near a table                                                                      |
| `Config.SoundDistance` | `12.0`                                                      | How far those sounds carry, in metres                                                                            |
| `Config.DefaultVolume` | `0.7`                                                       | Volume from 0 to 1 for players who have not set their own yet                                                    |
| `Config.ShakeAnim`     | an animation with `dict`, `name` and `time`                 | How the cup is shaken, and how long in milliseconds the dice stay in it. `false` uses `Config.ReachAnim` instead |
| `Config.ReachAnim`     | `{ dict = 'mp_common', name = 'givetake1_a', time = 1200 }` | A short reach over the table, used when the cup is not shaken. `false` for nothing at all                        |
| `Config.CupInHand`     | `{ bone = 28422, pos = ..., rot = ... }`                    | Where the cup sits in the hand while it is shaken. `false` leaves it on the table                                |

## Framework and stake

| Option                | Default                 | Meaning                                                                                                                   |
| --------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `Config.Framework`    | `'auto'`                | Where names and money come from. `'auto'`, `'qbx'`, `'qb'`, `'esx'`, `'ox_inventory'`, `'none'`, or functions of your own |
| `Config.BuyIn`        | `0`                     | Stake per player a table starts out with. `0` plays for nothing                                                           |
| `Config.BuyIns`       | `{ 0, 100, 500, 1000 }` | The stakes on offer in the lobby. `{}` leaves it at `Config.BuyIn`                                                        |
| `Config.BuyInDelay`   | `5`                     | Seconds a game cannot begin after the stake was changed                                                                   |
| `Config.BuyInAccount` | `'money'`               | The account the stake comes from, `'money'` (cash) or `'bank'`                                                            |

For a framework that is not on the list, give your own functions. Each takes the player's server id:

```lua
Config.Framework = {
    name = function(src) return ... end,              -- optional
    balance = function(src) return ... end,
    remove = function(src, amount) ... return true end,
    add = function(src, amount) ... return true end,
}
```

## Keys and messages

| Option               | Default                                               | Meaning                                                                                                                                           |
| -------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Config.KeyInteract` | `38` (E)                                              | Sit down, open the board                                                                                                                          |
| `Config.KeyStandUp`  | `73` (X)                                              | Stand up                                                                                                                                          |
| `Config.KeyWatch`    | `47` (G)                                              | Watch a game from beside the table                                                                                                                |
| `Config.KeyCamera`   | `26` (C)                                              | Switch the camera over the table                                                                                                                  |
| `Config.Keys`        | `roll = ' '`, `cross = 'Enter'`, `pass = 'Backspace'` | The keys of the board, as the browser names them: throw, cross, let the dice be. `' '` is the space bar, letters are lower case. `false` for none |
| `Config.Notify`      | `'gta'`                                               | Where messages go while the board is closed. `'gta'`, `'esx'`, `'qb'`, `'ox'`, or a `function(text)` of your own                                  |
| `Config.Target`      | `true`                                                | Offer sitting down and watching through `ox_target` if it is running                                                                              |

The four world keys are FiveM control ids, listed in the [FiveM controls reference](https://docs.fivem.net/docs/game-references/controls/).

## Commands

| Option                 | Default           | Meaning                                                    |
| ---------------------- | ----------------- | ---------------------------------------------------------- |
| `Config.CommandPlace`  | `'quicks_place'`  | The admin command that puts up a table                     |
| `Config.CommandRemove` | `'quicks_remove'` | The admin command that takes the nearest placed table away |

## Table item

`Config.Item`: players put up tables themselves from an inventory item. What it does, and how to add the item to your inventory, is on the [Table item](/organized-chaos-docs/quicks/table-item.md) page.

| Option                            | Default                     | Meaning                                                                                                                                                            |
| --------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Enabled`                         | `true`                      | `false`: no item                                                                                                                                                   |
| `Name`                            | `'quicks_table'`            | The item's name                                                                                                                                                    |
| `Framework`                       | `'auto'`                    | `'auto'` (Qbox, QBCore, ESX, else ox\_inventory), `'esx'`, `'qb'`, `'qbx'`, `'ox'`, or `false` for an inventory of your own that calls `exports.quicks:placeTable` |
| `Remove`                          | `true`                      | The item leaves the inventory while the table stands, and comes back when it is picked up. `false`: it stays, as a licence to put up tables                        |
| `MaxPerPlayer`                    | `1`                         | Tables a player may have up at once. `0` for any number                                                                                                            |
| `Place.Distance`                  | `4.0`                       | Metres from the player the table may stand                                                                                                                         |
| `Place.Spacing`                   | `3.5`                       | Metres it has to keep from the middle of any other table                                                                                                           |
| `Place.Radius`, `Place.Slope`     | `1.1`, `0.3`                | The ground this far around has to be free, and may rise or fall this much                                                                                          |
| `Place.Turn`                      | `7.5`                       | Degrees one click of the mouse wheel turns the table                                                                                                               |
| `Place.Animation`, `Place.Time`   | `mini@repair`, `2500`       | What the player does while putting it up, and for how many milliseconds. `Animation = false` puts it up at once                                                    |
| `PickUp.Enabled`                  | `true`                      | `false`: tables cannot be picked up                                                                                                                                |
| `PickUp.Target`                   | `'ox_target'`               | "Pick up the table" on the table. `false`: only the command                                                                                                        |
| `PickUp.Command`                  | `'quicks_pickup'`           | Takes down the nearest such table in reach. `false` for none                                                                                                       |
| `PickUp.Icon`, `PickUp.Distance`  | `'fa-solid fa-hand'`, `2.5` | The option's icon, and the metres from the table it shows                                                                                                          |
| `PickUp.OwnOnly`                  | `true`                      | Only the player who put a table up can pick it up                                                                                                                  |
| `PickUp.Animation`, `PickUp.Time` | `mini@repair`, `1500`       | What the player does while taking it down, and for how long                                                                                                        |
