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

# General

Language, framework, permissions, crafting rules, keys, UI and logging in config/config.lua.

Everything on this page is in `config/config.lua`.

## Basics

```lua
Config.Locale    = 'en'        -- 'en' | 'ar' | any file you add in config/locales/
Config.Framework = 'auto'      -- 'auto' | 'qbox' | 'qb-core' | 'esx' | 'standalone'
Config.Command   = 'crafting'  -- admin command prefix: /crafting <subcommand>
Config.Debug     = false       -- verbose client + server logging, keep off in production
```

| Option      | Default      | What it does                                                                                                          |
| ----------- | ------------ | --------------------------------------------------------------------------------------------------------------------- |
| `Locale`    | `'en'`       | Language of every player-facing text. See [Languages](/visionstore-docs/scripts/crafting/configuration.md#languages). |
| `Framework` | `'auto'`     | `'auto'` detects Qbox → QBCore → ESX → standalone. Set a name to force one.                                           |
| `Command`   | `'crafting'` | Name of the admin command. Change it if another script already uses `/crafting`.                                      |
| `Debug`     | `false`      | Prints extra logs (including every log line) to the consoles.                                                         |

## Permissions

```lua
Config.Permissions = {
    adminGroups = { 'god', 'admin' },
    access = 'everyone',
}
```

**`adminGroups`** are the staff groups that count as crafting admins. A player is an admin when, for any group in the list:

1. your framework says so (Qbox / QBCore permission groups, ESX player group), **or**
2. they have the ACE `group.<name>` or `<name>`, **or**
3. they have the ACE `crafting.admin`.

The server console is always admin.

```properties
add_ace group.admin crafting.admin allow
```

**`access`** decides who may use benches:

| Mode                   | Meaning                                                                                                                       |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `'everyone'` (default) | Any player may use, place and pick up benches. Per-bench `access` rules are skipped, unless that bench sets `enforce = true`. |
| `'benchRules'`         | Each bench's `access` rules decide (jobs, gangs, ACE, identifiers, NPC unlock). Staff bypass them.                            |
| `'admin'`              | Staff only. Handy for testing before going live.                                                                              |

The per-bench rules are explained on [Bench types](/visionstore-docs/scripts/crafting/configuration/benches.md#who-may-use-a-bench).

## Crafting rules

```lua
Config.Crafting = {
    allowMultipleUsers     = false,
    invincibleWhileUsing   = false,
    enableSpotlight        = true,
    portableBenches        = true,
    blueprintItems         = true,

    disableBenchLevels     = false,
    disableCategoryLevels  = true,

    hideUnavailableRecipes = false,
    allowViewLockedRecipes = false,

    kickOnDamage           = true,
    pauseOnExit            = false,
    pauseOnDisconnect      = true,
    cancelOnExit           = false,

    queueLimit             = 0,
    globalQueueLimit       = 0,
    maxCraftAmount         = 0,

    giveXPOnFailure        = false,
    removeBlueprintOnCraft = false,
    blueprintStrictMode    = false,
    disableBlackoutAtBench = false,

    hideHudAtBench         = true,
}
```

| Option                   | Default | What it does                                                                 |
| ------------------------ | ------- | ---------------------------------------------------------------------------- |
| `allowMultipleUsers`     | `false` | More than one player at the same bench at once.                              |
| `invincibleWhileUsing`   | `false` | Players can't be hurt while at a bench.                                      |
| `enableSpotlight`        | `true`  | Lights the bench so the screen stays readable at night.                      |
| `portableBenches`        | `true`  | Benches can exist as inventory items and be placed.                          |
| `blueprintItems`         | `true`  | A blueprint **item** in the inventory counts as owning that blueprint.       |
| `disableBenchLevels`     | `false` | `true` = every recipe is craftable on a level 0 bench.                       |
| `disableCategoryLevels`  | `true`  | Turns off the per-category level gate (`categoryLevel` on recipes).          |
| `hideUnavailableRecipes` | `false` | Hide recipes the bench level doesn't reach yet.                              |
| `allowViewLockedRecipes` | `false` | Show ingredients and results of locked recipes.                              |
| `kickOnDamage`           | `true`  | Taking damage closes the bench.                                              |
| `pauseOnExit`            | `false` | Leaving the bench pauses your running crafts.                                |
| `pauseOnDisconnect`      | `true`  | Disconnecting pauses your running crafts.                                    |
| `cancelOnExit`           | `false` | Leaving the bench cancels and refunds your crafts (wins over `pauseOnExit`). |
| `queueLimit`             | `0`     | Queued crafts per bench, per player. `0` = unlimited.                        |
| `globalQueueLimit`       | `0`     | Queued crafts across all benches, per player. `0` = unlimited.               |
| `maxCraftAmount`         | `0`     | Max quantity in one craft. `0` = unlimited.                                  |
| `giveXPOnFailure`        | `false` | A failed craft still gives bench XP.                                         |
| `removeBlueprintOnCraft` | `false` | Crafting uses up one use of the blueprint item.                              |
| `blueprintStrictMode`    | `false` | Recipes **without** a blueprint can't be crafted at all.                     |
| `disableBlackoutAtBench` | `false` | Force artificial lights on while at a bench.                                 |
| `hideHudAtBench`         | `true`  | Hide the minimap, the native HUD and your HUD while a bench is open.         |

### Blueprint durability

Only used when `removeBlueprintOnCraft = true`:

```lua
Config.BlueprintDurability = {
    enabled     = false,
    defaultUses = 5,
}
```

## Interaction distances

```lua
Config.Distances = {
    proximityRadius        = 80.0, -- benches beyond this are ignored entirely
    benchProximityDistance = 10.0, -- per-bench systems tick inside this
    interactDistance       = 2.0,  -- [E] works inside this
    sessionRadius          = 3.5,  -- walking further closes an open bench
    serverSlack            = 2.0,  -- server-side tolerance for latency
}
```

## Keys

```lua
Config.Keybinds = {
    interact = 'E',
    pickup   = 'G',
}
```

These are default keys. Players can rebind them in **Settings → Key Bindings → FiveM** ("Use crafting bench" and "Pick up crafting bench"). The placement keys are on the [Placement](/visionstore-docs/scripts/crafting/configuration/placement.md#keys) page.

## User interface

```lua
Config.Images = {
    path     = 'https://cfx-nui-ox_inventory/web/images/%s.png',
    fallback = 'https://cfx-nui-ox_inventory/web/images/crafting_bench.png',
}

Config.Sounds = {
    enabled = true,
    volume  = 0.35,   -- 0.0 - 1.0
}
```

* **`Images.path`**: where item images come from. `%s` is the item name. The default reads ox\_inventory's own images folder. A missing image falls back to `fallback`, then to a built-in placeholder.
* **`Sounds`**: UI click sounds on the bench screen.

### Hiding your HUD at the bench

The minimap and the native HUD are hidden automatically. If your HUD resource has hide / show exports, list it here:

```lua
Config.Hud = {
    resources = {
        -- { resource = 'my-hud', hide = 'Hide', show = 'Show' },
    },
}
```

Resources that aren't running are skipped. For anything more custom (an event instead of exports), edit `Bridge.HideHud` / `Bridge.ShowHud` in `bridge/client.lua` (see [Bridges](/visionstore-docs/scripts/crafting/developers/bridges.md#client-bridge)).

## Logging

```lua
Config.Logging = {
    oxlib = false,            -- ox_lib logger (lib.logger)

    discord = {
        enabled    = false,
        webhookUrl = '',
        username   = 'Vision Crafting',
    },

    history = true,           -- keep an audit row in crafting_history for every craft

    highValueItems = {
        -- 'WEAPON_PISTOL',
    },
}
```

| Option           | What it does                                                                      |
| ---------------- | --------------------------------------------------------------------------------- |
| `oxlib`          | Send log lines to the ox\_lib logger (`lib.logger`).                              |
| `discord`        | Built-in Discord webhook. Set `enabled = true` and paste your `webhookUrl`.       |
| `history`        | Keep an audit row in the `crafting_history` table for every craft.                |
| `highValueItems` | Crafted items that get an extra "High-value craft claimed" log line when claimed. |

Logged: bench placed, bench picked up, craft started, craft claimed, bench issued by an admin, and (when logging is on in `config/npcs.lua`) NPC entry fees, completed challenges, NPC benches issued and NPC custody. Your own scripts can listen to every line too: see [Events](/visionstore-docs/scripts/crafting/developers/events.md).

### Retention

```lua
Config.Retention = {
    queueDays   = 7,  -- claimed / cancelled crafts
    historyDays = 30, -- the craft / placement / pickup audit log
}
```

How long finished rows are kept, in days. `0` = keep forever.

## Anti-spam (advanced)

`Config.RateLimits` sets how many times a player can do each action per time window (in ms), for example:

```lua
Config.RateLimits = {
    openBench  = { limit = 10, window = 10000 },
    startCraft = { limit = 15, window = 10000 },
    placeBench = { limit = 5,  window = 15000 },
    -- ...
}
```

The defaults are safe for normal play. You shouldn't need to change them.


---

# 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://visionstore.gitbook.io/visionstore-docs/scripts/crafting/configuration/general.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.
