Just bought Inventory Engine, & playmaker for Dialogue System, are there any tutorials on how to use them together?
-
- 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?
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"
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"
Re: Just bought Inventory Engine, & playmaker for Dialogue System, are there any tutorials on how to use them together?
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:
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:
(The <Delay Evaluation> node is because Conversations Evaluate Conditions One Extra Level Ahead.)
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:
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.
(The <Delay Evaluation> node is because Conversations Evaluate Conditions One Extra Level Ahead.)
-
- 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?
It works great!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.)
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.
-
- 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?
Hello, I was able to create a Key Item UI.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.)
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.
-
- 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?
Oh my god thank you!!!Tony Li wrote: ↑Tue Jan 30, 2024 9:13 pm Hi,
Here's a starter example:
DS_InventoryEngine_SelectItemExample_2024-01-30.unitypackage
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?
Re: Just bought Inventory Engine, & playmaker for Dialogue System, are there any tutorials on how to use them together?
Hi,
Add an Inventory Engine Lua component to your Dialogue Manager.
Add an Inventory Engine Lua component to your Dialogue Manager.
-
- 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?
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.
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.
-
- 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?
Yes, that fixed it!!!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.
Thank you so much! You're absolutely amazing!!!!!!!!