Dialogue System integration for Inventory Pro is maintained by Devdog, the developer of Inventory Pro. You can get more information here:
https://inventory-pro-docs.readthedocs.io/en/latest/Integrations/TheDialogueSystem/GettingStarted/
Inventory Pro copyright © Devdog.
To enable Inventory Pro integration:
The Inventory Pro Lua Functions component adds these Lua functions:
| Lua Function | Description |
|---|---|
| GetStat(category, name) | Returns the value of a stat. |
| SetStat(category, name, value) | Sets the current raw value of a stat. |
| OpenVendor(name) | Triggers the Vendor Trigger on the named GameObject. If name is a blank string (""), it will use the current conversation conversant or actor. |
The Inventory Manager Dialogue System component adds these Lua functions:
| Lua Function | Description |
|---|---|
| GetItemCount(itemID) | Returns the amount of an item held by the player. |
| CanAddItem(itemID, amount) | Returns true/false if the item(s) can be added to the current player. |
| AddItem(itemID, amount) | Adds item(s) to the current player. |
| RemoveItem(itemID, amount) | Removes item(s) from the current player. |
| GetCurrencyCount(currencyID) | Returns the amount of a currency held by the player. |
| AddCurrency(currentID, amount) | Adds currency to the player. |
| CanRemoveCurrency(currencyID, amount) | Returns true/false if the currency can be removed from the player. |
| RemoveCurrency(currencyID, amount) | Removes currency from the player. |
You can save to Inventory Pro's save system by using the DialogueSystemCollectionSaverLoader provided in Devdog's integration.
If you want to use the Dialogue System's Save System, import Plugins ► Pixel Crushers ► Common ► Third Party Support ► Inventory Pro Support. This will add a Saver component named Inventory Pro Collection Saver. Add it to any Inventory Pro collection GameObject.