> For the complete documentation index, see [llms.txt](https://docs.northscripts.dev/site/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.northscripts.dev/site/documentation/resources/ox-inventory-rework/configuration.md).

# Configuration

There are two places:

| Where                                     | What                                                                                             |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `server.cfg` convars (`setup/server.cfg`) | The base ox\_inventory options: framework, slots, weight, keys, markers, loot tables, log level… |
| `config.lua`                              | Everything this rework adds: theme, branding, logs, throwing, drops, keys, clothing, trunks…     |

#### 4.1 Main convars

| Convar                               | Default                                | Description                                                                                                                |
| ------------------------------------ | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `inventory:framework`                | `esx`                                  | `esx`, `qb`, `qbx`, `ox`, `nd`                                                                                             |
| `inventory:slots`                    | `50`                                   | Player slots                                                                                                               |
| `inventory:weight`                   | `30000`                                | Player max weight (grams)                                                                                                  |
| `inventory:dropslots` / `dropweight` | `50` / `30000`                         | Ground drop size                                                                                                           |
| `inventory:keys`                     | `["F2","K","TAB"]`                     | Open inventory / open secondary / quick-use wheel                                                                          |
| `inventory:target`                   | `false`                                | Use ox\_target instead of markers                                                                                          |
| `inventory:dropprops`                | `true`                                 | Show props for drops instead of markers                                                                                    |
| `inventory:dropmodel`                | `prop_med_bag_01b`                     | Generic drop bag                                                                                                           |
| `inventory:police`                   | `["police","sheriff"]`                 | Groups treated as police (evidence, searching)                                                                             |
| `inventory:loglevel`                 | `1`                                    | `0` = no logs (Discord too), `1` = normal, `2` = also every add/remove/purchase                                            |
| `inventory:clearstashes`             | `6 MONTH`                              | Delete stashes unused for this long                                                                                        |
| `inventory:enablestealcommand`       | `true`                                 | Enables `/steal`                                                                                                           |
| `inventory:validhosts`               | `["r2.fivemanage.com","i.fmfile.com"]` | Hosts allowed for custom item images (`metadata.imageurl`)                                                                 |
| `inventory:webhook`                  | `""`                                   | Webhook that checks custom images. **If it is empty, every image URL is accepted.**                                        |
| `inventory:discordtoken`             | `""`                                   | Discord bot token for player avatars. Always use `set`, **never `setr`**: a replicated convar can be read by every client. |

See `setup/server.cfg` for the complete, commented list.

#### 4.2 config.lua

```lua
-- Default colours for players who have not picked their own
Config.Theme = { AccentColor = '#D9FD05', IconColor = '#121212' }

-- Console debug and the /trunkdebug command. Keep it false in production.
Config.Debug = false

-- Who may use /trunkmapping (group name -> minimum grade)
Config.TrunkMapping = { Groups = { admin = 0, superadmin = 0, owner = 0 } }

-- true = anything can be thrown (items with no prop use a paper bag)
Config.Placement = { ThrowAnyItem = false }

Config.Throw = {
    Timeout = 30000,       -- ms before an unfinished throw cancels itself
    ReleaseDelay = 400,    -- ms between click and release (matches the animation)
    MaxDistance = 49.0,    -- metres
    DefaultModel = 'prop_paper_bag_01',
}

-- Clothing that can be knocked off when hit
Config.Knock = { Clothing = { 'hat', 'glasses' }, Window = 2500, Poll = 150 }

Config.Drops = {
    BagModel = 'prop_paper_bag_01',   -- items without their own prop
    BatchModel = 'prop_med_bag_01b',  -- used when too many props are around
    SyncDistance = 50,                -- metres
    ZoneRadius = 1.0,                 -- radius of an Area Deposit
}

-- Default keys (players can rebind them in Settings > Key Bindings > FiveM)
Config.Keys = {
    ReloadWeapon = 'r',
    PlaceCarried = 'y',
    DropCarried = 'j',
    FoldContainer = 'h',
    ToggleGizmo = 'g',
    GizmoMode = 'r',
}

Config.Clothing = {
    Enabled = true,         -- false = hides and disables the whole clothing system
    AppearanceSync = true,  -- reapply worn clothing after the appearance script
    ReapplyDelay = 1000,    -- ms, raise it on slow servers
}

Config.Trunk = { ... }                -- trunk bay size for vehicles with no mapping (see 5.14)
Config.OutlineColor = '217,253,5'     -- outline of highlighted objects, "r,g,b"

Config.Branding = {
    LogoUrl = 'https://your-cdn/logo.png',
    Title = 'Your inventory',
    Subtitle = 'weight and space are limited here...',
}

Config.Logs = { ... }                 -- see Discord logs
```

With **`Config.Clothing.Enabled = false`**:

* clothing items, the character preview, outfits, `/givecloth` and `CreateClothingItem` are disabled;
* the backpack, parachute and bulletproof vest keep working.

Use this if you want to keep your usual clothing script.
