> ## Documentation Index
> Fetch the complete documentation index at: https://rust-co.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration

> Everything you can change in config/config.lua, explained in plain words.

All settings live in one file: `rco-vehicles/config/config.lua`. Open it with any text editor (Notepad works, VS Code is nicer).

<Tip>
  Only change what comes after the `=` sign. Keep the quotes `'...'`, the commas and the brackets exactly as they are. After saving, restart the server.
</Tip>

## The basics

| Setting | What it does | Default |
| - | - | - |
| `Config.Locale` | Language of the menus: `'en'` or `'pt-br'` | `'en'` |
| `Config.StoreName` | Your shop's name, shown at the top of every menu | `'Rust & Co.'` |
| `Config.Framework` | Leave `'auto'`. Only write `'rsg'` or `'vorp'` if the script guesses wrong | `'auto'` |
| `Config.Debug` | Help mode for setting up (see [Placing dealers and garages](#placing-dealers-and-garages)). Turn it off before opening to players | `false` |

### Another language

Copy `locales/en.json`, translate the texts on the right side of each line, save it as for example `locales/es.json` and set `Config.Locale = 'es'`. Anything you didn't translate shows in English.

## Money and limits

| Setting | What it does | Default |
| - | - | - |
| `Config.MoneyAccount` | Which money pays for vehicles. RSG: `'cash'`, `'bank'`, `'gold'` or another money type of your server. VORP: `'cash'` or `'gold'` | `'cash'` |
| `Config.MaxVehicles` | How many vehicles one character can own | `10` |
| `Config.MovePrice` | Price to bring a vehicle from another town's garage. `0` = free | `1` |

## Prices

Every RCO vehicle already has its own price. You only touch this list to **change** a price:

```lua theme={"dark"}
Config.Prices = {
    wanderer = 25,    -- the vehicle's name = the new price
}
```

The vehicle's name is the name of the model (the Wanderer bicycle is `wanderer`). A vehicle that is not in this list keeps its own price.

## Keys and distances

| Setting | What it does | Default |
| - | - | - |
| `Config.OpenKey` | Key to open a dealer or garage, on foot | **J** |
| `Config.StoreKey` | Key to put away the vehicle you are riding, at a garage | **R** |
| `Config.InteractDistance` | How close (metres) a player must stand to a dealer or garage spot | `2.0` |
| `Config.StoreDistance` | How close (metres) the vehicle must be to the garage spot to be put away | `15.0` |
| `Config.TransferDistance` | How close (metres) the other player must be to receive a vehicle | `5.0` |

<Note>
  Keys are written as the game's control codes (like `0xF3830D8E`), not as letters. Only change them if you know the code of the key you want. The store key has to be one the game reads while riding a vehicle: J, for example, does not work on a vehicle.
</Note>

## Garages

Each garage is a block like this:

```lua theme={"dark"}
valentine = {
    label = 'Valentine',
    coords = vector3(-179.53, 648.90, 113.58),
    spawn = vector4(-179.87, 653.14, 113.65, 136.06),
    blip = true,
},
```

| Line | What it means |
| - | - |
| `valentine` | The garage's short name. Lowercase, no spaces |
| `label` | The name players see |
| `coords` | Where the player stands to open the garage |
| `spawn` | Where the vehicle appears when it's taken out. The last number is the direction it faces |
| `blip` | `true` shows the garage on the map, `false` hides it |

Pick a `spawn` spot with about 6 metres of free space around it and nothing low overhead: the garage menu shows the vehicle there with the camera going around it.

<Warning>
  Every vehicle remembers the **short name** of its garage. If you rename `valentine` to something else, the vehicles kept there are lost from it. To add a garage, add a new block with a new short name instead.
</Warning>

It comes with seven garages: Saint Denis, Rhodes, Valentine, Annesburg, Blackwater, Strawberry and Armadillo.

## Dealers

Dealers work like garages, with a few more lines:

| Line | What it means |
| - | - |
| `label` | The name players see |
| `coords` | Where the player stands to open the dealer |
| `range` | How close (metres) to `coords` it opens. Leave it out to use `Config.InteractDistance` |
| `preview` | Where the vehicle on show stands while the player browses |
| `npc` | The clerk (a game character model). Remove the line for no clerk |
| `chair` | Optional: the chair the clerk sits on. Without it, the clerk looks for a seat nearby |
| `garage` | The garage (short name) that keeps the vehicles bought here |
| `delivery` | Where the new vehicle is handed over right after the purchase. Remove the line to hand it over at the garage instead |
| `categories` | Which kinds of vehicle are sold here, for example `{ 'bicycle' }`. `nil` sells everything |
| `blip` | `true` shows the dealer on the map |
| `lift` | Only for the Saint Denis shop that comes with the resource: the vehicle on show rises on a platform. Don't copy it to other dealers |

Heights are fixed to the ground by the script, so a `z` that is a metre off is fine. The exception is the Saint Denis dealer: its `preview` must stay exact, because it is the top of the platform.

## Placing dealers and garages

The easy way to get the numbers for a new spot:

<Steps>
  <Step title="Turn on help mode">
    Set `Config.Debug = true` and restart the server.
  </Step>

  <Step title="Stand on the spot">
    Go in the game to where the garage (or the vehicle) should be, facing the direction you want.
  </Step>

  <Step title="Copy your position">
    Type `/vehicles_here` in the chat, open the F8 console and copy the line it shows into the config.
  </Step>

  <Step title="Turn help mode off">
    Set `Config.Debug = false` again before opening the server to players.
  </Step>
</Steps>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.