Inventory Pro Support

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.

Setup

To enable Inventory Pro integration:

  1. Import the package Third Party Support ► Inventory Pro Support.
  2. Select menu item Tools → Inventory Pro → Integrations. Tick the checkbox for Dialogue System.
  3. The updated example scene for the Dialogue System for Unity 2.x is in Pixel Crushers ► Dialogue System ► Third Party Support ► Inventory Pro Support ► Example
  4. Devdog's integration documentation is here: https://inventory-pro-docs.readthedocs.io/en/latest/Integrations/TheDialogueSystem/GettingStarted/ . Devdog's integration covers:
    • An Inventory Pro CollectionSaverLoader component that ties into Inventory Pro's save system.
    • An example script to demonstrate how to tie into loot quests.
    • The same Lua functions that are defined in the Inventory Pro Lua Functions component (see below) so you can choose which one to use.
  5. If you want to access additional Lua functions, add an Inventory Pro Lua Functions to your Dialogue Manager. These functions are defined below.

Lua Functions

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.

Saving & Loading

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.


<< Third Party Integration