Skip to reading
Save Games & Inventory

8. Combine two inventory items

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 16. Bearing oil has an Inventory Actions rule targeting inventory:brass_gear.

The workshop combines Bearing oil with Brass gear to create Lubricated gear. A combination rule identifies the target; its action list or script supplies the result. Allow Combine controls drag-to-combine. The selected-item click route can still use a global recipe; it is not a master switch for every combination. Neither route invents recipes.

1. Create oil, brass_gear and lubricated_gear as inventory definitions.

2. Select Bearing oil and open Inventory Actions. Add a rule targeting Brass gear as an inventory item.

3. Choose an action that runs the guarded recipe script on the next page.

4. In the grid’s Type Settings, enable Allow Combine.

5. Run the game with oil and gear in the active player’s bag. Select oil, then click the gear, or test dragging one onto the other.

The target reference is inventory:brass_gear when you use a typed reference. An entity: reference means a scene target instead. A plain display name is not the reference.

Page 25 of 96Permalink
Go to page