> For the complete documentation index, see [llms.txt](https://zloma-scripts.gitbook.io/zloma-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zloma-scripts.gitbook.io/zloma-scripts/zloma_stance-free-escrow/configuration.md).

# Configuration

All supported user configuration for zloma\_stance lives in `config.lua`.

## General

| Option              | Type    | Description                                                                                      |
| ------------------- | ------- | ------------------------------------------------------------------------------------------------ |
| `Config.Locale`     | string  | Active locale. Shipped values are `en` and `hr`.                                                 |
| `Config.UseMethod`  | string  | How players open the stance menu. Supported values: `TargetProp`, `Target`, `Command`, `TextUI`. |
| `Config.TargetProp` | string  | Prop model used only when `Config.UseMethod = 'TargetProp'`.                                     |
| `Config.Debug`      | boolean | Enables debug logging in client and server consoles.                                             |
| `Config.Command`    | string  | Chat command name used when `Config.UseMethod = 'Command'`.                                      |

Current shipped defaults:

* `Config.Locale = 'hr'`
* `Config.UseMethod = 'TextUI'`
* `Config.Command = 'stance'`

## Performance

These values control how often fitment and zone checks run.

| Option                        | Type   | Description                                                                                              |
| ----------------------------- | ------ | -------------------------------------------------------------------------------------------------------- |
| `Config.FitmentTick`          | number | Milliseconds between repeated fitment reapply checks on tracked vehicles. Lower is smoother but heavier. |
| `Config.FitmentScanTimer`     | number | Milliseconds between full vehicle pool scans to discover relevant entities.                              |
| `Config.FitmentCheckRadius`   | number | Radius around the player used to consider nearby vehicles for fitment updates.                           |
| `Config.ZoneCheckInterval`    | number | Milliseconds between zone proximity checks.                                                              |
| `Config.VehicleCheckInterval` | number | Milliseconds between vehicle state checks while a player is inside the workflow.                         |

If you increase performance values too aggressively, fitment may feel delayed when vehicles stream in or when the player moves between zones.

## Interaction Modes

### `TextUI`

* Shows a localized on-screen hint while the player is inside a valid zone.
* The player presses `E` to open the menu.
* No target resource is required.

### `Command`

* Registers the command stored in `Config.Command`.
* The command still requires the player to be in a valid zone and inside a vehicle.
* No target resource is required.

### `Target`

* Creates a targetable box zone through the `zloma_core` target wrapper.
* Requires `ox_target` support through your stack.

### `TargetProp`

* Spawns a configured prop at each zone target position.
* Adds `ox_target` interaction directly to that prop.
* Requires a valid model name in `Config.TargetProp`.

## Zone Access Logic

Each entry inside `Config.FitmentZones` supports job and identifier access rules.

| Setup                                       | Result                                                         |
| ------------------------------------------- | -------------------------------------------------------------- |
| `job` empty and `allowedIdentifiers` empty  | Public station                                                 |
| `job` filled and `allowedIdentifiers` empty | Only that job can use it                                       |
| `job` empty and `allowedIdentifiers` filled | Only listed identifiers can use it                             |
| both filled                                 | Either the matching job or a whitelisted identifier can use it |

## Fitment Zone Structure

Each zone key can be named however you want. The value should follow this structure:

```lua
Config.FitmentZones = {
    ["zone_name"] = {
        coords = vector3(x, y, z),
        heading = 0.0,
        radius = 3.0,
        target = {
            coords = vector3(x, y, z),
            size = vec3(2, 2, 2)
        },
        price = 0,
        job = 'mechanic',
        allowedIdentifiers = {
            'license:example'
        }
    }
}
```

Field details:

| Field                | Type          | Description                                                                  |
| -------------------- | ------------- | ---------------------------------------------------------------------------- |
| `coords`             | vector3/table | Center of the stance pad used for zone detection.                            |
| `heading`            | number        | Used for zone orientation and spawned target prop heading.                   |
| `radius`             | number        | Radius of the usable stance area.                                            |
| `target.coords`      | vector3/table | Interaction point for target-based modes.                                    |
| `target.size`        | vec3/table    | Box size used for target zone interaction.                                   |
| `price`              | number        | Currently just stored as config data for your own usage or future extension. |
| `job`                | string/false  | Job allowed to use the station. Leave empty or false for public access.      |
| `allowedIdentifiers` | table         | Explicit identifier whitelist. Empty table means no whitelist.               |

## Locale Files

User-facing text can be changed through:

* `locales/en.lua`
* `locales/hr.lua`

The selected locale is applied immediately on client load using `Config.Locale`.

## Behavior Notes

* Saved fitment is stored by vehicle plate.
* Mechanics or whitelisted staff can tune vehicles they do not own if the station access allows it.
* The resource uses an active fitment cache plus state bags so streamed or newly joined clients can still receive wheel data.
* `zloma_core` handles framework detection and notifications, so no separate framework config is needed inside zloma\_stance.


---

# 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 dynamically by asking a question.

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

```
GET https://zloma-scripts.gitbook.io/zloma-scripts/zloma_stance-free-escrow/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.
