> 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/items-config.md).

# Items Config

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

## What it does

Defines `Config.ItemList`: every item’s internal name, label, weight, type, image, stack/use flags, and description. Inventory UI and other scripts read this list.

Keys must be **lowercase** (e.g. `weapon_pistol`).

## Fields per item

| Field               | Description                                     | Example          |
| ------------------- | ----------------------------------------------- | ---------------- |
| `name`              | Internal name (same as key).                    | `'bread'`        |
| `label`             | UI display name.                                | `'Bread'`        |
| `weight`            | Weight (grams).                                 | `180`            |
| `type`              | `"item"` \| `"weapon"` \| `"clothes"`.          | `'item'`         |
| `image`             | File under `html/img/`.                         | `'bread.webp'`   |
| `unique`            | `true` = no stack.                              | `false`          |
| `useable`           | `true` = Use button / usable logic.             | `true`           |
| `shouldClose`       | Close inventory on use.                         | `true`           |
| `description`       | Tooltip text.                                   | `'Fresh bread.'` |
| `itemLimit`         | Optional max per stack/slot.                    | `12`             |
| `client` / `server` | Optional event/export hooks for add/remove/use. | —                |
| `buttons`           | Optional extra UI actions.                      | —                |

## Add a new item

```lua
['my_new_item'] = {
    name = 'my_new_item',
    label = 'My New Item',
    weight = 100,
    type = 'item',
    image = 'my_new_item.webp',
    unique = false,
    useable = true,
    shouldClose = true,
    description = 'Tooltip text.',
},
```

1. Add the entry in `config_items.lua`.
2. Put the image in `html/img/`.
3. If usable, register logic via **devix-core** `UsableItem` (or item `client` / `server` hooks).

## See also

* [Weapon Config](/devix/devix-inventory/inventory-config/weapon-config.md) — behaviour for weapons listed here
* [Food Config](/devix/devix-inventory/inventory-config/food-config.md) — eat/drink behaviour
* [Main Config](/devix/devix-inventory/inventory-config/main-config.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/items-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.
