Stackable Item Definition¶
Stackable items track quantity inside one inventory entry. Use them for ammo boxes, scrap, food portions, crafting materials, or any other item type that should combine into stacks.
Placement¶
Register stackable items in:
Use lia.item.registerItem in that shared file to define the item directly from code.
Reference¶
| Field | Type | Purpose |
|---|---|---|
name |
string |
Display name shown in the inventory. |
model |
string |
World and inventory model used by the item. |
width |
number |
Inventory width in slots. |
height |
number |
Inventory height in slots. |
isStackable |
boolean |
Marks the item as using stack quantity logic. |
maxQuantity |
number |
Maximum number of units allowed in one stack. |
canSplit |
boolean |
Controls whether players are allowed to split the stack. |