Skip to reading
Save Games & Inventory

Names, IDs and the example’s vocabulary

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 PDF page

A name is what you want a person to read. An ID is the stable reference actions and scripts use. A dropdown may show Player Inventory(inventory_lab). The reference you type into a script is inventory_lab.

Source table from Names, IDs and the example’s vocabulary, page 5
ExampleNameID or number
Inventory GUIPlayer Inventoryinventory_lab
Inventory elementBag Gridbag_grid
Save GUISave and Loadsave_lab
Save elementSave Slotssave_slots
Player characterBuildertester
Second characterAssistantassistant
Inventory itemBrass keybrass_key
Stackable itemBearing oiloil
Manual saveBefore the repairSlot 1
Reserved autosaveWorkshop checkpointSlot 0 in this example

Keep element IDs unique across your project. Several operations can address an element by ID, and reusing bag_grid for a different menu makes the intended target harder to identify.

The example inventory starts with eight different item IDs. It displays six at a time. That gives us a second page immediately, which is much easier to test than an inventory with only one item.

Numbers are not item IDs. Save slot 4 means the game’s fourth manual slot; it does not mean the fourth row currently on screen. A sorted save list can put slot 4 at the top.

Page 5 of 96Permalink
Go to page