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

# General

Language, debug, framework / inventory / target detection, the badge item, admins, network and cache.

All settings on this page are in `config/config.lua`.

## Language and debug

```lua
Config.Locale = 'en'            -- 'en' | 'ar' (any file in locales/)
Config.Debug = false            -- draws desk zones and prints extra console lines
```

| Option          | Default | Meaning                                                                                                      |
| --------------- | ------- | ------------------------------------------------------------------------------------------------------------ |
| `Config.Locale` | `'en'`  | `'en'`, `'ar'`, or any file you add to `locales/`. An unknown code prints a warning and uses English.        |
| `Config.Debug`  | `false` | Draws the desk zones (ox\_target / qb-target outlines) and prints extra lines in the server and F8 consoles. |

## Integrations

```lua
Config.Framework = 'auto'       -- 'auto' | 'qbx' | 'qb' | 'esx' | 'ox' | 'standalone'
Config.Inventory = 'auto'       -- 'auto' | 'ox_inventory' | 'qs-inventory' | 'qb-inventory' | 'none'
Config.Target = 'auto'          -- 'auto' | 'ox_target' | 'qb-target' | 'textui'
```

`'auto'` uses the first resource of the list that is running **when Vision Badges Creator starts**.

| Option             | Auto order                                                                         | Fallback                                             |
| ------------------ | ---------------------------------------------------------------------------------- | ---------------------------------------------------- |
| `Config.Framework` | `qbx_core` → `qb-core` → `es_extended` → `ox_core`                                 | `standalone`                                         |
| `Config.Inventory` | `ox_inventory` → `qs-inventory` → `qb-inventory` / `ps-inventory` / `lj-inventory` | `none`                                               |
| `Config.Target`    | `ox_target` → `qb-target`                                                          | `textui` (built-in ox\_lib `[E] <desk name>` prompt) |

`'qb-inventory'` also covers ps-inventory and lj-inventory. An unsupported inventory value prints a warning and falls back to `'none'`.

## The badge item

```lua
Config.Item = {
    name = 'vision_badge',
}
```

| Option             | Default          | Meaning                                                                                                                                  |
| ------------------ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Config.Item.name` | `'vision_badge'` | The one item that carries every badge type. With ox\_inventory, each badge sets the item's label, icon and tooltip through its metadata. |

A single badge can still use its own item with `item = '...'` in `config/badges.lua` (see [Badge types](/visionstore-docs/scripts/badges/configuration/badges.md#inventory-item)).

{% hint style="warning" %}
Change the item name only **before** badges are issued, and register the new name in your inventory. With `Config.Inventory = 'none'` there is no item at all: badges are kept in the database and shown with `/badge`.
{% endhint %}

## Admins

```lua
Config.Admin = {
    ace = 'vision_badges.admin',
    groups = { 'admin', 'god', 'superadmin' },
    studioCommand = 'badgestudio',  -- false = no command (use the export instead)
}
```

A player is an admin when **any** of these match:

| Option          | Default                            | Meaning                                                                                                                                                                              |
| --------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `ace`           | `'vision_badges.admin'`            | A player with this ace is an admin: `add_ace group.admin vision_badges.admin allow`.                                                                                                 |
| `groups`        | `{ 'admin', 'god', 'superadmin' }` | For each name: the ace `<name>` or `group.<name>`; on QBCore, `QBCore.Functions.HasPermission(source, name)`; on ESX, `xPlayer.getGroup()` equal to the name.                        |
| `studioCommand` | `'badgestudio'`                    | Command that opens the Badge Studio. `false` = no command; use the client export `OpenStudio` (see [Exports](/visionstore-docs/scripts/badges/developers/exports.md#client-export)). |

Admins can open the Badge Studio and issue **every** badge, at any desk that serves it and with `/issuebadge` anywhere. The recipient still has to hold one of the badge's jobs (when `RequireMembership` is on), also when an admin issues their own badge.

{% hint style="info" %}
The Studio checks admin rights live. Desk options for admins are decided when the player's client loads the badge list, so a player who just became admin may need to reconnect to see every desk option.
{% endhint %}

## Network and cache

You normally never need to touch these.

```lua
Config.Network = {
    LatentRate = 120000,        -- bytes per second for photo transfers
    IssueTimeout = 20000,       -- ms the issuer waits for the server's answer
}

Config.Cache = {
    Badges = 256,               -- issued badge rows kept in server memory
    Photos = 64,                -- photos kept in server memory
    DeliveredPerPlayer = 128,   -- photos the server remembers a client already has
}
```

| Option                     | Default  | Meaning                                                                                                                        |
| -------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `Network.LatentRate`       | `120000` | Bytes per second for photo transfers (issuer to server, server to viewers).                                                    |
| `Network.IssueTimeout`     | `20000`  | Milliseconds the issuer waits before "The server did not answer".                                                              |
| `Cache.Badges`             | `256`    | Issued badge records kept in server memory. The least recently used one is dropped when full.                                  |
| `Cache.Photos`             | `64`     | Photos kept in server memory.                                                                                                  |
| `Cache.DeliveredPerPlayer` | `128`    | Photos the server remembers each player already has. A photo is sent once per session; later presentations only send the text. |


---

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