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

# Items & magazines

Install every included magazine item and add your own ammunition mappings.

Install every included magazine item and add your own ammunition mappings.

## Register the included items

Paste these entries inside `ox_inventory/data/items.lua`. The labels below match the supplied file and can be translated.

```lua
['magazine_9mm'] = {
    label = '9mm Magazin',
    weight = 200,
    stack = false,
    close = true,
    client = { export = 'tn_realisticreload.useMagazine' }
},

['magazine_22lr'] = {
    label = '.22LR Magazin',
    weight = 180,
    stack = false,
    close = true,
    client = { export = 'tn_realisticreload.useMagazine' }
},

['magazine_38'] = {
    label = '.38 Magazin',
    weight = 180,
    stack = false,
    close = true,
    client = { export = 'tn_realisticreload.useMagazine' }
},

['magazine_45acp'] = {
    label = '.45 ACP Magazin',
    weight = 210,
    stack = false,
    close = true,
    client = { export = 'tn_realisticreload.useMagazine' }
},

['magazine_50ae'] = {
    label = '.50 AE Magazin',
    weight = 220,
    stack = false,
    close = true,
    client = { export = 'tn_realisticreload.useMagazine' }
},

['magazine_556'] = {
    label = '5.56 Magazin',
    weight = 300,
    stack = false,
    close = true,
    client = { export = 'tn_realisticreload.useMagazine' }
},

['magazine_762'] = {
    label = '7.62 Magazin',
    weight = 320,
    stack = false,
    close = true,
    client = { export = 'tn_realisticreload.useMagazine' }
},

['magazine_sniper'] = {
    label = 'Sniper Magazin',
    weight = 260,
    stack = false,
    close = true,
    client = { export = 'tn_realisticreload.useMagazine' }
},

['magazine_heavysniper'] = {
    label = 'Heavy Sniper Magazin',
    weight = 300,
    stack = false,
    close = true,
    client = { export = 'tn_realisticreload.useMagazine' }
},
```

Copy `install/images/*.png` to `ox_inventory/web/images/`. Keep `stack = false` so each magazine retains its own `metadata.rounds`.

## Included mappings

| Ammo item          | Magazine item          | Capacity |
| ------------------ | ---------------------- | -------- |
| `ammo-9`           | `magazine_9mm`         | 17       |
| `ammo-22`          | `magazine_22lr`        | 12       |
| `ammo-38`          | `magazine_38`          | 6        |
| `ammo-45`          | `magazine_45acp`       | 12       |
| `ammo-50`          | `magazine_50ae`        | 7        |
| `ammo-rifle`       | `magazine_556`         | 30       |
| `ammo-rifle2`      | `magazine_762`         | 30       |
| `ammo-sniper`      | `magazine_sniper`      | 10       |
| `ammo-heavysniper` | `magazine_heavysniper` | 5        |

## Add a custom magazine

1. Register its inventory item with `client.export = 'tn_realisticreload.useMagazine'`.
2. Add a mapping to `Config.Magazines` using the **weapon's actual ammo item name**:

```lua
Config.Magazines['ammo-custom'] = {
    item = 'magazine_custom', capacity = 20, label = 'Custom Magazine'
}
```

3. Register matching loose ammo and an item image. Test using the magazine to refill it, **R** to reload, and `/magout` to eject.

{% hint style="info" %}
The default is `Config.NewMagazinesFull = true`. Set it to `false` for new magazines without round metadata to start empty. The included ready-to-use inventory bridge is Ox; another inventory needs a custom bridge, not just QB item definitions.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://tn-modifications.gitbook.io/tn-modifications/tn_realisticreload/items.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
