Skip to reading
Panels, Tabs & List Boxes

Selecting an item is not using it

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

Figure 31. The player selected bearing_oil, then received another bottle. The live inventory list updated to ×2.

Selecting Bearing oil writes bearing_oil to selected_item. It does not automatically equip it, switch the adventure cursor, combine it with another item or remove it from inventory. Add a separate Use, Inspect or Give Button with the game logic you want.

Source table from Selecting an item is not using it, page 36
GoalChange the correct data
Give an itemUse Add Inventory with the inventory item ID and Count.
Remove an itemUse the inventory removal action.
Change a stack quantityUse the inventory quantity action.
Only remove a row from a local listList Box: Delete Item changes that widget’s view; it does not remove the carried item.

The example’s Add one oil bottle Button uses Add Inventory, item bearing_oil, Count 1. Because the item definition is stackable, the list shows the new total. Test a nonstackable item separately rather than assuming it behaves like a stack.

A specific-character list refers to the character definition ID. Make sure you chose the intended owner when a party or NPC inventory looks empty.

Page 36 of 50Permalink
Go to page