> For the complete documentation index, see [llms.txt](https://devmosaic.gitbook.io/devmosaic/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devmosaic.gitbook.io/devmosaic/resources/devmosaic-ox-fuel-rework/configuration.md).

# Configuration

Every option in config.lua, what it changes, and what it costs.

Everything lives in `config.lua`. The file is open and commented, and it is read on resource start.

### Inventory And Target

`auto` picks the first supported resource that is running. Name one explicitly to override the detection.

| Option             | Default  | Accepts                                                                                                            |
| ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------ |
| `bridge.target`    | `'auto'` | `ox_target`, `qb-target`, `qtarget`                                                                                |
| `bridge.inventory` | `'auto'` | `ox_inventory`, `qs-inventory`, `origen_inventory`, `codem-inventory`, `ps-inventory`, `qb-inventory`, `framework` |

`framework` uses your QB or ESX player inventory directly, for servers running no separate inventory resource.

### Fuel Economy

These are the upstream `ox_fuel` settings and behave exactly as they always did.

| Option                      | Default | What it does                                   |
| --------------------------- | ------- | ---------------------------------------------- |
| `refillValue`               | `0.50`  | Percent of tank added per tick.                |
| `refillTick`                | `250`   | Milliseconds between ticks.                    |
| `priceTick`                 | `5`     | Money charged per tick.                        |
| `durabilityTick`            | `1.3`   | Petrol can durability used per tick.           |
| `globalFuelConsumptionRate` | `10.0`  | Multiplier on how fast all vehicles burn fuel. |

{% hint style="info" %}
**What a full tank costs and how long it takes.** At the defaults, filling from empty is 200 ticks: 50 seconds and $1,000. Halve `priceTick` to halve the price; raise `refillValue` to make it faster.
{% endhint %}

### Petrol Can

| Option                  | Default | What it does                                                       |
| ----------------------- | ------- | ------------------------------------------------------------------ |
| `petrolCan.enabled`     | `true`  | Turns the can on or off entirely. Needs ox\_inventory - see below. |
| `petrolCan.duration`    | `5000`  | Buy and refill animation length in milliseconds.                   |
| `petrolCan.price`       | `1000`  | Cost of a new can.                                                 |
| `petrolCan.refillPrice` | `800`   | Cost to refill one you already own.                                |

### Stations And Blips

| Option         | Default  | What it does                                                                 |
| -------------- | -------- | ---------------------------------------------------------------------------- |
| `showBlips`    | `2`      | `0` hides all blips, `1` shows only the nearest, `2` shows every station.    |
| `pumpModels`   | 7 models | Which props count as a pump. Leave as-is unless you added custom pump props. |
| `versionCheck` | `true`   | Prints to console when a new release exists.                                 |

### Pump Interaction

The block that drives the physical refuelling. Turn `enabled` off and the resource falls back to stock `ox_fuel` behaviour.

| Option                   | Default | What it does                                                  |
| ------------------------ | ------- | ------------------------------------------------------------- |
| `enabled`                | `true`  | Master switch for the whole physical system.                  |
| `interactionDistance`    | `1.8`   | How close a player stands to pick the nozzle up, in metres.   |
| `capInteractionDistance` | `2.4`   | How close to the fuel cap to attach or remove, in metres.     |
| `attachedHoseReach`      | `8.0`   | How far the hose stretches once attached, in metres.          |
| `reachGraceMs`           | `2000`  | How long an overstretched hose holds on before pulling loose. |
| `stationDisplayMargin`   | `20.0`  | Extra radius around a station where pump screens switch on.   |
| `stationReleaseMargin`   | `10.0`  | Extra distance before they switch off again.                  |
| `displayDistance`        | `25.0`  | Screen range for pumps not listed in `data/stations.lua`.     |
| `displayReleaseDistance` | `35.0`  | Range at which those same pumps release.                      |
| `displayReleaseDelay`    | `2000`  | Delay before an out-of-range screen shuts down.               |
| `streamDistance`         | `65.0`  | Distance at which nozzle and hose models are drawn.           |
| `displayQuality`         | `1.0`   | Pump screen sharpness, from `0.25` to `1.0`.                  |

{% hint style="warning" %}
`interactionDistance` is measured to the **nozzle grip**, not the pump body. Setting it below about `1.5` makes the nozzle awkward to pick up even when the player is clearly standing at the pump.
{% endhint %}

### The Petrol Can Needs ox\_inventory

The can tracks how much fuel is left in it, which means storing durability on the item. Only `ox_inventory` exposes an API for weapon metadata, so on every other inventory the can is disabled and the server prints a line at startup saying which inventory it found.

Everything else - pump refuelling, payment, prices - works on all supported inventories.

### A Note On Fuel Grades

The pump screen offers Regular, Plus and Premium. **They are cosmetic.** All three charge `priceTick` per tick, and the pump's own on-screen help text says so. If you want them to cost different amounts you will need to wire that in yourself through the payment export.
