# Kivo Inventory

> ## Kivo Inventory - Installation Guide

### Overview

Kivo Inventory is a redesigned inventory system for FiveM servers, built on ox\_inventory version 2.44.1. This system includes two main components:

* **kivo-inv-bridge**: Bridge script for multi-framework support with balance system
* **ox\_inventory**: Redesigned inventory UI and functionality

### Installation Steps

#### 1. Start order

{% hint style="success" %}
if you're using the version 1.0.1+ of the bridge script, start order doesn't apply anymore
{% endhint %}

**IMPORTANT:** The `kivo-inv-bridge` resource must be started **before** the `ox_inventory` resource to ensure proper framework detection and balance system initialization.

Add the following to your `server.cfg` in this exact order:

```lua
ensure kivo-inv-bridge
ensure ox_inventory
```

#### 2. Configuration

**Bridge Configuration**

The bridge script can be configured via `kivo-inv-bridge/shared/config.lua`. Available settings include:

* **Avatar Settings**: Configure Discord and Steam avatar fetching
  * `DiscordBotToken`: Discord bot token for fetching Discord avatars
  * `SteamApiKey`: Steam Web API key for fetching Steam avatars
  * `Priority`: Avatar fetch priority ('discord' or 'steam')
  * `CacheDuration`: Avatar cache duration in seconds (0 = cache forever until disconnect)
* **Debug Settings**: Enable debug logging for troubleshooting
  * `Enabled`: Enable/disable debug prints
  * `LogAvatar`: Enable/disable avatar fetching logs

**Ox\_Inventory Configuration**

You can modify the ox\_inventory configurations as needed:

* Edit files in `ox_inventory/data/` for item definitions and other data
* Modify `ox_inventory/locales/` for language customization
* Configure modules in `ox_inventory/modules/` as per your framework needs

#### 3. Custom Version Integration

1. **Drag and drop** the entire `web/build/` folder into your custom version of ox\_inventory, replacing the existing build folder.
2. Ensure your custom ox\_inventory's `fxmanifest.lua` includes the build files:

   ```lua
   ui_page 'web/build/index.html'

   files {
       'web/build/index.html',
       'web/build/**/*',
       'web/images/*.png',
   }
   ```

#### 4. Dependencies

Make sure you have the following dependencies installed and started **before** kivo-inventory:

* `oxmysql` - Database resource
* `ox_lib` - Overextended library
* FiveM Server artifact 6116 or higher
* OneSync enabled

### Features

#### Bridge System

* Multi-framework support with automatic detection
* Player balance system integration
* Avatar fetching from Discord and Steam
* Server key generation and validation

#### Inventory System

* Custom redesigned UI
* Based on ox\_inventory 2.44.1
* Enhanced user experience
* Item images and icons included

### Troubleshooting

#### Common Issues

1. **Inventory not working**
   * Ensure `kivo-inv-bridge` is started before `ox_inventory`
   * Check that all dependencies are installed and running
   * Verify server artifact is 6116 or higher
2. **Avatar not loading**
   * Verify Discord bot token or Steam API key is configured correctly
   * Check debug logs by enabling `Config.Debug.LogAvatar = true`
   * Ensure the bot has proper permissions in your Discord server
3. **Custom build not working**
   * Make sure you copied the entire `web/build/` folder
   * Verify `fxmanifest.lua` points to the correct build paths
   * Clear your FiveM cache and restart the server

### File Structure

```apex
kivo-inventory/
├── kivo-inv-bridge/          # Bridge script (start first)
│   ├── client/               # Client-side scripts
│   ├── server/               # Server-side scripts
│   ├── shared/               # Shared configuration and framework detection
│   └── fxmanifest.lua        # Resource manifest
│
├── ox_inventory/             # Main inventory system
│   ├── client.lua            # Client initialization
│   ├── server.lua            # Server initialization
│   ├── data/                 # Item definitions and data
│   ├── locales/              # Language files
│   ├── modules/              # Framework modules
│   ├── web/                  # UI source code
│   │   ├── src/              # React source files
│   │   ├── build/            # Compiled UI (after npm run build)
│   │   └── package.json      # Node dependencies
│   └── fxmanifest.lua        # Resource manifest
│
└── doc.md                    # This documentation file
```

### Support

For issues, feature requests, or questions join our discord.

### Credits

* **ox\_inventory**: Original inventory system by Overextended
* **Dev**: Roroleroh, Royaly
* **Version**: Based on ox\_inventory 2.44.1


---

# 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://docs.kivostudios.net/scripts/kivo-inventory.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.
