> For the complete documentation index, see [llms.txt](https://docs.rainmad.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rainmad.com/resources/chopshop-with-welding-minigame/configuration.md).

# Configuration

Everything lives in `rm_chopshop/cfg.lua` and the three files under `rm_chopshop/data/` (all open, comments included).

## Locale & bridges

```lua
cfg.locale = 'en'            -- locales/<locale>.json
cfg.bridge = {
    framework    = 'auto',   -- 'auto' | 'qb' | 'esx'
    target       = 'auto',   -- 'auto' | 'ox_target' | 'qb-target' | false
    minigame     = 'ox_lib', -- key-copy skill check; false = no check
    notification = 'ox_lib',
    textUI       = 'ox_lib',
    vehiclelock  = 'auto',   -- gives the player keys to the job vehicle
    dispatch     = false,    -- police alerts; see bridge/dispatch/ for adapters
}
```

Every value is the name of an open adapter file under `rm_chopshop/bridge/<category>/`; the annotations in `cfg.lua` list the full set. `'auto'` picks the first matching resource that is running, `false` disables the category (with `target = false` the NPC uses a keypress prompt instead). Copy an adapter to integrate a resource we don't cover.

## Police & black money

```lua
cfg.police = {
    requiredCount = 0,    -- minimum on-duty police to start a job; 0 disables
    jobs = { 'police', 'sasp', 'bcso', 'sheriff' },
    countMethod = 'fast', -- 'fast' = event-cached; 'scan' = iterate players
}

cfg.blackMoney = {
    type = 'item',         -- 'item' | 'account' | 'markedbills'
    item = 'black_money',
    account = 'black_money',
    metadataKey = 'worth', -- 'markedbills': metadata key holding a bill's value
}
```

`cfg.blackMoney` decides what `moneyType = 'black_money'` means in the price files: a plain item whose count is the value, a framework account, or marked-bill items whose value sits in metadata (change is given back automatically).

## Gameplay

```lua
cfg.vehicleStealDispatchChance = 100    -- % chance to alert police when the keys are taken
cfg.vehicleChoppingDispatchChance = 100 -- % chance when dismantling starts

cfg.hintBlipRadius = 150.0   -- search radius drawn around the target vehicle
cfg.weldingSpeed = 0.03      -- cutting progress per frame while welding
cfg.tireRemovalDuration = 20 -- seconds per wheel
cfg.weldingDistance = 0.6    -- how close the weld tip must be to the panel

cfg.cooldowns = {
    cancel = 2, -- minutes after cancelling a job
    player = 0, -- minutes between jobs per player
    global = 0, -- minutes between jobs server-wide
}

cfg.enableMultiplePersonDisassembly = true
cfg.disassemblyTimeLimit = 10 -- minutes to finish after parking; the job cancels when it runs out
cfg.serversideSpawn = false   -- spawn the job vehicle server-side instead of via the taker's client
```

## Job hours

```lua
cfg.hourCheck = function()
    local hour = GetClockHours()
    if hour < 5 or hour >= 22 then
        return true
    else
        return false, 'You can only get work at night, try again later', 'fa-solid fa-moon'
    end
end
```

Optional; return `false` plus a text and an icon to disable the job option in the menu. Keep it `false` to allow jobs around the clock.

## Extra rewards

```lua
cfg.extraRewards = {
    money = { chance = 50, amount = { 100, 1000 }, type = 'cash' }, -- 'cash' | 'black_money'
    items = {
        ['goldbar'] = { chance = 50, amount = { 1, 10 } },
    },
}
```

Handed out with the collected parts when the job finishes. `amount` is a number or a `{ min, max }` range.

## Data files

* **`data/coords.lua`**: the mission NPCs (model, coords, blip), the chop locations (vehicle spot + parts rack) and every vehicle/key location pair. Add as many as you like; each active job occupies one vehicle location.
* **`data/vehicles.lua`**: the model pool the job vehicle is picked from.
* **`data/prices.lua`**: the buy menu (`cfg.buy`) and the sell/trade menu (`cfg.sell`). A sell entry with a `price` can be sold, one with `tradeItems` can be traded, and both at once offers the choice; drop either field to hide that option. Any `moneyType` accepts `'cash'` or `'black_money'`.

## Parts & carry props

`cfg.vehicleParts` maps the ten stock parts (4 doors, hood, trunk, 4 wheels) to their bones, payout items and carry props; `cfg.carryTypes` holds the prop models and attach offsets. Rewire them only if you know what the bones mean: a wrong bone makes its part unmarkable.
