# Configuration

This resource uses a simple configuration file located in:

* `data/config.lua`

### Main Configuration

File: `data/config.lua`

```lua
Locale = 'pl',   -- 'en' or 'pl'
debug = false,   -- Enable debug mode (logs surface materials)

-- Drift detection
driftThreshold = 6.0,       -- Min traction vector length to trigger smoke
scaleMultiplier = 1,        -- Global scale multiplier for all smoke particles

-- Smoke density
smokeDensity = 100,         -- Base density (used for particle spread)
smokeOpacity = 0.35,        -- Opacity of colored smoke (0.0 – 1.0)

-- Burnout smoke
bigBurnoutSmoke = true,     -- Enable enhanced smoke during burnouts
growBurnoutSmoke = true,    -- Smoke grows progressively during a burnout
maxBurnoutSmokeMultiplier = 1.6,  -- Max scale multiplier at peak burnout

-- Surface filter
roadSurfaces = { 1, 3, 4, 12 },
```

### Locale

Defines which language should be used.

Supported values:

* `en`
* `pl`

Example:

```lua
Locale = 'en'
```

### Debug

Enables debug mode.

```lua
debug = true
```

When enabled, the script prints surface material IDs to the console. This is useful when adding new surface types to `roadSurfaces`.

### Drift Detection

#### driftThreshold

Defines the minimum traction vector length required to trigger smoke.

```lua
driftThreshold = 6.0
```

* Lower value = smoke appears more easily
* Higher value = smoke appears only during harder slides

#### scaleMultiplier

Applies a global scale multiplier to all smoke particles.

```lua
scaleMultiplier = 1
```

Increase this value if you want larger smoke effects overall.

### Smoke Density

#### smokeDensity

Defines the base smoke density used for particle spread.

```lua
smokeDensity = 100
```

Higher values create a denser smoke effect.

#### smokeOpacity

Defines the opacity of colored smoke.

```lua
smokeOpacity = 0.35
```

Supported range:

* `0.0` = fully transparent
* `1.0` = fully opaque

> This setting only affects colored smoke. White smoke opacity is controlled by the particle asset itself.

### Burnout Smoke

#### bigBurnoutSmoke

Enables enhanced smoke during burnouts.

```lua
bigBurnoutSmoke = true
```

#### growBurnoutSmoke

Makes burnout smoke increase progressively over time.

```lua
growBurnoutSmoke = true
```

#### maxBurnoutSmokeMultiplier

Defines the maximum smoke scale multiplier reached during a burnout.

```lua
maxBurnoutSmokeMultiplier = 1.6
```

Higher values create larger burnout smoke effects.

### Surface Filter

#### roadSurfaces

Defines which GTA surface material IDs can generate smoke.

```lua
roadSurfaces = { 1, 3, 4, 12 }
```

Only surfaces listed here will allow smoke effects.

### Surface ID Reference

* `1` — Tarmac
* `3` — Concrete
* `4` — Pavement
* `12` — Road markings

Add or remove surface IDs depending on where you want smoke to appear.

### Colored Smoke

Colored smoke is automatically applied when the vehicle has a custom tire smoke color set.

No additional configuration is required.

If the tire smoke RGB value is different from pure white (`255, 255, 255`), the script uses the colored smoke particle and applies the exact vehicle smoke color automatically.

### Notes

* Smoke is generated on all four wheels
* The system supports both normal white smoke and custom colored smoke
* Burnout smoke can grow dynamically over time
* Resource state is saved persistently via `ResourceKvp`
* The script starts automatically when the player is loaded


---

# 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://mskscripts.gitbook.io/mskscripts/scripts/realistic-tire-smoke/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.
