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

# Weapon Config

File: `config_weapons.lua`\
Resource: devix-inventory

## What it does

Weapon **behaviour** only (not the item list). Reload, durability, ammo mapping, attachments, tints, repair item, 3D attachment preview, world models.

Weapon definitions (label/weight/image) stay in [Items Config](broken://pages/a23020852002b979ffc1cc21fed744e5ba85e170).

***

## Important options

| Option                                         | Description                                          |
| ---------------------------------------------- | ---------------------------------------------------- |
| `WeaponsConfig.ReloadTime`                     | Reload duration (ms); may be random.                 |
| `WeaponsConfig.ReloadDurationMs`               | NUI / client reload progress duration.               |
| `WeaponsConfig.DurabilityBlockedWeapons`       | Weapons with no durability (stungun, flashlight, …). |
| `WeaponsConfig.RepairItem`                     | Item that repairs weapon in hand to 100.             |
| `WeaponsConfig.AmmoTypes`                      | Ammo item → `{ ammoType, amount }`.                  |
| `WeaponsConfig.WeaponAmmoType`                 | Weapon name → game ammo type string.                 |
| `WeaponsConfig.Throwables`                     | Throwable weapon names.                              |
| `WeaponsConfig.DurabilityMultiplier`           | Weapon → durability lost per shot.                   |
| `WeaponsConfig.WeaponAttachments`              | Attachment item → weapon → component hash.           |
| `WeaponsConfig.WeaponAttachmentSlots`          | Groups attachments (scope, mag, barrel, grip).       |
| `WeaponsConfig.WeaponTintIndices` / `Mk2`      | Tint index lists for UI.                             |
| `WeaponsConfig.WeaponAttachmentPanSensitivity` | 3D preview mouse sensitivity.                        |
| `WeaponsConfig.WeaponAttachmentDepthMin/Max`   | 3D preview zoom limits.                              |
| `WeaponsConfig.WeaponWorldModels`              | Weapon → world model name when dropped.              |
| `WeaponsConfig.WeapDraw`                       | Optional draw animation variants.                    |

***

## Example

```lua
WeaponsConfig.ReloadDurationMs = 5000
WeaponsConfig.DurabilityBlockedWeapons = { 'weapon_stungun', 'weapon_flashlight' }
WeaponsConfig.AmmoTypes = {
    pistol_ammo = { ammoType = 'AMMO_PISTOL', amount = 30 },
}
```

***

## See also

* [Items Config](/devix/devix-inventory/inventory-config/items-config.md)
* Exports: `SetEquippedWeapon`, `DecreaseWeaponDurabilityByShoot` in [Inventory Exports](/devix/devix-inventory/inventory-exports.md)


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://devix.gitbook.io/devix/devix-inventory/inventory-config/weapon-config.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
