> For the complete documentation index, see [llms.txt](https://docs.cuxial.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cuxial.com/scripts/vehicles/cuxial-chipeo/configuration.md).

# Configuration

Every option of Cuxial Chipeo explained: items, audio, overheating, cabin pressure, speakers, workshop and staff.

Everything you can adjust lives in `shared/config.lua`. Restart the resource after any change.

## Test mode

| Option  | Type    | Default | What it does                                                                                                                                                                                                                                                                                                                                                                          |
| ------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `debug` | boolean | `false` | `true` = test mode for staff: players with the `admin.permission` permission need no item, owner check, job or material, nothing is taken from or given to their inventory, the library offers them virtual USB sticks and they get the test commands listed in [Commands & permissions](/scripts/vehicles/cuxial-chipeo/commands.md#test-mode-commands). `false` = normal behaviour. |

## Interface · `ui`

| Option            | Type         | Default      | What it does                                                                                                                                                                       |
| ----------------- | ------------ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accent`          | string (hex) | configurable | Accent colour of the head unit.                                                                                                                                                    |
| `allowAccent`     | boolean      | `false`      | `true` lets each player pick their own colour in the settings tab. `false` hides that section and everyone uses `accent`.                                                          |
| `allowBackground` | boolean      | `true`       | `true` lets each player set an image or gif link as background of the head unit. `false` hides the section and ignores saved backgrounds.                                          |
| `allowAcoustics`  | boolean      | `false`      | `true` lets each player switch off 3D audio and occlusion for themselves. `false` hides both switches and the values of the `acoustics` block apply to everyone.                   |
| `cameraKey`       | string       | `'Alt'`      | Key that, while held with the head unit open, releases the mouse so the player can move the camera. Use the key name as the browser reports it: `'Alt'`, `'Control'`, `'Shift'`... |

## Opening the radio

| Option        | Type   | Default    | What it does                                                                                                                                                                 |
| ------------- | ------ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `command`     | string | `'chipeo'` | Command that opens and closes the head unit. `''` registers no command.                                                                                                      |
| `keybind`     | string | `'F4'`     | Default key for the same action. `''` registers no key. Each player can rebind it in the GTA key settings.                                                                   |
| `remoteRange` | number | `12.0`     | Metres. Outside the car, the owner or the installer can open the radio up to this distance. Also the maximum distance to a portable speaker to control the radio through it. |

## Items · `items`

| Option    | Type   | Default              | What it does                                                                                                                              |
| --------- | ------ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `install` | string | `'chipeo_radio'`     | Item that installs the equipment. It is consumed.                                                                                         |
| `unmount` | string | `'chipeo_unmount'`   | Item that removes the equipment. It is consumed, and the `install` item is given back.                                                    |
| `usb`     | table  | `usb_8` to `usb_128` | USB sticks: `item name = number of songs that fit`. Two sticks must not share the same capacity.                                          |
| `medusas` | table  | `{}`                 | Portable speakers: `item name = prop name`. Empty = no portable speakers. The props are not included; list only the ones your server has. |

Every item name used here needs its item in the inventory with the export `cuxial_chipeo.<item name>`. See [Installation](/scripts/vehicles/cuxial-chipeo/installation.md).

## Installing and removing · `install`

| Option             | Type    | Default | What it does                                                                                                                    |
| ------------------ | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `timeMs`           | number  | `5000`  | Duration of the installation progress bar, in milliseconds.                                                                     |
| `ownerOnly`        | boolean | `false` | `true` = only the owner of the vehicle can install. `false` = anyone with the item, on any vehicle.                             |
| `unmountTimeMs`    | number  | `5000`  | Duration of the removal progress bar, in milliseconds.                                                                          |
| `unmountOwnerOnly` | boolean | `true`  | `true` = only the owner of the vehicle or the player who installed the equipment can remove it. `false` = anyone with the item. |
| `range`            | number  | `4.0`   | Metres to the vehicle to install or remove from outside.                                                                        |

## Audio · `audio`

| Option            | Type      | Default                                  | What it does                                                                                                                          |
| ----------------- | --------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `defaultDistance` | number    | `10.0`                                   | Metres at which a vehicle is heard, for models not listed in `vehicles.distance`. It is the top of the range slider in the head unit. |
| `maxVolumeBoost`  | number    | `5.0`                                    | Top of the volume control for models not listed in `vehicles.volume`. `1.0` is normal volume.                                         |
| `proximityMs`     | number    | `250`                                    | Milliseconds between distance checks on each client while something is playing. Lower is smoother and costs more.                     |
| `maxBass`         | number    | `100`                                    | Scale of the bass control.                                                                                                            |
| `bassHz`          | table     | `min = 60`, `max = 200`, `default = 110` | Range and starting value of the subwoofer cut-off, in Hz.                                                                             |
| `maxPunch`        | number    | `100`                                    | Scale of the punch control.                                                                                                           |
| `eqBands`         | number\[] | `60, 170, 350, 1000, 3500, 10000`        | Centre frequency of each equalizer band, in Hz. The number of entries is the number of bands.                                         |
| `eqRangeDb`       | number    | `12`                                     | Each band moves between minus and plus this many dB.                                                                                  |
| `presetSlots`     | number    | `5`                                      | Equalizer presets each player can save.                                                                                               |

## Overheating · `overheat`

While a track plays with the bass at or above the threshold, the equipment heats up one point per second. When the counter reaches `seconds`, it fries.

| Option              | Type    | Default | What it does                                                           |
| ------------------- | ------- | ------- | ---------------------------------------------------------------------- |
| `enabled`           | boolean | `true`  | `false` disables overheating: the equipment never fries on its own.    |
| `seconds`           | number  | `15`    | Seconds with the bass above the threshold until the equipment fries.   |
| `bassThreshold`     | number  | `80`    | Bass level, from 0 to `audio.maxBass`, from which it heats up.         |
| `cooldownPerSecond` | number  | `2`     | Points the counter drops per second with the bass below the threshold. |
| `fireSeconds`       | number  | `20`    | Seconds the fire and smoke last.                                       |
| `damagedMaxVolume`  | number  | `1.0`   | Maximum volume while the equipment is fried.                           |
| `damagedMaxBass`    | number  | `20`    | Maximum bass while the equipment is fried.                             |

A fried system stays limited until it is repaired. See `mechanic` below.

## Cabin pressure · `pressure`

With every door, window and roof closed, the windows intact and the volume very high, pressure builds up until a window bursts.

| Option              | Type    | Default | What it does                                                                                                                                                           |
| ------------------- | ------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `enabled`           | boolean | `true`  | `false` disables it: windows never burst.                                                                                                                              |
| `volumeThreshold`   | number  | `0.7`   | Fraction of the vehicle's maximum volume from which pressure rises.                                                                                                    |
| `seconds`           | number  | `10`    | Size of the pressure meter. Pressure rises between 0.35 and 1.3 points per second depending on volume, bass and punch, and a window bursts when it reaches this value. |
| `cooldownPerSecond` | number  | `2`     | How much the pressure drops per second when the conditions are not met.                                                                                                |
| `breakCooldown`     | number  | `12`    | Seconds of grace after a window bursts.                                                                                                                                |

## Acoustics · `acoustics`

| Option          | Type    | Default | What it does                                                                                                                            |
| --------------- | ------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `spatial`       | boolean | `true`  | 3D audio: the sound comes from where the car is relative to the camera.                                                                 |
| `occlusion`     | boolean | `true`  | Walls and buildings between the player and the source muffle the sound. A car in a different interior than the player is fully muffled. |
| `occlusionRays` | number  | `3`     | Rays traced per source, from 1 to 3. More is finer and costs more.                                                                      |

With `ui.allowAcoustics = true` each player can switch `spatial` and `occlusion` off for themselves. They cannot switch on what is `false` here.

## Effects · `fx`

| Option     | Type  | Default                                              | What it does                                                                                                                                                                         |
| ---------- | ----- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `fire`     | table | trunk bone, `core` particles                         | Fire and smoke when the equipment fries: `bone`, particle dictionary `dict`, effect names `fire` and `smoke`, and their scales `fireScale` and `smokeScale`.                         |
| `sparkle`  | table | `minBass = 60`, `intervalMs = 700`                   | Sparks while the bass is at or above `minBass`, every `intervalMs` milliseconds: `dict`, `name`, `scale` and `bone`.                                                                 |
| `shake`    | table | `enabled = true`, `multiplier = 0.5`, `minBass = 40` | Camera vibration near a car with the bass at or above `minBass`. `enabled = false` turns it off; `multiplier` sets the strength.                                                     |
| `vehicles` | table | example list                                         | Per model: `fireBone` (a name or a list) and `sparkleBones` (a list), for vehicles whose audio equipment has its own bones. Models not listed use the bones of `fire` and `sparkle`. |

If a bone does not exist on a vehicle, the effect falls back to the trunk.

## Vehicles · `vehicles`

| Option      | Type      | Default      | What it does                                                                                            |
| ----------- | --------- | ------------ | ------------------------------------------------------------------------------------------------------- |
| `blacklist` | string\[] | bicycles     | Models that cannot receive equipment.                                                                   |
| `distance`  | table     | example list | `model name = metres`. Maximum range of the sound for that model. The rest use `audio.defaultDistance`. |
| `volume`    | table     | example list | `model name = maximum volume`. The rest use `audio.maxVolumeBoost`.                                     |

The models in `distance`, `volume` and `fx.vehicles` (`sultan` and `speedo`) are examples. Replace them with the spawn names of your own vehicles.

{% code title="shared/config.lua" %}

```lua
vehicles = {
    blacklist = { 'bmx', 'scorcher' },
    distance = { sultan = 20.0, speedo = 25.0 },
    volume = { sultan = 6.0, speedo = 7.0 },
},
```

{% endcode %}

## Portable speakers · `medusa`

| Option         | Type   | Default | What it does                                                                                                                                                                                                                          |
| -------------- | ------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pairRange`    | number | `15.0`  | Metres. When placed, the speaker pairs with the nearest vehicle with equipment inside this radius.                                                                                                                                    |
| `signalRange`  | number | `30.0`  | Metres. If the car moves further away, the speaker loses the signal and goes silent. It then tries to pair again with a car inside `pairRange`.                                                                                       |
| `distance`     | number | `12.0`  | Metres at which the speaker is heard.                                                                                                                                                                                                 |
| `maxPerPlayer` | number | `3`     | Speakers a player can have placed at once.                                                                                                                                                                                            |
| `cable`        | table  | enabled | Cable drawn between the speaker and the car. `enabled = false` hides it. `bone` and `offset` set where it starts on the prop, `vehicleBone` where it ends on the car, and `overrides` changes `bone` and `offset` for specific props. |

## Workshop · `mechanic`

| Option         | Type    | Default               | What it does                                                                                                           |
| -------------- | ------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `enabled`      | boolean | `true`                | `false` removes the repair command. Fried equipment can then only be fixed through the `SetDamaged` export.            |
| `command`      | string  | `'repairchipeo'`      | Command that repairs the equipment of the nearest vehicle.                                                             |
| `timeMs`       | number  | `30000`               | Duration of the repair progress bar, in milliseconds.                                                                  |
| `range`        | number  | `5.0`                 | Metres to the vehicle.                                                                                                 |
| `jobs`         | table   | `{ mechanic = true }` | Jobs allowed to repair: `job name = true`. Add the mechanic jobs of your server.                                       |
| `requirements` | table   | four materials        | Materials consumed by a repair. Each entry has `item`, `amount` and `label` (the name shown when the player lacks it). |

{% code title="shared/config.lua" %}

```lua
mechanic = {
    enabled = true,
    command = 'repairchipeo',
    timeMs = 30000,
    range = 5.0,
    jobs = { mechanic = true },
    requirements = {
        { item = 'chipeo_amp', amount = 1, label = 'Amplifier' },
        { item = 'chipeo_cables', amount = 2, label = 'Cables' },
    },
},
```

{% endcode %}

## Staff · `admin`

| Option         | Type   | Default             | What it does                                                                                                                                    |
| -------------- | ------ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `permission`   | string | `'admin'`           | Framework permission, checked through Cuxial Bridge, that identifies staff: it allows the staff commands, picking up any speaker and test mode. |
| `removeAll`    | string | `'removeallchipeo'` | Command that removes every placed speaker.                                                                                                      |
| `removeNearby` | string | `'removechipeo'`    | Command that removes the placed speakers around the staff member.                                                                               |
| `nearbyRadius` | number | `30.0`              | Radius of `removeNearby`, in metres.                                                                                                            |

## Library · `library`

| Option              | Type             | Default                                                   | What it does                                                                                                                                                                    |
| ------------------- | ---------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `autoNext`          | boolean          | `true`                                                    | `true` = when a song stored on the inserted USB ends, the next one on the stick plays, and after the last one it starts over. `false` = playback stops at the end of each song. |
| `maxNameLength`     | number           | `60`                                                      | Maximum length of a song name.                                                                                                                                                  |
| `maxUrlLength`      | number           | `500`                                                     | Maximum length of a link.                                                                                                                                                       |
| `allowedExtensions` | string\[] \| nil | `mp3`, `wav`, `ogg`, `m4a`, `aac`, `flac`, `opus`, `webm` | Extensions a link must end in. `nil` accepts any `https://` link.                                                                                                               |

{% hint style="info" %}
Only direct links to an audio file work. A link is accepted when it starts with `https://`, has no spaces or quotes and ends in one of the allowed extensions. The address of a video or streaming page is not an audio file.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cuxial.com/scripts/vehicles/cuxial-chipeo/configuration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
