# Installation & Configuration

First, you need to install the scripts **required** for **Qubit Looting** to work. After installing these scripts, you can put **qubit-looting** into your resources folder and run it.

* oxmysql / mysql-async
* ox\_lib - [**Download Here**](https://github.com/overextended/ox_lib/releases/download/v3.11.0/ox_lib.zip)
* ox\_target - [**Download Here**](https://github.com/overextended/ox_target/releases/download/v1.13.1/ox_target.zip)

Qubit Looting comes with a ready-made loot meta, with loot configured for a long-lasting survival experience. If you want, you can remove these default loots and create your own loot meta. To protect copyright, we cannot share the image of the items

## 1. Framework Configration

**Qubit Looting** supports ESX and QB frameworks. If you're using a different framework, unfortunately you won't be able to run **Qubit Looting**.

Open the `config.lua` and `fxmanifest.lua` change framework setttings for your needs

<details>

<summary>QBCore Settings</summary>

If you're using the QBCore / QBX framework, you should configure the framework settings in the config as follows

&#x20;Open `config.lua` and change these lines

```lua
Config.Framework = "QB" -- QB, oldESX, ESX
Config.CoreName = 'qb-core' -- qb-core, es_extended
```

</details>

<details>

<summary>ESX Settings</summary>

If you're using the ESX framework, you should configure the framework settings in the config as follows

&#x20;Open `config.lua` and change these lines

```lua
Config.Framework = "ESX" -- QB, oldESX, ESX
Config.CoreName = 'es_extended' -- qb-core, es_extended
```

</details>

## 2. Item Definition

All items in **Config.Items** are fully customizable. we will define the items to be placed inside the loots. You can set their rarity color, label, and the scale they will have in the inventory.

{% hint style="info" %}
**rarityColor** field is only change color, you can change from **Config.rarity**
{% endhint %}

```lua
["garbage"] = { -- Item Inventory Name
  label = "Garbage", -- UI Name
  description = "Recyclable waste material", -- UI Description
  fullscale = false, -- UI Fullscale or Compact view
  rarityColor = "verycommon", -- UI Rarity color
},
```

## 3. Rarity Definition

You can edit all rarity rates here with the names and rarity colors you want to set, and you can also change their rates as you wish. Please make sure that the total equals 100% and distribute the rates from highest to lowest. 100% <> %0

```lua
-- Rarity Drop Rates (Percentage based)
Config.rarity = {
    verycommon = {0, 50, '#ffffff'},    -- 50% Chance
    common = {50, 75, '#1eff00'},       -- 25% Chance
    uncommon = {75, 90, '#0070dd'},     -- 15% Chance
    rare = {90, 97, '#a335ee'},         -- 7% Chance
    veryrare = {97, 99, '#ff8000'},     -- 2% Chance
    legendary = {99, 100, '#ffd700'}    -- 1% Chance
}

```

## 4. Lootable Definition

In this area, we will make the props we want lootable. You can define as many Lootables as you want according to the schema below.

```lua
{
    name = "verylow", -- Custom Lootable Name ( Example : "bad,good,super" )
    description = "Trash bins, small boxes", -- Description for understanding, not in-game only config.
    props = { -- Lootable Prop Hash List
        -838860344, -1543210774, -756152956, -1340926540, 153748523
    },
    loots = { -- Loot Search Configration, all rarity is changeable
        -- if you want you can remove any category like "verycommon" or "rare"
        verycommon = { -- 50% Chance
            {name = "garbage", min = 1, max = 2},
            {name = "scrapofclothing", min = 1, max = 2},
            {name = "fabric", min = 1, max = 2},
            {name = "plastic", min = 1, max = 2},
            {name = "glass", min = 1, max = 2}
        },
        common = { -- 25% Chance
            {name = "scrapofclothing", min = 1, max = 2},
            {name = "fabric", min = 1, max = 2},
            {name = "plastic", min = 1, max = 2},
            {name = "glass", min = 1, max = 2}
        },
        uncommon = { -- 15% Chance
            {name = "fabric", min = 1, max = 3},
            {name = "plastic", min = 1, max = 3},
            {name = "glass", min = 1, max = 3}
        },
        rare = { -- 7% Chance
            {name = "fabric", min = 1, max = 4},
            {name = "glass", min = 1, max = 4},
            {name = "plastic", min = 1, max = 4},
            {name = "weapon_bat", min = 0, max = 1},
        },
        veryrare = { -- 2% Chance
            {name = "fabric", min = 1, max = 5},
            {name = "glass", min = 1, max = 5},
            {name = "weapon_bat", min = 0, max = 1},
            {name = "weapon_crowbar", min = 0, max = 1},
        },
        legendary = { -- 1% Chance
            {name = "weapon_knife", min = 1, max = 1},
            {name = "weapon_crowbar", min = 1, max = 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.qubitstudios.net/fivem-scripts/prop-search/installation-and-configuration.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.
