Just bought Inventory Engine, & playmaker for Dialogue System, are there any tutorials on how to use them together?

Announcements, support questions, and discussion for the Dialogue System.
need_verification
Posts: 24
Joined: Thu Jan 18, 2024 5:41 am

Just bought Inventory Engine, & playmaker for Dialogue System, are there any tutorials on how to use them together?

Post by need_verification »

Hello, I saw the third party integration option for playmaker and inventory engine, so I bought them to use with the Dialogue System.

However, I am having some confusion on how the Dialogue System access the items from Inventory engine.

My goal is this:

- Collect Key items.
- NPC asks for Key item 1 or Key Item 2 during conversation
- Player opens inventory and selects Key item 1 or Key item 2, which makes them go down different conversation routes.


----------
I added all the scripts needed to integrate "Inventory Engine"

Image
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Just bought Inventory Engine, & playmaker for Dialogue System, are there any tutorials on how to use them together?

Post by Tony Li »

Hi,

You've probably already seen these links, but I'm including them here just in case:
In a conversation, you can use the Inventory Engine Lua functions to check if the player has a key and then remove that key. In the screenshot below, the responses "Here is key 1" and "Here is key 2" will only be shown to the player if they have the corresponding key. If the player selects that response, it will remove that key from the player's MainInventory:

keyConversation.png
keyConversation.png (33.88 KiB) Viewed 1245 times

Opening a separate UI to allow the player to select an item from their inventory is more complicated and somewhat out of the scope of the Dialogue System. However, the Dialogue System provides ways to interface with it using sequencer commands. In the example below, the conversation activates a UI GameObject named "Key Selection UI". It's up to you to implement Key Selection UI. The conversation assumes that Key Selection UI will do the following:
  • Show the keys that the player can select.
  • When the player selects a key, set a variable named "SelectedKey" to the name of the selected key (e.g., "Key1"). For example, use the Dialogue System's "Set Variable" Playmaker action.
  • When the player selects a key, send the sequencer message "Selected". The conversation waits for this message. For example, use the "Send Sequencer Message" Playmaker action.
keyConversation2.png
keyConversation2.png (35.11 KiB) Viewed 1245 times

(The <Delay Evaluation> node is because Conversations Evaluate Conditions One Extra Level Ahead.)
need_verification
Posts: 24
Joined: Thu Jan 18, 2024 5:41 am

Re: Just bought Inventory Engine, & playmaker for Dialogue System, are there any tutorials on how to use them together?

Post by need_verification »

Tony Li wrote: Sat Jan 27, 2024 11:46 pm Hi,

You've probably already seen these links, but I'm including them here just in case:
In a conversation, you can use the Inventory Engine Lua functions to check if the player has a key and then remove that key. In the screenshot below, the responses "Here is key 1" and "Here is key 2" will only be shown to the player if they have the corresponding key. If the player selects that response, it will remove that key from the player's MainInventory:


keyConversation.png


Opening a separate UI to allow the player to select an item from their inventory is more complicated and somewhat out of the scope of the Dialogue System. However, the Dialogue System provides ways to interface with it using sequencer commands. In the example below, the conversation activates a UI GameObject named "Key Selection UI". It's up to you to implement Key Selection UI. The conversation assumes that Key Selection UI will do the following:
  • Show the keys that the player can select.
  • When the player selects a key, set a variable named "SelectedKey" to the name of the selected key (e.g., "Key1"). For example, use the Dialogue System's "Set Variable" Playmaker action.
  • When the player selects a key, send the sequencer message "Selected". The conversation waits for this message. For example, use the "Send Sequencer Message" Playmaker action.

keyConversation2.png


(The <Delay Evaluation> node is because Conversations Evaluate Conditions One Extra Level Ahead.)
It works great!

I am having issues creating the UI for the part 2 section though. I am unsure how to get the key items to appear in the KeySelectionUI. I'm on the inventory engine help discord right now. I will get back to you if I figure it out.

:D
need_verification
Posts: 24
Joined: Thu Jan 18, 2024 5:41 am

Re: Just bought Inventory Engine, & playmaker for Dialogue System, are there any tutorials on how to use them together?

Post by need_verification »

Tony Li wrote: Sat Jan 27, 2024 11:46 pm Hi,

You've probably already seen these links, but I'm including them here just in case:
In a conversation, you can use the Inventory Engine Lua functions to check if the player has a key and then remove that key. In the screenshot below, the responses "Here is key 1" and "Here is key 2" will only be shown to the player if they have the corresponding key. If the player selects that response, it will remove that key from the player's MainInventory:


keyConversation.png


Opening a separate UI to allow the player to select an item from their inventory is more complicated and somewhat out of the scope of the Dialogue System. However, the Dialogue System provides ways to interface with it using sequencer commands. In the example below, the conversation activates a UI GameObject named "Key Selection UI". It's up to you to implement Key Selection UI. The conversation assumes that Key Selection UI will do the following:
  • Show the keys that the player can select.
  • When the player selects a key, set a variable named "SelectedKey" to the name of the selected key (e.g., "Key1"). For example, use the Dialogue System's "Set Variable" Playmaker action.
  • When the player selects a key, send the sequencer message "Selected". The conversation waits for this message. For example, use the "Send Sequencer Message" Playmaker action.

keyConversation2.png


(The <Delay Evaluation> node is because Conversations Evaluate Conditions One Extra Level Ahead.)
Hello, I was able to create a Key Item UI.

Image

However, I ran to some problems.

-the way Inventory Engine works, I have to press "I" to open the inventory and be able to click/select the items

-If KeySelectionUI" is set to FALSE at beginning of RunTime, I can't add my KeyItems to the inventory

- The Inventory Engine discord suggested I duplicate the UI camera and then extend the GUI Manager?

------------------------------
I know that these are more questions for the Inventory Engine Discord, but I was wondering if there was alternative approach? Thank you.
need_verification
Posts: 24
Joined: Thu Jan 18, 2024 5:41 am

Re: Just bought Inventory Engine, & playmaker for Dialogue System, are there any tutorials on how to use them together?

Post by need_verification »

Tony Li wrote: Tue Jan 30, 2024 9:13 pm Hi,

Here's a starter example:

DS_InventoryEngine_SelectItemExample_2024-01-30.unitypackage
Oh my god thank you!!!

I was testing it out, and after I speak to the NPC, it won't let me select the item. Could it be because some of the scripts are missing? *I had to delete the inventory memory for it to work


After I select the item to give, I get this error message. Could it be because i'm missing some scripts?
Image

Image
Image
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Just bought Inventory Engine, & playmaker for Dialogue System, are there any tutorials on how to use them together?

Post by Tony Li »

Hi,

Add an Inventory Engine Lua component to your Dialogue Manager.
need_verification
Posts: 24
Joined: Thu Jan 18, 2024 5:41 am

Re: Just bought Inventory Engine, & playmaker for Dialogue System, are there any tutorials on how to use them together?

Post by need_verification »

Tony Li wrote: Fri Feb 02, 2024 8:45 pm Hi,

Add an Inventory Engine Lua component to your Dialogue Manager.
Do I also add it to the "Rogue Main Inventory?" (it says missing a script)
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Just bought Inventory Engine, & playmaker for Dialogue System, are there any tutorials on how to use them together?

Post by Tony Li »

Hi,

The missing script on the Dialogue Manager is the Inventory Engine Lua component.

The missing script on RogueMainInventory is an Inventory Engine Saver component.

It looks like you just need to import the Inventory Engine Support packages. There's on in Plugins > Pixel Crushers > Common > Third Party Support and another in Plugins > Pixel Crushers > Dialogue System > Third Party Support.
need_verification
Posts: 24
Joined: Thu Jan 18, 2024 5:41 am

Re: Just bought Inventory Engine, & playmaker for Dialogue System, are there any tutorials on how to use them together?

Post by need_verification »

Tony Li wrote: Fri Feb 02, 2024 9:12 pm Hi,

The missing script on the Dialogue Manager is the Inventory Engine Lua component.

The missing script on RogueMainInventory is an Inventory Engine Saver component.

It looks like you just need to import the Inventory Engine Support packages. There's on in Plugins > Pixel Crushers > Common > Third Party Support and another in Plugins > Pixel Crushers > Dialogue System > Third Party Support.
Yes, that fixed it!!!

Thank you so much! You're absolutely amazing!!!!!!!!
Post Reply