> For the complete documentation index, see [llms.txt](https://acestudios.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://acestudios.gitbook.io/docs/guides/ox-inventory-items.md).

# ox\_inventory Items

Add AceStudios items and images to ox\_inventory, with the correct start order.

Several resources use inventory items. This page covers the setup they share on **ox\_inventory**.

## Overview

| Resource                                                                                | Items                 | Item data                            | Images       | Start before `ox_inventory`? |
| --------------------------------------------------------------------------------------- | --------------------- | ------------------------------------ | ------------ | :--------------------------: |
| [Advanced MultiPacks](/docs/inventory-and-items/advanced-multipacks/installation.md)    | 11 bags               | `inv-data.txt` (generated)           | `_Images/`   |           ✅ **Yes**          |
| [Serial Scratcher](/docs/inventory-and-items/serial-scratcher/installation.md)          | 3 tools               | `data-for-ox-inv.md`                 | `_Images/`   |           ✅ **Yes**          |
| [Deployables](/docs/inventory-and-items/deployables/installation.md)                    | 13 deployables        | `generated_items.txt` (generated)    | `imgs/`      |      No, start **after**     |
| [Recon Optics](/docs/tactical-and-military/recon-optics/installation.md)                | 2 optics              | Example in docs / ReadMe             | `_images/`   |              No              |
| [Helmet Camera](/docs/tactical-and-military/helmet-camera/installation.md)              | 2 cameras             | Example in docs / ReadMe             | `_Images/`   |              No              |
| [Date Farming & Packaging Job](/docs/jobs-and-economy/date-farming-job/installation.md) | 3 products            | Add them yourself                    | `imgs/`      |      No, start **after**     |
| [Compensation Stashes](/docs/inventory-and-items/compensation-stashes/installation.md)  | — (uses stashes)      | —                                    | —            |      No, start **after**     |
| [Live Radio](/docs/roleplay/live-radio/installation.md)                                 | Up to 4, all optional | `items/ox_inventory.lua` (generated) | Add your own |      No, start **after**     |

## Start order

{% code title="server.cfg" %}

```properties
ensure oxmysql
ensure ox_lib

# Must start BEFORE ox_inventory
ensure ace_advanced_multipacks
ensure ace_serialscratch

ensure ox_inventory

# Start AFTER ox_inventory (detection / stashes)
ensure ace_deployables
ensure ace_datepackagingJob
ensure ace_compstashes
ensure ace_reconoptics
ensure ace_helmetcam
```

{% endcode %}

## Adding item definitions

Item definitions go in `ox_inventory/data/items.lua`, inside the returned table:

{% code title="ox\_inventory/data/items.lua" %}

```lua
return {
    -- existing items ...

    ['binoculars'] = {
        label = 'Binoculars',
        weight = 200,
        stack = false,
        consume = 0,
        client = {
            export = 'ace_reconoptics.activateACEBinoculars'
        }
    },
}
```

{% endcode %}

### `client.export` vs `server.export`

| Resource            | Export type  | Format                                                                                                                                                                                                |
| ------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Advanced MultiPacks | `client`     | `ace_advanced_multipacks.aceopenpack_<bag>`                                                                                                                                                           |
| Deployables         | `client`     | `ace_deployables.deploy_<key>`                                                                                                                                                                        |
| Recon Optics        | `client`     | `ace_reconoptics.activateACEBinoculars` / `activateACESpottingScope`                                                                                                                                  |
| Helmet Camera       | `client`     | `ace_helmetcam.ActivateRightCameraPov` / `ActivateLeftCameraPov`                                                                                                                                      |
| Serial Scratcher    | **`server`** | `ace_serialscratch.halfscratchserial` / `fullscratchserial` / `serialnumberforensictool`                                                                                                              |
| Live Radio          | **`server`** | `ace_liveradio.useHeadphones` / `useBoombox` / `useDJDeck` (only when each feature's `Item` option is set — see [Commands, Exports & Items](/docs/roleplay/live-radio/commands-and-exports.md#items)) |

{% hint style="danger" %}
The export string is `resource_name.exportName`. **Renaming a resource folder breaks its items.**
{% endhint %}

## Adding images

Copy each resource's images into **`ox_inventory/web/images/`**. The image file name must match the item name, for example `backpack.png` for the `backpack` item.

## Applying changes

ox\_inventory loads `items.lua` when it starts. After adding items, **restart the server**, or at least restart `ox_inventory` and then the resources that depend on it.
