Quest instance with ID is not registered with Quest Machine

Announcements, support questions, and discussion for Quest Machine.
Post Reply
Ollymuk
Posts: 39
Joined: Wed Oct 14, 2020 12:59 pm

Quest instance with ID is not registered with Quest Machine

Post by Ollymuk »

Hi

Me again, sorry.

I have a quest called "Get Game" which I think appears to be registered in the QM database.

2020-10-26 17_34_56-Window.png
2020-10-26 17_34_56-Window.png (4.09 KiB) Viewed 607 times
2020-10-26 17_35_09-Window.png
2020-10-26 17_35_09-Window.png (11.74 KiB) Viewed 607 times


I have used the little QM to DS tool (Tools menu) to sync from my QM database to the DS database. Those quests appear in DS.

2020-10-26 17_35_22-Window.png
2020-10-26 17_35_22-Window.png (7.68 KiB) Viewed 607 times


I have Quest overrides set in the DS manager

2020-10-26 17_37_40-Window.png
2020-10-26 17_37_40-Window.png (9.24 KiB) Viewed 607 times


However, when I run the game I get this error and conversation threads that have that quest as a condition don't appear to work. Any ideas why that might be? I *think* I've gone through the docs and I feel fairly confident that I haven't missed anything. This is using the trial at the mo.


Quest Machine: A quest instance with ID 'Get Game' is not registered with Quest Machine.
UnityEngine.Debug:LogWarning(Object)
PixelCrushers.QuestMachine.QuestMachine:GetQuestInstance(String, String)
PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemQuestMachineBridge:GetQuestInstance(String, String) (at Assets/Plugins/Pixel Crushers/Quest Machine/Third Party Support/Dialogue System Support/Scripts/Bridge/DialogueSystemQuestMachineBridge.cs:273)
PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemQuestMachineBridge:GetQuesterQuestState(String, String) (at Assets/Plugins/Pixel Crushers/Quest Machine/Third Party Support/Dialogue System Support/Scripts/Bridge/DialogueSystemQuestMachineBridge.cs:280)
PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemQuestMachineBridge:GetQuestStateOnDefaultPlayer(String) (at Assets/Plugins/Pixel Crushers/Quest Machine/Third Party Support/Dialogue System Support/Scripts/Bridge/DialogueSystemQuestMachineBridge.cs:410)
PixelCrushers.DialogueSystem.QuestLog:CurrentQuestState(String)
PixelCrushers.DialogueSystem.QuestLog:GetQuestState(String)
PixelCrushers.DialogueSystem.QuestLog:IsQuestInStateMask(String, QuestState)
PixelCrushers.DialogueSystem.QuestLog:GetAllQuests(QuestState, Boolean, String)
PixelCrushers.DialogueSystem.QuestLog:GetAllQuests(QuestState)
PixelCrushers.DialogueSystem.<RefreshAtEndOfFrame>d__28:MoveNext()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest instance with ID is not registered with Quest Machine

Post by Tony Li »

Hi,

Have you assigned your Main Quest Database to the Quest Machine GameObject's Quest Machine Configuration component > Quest Databases list?

Also, to get more info, you can temporarily tick the Quest Machine GameObject's Debug Settings > Debug tickbox. (I recommend just doing this temporarily because it will spam a lot of stuff to the Console that you can normally ignore.)

With Debug ticked, you should see lines in the Console such as:

Code: Select all

Quest Machine: Registering quest asset 'peskyRabbits'.
Quest Machine: Registering quest asset 'harvestCarrots'.
Quest Machine: Registering quest asset 'foodDelivery'.
Quest Machine: Registering quest asset 'coinRace'.
However, if you see those exact lines above, then it means Quest Machine's Demo database is still assigned to your Quest Machine GameObject instead of your own Main Quest Database.
Ollymuk
Posts: 39
Joined: Wed Oct 14, 2020 12:59 pm

Re: Quest instance with ID is not registered with Quest Machine

Post by Ollymuk »

I like to challenge you :)
2020-10-26 19_07_47.png
2020-10-26 19_07_47.png (207.69 KiB) Viewed 602 times


REgistered in the QM manage and I already had debug on. Those quests seemingly are being registered.


2020-10-26 19_09_48.png
2020-10-26 19_09_48.png (85.44 KiB) Viewed 602 times
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest instance with ID is not registered with Quest Machine

Post by Tony Li »

Okay, that's perfect so far.

The error that you're getting is that there isn't a quest instance in the player's QuestJournal.

A quest asset is a quest file in the project. Quest assets are assigned to your quest database and registered to Quest Machine at runtime.

A quest instance is an in-memory copy of a quest asset. QuestGivers (e.g., NPCs) and QuestJournals (e.g., player) have quest instances. When you assign quest assets to a QuestGiver's Quests lists, at runtime the QuestGiver will create a list of quest instances to keep track of information such as how many times a player has accepted a quest. When the QuestGiver gives a quest to the player, it makes another copy of its quest instance and gives this copy to the player's QuestJournal.

Check HasQuest("Get Game") first. This checks if the player's QuestJournal has a quest instance. If so, then you can check if the quests's state. For example, instead of:

Code: Select all

CurrentQuestState("Get Game") == "active"
check:

Code: Select all

HasQuest("Get Game") and (CurrentQuestState("Get Game") == "active")
Please give that a try. If that doesn't fix it, let me know what the context where it's not working. For example, is this during a conversation? If so, what quest state are you checking (unassigned, active, etc.)?
Ollymuk
Posts: 39
Joined: Wed Oct 14, 2020 12:59 pm

Re: Quest instance with ID is not registered with Quest Machine

Post by Ollymuk »

Hi Tony

Right, the last email shed some light on something here. I have a scene with two quest givers. Those warnings appear until you run through the conversation options for those quest givers and then they disappear.

Could the warnings be being shown *because* I have QM debug on?

The issue with conversations paths not showing was something else, I think. It's working now at least though I've made some changes to the conversations. SOrry about that, may well have been me.

Also, is there a discord channel? Would love to ask about some best practice kinda stuff without bothering you all the time here on the forums :)
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest instance with ID is not registered with Quest Machine

Post by Tony Li »

Yes, those warnings only appear because Debug is ticked. But, in some cases, they can help identify true issues. In this case, however, if the quest isn't assigned to any QuestGivers or QuestJournals yet, it may just be crying wolf.

The discord server is here: https://discord.gg/FwUaCNt

For questions that someone else might also ask in the future, I usually request that people post on the forum to make the answers more searchable. For general discussion and quick things, discord is perfectly fine.
Post Reply