ItemStack Configuration

This configuration file defines which items can be stacked in inventory and their maximum stack sizes, with optional item transformation when reaching max stack.

File Location#

Data/Item/ItemStack.xml

Dependencies#

Depends OnPurpose
Item.xmlItem definitions
Depended On ByPurpose
ItemValue.xmlUses stack count for price calculation

How It Works#

  1. When items are picked up, purchased, or moved into inventory, the server checks ItemStack
  2. If the item has a matching entry and another stack of the same Index, Level, and SocketOptionBonus already exists, units are merged into that stack
  3. The stack count shown in inventory grows up to MaxStack
  4. When the stack reaches exactly MaxStack and a CreateIndex is configured, the merged stack is consumed and a new item of the target type/level is generated in its place
  5. Stacks can be split manually with the in-game stack-split action (ctrl + right click)

Structure#

<Item Type="14" Index="13" Level="*" MaxStack="255"
      CreateType="*" CreateIndex="*" Name="Jewel of Bless"/>

Old Format (Backward Compatible)#

<Item Index="7181" MaxStack="255" CreateIndex="*"/>

Attributes#

AttributeTypeDescription
TypeintItem category (0-15). New format only
IndexintType-relative index 0-511 (new format), or fully calculated index Type*512+TypeOffset (old format)
Levelstring* for all levels, or a specific level 0-15. A specific-level entry takes priority over the * entry for the same Index
MaxStackintMaximum stack size. Hard cap is 255 because the runtime count is stored in one byte
CreateTypestring* for no transformation, or the category of the item created when the stack fills
CreateIndexintType-relative index of the created item. Only used when CreateType is not *
CreateLevelstring* to copy the source stack's level, or a fixed 0-15 level for the created item
NamestringHuman-readable comment (optional, not parsed)

Index Calculation (Old Format)#

Index = Type * 512 + TypeOffset

Category Reference#

CategoryItem TypeStackable
0-5Weapons (Swords, Axes, Maces, Spears, Bows/Crossbows, Staves)No, except Bolt (4,7) and Arrow (4,15)
6ShieldsNo
7-11Armor (Helm, Armor, Pants, Gloves, Boots)No
12Wings, Jewel of Chaos, Orbs, Scrolls, FragmentsYes (per-entry)
13Rings, Pendants, Quest Items, Map FragmentsYes (per-entry)
14Potions, Jewels (Bless/Soul/Life/Creation), Boxes, Event ItemsYes (per-entry)
15Pentagram items, Errtels, Socket SeedsYes (per-entry)

Examples#

<!-- Jewels stack to 255, no transformation -->
<Item Type="14" Index="13" Level="*" MaxStack="255"
      CreateType="*" CreateIndex="*" Name="Jewel of Bless"/>

<Item Type="14" Index="14" Level="*" MaxStack="255"
      CreateType="*" CreateIndex="*" Name="Jewel of Soul"/>

When CreateType="*", items simply stack without transforming.

Important Behavior#

Common Issues#

  • Item - Base item definitions referenced by Index
  • ItemValue - Per-unit price multiplied by stack count when selling
  • ItemDrop - Drop tables that produce stackable items
  • LuckyItem - Lucky armor (non-stackable) and the Lucky Ticket flow

Last updated April 21, 2026