> 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-gasstations/configuration.md).

# Configuration

Every block of shared/config.lua and data/stations.lua in Cuxial Gas Stations, with defaults and common changes.

Everything is set in `shared/config.lua`. The list of stations lives in `data/stations.lua`. Restart the resource after editing either file.

{% hint style="info" %}
Many values here are defaults that staff can override in game, per station or for all of them, from `/gasadmin` → **Upgrades**. A rule set there wins over this file. See [Rules](/scripts/vehicles/cuxial-gasstations/features.md#rules).
{% endhint %}

Money values are in whole currency units unless a row says otherwise. Distances are in metres.

## General

| Option                                | Type      | Default                        | What it does                                                                                                         |
| ------------------------------------- | --------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------- |
| `debug`                               | boolean   | `false`                        | Debug traces in the console. Also enabled with `setr cuxial_gasstations_debug 1`.                                    |
| `ui.accent`                           | string    | configurable                   | Accent colour of the interface, as a hex code.                                                                       |
| `ui.currency.symbol`                  | string    | `'$'`                          | Currency symbol shown in the interface.                                                                              |
| `ui.currency.locale`                  | string    | `'en-US'`                      | Number format of amounts. Use `'es-ES'` for 1.000,50.                                                                |
| `ui.mission.corner`                   | string    | `'top-right'`                  | Corner of the mission overlay: `'top-right'`, `'top-left'`, `'bottom-right'` or `'bottom-left'`.                     |
| `ui.mission.toggleKey`                | string    | `'F7'`                         | Default key that collapses the mission overlay.                                                                      |
| `logs.convar`                         | string    | `'cuxial_gasstations_webhook'` | Name of the convar that holds the Discord webhook.                                                                   |
| `limits.stationsPerPlayer`            | number    | `1`                            | Stations a player can own.                                                                                           |
| `limits.stationsEmployed`             | number    | `2`                            | Stations a player can work at as an employee at the same time.                                                       |
| `limits.jobs`                         | number    | `20`                           | Delivery jobs a station can have posted at once.                                                                     |
| `admin.command`                       | string    | `'gasadmin'`                   | Command that opens the admin panel.                                                                                  |
| `admin.ace`                           | string    | `'cuxial_gasstations.admin'`   | ACE that grants admin access.                                                                                        |
| `admin.permission`                    | string    | `'admin'`                      | Framework permission that also grants admin access.                                                                  |
| `fuelsEnabled`                        | boolean   | `true`                         | `false`: stations only handle `regular`; the other fuels and the chargers disappear.                                 |
| `renameEnabled`                       | boolean   | `true`                         | Lets the owner change the name, colour and icon of the blip.                                                         |
| `groupBlips`                          | boolean   | `true`                         | Groups the station blips into one category on the map.                                                               |
| `routeBlip`                           | table     | `{ sprite = 478, color = 5 }`  | Blip of the run route.                                                                                               |
| `plate.prefix`                        | string    | `'GS'`                         | Plate of run vehicles: prefix plus 6 digits.                                                                         |
| `blipColors`                          | number\[] | 16 colours                     | Blip colours the owner can choose from.                                                                              |
| `blipSprites`                         | number\[] | 13 icons                       | Blip icons the owner can choose from.                                                                                |
| `ledger.flushSeconds` / `flushAmount` | number    | `60` / `5000`                  | Wash income is written to the cash history in batches: every N seconds or when the pending amount passes this value. |

## Abandonment

| Option                | Type    | Default | What it does                                                 |
| --------------------- | ------- | ------- | ------------------------------------------------------------ |
| `abandon.enabled`     | boolean | `true`  | Stations with low stock are taken from their owner.          |
| `abandon.minStockPct` | number  | `30`    | Minimum total stock, as a percentage of the capacity.        |
| `abandon.hours`       | number  | `72`    | Hours in a row below the minimum before the station is lost. |

## Roles

`roles.actions` sets the minimum role for each action and `roles.pages` for each panel page. Roles go from 1 (basic) to 3 (full); 4 means owner only.

| Action                                       | Default | Allows                                                 |
| -------------------------------------------- | ------- | ------------------------------------------------------ |
| `contractImport`, `contractExport`           | `1`     | Start import and export contracts.                     |
| `loadBalance`                                | `1`     | Read the cash history.                                 |
| `fleetUse`                                   | `1`     | Take a detailing van out.                              |
| `spillClean`                                 | `1`     | Clean a fuel spill.                                    |
| `createJob`, `deleteJob`                     | `2`     | Post and delete delivery jobs.                         |
| `applyPrice`                                 | `2`     | Change pump prices.                                    |
| `unlockElectric`                             | `2`     | Pay to unlock the electric chargers.                   |
| `buyUpgrade`                                 | `2`     | Buy upgrades.                                          |
| `toggleBalance`                              | `2`     | Hide or show entries of the cash history.              |
| `washConfig`, `washJobs`                     | `2`     | Set wash services and post wash jobs.                  |
| `npcConfig`, `mobileConfig`                  | `2`     | Turn NPC customers and mobile detailing on or off.     |
| `rename`                                     | `3`     | Rename the station and change its blip.                |
| `deposit`, `withdraw`                        | `3`     | Move money in and out of the cash box.                 |
| `hire`, `fire`, `changeRole`, `commission`   | `3`     | Manage staff and pay manual commissions.               |
| `fleet`                                      | `3`     | Buy and sell fleet vehicles.                           |
| `rentalConfig`, `promos`, `commissionConfig` | `3`     | Rental settings, promotions and automatic commissions. |
| `notices`                                    | `3`     | Receive the station notices.                           |
| `sell`, `noticeConfig`                       | `4`     | Sell the station; change the notice settings.          |

Default pages: `summary` and `contracts` at 1; `goods`, `fleet`, `jobs`, `wash` and `upgrades` at 2; `employees`, `promos` and `bank` at 3.

## Fuels and station types

`fuels.petrol` and `fuels.electric` list the fuel ids. `types` holds one entry per kind of station; the default is `small`, and each station in `data/stations.lua` points to one with `type`.

| Option                      | Type      | Default                                     | What it does                                                                 |
| --------------------------- | --------- | ------------------------------------------- | ---------------------------------------------------------------------------- |
| `maxEmployees`              | number    | `5`                                         | Staff limit.                                                                 |
| `stockCapacity`             | number    | `1000`                                      | Base litres per fuel.                                                        |
| `priceLimits`               | table     | per fuel                                    | `{ min, max }` price per litre or kWh the owner can set.                     |
| `electricUnlock`            | table     | `3000` / `9000`                             | One-off payment from the cash box to turn on the normal and fast chargers.   |
| `upgrades.<id>.price`       | number    | per upgrade                                 | Price of each level. Add `prices = { ... }` for a different price per level. |
| `upgrades.<id>.levels`      | number\[] | per upgrade                                 | Value of each level, from 0 to 5.                                            |
| `deliveryman.maxLiters`     | number    | `100`                                       | Litre cap of a delivery job.                                                 |
| `deliveryman.pricePerLiter` | number    | `35`                                        | Fuel cost per litre added to the reward when posting a job.                  |
| `deliveryman.goodsPrice`    | table     | `soap = 8`, `water = 0.4`                   | Cost per litre in a delivery job for soap or water.                          |
| `tiers`                     | table\[]  | 3 sizes                                     | Contracts offered to the owner. See below.                                   |
| `blip`                      | table     | `{ sprite = 361, color = 41, scale = 0.6 }` | Blip of a station that has not been customised.                              |

Upgrades:

| Id             | Default price | What each level gives                                     |
| -------------- | ------------- | --------------------------------------------------------- |
| `stock`        | `20000`       | Extra litres per fuel: 0, 250, 500, 1000, 1500, 2000.     |
| `truck`        | `45000`       | Garage: fleet slots, from 1 to 6.                         |
| `relationship` | `60000`       | Discount (%) on imports and on the cost of jobs: 0 to 40. |
| `washer`       | `35000`       | Active pressure washers: 0 to 4.                          |
| `detailing`    | `50000`       | 1 detailing van, 2 rental, 3 mobile detailing.            |

Each entry of `tiers`:

| Field         | What it does                                                                                 |
| ------------- | -------------------------------------------------------------------------------------------- |
| `name`        | Size shown in the panel: `small`, `medium` or `large`.                                       |
| `maxLiters`   | Litre cap of the run. The real amount is the capacity of the chosen vehicle, up to this cap. |
| `minCapacity` | Minimum vehicle capacity needed to pick this contract.                                       |
| `maxDistance` | Maximum distance of the destination, in km, there and back.                                  |
| `importPrice` | Cost per litre of each fuel, soap and water.                                                 |
| `exportPrice` | Earnings per litre exported.                                                                 |
| `img`         | Image of the card in the panel.                                                              |

## Fleet

| Option             | Type     | Default    | What it does                                                     |
| ------------------ | -------- | ---------- | ---------------------------------------------------------------- |
| `fleet.sellFactor` | number   | `0.5`      | Fraction of the price returned when a vehicle is sold.           |
| `fleet.starter`    | string   | `'van'`    | Catalog id given for free with the station.                      |
| `fleet.jobVehicle` | string   | `'box'`    | Catalog id used by delivery jobs. It does not take a fleet slot. |
| `fleet.catalog`    | table\[] | 6 vehicles | Vehicles the station can buy.                                    |

Each catalog entry has `id`, `label`, `model`, `capacity` (litres per run), `speed` (1 to 5, shown in the panel only) and `price`. Optional fields: `trailer` (trailer model), `requires = { garage, relationship, detailing }` (minimum upgrade levels), `kind = 'detail'` (detailing van, not valid for contracts) and `usesSlot`.

{% hint style="warning" %}
If your server runs a model blacklist, check that no catalog model is on it. A blacklisted vehicle is deleted as soon as it appears and the run fails.
{% endhint %}

## Loading and unloading

Block `loading`: the hose-and-bay sequence of contracts and deliveries.

| Option                     | Type     | Default                | What it does                                                                                                        |
| -------------------------- | -------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `litersPerSecond`          | number   | `10`                   | Transfer speed.                                                                                                     |
| `bayRadius` / `bayHeading` | number   | `1.5` / `15.0`         | Tolerance, in metres and degrees, to count the vehicle as lined up.                                                 |
| `ropeLength`               | number   | `12.0`                 | Reach of the hose.                                                                                                  |
| `rope`                     | boolean  | `true`                 | Draws the hose as a rope.                                                                                           |
| `nozzle`                   | string   | `'prop_cs_fuel_nozle'` | Nozzle model.                                                                                                       |
| `fillPoints`               | table    | `tanker`               | Where the hose connects on each vehicle model. Without an entry, the centre of the rear. Tune one with `/gas_fill`. |
| `props`                    | table\[] | 5 props                | Props that can be chosen for a loading point in the editor.                                                         |
| `explosion`                | table    | enabled                | Explosion when the vehicle is moved with the hose connected. `enabled = false` turns it off.                        |
| `propDistance`             | number   | `120.0`                | Distance at which the prop of a point appears.                                                                      |
| `missionPropsOnly`         | boolean  | `true`                 | `true`: loading props are only visible to the player doing the run. `false`: visible to everyone nearby.            |
| `duplicateRadius`          | number   | `75.0`                 | Radius used in the admin panel to flag locations that are too close to each other.                                  |

## Modules

`modules` switches whole features. `false` removes the interactions, loops and callbacks of that feature.

| Module        | Feature                                        |
| ------------- | ---------------------------------------------- |
| `wash`        | Everything related to pressure washing.        |
| `stationWash` | Wash slots at stations.                        |
| `van`         | Detailing vans.                                |
| `rental`      | Van rental.                                    |
| `jobsMenu`    | The jobs menu at the jobs point.               |
| `washJobs`    | Wash jobs posted by the owner.                 |
| `goods`       | Soap and water stock.                          |
| `services`    | Wash services with a price (rinse, foam, wax). |
| `wax`         | Wax stage and its effect.                      |
| `commissions` | Automatic commissions.                         |
| `promos`      | Promotions.                                    |
| `npc`         | NPC customers.                                 |
| `mobile`      | Mobile detailing.                              |
| `reputation`  | Ratings and reputation.                        |
| `notices`     | Owner notices.                                 |
| `livery`      | Livery of the detailing van.                   |
| `spill`       | Fuel spills.                                   |
| `hoseAudio`   | Sounds of the loading hose.                    |

All are `true` by default.

## Pressure washing

Block `wash`. The most used groups are below; the rest are fine-tuning values, each with a comment in the file.

### Public washers

| Option               | Type      | Default      | What it does                                                                                                                                        |
| -------------------- | --------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `public.enabled`     | boolean   | `true`       | `false`: public washers do not appear.                                                                                                              |
| `public.unlisted`    | string    | `'deny'`     | A washer prop of the map that is neither public nor a station slot: `'deny'` cannot be used, `'selfservice'` works as a public self-service washer. |
| `public.matchRadius` | number    | `3.0`        | Distance to match a map prop with a public washer.                                                                                                  |
| `public.price`       | number    | `10`         | Price to take the gun in self-service mode.                                                                                                         |
| `public.jobs`        | string\[] | example jobs | Jobs allowed to use washers in job mode. Replace them with yours.                                                                                   |
| `public.jobReward`   | number    | `150`        | Pay per clean vehicle in job mode. `0` = no pay.                                                                                                    |

### Station slots

| Option                  | Type   | Default | What it does                                       |
| ----------------------- | ------ | ------- | -------------------------------------------------- |
| `stations.maxSlots`     | number | `6`     | Wash slots an admin can place per station.         |
| `stations.editRadius`   | number | `120.0` | Maximum distance from the station office to a bay. |
| `stations.propRadius`   | number | `20.0`  | Maximum distance between the bay and its washer.   |
| `stations.hosesPerSlot` | number | `1`     | Hoses in use at once per slot.                     |
| `stations.quoteRadius`  | number | `5.0`   | Distance to the washer to see the prices.          |

### Money

| Option                    | Type   | Default  | What it does                                                      |
| ------------------------- | ------ | -------- | ----------------------------------------------------------------- |
| `economy.account`         | string | `'cash'` | Account charged for the wash and the fee.                         |
| `economy.fallbackAccount` | string | `'bank'` | Used when the first account is short.                             |
| `economy.breakFee`        | number | `50`     | Fee for breaking the hose. At a station it goes to its cash box.  |
| `economy.rewardAccount`   | string | `'bank'` | Account that receives wash pay.                                   |
| `economy.rewardCooldown`  | number | `12`     | Seconds between two payments to the same player.                  |
| `economy.vehicleCooldown` | number | `600`    | Seconds before the same vehicle pays again.                       |
| `economy.repickWindow`    | number | `120`    | Seconds in which taking the gun again at the same washer is free. |
| `reward.minDirt`          | number | `2.0`    | Minimum starting dirt (0 to 15) for a wash to pay.                |
| `reward.maxDirt`          | number | `0.5`    | Maximum dirt left for the wash to count as done.                  |

The other `reward` values are server-side tolerances against cheating and sync delays.

### Wash process

| Option                                                   | Type    | Default                   | What it does                                                                                 |
| -------------------------------------------------------- | ------- | ------------------------- | -------------------------------------------------------------------------------------------- |
| `cleaning.soapPortion` / `scrubPortion` / `waterPortion` | number  | `0.5` / `0.25` / `0.25`   | Share of the dirt removed by each stage.                                                     |
| `cleaning.stageSeconds`                                  | table   | `foam = 18`, `rinse = 14` | Seconds of effective spraying to complete each stage.                                        |
| `cleaning.scrubTime`                                     | number  | `10`                      | Seconds of scrubbing with the sponge.                                                        |
| `cleaning.sourceRadius`                                  | number  | `10.0`                    | Maximum distance between the washer, the vehicle and the player.                             |
| `jet.maxDistance` / `coneDeg`                            | number  | `6.0` / `25`              | Reach and width of the jet that counts as hitting the car.                                   |
| `jobs.timeout`                                           | number  | `900`                     | Maximum seconds of a wash.                                                                   |
| `jobs.idle`                                              | number  | `300`                     | Seconds with no progress before the wash is cancelled.                                       |
| `jobs.leaveRadius` / `leaveSeconds`                      | number  | `30.0` / `15`             | Walking this far from the washer for this long cancels the wash.                             |
| `keys.switchMode` / `dropGun`                            | string  | `'G'` / `'E'`             | Default keys: switch water and soap; drop the gun after the hose breaks.                     |
| `keys.switchAnywhere`                                    | boolean | `false`                   | `true`: the mode can be switched anywhere, not only within `keys.switchRange` of the washer. |
| `offers.acceptKey` / `declineKey`                        | string  | `'Y'` / `'X'`             | Default keys of the offer card.                                                              |
| `hose.maxLength`                                         | number  | `17.0`                    | Distance from the washer at which the hose breaks.                                           |
| `hose.explode`                                           | boolean | `true`                    | Water burst when the hose of a washer breaks.                                                |
| `physics.enabled`                                        | boolean | `true`                    | The water jet pushes peds, loose objects and empty vehicles.                                 |
| `physics.pushPlayers`                                    | boolean | `true`                    | The jet also knocks players down.                                                            |
| `spray.jetStyle`                                         | string  | `'legacy'`                | Look of the water jet: `'legacy'` (steam) or `'cannon'` (water cannon).                      |
| `engineSound.enabled`                                    | boolean | `true`                    | Engine loop on each washer in use.                                                           |
| `ui.sprayMode`                                           | table   | left, centre              | Position and size of the water / soap badge.                                                 |

### Washer prop and van

| Option                              | Type      | Default                        | What it does                                                                                                          |
| ----------------------------------- | --------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
| `pump.model`                        | string    | `'cuxial_pressure_washer'`     | Washer prop.                                                                                                          |
| `pump.spawnDistance`                | number    | `120.0`                        | Distance at which a washer appears.                                                                                   |
| `van.enabled`                       | boolean   | `true`                         | Washing from the detailing van.                                                                                       |
| `van.mode`                          | string    | `'selfservice'`                | Mode of vans that wash in public mode: `'selfservice'` (the player pays) or `'job'` (listed jobs only, paid per car). |
| `van.price` / `reward` / `breakFee` | number    | `nil`                          | Overrides for vans. `nil` uses the public washer values.                                                              |
| `van.requiredDoors`                 | number\[] | `{ 2, 3 }`                     | Doors that must be open to take the gun. `{}` = none.                                                                 |
| `van.models`                        | table\[]  | detailing van                  | Van models and the point where the hose comes out.                                                                    |
| `van.defaultLivery`                 | number    | `1`                            | Livery applied to a van with none. `false` = none.                                                                    |
| `commands.livery`                   | table     | `washerlivery`, `group.admin`  | Livery command and who can use it.                                                                                    |
| `debugCommand`                      | table     | `washdebug`, `enabled = false` | Jet diagnostics command, for admins. `enabled = true` registers it without debug mode; `name = false` removes it.     |

## Goods and supply

| Option                         | Type    | Default                          | What it does                                                                                                       |
| ------------------------------ | ------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `goods.soap`                   | table   | `capacity = 200`, `lowPct = 15`  | Soap tank in litres and low-stock percentage.                                                                      |
| `goods.water`                  | table   | `capacity = 5000`, `lowPct = 15` | Water tank and low-stock percentage.                                                                               |
| `supply.water.mains`           | boolean | `true`                           | `true`: water refills on its own and the station pays per litre. `false`: water comes by contracts and deliveries. |
| `supply.water.litersPerMinute` | number  | `10`                             | Refill speed.                                                                                                      |
| `supply.water.pricePerLiter`   | number  | `0.1`                            | Cost of mains water.                                                                                               |
| `supply.soap.drums`            | boolean | `true`                           | `true`: soap is unloaded in drums carried by hand. `false`: with the hose, like fuel.                              |
| `supply.soap.drumLiters`       | number  | `25`                             | Litres per drum.                                                                                                   |
| `supply.soap.perVehicle`       | table   | per model                        | Drums each vehicle model can carry. `0` = cannot carry soap. Other models use `defaultPerVehicle` (`6`).           |

## Services and wax

Each entry of `services` (`rinse`, `foam`, `wax`):

| Field           | What it does                                                                            |
| --------------- | --------------------------------------------------------------------------------------- |
| `enabled`       | Offers the service.                                                                     |
| `price`         | Default price. Defaults: 20, 45 and 90.                                                 |
| `limits`        | `{ min, max }` the owner can set.                                                       |
| `soap`, `water` | Litres used each time the gun is taken.                                                 |
| `portions`      | Share of dirt per stage for this service. Without it, the `wash.cleaning` values apply. |
| `wax`           | `true`: adds the wax stage.                                                             |

| Option         | Type    | Default | What it does                                                         |
| -------------- | ------- | ------- | -------------------------------------------------------------------- |
| `wax.duration` | number  | `7200`  | Seconds the wax lasts.                                               |
| `wax.factor`   | number  | `0.25`  | Fraction of new dirt that sticks while waxed.                        |
| `wax.time`     | number  | `8`     | Seconds to apply it.                                                 |
| `wax.persist`  | boolean | `false` | `true`: the wax is stored by plate and survives storing the vehicle. |

## Commissions and promotions

| Option                        | Type      | Default                     | What it does                                                                                 |
| ----------------------------- | --------- | --------------------------- | -------------------------------------------------------------------------------------------- |
| `commissions.wash`            | table     | `default = 15`, `max = 50`  | Percentage for the employee who washes an NPC customer's car, and the cap the owner can set. |
| `commissions.mobile`          | table     | `default = 25`, `max = 50`  | Same for mobile detailing.                                                                   |
| `commissions.perEmployee`     | boolean   | `true`                      | Lets the owner set a percentage per employee.                                                |
| `promos.maxPerStation`        | number    | `5`                         | Promotions a station can have at once.                                                       |
| `promos.happyHour`            | table     | `minPct = 5`, `maxPct = 50` | Range of the happy hour discount.                                                            |
| `promos.voucher.liters`       | table     | `{ 20, 100 }`               | Range of minimum litres for a free wash. Default `defaultLiters = 40`.                       |
| `promos.voucher.validMinutes` | table     | `{ 10, 120 }`               | Range of minutes the voucher is valid.                                                       |
| `promos.voucher.services`     | string\[] | `rinse`, `foam`             | Services a voucher can give.                                                                 |

## Vans, rental and shifts

| Option                               | Type      | Default                      | What it does                                                                                               |
| ------------------------------------ | --------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `van.platePrefix`                    | string    | `'GW'`                       | Plate of detailing vans: prefix plus 6 digits.                                                             |
| `van.returnRadius`                   | number    | `25.0`                       | Distance to the lot to return a van.                                                                       |
| `van.stationRadius`                  | number    | `60.0`                       | Distance to the station to take out or rent a van.                                                         |
| `van.perPlayer`                      | number    | `1`                          | Vans a player can have out for own use.                                                                    |
| `van.offlineMinutes`                 | number    | `5`                          | An own-use van is removed if its holder stays offline this long.                                           |
| `van.unregistered`                   | string    | `'legacy'`                   | A detailing van that does not belong to a station: `'legacy'` washes in public mode, `'deny'` cannot wash. |
| `van.tank`                           | table     | `soap = 15`, `water = 400`   | Litres loaded from the station stock when the van leaves.                                                  |
| `rental.accounts`                    | string\[] | `cash`, `bank`               | Accounts the renter can pay with.                                                                          |
| `rental.pricePerHour`                | table     | `400` (150 to 1500)          | Default and range the owner can set.                                                                       |
| `rental.deposit`                     | table     | `3000` (1000 to 10000)       | Default and range of the deposit.                                                                          |
| `rental.maxHours`                    | table     | `4` (1 to 12)                | Default and range of the maximum rental time.                                                              |
| `rental.graceMinutes`                | number    | `10`                         | Minutes after the end with no late fee.                                                                    |
| `rental.overtimeFactor`              | number    | `1.5`                        | Late fee per hour = hourly price × this factor.                                                            |
| `rental.forfeitAfterHours`           | number    | `3`                          | Hours late after which the deposit is lost and the van removed.                                            |
| `rental.damage`                      | table     | `body = 1.5`, `engine = 1.0` | Weight of damage charges, as a fraction of the deposit.                                                    |
| `washJobs`                           | table     | see file                     | Limits of wash jobs: `max` posted at once, and `{ min, max }` for `reward`, `count` and `name` length.     |
| `jobsMenu.radius`                    | number    | `25.0`                       | Distance to the jobs point to use its menu.                                                                |
| `shift.leaveRadius` / `leaveMinutes` | number    | `150.0` / `10`               | The shift closes after this many minutes farther than this from the station.                               |

## NPC customers

NPC customers pay with new money, so the caps are conservative.

| Option                                                   | Type      | Default              | What it does                                                     |
| -------------------------------------------------------- | --------- | -------------------- | ---------------------------------------------------------------- |
| `npc.enabled`                                            | boolean   | `true`               | Turns the feature on.                                            |
| `npc.tickSeconds` / `baseChance`                         | number    | `30` / `0.25`        | How often each station rolls for a customer and the base chance. |
| `npc.maxActivePerStation`                                | number    | `1`                  | Customers at once per station (0 to 2).                          |
| `npc.hourlyCap` / `hourlyMoney`                          | number    | `6` / `600`          | Customers and money created per station per hour.                |
| `npc.dailyCap` / `dailyMoney`                            | number    | `30` / `3000`        | Same per day.                                                    |
| `npc.maxGlobal` / `globalHourlyCap` / `globalDailyMoney` | number    | `6` / `30` / `20000` | Server-wide caps.                                                |
| `npc.presenceRadius`                                     | number    | `80.0`               | An on-shift employee must be this close to the bay.              |
| `npc.models`, `npc.peds`                                 | string\[] | lists                | Cars and drivers used.                                           |
| `npc.dirt`                                               | table     | `{ 8.0, 15.0 }`      | Dirt of the car on arrival.                                      |
| `npc.services`                                           | table     | weights              | Chance of each service being asked for.                          |
| `npc.priceFactor`                                        | number    | `1.0`                | Multiplier on the owner's price.                                 |
| `npc.timeouts`                                           | table     | seconds              | Time allowed to arrive, wait, be washed and leave.               |
| `npc.tip`                                                | table     | `maxPct = 30`        | Maximum tip and the times that give 100 % and 0 % of it.         |

## Mobile detailing

| Option                                 | Type            | Default        | What it does                                                                                |
| -------------------------------------- | --------------- | -------------- | ------------------------------------------------------------------------------------------- |
| `mobile.enabled`                       | boolean         | `true`         | Turns the feature on.                                                                       |
| `mobile.level`                         | number          | `3`            | Detailing upgrade level required.                                                           |
| `mobile.command`                       | string \| false | `'detailing'`  | Request command. `false` = no command.                                                      |
| `mobile.multiplier`                    | number          | `1.6`          | Multiplier on the service price.                                                            |
| `mobile.feePerKm` / `maxKm`            | number          | `40` / `6.0`   | Travel fee and maximum distance from the station.                                           |
| `mobile.requestTtl`                    | number          | `300`          | Seconds a request waits for an employee.                                                    |
| `mobile.arriveTimeout` / `washTimeout` | number          | `600` / `600`  | Seconds to arrive and to finish the wash.                                                   |
| `mobile.cancelFeePct`                  | number          | `25`           | Percentage kept when the customer cancels after it was accepted.                            |
| `mobile.cooldown`                      | number          | `600`          | Seconds between requests from the same player.                                              |
| `mobile.maxOpenPerStation`             | number          | `3`            | Requests in progress per station.                                                           |
| `mobile.services`                      | string\[]       | all three      | Services that can be requested.                                                             |
| `mobile.account`                       | string          | `'bank'`       | Account the customer is charged from.                                                       |
| `mobile.phone.company`                 | string          | `'detailing'`  | Id of the company in your phone resource. A message to that company opens the request menu. |
| `mobile.phone.number` / `name`         | string          | example values | Sender of the messages the customer receives.                                               |
| `mobile.phone.keywords`                | table           | per service    | Words in the message that pick a service directly.                                          |

{% hint style="info" %}
For requests by phone, add a company to your phone's service list with the same id as `mobile.phone.company`. Set `mobile.phone = false` to leave the phone out.
{% endhint %}

## Reputation

| Option                                               | Type   | Default                 | What it does                                                                                     |
| ---------------------------------------------------- | ------ | ----------------------- | ------------------------------------------------------------------------------------------------ |
| `reputation.prior` / `weight`                        | number | `3.0` / `10`            | Starting rating and how much it weighs against real ratings.                                     |
| `reputation.windowDays` / `halfLifeDays`             | number | `30` / `10`             | Ratings older than the window are ignored; a rating loses half its weight every half-life.       |
| `reputation.npcFactor`                               | table  | `{ 0.5, 1.5 }`          | Multiplier on NPC customer chance at 1 and at 5 stars.                                           |
| `reputation.supplierBonus`                           | table  | `from = 3.5`, `max = 3` | Extra supplier discount (%) from that rating, `perHalfStar` per half star.                       |
| `reputation.oncePerHours`                            | number | `24`                    | One rating that counts per player and station in this time.                                      |
| `reputation.promptCooldownMinutes` / `promptSeconds` | number | `30` / `15`             | Time before asking the same player again; seconds the rating card stays.                         |
| `reputation.fuelDelaySeconds`                        | number | `60`                    | Delay of the card after refuelling.                                                              |
| `reputation.weights`                                 | table  | per source              | Weight of each source: `wash`, `mobile`, `fuel`, `rental`, `npc`, `stockout`, `missed`, `spill`. |
| `reputation.prompt`                                  | table  | all `true`              | Which services ask the player for a rating.                                                      |
| `reputation.adjustMax`                               | number | `20`                    | Maximum manual adjustment by an admin, in tenths of a star.                                      |

## Notices

| Option                                            | Type      | Default            | What it does                                                                                                                                                    |
| ------------------------------------------------- | --------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `notices.phone`                                   | boolean   | `true`             | Sends notices to the phone when one is available. `false`: always the standard notification.                                                                    |
| `notices.maxPerHour`                              | number    | `12`               | Notices per station per hour.                                                                                                                                   |
| `notices.retentionDays`                           | number    | `14`               | Days a notice is kept.                                                                                                                                          |
| `notices.offlineMax` / `loginShow` / `loginDelay` | number    | `30` / `3` / `15`  | Notices stored for an offline player; how many are shown on login and after how many seconds.                                                                   |
| `notices.lowStock`                                | table     | `20` / `15` / `15` | Default low-stock percentages for fuel, soap and water, and the check schedule (`cron`).                                                                        |
| `notices.daily`                                   | table     | `'0 9 * * *'`      | Schedule of the daily summary. `discord = true` also sends it to the logs webhook.                                                                              |
| `notices.webhook.enabled`                         | boolean   | `true`             | Lets owners set a Discord webhook for their station.                                                                                                            |
| `notices.types.<kind>`                            | table     | all enabled        | Switch and cooldown in minutes for each kind of notice.                                                                                                         |
| `notices.providers`                               | string\[] | `{}`               | Names of [notice providers](/scripts/vehicles/cuxial-gasstations/developers.md#registernoticeprovider) that must exist. A missing one prints a console warning. |

## Spills

| Option                                       | Type    | Default                     | What it does                                                                                            |
| -------------------------------------------- | ------- | --------------------------- | ------------------------------------------------------------------------------------------------------- |
| `spill.liters`                               | number  | `10`                        | Litres the station loses per spill.                                                                     |
| `spill.radius`                               | table   | `{ 1.5, 3.0 }`              | Size of the puddle according to the litres.                                                             |
| `spill.lifetimeMinutes`                      | number  | `4`                         | Time before a puddle dries on its own.                                                                  |
| `spill.burnSeconds`                          | number  | `25`                        | Time it burns once lit.                                                                                 |
| `spill.maxPerStation` / `maxGlobal`          | number  | `1` / `6`                   | Puddles at once.                                                                                        |
| `spill.playerCooldown` / `vehicleCooldown`   | number  | `300` / `300`               | Seconds before the same player or vehicle can cause another.                                            |
| `spill.ignite.bulletChance` / `engineChance` | number  | `35` / `5`                  | Chance (%) that a gunshot or starting an engine on the puddle lights it. Explosions and fire always do. |
| `spill.fire`                                 | table   | `damage = 5`                | Number of flames and damage per second to anyone standing in it.                                        |
| `spill.reputationStars`                      | number  | `2`                         | Rating the spill counts as.                                                                             |
| `spill.spreadToPump`                         | boolean | `false`                     | `false`: the fire never reaches the pumps. `true`: `pump.chance` % that it does.                        |
| `spill.clean`                                | table   | `seconds = 8`, `water = 20` | Cleaning time and litres of station water used. `enabled = false` removes the option.                   |

## Stations

`data/stations.lua` lists every station. The delivered file covers the default map; edit prices and names, or add your own entries.

| Field       | Type   | What it does                                                                               |
| ----------- | ------ | ------------------------------------------------------------------------------------------ |
| `label`     | string | Default name on the blip and in the panel.                                                 |
| `buyPrice`  | number | Purchase price.                                                                            |
| `sellPrice` | number | Paid to the owner on selling, plus the cash box.                                           |
| `type`      | string | Key of `types` in the config.                                                              |
| `account`   | string | Player account used for the station's money: `'bank'` or `'cash'`.                         |
| `coords`    | vec3   | Office point, where the panel opens.                                                       |
| `blip`      | vec3   | Blip position. Omit it for no blip.                                                        |
| `truck`     | vec4   | Where the run vehicle appears and is returned.                                             |
| `trailer`   | vec4   | Where the trailer appears.                                                                 |
| `van`       | vec4   | Where detailing vans appear and are returned. Optional; `truck` is used without it.        |
| `jobs`      | vec3   | Jobs point.                                                                                |
| `pumps`     | vec4   | Sphere that covers the pumps: centre and radius. A pump inside it belongs to this station. |

{% hint style="danger" %}
Never rename the key of a station that already has an owner (`gas_station_1`...). The key is its id in the database.
{% endhint %}

## Common changes

**Two stations per player and a shorter abandon rule**

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

```lua
limits = { stationsPerPlayer = 2, stationsEmployed = 2, jobs = 20 },
abandon = { enabled = true, minStockPct = 20, hours = 48 },
```

{% endcode %}

**Turn off NPC customers and spills**

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

```lua
modules = {
    -- ...
    npc = false,
    spill = false,
},
```

{% endcode %}

**Add a vehicle to the fleet**

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

```lua
{ id = 'box_m', label = 'Medium truck', model = 'benson', capacity = 160, speed = 3, price = 60000 },
```

{% endcode %}

Add the line inside `fleet.catalog`, and its model to `supply.soap.perVehicle` if it should carry a different number of soap drums.

**Dollar format in the interface**

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

```lua
ui = {
    accent = '#4f9cf9',
    currency = { symbol = '$', locale = 'en-US' },
    mission = { corner = 'top-right', toggleKey = 'F7' },
},
```

{% endcode %}


---

# 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-gasstations/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.
