> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-boxing-and-fight-club/cas-boxing/configuration.md).

# Configuration

CAS Boxing configuration for RedM: general settings, betting limits and house book, bout rules, arenas, house fighters, tournaments and ranking in shared/config.lua.

Everything is in `shared/config.lua`. Every setting is commented in the file; these are the ones most servers change.

## General

| Setting             | Default    | Meaning                                                    |
| ------------------- | ---------- | ---------------------------------------------------------- |
| `Config.Locale`     | `'en'`     | Language file in `locales/`                                |
| `Config.Framework`  | `'auto'`   | `'auto'`, `'vorp'`, `'rsg'` or `'standalone'`              |
| `Config.Command`    | `'boxing'` | Chat command that opens the menu                           |
| `Config.Commission` | `0.05`     | House share of wager pots, bet pools and tournament prizes |

## Betting

| Setting                       | Default             | Meaning                                                                      |
| ----------------------------- | ------------------- | ---------------------------------------------------------------------------- |
| `Config.BetLimits`            | `1` – `500`         | Smallest and largest bet                                                     |
| `Config.BettingWindowSeconds` | `45`                | How long bets are taken before the first bell                                |
| `Config.BetOnNpcFights`       | `true`              | Allow bets on fights against house fighters                                  |
| `Config.HouseBook`            | `true`, stake `100` | The house puts its own money on both sides, so a single bettor can still win |

## Bouts

| Setting                       | Default            | Meaning                                                  |
| ----------------------------- | ------------------ | -------------------------------------------------------- |
| `Config.WagerLimits`          | per currency       | Smallest / largest wager and its step                    |
| `Config.RoundDurations`       | `60, 90, 120, 180` | Round lengths players can pick (seconds)                 |
| `Config.MaxRounds`            | `12`               | Most rounds a bout can have                              |
| `Config.ChallengeMaxDistance` | `250.0`            | How far away a player can be challenged (`0` = anywhere) |
| `Config.ArenaTravel`          | `'teleport'`       | `'teleport'` fighters to their corners, or `'walk'`      |
| `Config.RingOutSeconds`       | `6`                | Seconds outside the ropes before a fighter forfeits      |

Combat balance (damage, stamina, knockdowns, house fighter strength) is in `Config.Combat`.

## Arenas

The Fight Club ring is added automatically when **CAS Fight Club** runs (its booking fee is `Config.FightClub.ringFee`). For rings of your own, add entries to `Config.Arenas`:

```lua
Config.Arenas = {
    {
        id = 'valentine', name = 'Valentine Ring', location = 'Valentine, New Hanover', ringFee = 10,
        center = vector3(x, y, z),          -- middle of the ring, at floor level
        radius = 3.3,                       -- half the width inside the ropes
        cornerRed = vector4(x, y, z, heading),
        cornerBlue = vector4(x, y, z, heading),
        spectatorCam = vector3(x, y, z),    -- where spectators watch from
    },
}
```

{% hint style="warning" %}
Do not place a ring inside a safezone that disables melee or gives godmode: punches would do nothing there.
{% endhint %}

## House fighters

`Config.NpcBoxers` lists the NPCs players can fight: name, nickname, `difficulty` (`'amateur'`, `'fighter'`, `'veteran'`, `'champion'`), ped model, entry fee, reward and skill (`0.3` easy – `0.8` very hard).

## Tournaments

`Config.Tournaments` lists the brackets (name, arena, size 4 / 8 / 16, entry fee, currency). With `Config.Tournament.fillWithNpcs = true`, empty slots are filled with house fighters.

## Ranking

`Config.Rating` (starting rating and how fast it moves) and `Config.Divisions` (the rating each division starts at).
