Dialogue/ Quest Machine/ Inventory Integration Issues

Announcements, support questions, and discussion for Quest Machine.
Post Reply
c166
Posts: 38
Joined: Fri Oct 14, 2022 11:08 pm

Dialogue/ Quest Machine/ Inventory Integration Issues

Post by c166 »

Hey Tony,

Not sure why, but there appears to be some issues that have cropped up on parts that used to work; and am hoping you'd be able to provide some insight as to how to fix them. In general, the problems started cropping up once I tried to increase the number of quests & create branching dialogue paths. In trying to fix some of these issues, things that worked previously also stopped working.
  • Quest HUD stopped appearing
  • Conversation uses the "Quest Dialogue UI" instead of going down the Dialogue Manager AFTER the initial conversation when switching back to single quest to debug multi-quest & appears to be the Quest GIVERS selection list
  • Inventory integration seems to have stopped working/ counting the number of items
  • Counter appears to not be working as expected between scenes - though the quest journal updates (after adding it to the persistent object as per the previous post)
Quest HUD stopped appearing
The Quest still appears in the journal, however the HUD does not appear. The GameObject appears to be active but not picking up and generating the expected text.
quest_active_in_journal.PNG
quest_active_in_journal.PNG (57.92 KiB) Viewed 2365 times
quest_hud_active_quest.PNG
quest_hud_active_quest.PNG (12.97 KiB) Viewed 2365 times
quest_hud_active_object.PNG
quest_hud_active_object.PNG (5.92 KiB) Viewed 2365 times
quest_hud_not_there.PNG
quest_hud_not_there.PNG (59.88 KiB) Viewed 2365 times
Conversation uses the "Quest Dialogue UI" instead of Dialogue Manager conversation
After reverting from multiple quests back to a singular quest (to debug); one of the quests is broken (collect_wood) - and instead goes to the "Quest Dialogue" UI instead of going into the Dialogue Manager to determine the conversation AFTER the initial conversation works fine. The condition should be satisfied, but even if it wasn't - I've got the unconditional fallback of "hey" so it looks like it's just not using Dialogue Manager (and probably is a toggle somewhere? though I don't remember making this change). The OTHER quest (kill_beholder) however uses the Dialogue Manager system as expected.
collecting_wood_conversation.PNG
collecting_wood_conversation.PNG (70.66 KiB) Viewed 2365 times
quest_giver.PNG
quest_giver.PNG (49.83 KiB) Viewed 2365 times
Inventory counter appears to be broken - not sure if it's related to other issues
The wood counter integration with inventory engine USED to work, however, it no longer does and I'm not sure why. I did notice that the counter set-up still specified the message system on the Quest Editor -> but relied on the inventory inventory count condition node to pass one of the Quest Nodes. Should I be setting this as a "data sync" in the Quest Editor instead of pointing to a message system?

Counter not working between scenes - although the quest node passes to the next step
The counter doesn't seem to filter through into the Journal UI in either scene; though the quest node updates as if the counters were working as expected. I.e. it goes to the next node after killing 2 beholders (just doesn't display the counters in the Quest Journal/ HUD).
quest_journal_between_scenes.PNG
quest_journal_between_scenes.PNG (56.56 KiB) Viewed 2365 times
quest_update_counter_broken.PNG
quest_update_counter_broken.PNG (87.84 KiB) Viewed 2365 times
beholder_counter.PNG
beholder_counter.PNG (19.85 KiB) Viewed 2365 times
Best Regards,
C
User avatar
Tony Li
Posts: 22098
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue/ Quest Machine/ Inventory Integration Issues

Post by Tony Li »

Hi,

Would it be possible for you to send a reproduction project to tony (at) pixelcrushers.com?

If not, let me know and we'll go through each of these point by point.
c166
Posts: 38
Joined: Fri Oct 14, 2022 11:08 pm

Re: Dialogue/ Quest Machine/ Inventory Integration Issues

Post by c166 »

Hey Tony,

Unfortunately, my project is fairly entangled with a fair few other assets from the Asset Store. One of whom I'd previously asked if it was alright to share their code as part of debugging; and they said only if the debugger had the asset as well (https://assetstore.unity.com/packages/t ... kit-150156). That asset is also fairly related to one of the errors (the scene change) - though I could attempt to separate out the other parts + try to replicate the issues in another project.

Optimally though, if you could give me pointers/ possible causes of the problems - I can mess around and try to resolve as many issues as possible before trying to separate out/ replicate the remaining issues in a standalone project. Happy to tackle each issue one at a time. I had the post contain everything as I thought that'd be better than making one post for each issue.

Best Regards,
C
User avatar
Tony Li
Posts: 22098
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue/ Quest Machine/ Inventory Integration Issues

Post by Tony Li »

Hi,

I do have licenses to most of the major assets on the Asset Store, including Slay the Sp-- er, Single-Player CCG Kit. ;-) But we can tackle each question here first:

> Quest HUD stopped appearing

Check the player's Quest Journal component. UI Settings > Quest HUD should be unassigned or point to your quest HUD. If it's unassigned (which is the easiest way to configure it), it will use the quest HUD that's assigned to the Quest Machine GameObject's Quest HUD field.

If that checks out, play the scene and reproduce the issue. Then pause and examine the quest HUD in the Hierarchy. Does it contain content for your quest(s)? If so, what's preventing the content from being visible? It could be the sizes or positions of the UI elements, or it could be that a parent GameObject is inactive or has a Canvas Group with Alpha = 0, etc.

If the quest HUD's hierarchy doesn't contain content for your quests, check the quests themselves. Their HUD Text sections should have content for the quest's current state.

One last thing to check, for reference. Does the quest HUD in Quest Machine's Demo scene work?


> Conversation uses the "Quest Dialogue UI" instead of going down the Dialogue Manager AFTER the initial conversation when switching back to single quest to debug multi-quest & appears to be the Quest GIVERS selection list

I don't quite follow. What type of content do you expect to see? Content about a single, specific quest? Or content showing a list of quests that the player can choose to talk about?

If it's content about a single quest, make sure the quest's Dialogue Text for the current state has a Dialogue System Conversation content element.

If it's the list of quests, make sure the Quest Machine GameObject has a Dialogue System Quest Dialogue UI component, and Generate Conversation For Quest Lists is ticked.


> Inventory integration seems to have stopped working/ counting the number of items

Which inventory system?

Are there any errors or warnings in the Console window?


> Counter appears to not be working as expected between scenes - though the quest journal updates (after adding it to the persistent object as per the previous post)

In what way does the counter not work? Does it lose its value when changing scenes?
c166
Posts: 38
Joined: Fri Oct 14, 2022 11:08 pm

Re: Dialogue/ Quest Machine/ Inventory Integration Issues

Post by c166 »

Hey Tony,

Thanks for the responses. I have resolved 3/4 of those issues with your tips.

The only one that I haven't been able to work out is:

Inventory integration seems to have stopped working/ counting the number of items
I am using the MoreMountains Inventory system and the Pixel Crushers' related integration pack (replaced my own one -> only built my own since I thought it'd make integrating things easier -> but Pixel Crusher's has been absolutely great for this).

This used to work, but stopped working for some reason though I didn't touch anything directly related to the counters.

There is an intermittent warning that doesn't always show up. Even when it doesn't appear though, the inventory item still doesn't get picked up so it may be unrelated.
missing_script_inventory_engine.PNG
missing_script_inventory_engine.PNG (30.19 KiB) Viewed 2357 times
When I click the warning message, it takes me to the following line:
missing_script_reference.PNG
missing_script_reference.PNG (15.33 KiB) Viewed 2357 times
The set-up is a condition in the Quest as follows:
InventoryManager_wood_count.PNG
InventoryManager_wood_count.PNG (15.14 KiB) Viewed 2357 times
The item appears in the inventory gameobject in game once I pick it up.
linked_inventory.PNG
linked_inventory.PNG (20.42 KiB) Viewed 2357 times
The item setup itself. I thought it may have been due to incorrect capitalization - but things look fine here + I didn't change this.
Wood Item Setup.PNG
Wood Item Setup.PNG (26.23 KiB) Viewed 2357 times
I have tried to set the counter as both via data sync, as well as via the message system. Not sure which one is appropriate, but assume data sync since the counter isn't getting updated through messaging, and instead through the integration counter.
wood_counter.PNG
wood_counter.PNG (19.53 KiB) Viewed 2357 times
wood_counter_data_sync.PNG
wood_counter_data_sync.PNG (13.91 KiB) Viewed 2357 times
~~~~~~~~~~~~~~~~~
Resolved with Question
~~~~~~~~~~~~~~~~~

Conversation uses the "Quest Dialogue UI" instead of going down the Dialogue Manager AFTER the initial conversation when switching back to single quest to debug multi-quest & appears to be the Quest GIVERS selection list

I had forgotten that the Dialogue entry node had to be set on each quest level - and they pointed to the OLD quest name, as I had split out the old quest into two. Originally I tried to have ALL the quests in the same conversation + have a cascading set of logic (conditionals) to determine which branch of conversation was active/ possible. I then changed this up to match the demo, since it looked more manageable to split up each quest conversation + having to keep track of all the conditionals as seemed tough.

Splitting it up does have the downside of having this part of the conversation feel slightly unnatural (where you select via the quest title which conversation path you want). Though I could work around that by modifying the title to something that sounds more like a conversation. Is there an alternate solution?
conversation_path_selection.PNG
conversation_path_selection.PNG (9.64 KiB) Viewed 2357 times
~~~~~~~~~~~~~~~~~
Resolved as FYI
~~~~~~~~~~~~~~~~~

Quest HUD stopped appearing
Turns out Quest Journal in the persistent object was set to inactive in the prefab when it gets instantiated - which meant the HUD didn't appear. Didn't realize this since calling up the Journal UI worked & tracked the quest as expected.

Counter appears to not be working as expected between scenes
The Quest Journal HUD not appearing hid the issue as there were multiple reasons as to why the counter wasn't working. Fixing the HUD made it easier to identify a typo in one specific area.

Best Regards,
C
User avatar
Tony Li
Posts: 22098
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue/ Quest Machine/ Inventory Integration Issues

Post by Tony Li »

For the Resources.LoadAll<>() warning, check your item assets in the Inspector view. One of them may have an issue. It would be one of the items directly in a Resources folder, not in a subfolder "Resources/Items".

For the Inventory Engine Has Items quest condition, you do not need to set up any messages or data sync. The condition itself will keep the counter updated. Make sure the Inventory Name exactly matches the GameObject name of your inventory, including capitalization. Double check that the GameObject name or condition's Inventory Name field doesn't accidentally have a blank space at the end or something like that.
c166
Posts: 38
Joined: Fri Oct 14, 2022 11:08 pm

Re: Dialogue/ Quest Machine/ Inventory Integration Issues

Post by c166 »

Hey Tony,

Thanks for that, the Resource error is intermittent and hasn't happened for a while now. I'll take a look at the resources folders if it happens again.

Good to know that I don't need to worry about the message/ data sync component if it's hooked up directly via a condition. I found the problem, and it was due to setting one of the (later) quest nodes in the quest chain active while in Editor mode. I must have done that while experimenting to fix one of the other issues. Setting that back to inactive let the quest work as expected - so that's all the problems resolved.

Quest can be started via the NPC conversation, but gets stuck at Node 1 when initial conditions are:
Start Node (true)
Node 1 (active)
active_quest_node.PNG
active_quest_node.PNG (17.34 KiB) Viewed 2332 times
Quest works as expected with:
Start Node (inactive)
Node 1 (inactive)
inactive_quest_node.PNG
inactive_quest_node.PNG (15.83 KiB) Viewed 2332 times
The kits and the integration between them have really saved me a lot of time + headaches (as a solo hobbyist with aspirations to make a proper game) - so thanks to you + the team again! Also really appreciate the level of support/ responses that you provide on these forums. Hopefully will be able to make good progress on the game this year :)

Best Regards,
C
User avatar
Tony Li
Posts: 22098
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue/ Quest Machine/ Inventory Integration Issues

Post by Tony Li »

Glad to help! Best of luck with your game!
Post Reply