This page describes how to set up the Dialogue System with Devion Games' Item & Inventory System. (Item & Inventory System is required.)
Item & Inventory System copyright © Devion Games.
Import these package:
This will unpack files into:
Add a DevionInventoryLua component to the Dialogue Manager. It adds these Lua functions:
Lua Function | Description |
---|---|
dgGetItemCount("Inventory", "Item Name") | Returns the quantity of an item in an inventory. |
dgAddItem("Inventory", "Item Name", amount) | Adds a quantity of an item to an inventory. |
dgRemoveItem("Inventory", "Item Name", amount) | Removes a quantity of an item from an inventory. |
Sequencer Command | Description |
---|---|
gdUseTrigger([subject]) | Activates the Devion Inventory Trigger on the subject (default: speaker). |
Use the dgUseTrigger() sequencer command to open a vendor or bank from a conversation. (See the Vendor capsule's conversation in the example scene.) The subject should have a Devion Inventory Trigger such as a Vendor Trigger.
To automatically update quest UIs (quest log window and quest tracker) when an ItemCollection changes (e.g., picking up or dropping an item), add a Devion Update Quest UIs component to the ItemCollection.
Add a DevionItemCollectionSaver to an ItemCollection to include it in saved games if using the Save System.