Skip to reading
Save Games & Inventory

Stackable items and maximum amounts

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView illustrations
Source table from Stackable items and maximum amounts, page 9
SettingExampleWhat the player gets
Stackable offBrass key, Max Stack 1At most one copy of that item ID.
Stackable on; Max Stack 5Bearing oilOne visible slot with a quantity from 1 to 5.
Give 3 oil when the player has 1Maximum 5Four oil.
Give 20 oil when the player has 4Maximum 5Five oil, not 24.
Remove 1 oil from a stack of 1No amount remainsThe item disappears from the carried list.

Figure 5. The oil occupies one cell. Its quantity is part of the caption; four copies do not make four cells.

The widget’s capacity counts different item IDs, not the total number of objects. Eight keys represented by one stackable item still use one slot. Eight different key IDs use eight slots.

Show Quantity is supported as showQuantity in the element JSON. It is true in this example. The quantity suffix appears when the amount is greater than one. If you want a custom counter in a separate Label, update it from game logic.

Use Remove Inventory to take items away. Giving an amount of zero is not a reliable way to mean “do nothing”; the add action normalizes its count. Check your amount before calling the action.

Page 9 of 96Permalink
Go to page