> For the complete documentation index, see [llms.txt](https://wiki.qfdevelopers.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.qfdevelopers.com/scripts/editor/configuration.md).

# Configuration

Page dedicated to how to configure our Multicharacter

#### Configuration Guide (`config.lua`)

**Framework & Inventory Detection** While the script attempts to auto-detect your framework, you must explicitly define your inventory system so starter items are distributed correctly.

```lua
-- Supported options: 'ox_inventory', 'esx', 'qb'
Config.Inventory = 'ox_inventory' 
```

**Language & Formatting** One option drives both the translation files in `locales/` and the number and date formatting inside the UI. Both notations are accepted, so `'de'` and `"de-DE"` resolve to the same translation.

```lua
Config.Locale = "en-US" -- en, de, es, fr, it, ja, ko, pl, pt
Config.Currency = "USD"
Config.DateFormat = "MM/dd/yyyy"
```

Missing keys in a translation fall back to English, so a partially translated locale never shows raw keys.

{% hint style="info" %}
Up to and including **1.3.1** `Config.Locale` was declared twice in `config.lua`, and the second declaration silently overwrote the first — the server then always fell back to English. Fixed in **1.3.2**. On older versions, make sure only one `Config.Locale` line exists in your `config.lua`.
{% endhint %}

**Character Slot Management** You have absolute control over how many characters a player can create. The `Config.Slots` array determines the maximum slot count and the properties of each slot.

```lua
Config.Slots = {
    { type = "free" }, -- Slot 1: Available immediately
    { type = "free" }, -- Slot 2: Available immediately
    { type = "paid", url = "https://yourtebex.com/category/slots" }, -- Slot 3: Shows a purchase prompt
    { type = "locked" }, -- Slot 4: Completely hidden until unlocked by an Admin
}
```

**Cinematic Cutscenes** You can map specific interior locations to specific character slots to create unique backdrops during selection.

```lua
Config.Cutscenes = {
    -- Slot 1 will load the Agency Office interior with a specific timecycle modifier
    [1] = { 
        name = "fix_agy_int1", 
        timecycle = "super_lod", 
        coords = vector3(-1147.0691, -1522.1497, 10.6327) 
    },
}
```

**Starter Items** Packages offered to a player during character creation. Every item accepts an optional `metadata` table, passed on as ox\_inventory metadata or qb-inventory info.

```lua
Config.StarterItems = {
    enable = true,
    packages = {
        {
            id = "basic",
            label = "Basic Starter Package",
            description = "Essential food, water, and tools to get you started.",
            default = true, -- given when the player is not asked to choose
            items = {
                { name = "burger", count = 3, label = "Burger", icon = "utensils" },
                { name = "water",  count = 5, label = "Water",  icon = "droplet" },
            }
        }
    }
}
```

`label` and `icon` are only used for the preview in the UI, `name` and `count` are what actually reaches the inventory.

**Metadata placeholders** Values inside `metadata` may contain placeholders that are filled with the freshly created character, so documents can be handed out already completed:

`%firstname%` `%lastname%` `%fullname%` `%birthdate%` `%gender%` `%sex%` `%nationality%` `%height%` `%citizenid%`

```lua
{
    name = "id_card", count = 1, label = "ID Card", icon = "id-card",
    metadata = {
        firstname   = "%firstname%",
        lastname    = "%lastname%",
        birthdate   = "%birthdate%",
        gender      = "%gender%",
        nationality = "%nationality%",
        citizenid   = "%citizenid%"
    }
},
{
    name = "driver_license", count = 1, label = "Driver License", icon = "id-card",
    metadata = {
        firstname = "%firstname%",
        lastname  = "%lastname%",
        birthdate = "%birthdate%",
        type      = "Class C Driver License"
    }
}
```

Adjust the item names and the metadata keys to whatever your ID card script expects. Items carrying metadata are never merged into a single stack, so two documents stay two separate entries. Unknown placeholders are left in the text untouched.

{% hint style="info" %}
`metadata` requires **1.3.2** or newer.
{% endhint %}

**Character Templates & Starting Wealth** If `Config.CharacterTemplate.enable = true`, players are prompted to select a "Background" (e.g., Gangster, Civilian, Police) during creation. This background defines their starting cash, bank balance, and potentially starting vehicles.

If templates are disabled, you must define the default starting money using a strict JSON string:

```lua
Config.DefaultMoneyQuery = '{"bank":50000,"money":500}'
```


---

# 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, and the optional `goal` query parameter:

```
GET https://wiki.qfdevelopers.com/scripts/editor/configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
