# Configuration

## &#x20;All configuration options explained

```

⚙️ Configuration

All configuration files are in the `config/` folder.

General Config

File: `config/general.lua`

 Framework
Config.Framework = 'qb'    -- 'esx' or 'qb'
```

#### Language

```
Config.Locale = 'en'       -- 'tr' | 'en' | 'de'
```

Add new languages in `config/locales.lua`.

#### Inventory

```
Config.Inventory = 'ox'    -- 'esx' | 'qb' | 'ox' | 'qs' | 'lj'
```

#### Notifications

```
Config.Notify = 'ox_lib'   -- 'esx' | 'qb' | 'ox_lib' | 'custom'
```

If `ox_lib` is not installed, the script automatically falls back to your framework's notification system.

#### Progressbar

```
Config.Progressbar = 'default'  -- 'default' | 'ox_lib' | 'qb'
```

* `default` — Built-in NUI progressbar
* `ox_lib` — Uses ox\_lib progressbar (must be installed)
* `qb` — Uses qb-progressbar (must be installed)

#### Target System

```
Config.Target = false       -- false | 'ox' | 'qb'
```

* `false` — Marker + E key interaction
* `'ox'` — ox\_target zones
* `'qb'` — qb-target zones

#### Interaction (when Target = false)

```
Config.InteractKey   = 38   -- E key
Config.InteractLabel = nil  -- nil = uses locale
```

### Sound Effects

```
Config.Sounds = {
    enabled = true,
    craftStart   = { dict = 'DLC_HEIST_HACKING_SNAKE_SOUNDS', name = 'Beep_Green' },
    craftSuccess = { dict = 'HUD_AWARDS',                     name = 'RANK_UP' },
    craftFail    = { dict = 'HUD_FRONTEND_DEFAULT_SOUNDSET',  name = 'ERROR' },
    craftCancel  = { dict = 'HUD_FRONTEND_DEFAULT_SOUNDSET',  name = 'BACK' },
    levelUp      = { dict = 'HUD_AWARDS',                     name = 'FIRST_PLACE' },
}
```

### Level System

```
Config.Level = {
    enabled    = true,
    maxLevel   = 50,
    baseXP     = 100,
    multiplier = 1.5,

    bonuses = {
        speedReduction = { perLevel = 1.5,  maxBonus = 50  },
        successBoost   = { perLevel = 0.8,  maxBonus = 25  },
        bonusItem      = { perLevel = 0.5,  maxChance = 20 },
        materialSave   = { perLevel = 0.4,  maxChance = 15 },
    }
}

Config.FailXPPercent = 50   -- XP percentage on failed craft
```

#### Level Bonuses Table

| Level | Speed | Success | Bonus Item | Material Save |
| ----- | ----- | ------- | ---------- | ------------- |
| 10    | -15%  | +8%     | 5%         | 4%            |
| 20    | -30%  | +16%    | 10%        | 8%            |
| 30    | -45%  | +24%    | 15%        | 12%           |
| 50    | -50%  | +25%    | 20%        | 15%           |

### Craft Settings

```
Config.Craft = {
    failBehavior  = 'all_lost',  -- 'all_lost' | 'half_lost' | 'kept'
    cancelRefund  = true,        -- Refund materials on cancel
    minCraftTime  = 1,           -- Minimum craft time (seconds)
    maxQueue      = 5,           -- Max queue size
    timeTolerance = 2000,        -- Time tolerance for validation (ms)
}
```

#### Fail Behavior Options

| Value         | Description                                    |
| ------------- | ---------------------------------------------- |
| `'all_lost'`  | All materials are lost on failure              |
| `'half_lost'` | Half of materials are returned                 |
| `'kept'`      | All materials are returned (only time is lost) |

### Security

```
Config.Security = {
    tableDistanceCheck = true,
    maxTableDistance    = 10.0,
    rateLimit          = 3,
    logSuspicious      = true,
    kickOnExploit      = false,
    banOnExploit       = false,
    banSystem          = 'qb',     -- 'qb' | 'esx' | 'custom'
    banDuration        = 0,        -- 0 = permanent (minutes)
    banReason          = nil,      -- nil = uses locale
}
```

### Webhook

```
Config.Webhook = {
    enabled  = false,
    craft    = '',    -- Successful craft webhook URL
    fail     = '',    -- Failed craft webhook URL
    levelup  = '',    -- Level up webhook URL
    exploit  = '',    -- Exploit detection webhook URL
    admin    = '',    -- Admin action webhook URL

    colors = {
        success = 3066993,
        fail    = 15158332,
        levelup = 15844367,
        exploit = 10038562,
        admin   = 3447003,
    },

    serverName = 'My Server',
    serverLogo = '',
}
```

***

### Admin Panel

```
Config.AdminUI = {
    enabled  = true,
    command  = 'craftadmin',
    hotkey   = false,          -- false or key code (e.g., 168 = F7)
}
```

***

### Debug

```
Config.Debug = false    -- Set to true for development
```

Debug mode prints detailed information to F8 console and shows target zones visually.


---

# 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://elena-scripts.gitbook.io/elenascripts/gameplay/craft-system/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.
