# Configuration

The config lives in three files:

| File | What it holds |
|---|---|
| `shared/config.lua` | Everything except shops and recipes |
| `shared/shops.lua` | `Config.Shops` |
| `shared/crafting.lua` | `Config.Recipes` and `Config.Crafting` |

:::hint{type="info" title="Live settings"}
Many values can also be changed in game in `/invadmin` → **Settings** without a restart. Those changes are stored separately and override the file. See [Admin panel](/new/inventory-v2/admin-panel#settings).
:::

## General

| Option | Default | Description |
|---|---|---|
| `Config.Locale` | `'en'` | Language file from `locales/`. |
| `Config.Debug` | `false` | Extra console output. |
| `Config.Keys` | `TAB`, `Z`, `E` | Default keys for open, hotbar and interact. Players can rebind them. |
| `Config.HotbarSize` | `5` | Number of hotbar slots. |
| `Config.SaveInterval` | `60` | Seconds between database saves of changed inventories. |
| `Config.ImagePath` | `'images/'` | Where item images are loaded from. |
| `Config.InteractDistance` | `3.0` | Distance for ground items, search and similar. |
| `Config.GiveDistance` | `3.5` | Max distance to the person you give an item to. |
| `Config.StartItems` | water, sandwich, phone | Items a new character gets once. |
| `Config.AdminGroups` | `admin`, `superadmin`, `god` | Framework groups with admin access, in addition to the ACE `command.koja-inventory-v2`. |
| `Config.Webhooks` | empty | Discord webhooks for `give`, `drop`, `admin`, `shop` and `craft` logs. |

## Player and equipment

| Option | Default | Description |
|---|---|---|
| `Config.Player.width` / `height` | `10` / `5` | Pocket grid size in cells. |
| `Config.Player.maxWeight` | `35000` | Carry limit in grams for pockets, equipment and the worn backpack together. |
| `Config.Slots` | backpack, vest, primary, secondary | Built-in equipment slots. An item goes in a slot when its `equip` matches the slot's `accepts`. |

## Cash

`Config.Cash.enabled` makes `money` and `black_money` real items that mirror the framework accounts in both directions. `Config.Cash.accounts` maps each item to the ESX and QBCore account names.

## ox_inventory compatibility

| Option | Default | Description |
|---|---|---|
| `Config.Ox.enabled` | `true` | Turns on the ox API, the data import and the migration. |
| `Config.Ox.sources` | `ox_inventory/data/`, then `ox/` | Where the ox `items.lua`, `weapons.lua`, `shops.lua`, `stashes.lua` and `crafting.lua` are read from. |
| `importItems`, `importShops`, `importStashes`, `importCrafting` | `true` | What to import. |
| `migratePlayers` | `true` | Import a player's ox inventory the first time they join. |
| `exports` | `true` | Also answer `exports.ox_inventory` calls. |
| `esxBridge` | `true` | Feed ESX's ox mode (`xPlayer.addInventoryItem` and so on). |
| `stackSize` / `ammoStack` | `100` / `250` | Stack size for imported items and ammo. |
| `scrapItem` | `'scrap_metal'` | What imported weapons salvage into. |

## Clothing and gear

| Option | Default | Description |
|---|---|---|
| `Config.Clothing.enabled` | `true` | One slot per clothing piece. |
| `Config.Clothing.appearance` | `'illenium-appearance'` | Appearance resource to save to and read item names and images from. |
| `Config.Clothing.replaced` | `'storage'` | Where a piece goes when you put another one on: `'storage'` (your pockets) or `'delete'`. |
| `Config.Clothing.watch` | `enabled, interval 1000, settle 2000, grace 3000` | Reads clothes put on by other scripts. A change must stay `settle` ms before it is synced; nothing syncs in vehicles or ragdoll and for `grace` ms after. |
| `Config.Clothing.categories` | 11 pieces | Key, prop or component id, label, size and weight of each clothing slot. |
| `Config.Clothing.naked` | GTA defaults | Drawable that counts as "nothing worn" per component and gender. |
| `Config.Gear.enabled` | `true` | Shows the backpack (component 5) and vest (component 9) on the character. The look comes from the item `ped` field. |
| `Config.Outfits` | `enabled, nameMax 32, duration 3500` | Outfit items and outfit bags. |

## Vehicles

| Option | Description |
|---|---|
| `Config.Trunk.default` / `classes` / `models` | Trunk grid and weight by vehicle class (0 to 20) or model. `false` means no trunk. |
| `Config.Trunk.frontTrunk` | Models whose trunk is at the front. |
| `Config.Glovebox` | Glovebox grid and weight, per class. |
| `Config.TrunkProps` | Trunk contents shown as props in the car: `maxProps`, `renderDistance`, `floorDepth`, `margin`, prop models by size, `alwaysVisible` for pickups. |

## Drops

`Config.Drops` controls ground drops: grid size and weight, `lifetime` (seconds), `mergeRadius` (drops closer than this merge), `maxPerPlayer`, `renderDistance`, physics settling (`dropHeight`, `settleTimeout`, `settleSpeed`) and the pile threshold. `Config.DropDots` draws the small dots over items on the ground.

## Stashes

`Config.Stashes` is a list of `{ name, label, coords, radius, width, height, maxWeight, jobs, shared }`. `shared = false` gives every player their own stash at that spot. You can also create stashes in game. See [Admin panel](/new/inventory-v2/admin-panel#locations).

## Search, frisk and give

| Option | Description |
|---|---|
| `Config.Search` | Jobs that can use `/search` and whether the target must have hands up or be dead. |
| `Config.Frisk` | Frisking from behind: `command`, `key`, `target` (ox_target option), `distance`, `angle`, reveal timing, which states allow it (hands up animations, cuffed, dead). |
| `Config.Handover` | The give flow: offer `timeout`, cooldowns, hand prop and animations, `pickTimeout` and `pickAngle` for choosing the receiver with the camera. |

## Weapons

| Option | Default | Description |
|---|---|---|
| `Config.Weapons.disableWeaponWheel` | `true` | Weapons are drawn from the hotbar only. The radio wheel in vehicles still works. |
| `Config.Weapons.saveAmmoInterval` | `10` | Seconds between ammo reports from the client. |
| `inVehicle`, `vehicleDriver`, `vehiclePassenger`, `vehicleDenyClasses` | | Drive-by rules. Bicycles are blocked by default. |
| `Config.Throw` | | Throwing the held weapon: key, charge time, force, max distance, from-vehicle rules and a `deny` list. |
| `Config.Workshop` | `enabled, fov 38` | The 3D attachment workshop. |

## Held items

`Config.Hands` controls items held in the hand: the keys (`E` use, right mouse throw, left mouse put down, `X` put away), hold and carry animations, props per model in `props`, and items that cannot be held in `deny`.

## Durability

| Option | Default | Description |
|---|---|---|
| `Config.Durability.enabled` | `true` | Weapons and tools wear out and can be repaired. |
| `broken` | `'keep'` | At 0%: `'keep'` (unusable until repaired) or `'remove'` (the item falls apart). |
| `weapons.perShot` | `0.05` | Percent lost per shot. `weapons.classes` overrides it by name pattern (snipers, shotguns, SMGs, pistols...). |
| `tools` | lockpick 25, fishing_rod 2, shovel 4 | Percent lost per use. |
| `craftTools` | lockpick 10, repairkit 8 | Percent lost when used as a crafting tool. |
| `repairs` | weapon_kit, repairkit, scrap_metal | Repair items: `amount`, `categories` or `items` they can repair, `duration`. |

An item can override all of this with its own `durability = { shot, use, craft }`. See [Items](/new/inventory-v2/items).

## Shops

Each entry in `shared/shops.lua`:

```lua title="shared/shops.lua"
{
    name = 'general',
    label = '24/7 Store',
    blip = { sprite = 52, color = 2, scale = 0.7 },
    width = 8,
    locations = { vec3(25.7, -1347.3, 29.49) },
    jobs = nil,
    items = {
        { name = 'water', price = 6 },
        { name = 'bandage', price = 35, stock = 20 },
    },
}
```

`stock` limits how many can be bought until the shop restocks. Shops can also be created in game.

## Crafting

```lua title="shared/crafting.lua"
Config.Recipes = {
    lockpick = {
        result = { name = 'lockpick', count = 1 },
        ingredients = { scrap_metal = 2 },
        tools = { 'repairkit' },
        duration = 4000,
    },
}

Config.Crafting = {
    aliases = { scrap_metal = { 'scrapmetal' }, cloth = { 'clothe' } },
    hand = { 'bandage', 'lockpick', 'backpack_small' },
    benches = {
        { name = 'workbench', label = 'Workbench', locations = { vec3(-347.11, -133.33, 39.01) }, recipes = { 'lockpick', 'radio' } },
    },
}
```

- `tools` are needed but not used up (they lose durability if the durability system tracks them).
- `aliases` let other item names count as an ingredient, for example the ox item `scrapmetal` for `scrap_metal`.
- `hand` lists recipes available from the inventory without a bench.
- Benches can also be created in game.

## Other

| Option | Description |
|---|---|
| `Config.ItemNotify` | The item popup on the right when you get or lose items. |
| `Config.Signs` | The floating sign over shops, benches and stashes. |
| `Config.Dumpsters` | Searchable dumpsters: models, loot table, refill time, searches per hour. |
| `Config.Dummies` | Test peds for admins (`/invdummy`). |
| `Config.DebugKits` | Item kits for `/invkit`. |
