> 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/inventory-and-items/advanced-multipacks/configuration.md).

# Configuration

Configure bags, item rules and generators in ace\_advanced\_multipacks.

Settings are in `config.lua`. Item groups are in `weapons_list.lua`.

## General

| Option                  | Type    | Default                | Description                                                                                           |
| ----------------------- | ------- | ---------------------- | ----------------------------------------------------------------------------------------------------- |
| `Config.PrintDebugMsgs` | boolean | `false`                | Prints debug messages.                                                                                |
| `InventoryExport`       | export  | `exports.ox_inventory` | Your ox\_inventory export. Only change it if ox\_inventory runs under a different resource name.      |
| `AllowMultipleBags`     | boolean | `false`                | Lets players carry more than one of the same bag. **Not recommended**, and support for it is limited. |
| `ExportItemList`        | boolean | `true`                 | Generates ox\_inventory item entries for every bag into `inv-data.txt`.                               |
| `GenerateShopData`      | boolean | `true`                 | Generates shop entries into `shop-data.txt`.                                                          |
| `WhiteListedPeds`       | table   | freemode peds          | Ped models allowed to use bags. See below.                                                            |

{% hint style="info" %}
The `ExportItemList` comment also mentions the server-console command `ExportAceData`. See [Commands & Exports](/docs/inventory-and-items/advanced-multipacks/commands-and-exports.md).
{% endhint %}

### Ped whitelist

```lua
WhiteListedPeds = {
    Male = { 'mp_m_freemode_01' },
    Female = { 'mp_f_freemode_01' }
}
```

Players using a ped model that isn't listed get the message *"You are not allowed to use backpacks!"*. The bag clothing models are made for the freemode peds.

## Bags

`Config.MultiPacks` is a table keyed by the **item name**:

```lua
Config.MultiPacks = {
    ['fannypack'] = {
        label = 'Fanny Pack',
        slots = 4,
        weight = 5500,
        MaleComponent = { componentid = 5, drawable = 112, texture = 0 },
        FemaleComponent = { componentid = 5, drawable = 112, texture = 0 },
        disallowedItems = { GetList.largeWeapons, GetList.mediumWeapons, GetList.utilityWeapons }
    },
}
```

| Field               | Required | Description                                                                   |
| ------------------- | :------: | ----------------------------------------------------------------------------- |
| key (`'fannypack'`) |     ✅    | Item name. Must match the item in ox\_inventory `items.lua`.                  |
| `label`             |     ✅    | Display name of the bag.                                                      |
| `slots`             |     ✅    | Number of slots in the bag. 5 slots make one row.                             |
| `weight`            |     ✅    | Weight value of the bag in grams (1000 = 1 kg).                               |
| `MaleComponent`     |     ✅    | Clothing shown on male peds: `componentid` (5 = bags), `drawable`, `texture`. |
| `FemaleComponent`   |     ✅    | Clothing shown on female peds.                                                |
| `disallowedItems`   | Optional | List of item groups that **can't** go in the bag.                             |
| `onlyAllowedItems`  | Optional | List of item groups that are the **only** items allowed in the bag.           |

{% hint style="warning" %}
Clothing drawable numbers depend on every clothing pack streamed on your server. If you add or remove other bag packs, the numbers can shift and bags may show the wrong model. Check the drawable in-game (for example with a clothing menu) and update `drawable` to match.
{% endhint %}

## Item groups (`weapons_list.lua`)

Bag rules refer to groups from `weapons_list.lua` through `GetList`:

| Group                    | Contains                                                                               |
| ------------------------ | -------------------------------------------------------------------------------------- |
| `GetList.smallWeapons`   | Pistols, small SMGs, light melee, all ammo types                                       |
| `GetList.mediumWeapons`  | Large melee, standard SMGs, shotguns, musket, all ammo types                           |
| `GetList.largeWeapons`   | Assault rifles, snipers, LMGs, heavy weapons, all ammo types                           |
| `GetList.throwables`     | Grenades, molotovs, sticky bombs, flares…, all ammo types                              |
| `GetList.thrownWeapons`  | Same weapons as `throwables`, all ammo types                                           |
| `GetList.utilityWeapons` | Petrol can, fire extinguisher, digiscanner, hazard can, fertilizer can, all ammo types |
| `GetList.handguns`       | Pistols and revolvers, all ammo types                                                  |
| `GetList.AllWeapons`     | All groups above merged together                                                       |

{% hint style="info" %}
Every group also includes all ox\_inventory ammo items (`ammo-9`, `ammo-rifle`, …). That's why ammo can go in bags that block a weapon group. Remove the ammo entries from a group if you want to block ammo too.
{% endhint %}

### Adding items to a group

Add item names to an existing group, or create your own group:

{% code title="weapons\_list.lua" %}

```lua
ItemsList.drugs = {
    "weed_bag", "coke_bag"
}
```

{% endcode %}

Then use it in a bag:

```lua
disallowedItems = { GetList.drugs }
```

{% hint style="warning" %}
If you want a custom group included in `GetList.AllWeapons`, add it to the `mergeTables(...)` call at the bottom of `weapons_list.lua`.
{% endhint %}

## Messages

`Config.NotificationsHolder` holds the player messages (`message1`–`message6`). You don't need to change them, but you can translate them.
