# Conversions

## Conversions

To speed up migrating to our resource, we have built conversion tools for popular consumable setups. These tools read your existing item configurations and automatically create equivalent items in zyke\_consumables.

Ease of use is a priority for us. If you use a consumable resource that we don't support yet, or if there's a format you'd like the Quick Import to recognize, just ask in our [Discord](https://discord.gg/zykeresources). We are always happy to add more tools and will look into it.

***

#### Table of Contents

* [Quick Import](#quick-import)
* [Supported Resources](#supported-resources)
* [ox\_inventory](#ox_inventory)
* [qb-smallresources](#qb-smallresources)
* [pixel-consumables](#pixel-consumables)
* [Activating Items](#activating-items)
* [FAQ](#faq)

***

#### Quick Import

The `consum:import` command is the fastest way to bring consumable items into zyke\_consumables. Instead of requiring the original resource to be running on your server, you simply **paste your item definitions** into an in-game form and the system handles the rest.

It currently recognizes **ox\_inventory** item definitions (items with `client.status` fields). If you need support for a different format, let us know in our [Discord](https://discord.gg/zykeresources) and we can add more preset recognition.

Unlike the other conversion commands, `consum:import` is an **in-game command** (not server console).

#### Importing from a creator's item pack

Many creators (like DJ's Collections) provide their items in two versions: **non-consumable** (for your inventory) and **consumable** (for our import). This is the recommended workflow:

{% stepper %}
{% step %}

#### Add clean items to your inventory

Copy the **non-consumable** item definitions from the creator's docs and paste them into your `ox_inventory/data/items.lua`.

Restart your server so ox\_inventory picks up the new items.
{% endstep %}

{% step %}

#### Import the consumable definitions

Go in-game and type `/consum:import`. Paste the **consumable** item definitions into the form and click **Import**.
{% endstep %}

{% step %}

#### Activate the items

If everything looks correct, run `/consum:activate_batch` in-game (or `consum:activate_batch` in the server console) to activate your imported items.

Alternatively, open the Creator Menu (`/consum:ic`) to review and activate them individually.
{% endstep %}
{% endstepper %}

#### Importing from your existing server

If you are migrating items that are already consumable on your server (they have `client.status` in your `ox_inventory/data/items.lua`):

{% stepper %}
{% step %}

#### Run the import

Go in-game and type `/consum:import`. Paste the consumable item definitions into the form and click **Import**.
{% endstep %}

{% step %}

#### Update your inventory items

The import generates a clean file in the `import_batches` folder inside zyke\_consumables (e.g. `batch_2026-04-10_18-00-00.lua`). This file contains your items with all consumable data stripped out. Copy the contents into your `ox_inventory/data/items.lua`, replacing the old consumable versions.

Each batch file ends with a trailing comma, so you can safely paste multiple batches into your items file without worrying about Lua syntax errors.
{% endstep %}

{% step %}

#### Restart the server

Restart so ox\_inventory loads the clean items and no longer registers them as consumable. This is required so zyke\_consumables can register them as usable instead.
{% endstep %}

{% step %}

### Activate the items

If everything looks correct, run `/consum:activate_batch` in-game (or `consum:activate_batch` in the server console) to activate your imported items.

Alternatively, open the Creator Menu (`/consum:ic`) to review and activate them individually.
{% endstep %}
{% endstepper %}

***

#### Supported Resources

| Resource          | Command         | Where          | Auto-detect on Startup                   |
| ----------------- | --------------- | -------------- | ---------------------------------------- |
| ox\_inventory     | `consum:import` | In-game        | N/A (paste-based, no resource required)  |
| ox\_inventory     | `ox_convert`    | Server console | Yes (if `fetchOxConversions` is enabled) |
| qb-smallresources | `qb_convert`    | Server console | No                                       |
| pixel-consumables | `pixel_convert` | Server console | No                                       |

All server console commands are **server console only** (not available in the F8 client console). Remember that you don't prefix the slash for commands in the server console.

Items that are already configured in zyke\_consumables are automatically skipped during conversion.

#### Which method should I use?

* **Quick Import (`consum:import`)**: Best for adding items from creator packs, or importing specific items by pasting their definitions. Works in-game and doesn't require the original resource to be running.
* **ox\_inventory (`ox_convert`)**: Best for migrating an entire server in one go. Requires ox\_inventory to be running and reads directly from its files. Also generates a cleaned `items.lua` to replace the original.
* **qb-smallresources / pixel-consumables**: Use these if you are migrating from those specific resources. They read from the running resource's config.

***

#### ox\_inventory

The tool detects items in `ox_inventory/data/items.lua` that have a `client.status` field. It converts status effects (hunger, thirst, stress) into consumption rewards, along with animations and props.

This is a server-side migration tool. It requires ox\_inventory to be running on your server so it can read its item files directly. If you just want to import items from a creator pack, use Quick Import instead.

Make sure `fetchOxConversions` is enabled in your config before starting.

{% stepper %}
{% step %}

#### Restart zyke\_consumables

When the script starts, it will display the number of available conversions in the server console.
{% endstep %}

{% step %}

#### Run the command

Run `ox_convert` in the server console. This creates all detected consumable items in zyke\_consumables and generates a cleaned `items.lua` file in the root of the zyke\_consumables folder.
{% endstep %}

{% step %}

#### Replace your items file

The generated `items.lua` contains your items with all the old consumable data stripped out (animations, props, status effects, etc.), leaving only the inventory-relevant fields.

Copy this file into `ox_inventory/data/items.lua`.

Make a backup of your original `items.lua` before replacing it.
{% endstep %}

{% step %}

#### Restart the server

Restart the server so both ox\_inventory and zyke\_consumables pick up the changes.
{% endstep %}

{% step %}

#### Activate items

See Activating Items below.
{% endstep %}
{% endstepper %}

***

#### qb-smallresources

The tool reads the `Config.Consumables` table from qb-smallresources and processes all categories: food, drink, alcohol, and custom items. Default animations and props are assigned based on item type.

Since qb-smallresources items don't typically have detailed prop/animation data, we recommend customizing these after conversion. The tool allows a blanket-conversion that speeds up getting all of the items over.

{% stepper %}
{% step %}

#### Make sure qb-smallresources is running

The resource needs to be started so the tool can read its config.
{% endstep %}

{% step %}

#### Run the command

Run `qb_convert` in the server console. All converted items are created as **inactive drafts**.

The following categories are processed:

| Category  | Item Type | Default Rewards         |
| --------- | --------- | ----------------------- |
| `eat`     | Food      | Food                    |
| `drink`   | Drink     | Drink                   |
| `alcohol` | Drink     | Drink + Alcohol         |
| `custom`  | Varies    | Based on replenish type |

Open the Creator Menu to review and customize each item before activating.
{% endstep %}

{% step %}

#### Activate items

See Activating Items below.
{% endstep %}
{% endstepper %}

***

#### pixel-consumables

The tool reads `Config.ConsumablesCustom` from pixel-consumables and converts replenish types (Hunger, Thirst, Stress, Alcohol), animations, and prop data.

{% stepper %}
{% step %}

#### Make sure pixel-consumables is available

The resource needs to be available so the tool can read its config.
{% endstep %}

{% step %}

#### Run the command

Run `pixel_convert` in the server console. Converted items are created as **inactive**.
{% endstep %}

{% step %}

#### Review your items

Open the Creator Menu to review and activate them.
{% endstep %}

{% step %}

#### Activate items

See Activating Items below.
{% endstep %}
{% endstepper %}

***

#### Activating Items

After conversion or import, items need to be activated before players can use them.

{% stepper %}
{% step %}

#### Option A: Batch activate (Quick Import)

If you used `consum:import`, run `/consum:activate_batch` in-game (or `consum:activate_batch` in the server console). This activates the most recent batch of imported items.
{% endstep %}

{% step %}

#### Option B: Force activate all

Run `consum:force_activate` in the server console. This activates **all** inactive items across every conversion method.
{% endstep %}

{% step %}

#### Option C: Manually activate each item

Open the Creator Menu (`/consum:ic`) and activate items individually. This is slower but lets you verify each item first. We recommend this approach since automatic conversions may not always be perfect.
{% endstep %}
{% endstepper %}

***

#### FAQ

**Q: Will running a conversion twice create duplicate items?** No. The tool skips any items that are already configured in zyke\_consumables.

**Q: Do I need to remove the old consumable resource after converting?** For ox\_inventory, you replace the items file so the old consumable behavior is removed. For qb-smallresources and pixel-consumables, you should stop those resources after conversion so they don't conflict.

**Q: Can I customize items after conversion?** Yes. All converted items can be fully edited in the Creator Menu. We recommend reviewing converted items since default animations and props may not match your specific items.

**Q: What if the conversion gets something wrong?** You can delete the item in the Creator Menu and recreate it manually, or simply edit the converted item to fix it. The conversion is a starting point, not a final result.

**Q: What's the difference between `consum:import` and `ox_convert`?** `consum:import` is an in-game command where you paste item definitions into a form. It doesn't require ox\_inventory to be running on your server, making it ideal for adding items from creator packs. `ox_convert` is a server console command that reads directly from the ox\_inventory resource files. It's designed for full server migrations and also generates a cleaned `items.lua` to replace the original with.

**Q: What are the files in the `import_batches` folder?** Each time you use `consum:import`, a timestamped file is generated in the `import_batches` folder inside zyke\_consumables containing the clean (non-consumable) versions of your imported items. Copy these into your `ox_inventory/data/items.lua` so that ox\_inventory doesn't try to handle the consumable behavior itself. Each batch is timestamped and nothing is ever overwritten, even across server restarts.

**Q: Can I combine multiple batch files?** Yes. Each batch file ends with a trailing comma, so you can safely paste the contents of multiple batch files into your `items.lua` one after another without Lua syntax errors.
