# Configuration

Main configuration file: `config.lua`

## Core options

* `Config.Framework` - framework mode. Use `auto`, `qbox`, `qbcore`, or `esx`.
* `Config.JobName` - job name required for tow driver features.
* `Config.Debug` - prints extra console messages when enabled.

## Depot

* `Config.Ped` - depot worker model, location, and scenario.
* `Config.PedBlip` - map blip for the tow depot.
* `Config.RentalSpawnCoords` - where rental tow trucks spawn.
* `Config.RentalReturnZone` - where rental tow trucks must be parked for deposit refunds.

## Rentals

`Config.RentalTrucks` defines the tow trucks drivers can rent.

```lua
Config.RentalTrucks = {
    [1] = { model = 'towtruck', deposit = 500, minLevel = 1 },
    [2] = { model = 'towtruck2', deposit = 1200, minLevel = 10 },
    [3] = { model = 'flatbed', deposit = 2500, minLevel = 25 },
}
```

* `model` - vehicle model to spawn.
* `deposit` - bank money held until the truck is returned.
* `minLevel` - tow level needed to rent this truck.

`Config.RentalFuelLevel` sets the fuel amount on spawned rental trucks.

## Fuel and vehicle keys

* `Config.Fuel = 'auto'` tries common fuel resources.
* Set `Config.Fuel = false` if you don't have a fuel resource.
* `Config.VehicleKeys.System = 'auto'` tries supported key resources.
* Set `Config.VehicleKeys = false` if you don't use vehicle keys.

Supported vehicle key resources:

* `qbx_vehiclekeys`
* `qb-vehiclekeys`
* `Renewed-Vehiclekeys`
* `qs-vehiclekeys`
* `cd_garage`
* `wasabi_carlock`
* `wasabi-carlock`

## XP and rewards

* `Config.MaxLevel` - highest tow level.
* `Config.XPPerLevel` - base XP needed per level.
* `Config.XPMultiplier` - level curve multiplier.
* `Config.CategoryRewards` - main payout and XP setup by vehicle category.
* `Config.PayoutPerKm` / `Config.XPPerKm` - extra reward based on route length.
* `Config.LevelPayoutBonus` - extra payout per driver level.

Reward priority:

1. `Config.VehicleRewards` used if you want specific vehicles to have specific payouts.
2. `Config.CategoryRewards` rewards per vehicle category.

Vehicle-specific rewards are optional, example:

```lua
Config.VehicleRewards = {
    adder = { payout = 700, xp = 100 },
    sultan = { payout = 325, xp = 60 },
}
```

## Vehicle unlocks

`Config.UseCategories = true` unlocks vehicle categories by level. On ESX, the categories come from `Config.ESXVehicles`.

```lua
Config.CategoryLevelTiers = {
    [1] = { 'compacts', 'sedans', 'suvs' },
    [5] = { 'coupes', 'muscle' },
}
```

`Config.UseCategories = false` unlocks exact vehicle models by level. On ESX, those models still need to exist in `Config.ESXVehicles`.

```lua
Config.VehicleLevelTiers = {
    [1] = { 'asea', 'premier' },
    [5] = { 'sultan' },
}
```

Use `Config.VehicleBlacklist` for vehicles that should never be selected for NPC tow jobs.

## ESX vehicles

ESX does not provide the same shared vehicle catalog as Qbox/QB-Core. Use `Config.ESXVehicles` to list vehicles that can be used for NPC tow jobs.

## NPC tow jobs

* `Config.PickupLocations` - where broken vehicles can spawn.
* `Config.CustomerPedModels` - random customer NPC models.
* `Config.NpcHomeDeliverySpots` - possible home delivery spots.
* `Config.GasStationSpots` - destinations for out of gas jobs.
* `Config.DropOffZone` - default depot drop-off area.
* `Config.NpcJobOfferDelay` - delay before queued drivers receive an NPC job offer.
* `Config.QueueCheckInterval` - how often the server checks queued drivers.

Drivers must talk to the customer before towing the vehicle. The customer will get in the tow truck when the driver enters the drivers seat of the tow truck.

## Player tow requests

* `Config.PlayerRequestCooldownSeconds` - cooldown between tow requests from the same player.
* `Config.MechanicDestinations` - mechanic destinations players can choose in the LS Tow app. NPC tow jobs can also use these shops as delivery destinations.

Players can send a tow request from the tablet app. On-duty tow drivers see the request, send a quote, and the requester can accept, decline, or pay by cash/bank.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://w-labs.gitbook.io/w-labs-docs/scripts/wlabs-towing/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
