Dialogue System Quest Complete issue

Announcements, support questions, and discussion for Quest Machine.
Post Reply
KingCeryn
Posts: 70
Joined: Sun Aug 23, 2020 5:12 pm

Dialogue System Quest Complete issue

Post by KingCeryn »

So i followed the old 2018 integration video, and everything works except for the end of my quests- I get the proper result of Quest Completion- an instantiated sound/ui- on the Quest Machine side, but when I try to talk to the NPC again it treats the Quest as Unassigned, not Success.

Is there a specific Lua code I can do to brute-force the quest completion on the Dialogue Manager side? I tried the SetQuestState command but it says "Dialogue System: Can't find Quest Machine quest with ID 'QUESTNAME' to set its state."

Also, whenever I start the dialogue conversation, the Quest disappears from the Quest Editor. It starts saying "Runtime: Waiting To Start" but once I use the GiveQuest command, the Quest Editor goes blank and just shows the "New Quest Asset" button. If I try to go through my assets and reopen the Quest file, it just stays on Waiting To Start. Even though the Quest goes through all according to the conditions properly, it just doesnt seem to mark completion. Doesnt appear in my Quest Log under Completed either, but shows when its active, each node, etc.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System Quest Complete issue

Post by Tony Li »

Hi,

To make your quest show as Completed, tick your player's Quest Journal > Save Settings > Remember Completed Quests. (Some games, particularly those that use a lot of procedurally-generated quests, may not want to keep accumulating an infinite list of completed quests.)

That may also fix the issue with the NPC treating it unassigned. If not, check the quest's Quest Info > Max Times. If it's greater than one, the quest is repeatable, so the NPC may be offering it again.
KingCeryn
Posts: 70
Joined: Sun Aug 23, 2020 5:12 pm

Re: Dialogue System Quest Complete issue

Post by KingCeryn »

Thanks, the "Remember Completed Quests" fixed it!
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System Quest Complete issue

Post by Tony Li »

Great! Glad to help.
fallingstarint
Posts: 22
Joined: Fri Oct 01, 2021 11:50 am

Re: Dialogue System Quest Complete issue

Post by fallingstarint »

Hello,

I am bumping this topic because it is related to my problem: when I load a new scene, even if I have a "don't destroy" component to my Dialogue System and my Quest Machine objects, my player character prefab loses its connection to the Journal UI.

In its "UI Settings > Quest Journal UI", it is marked as "none", but in the previous scene it is linked to the actual journal/quest machine database.

Am I missing something?
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System Quest Complete issue

Post by Tony Li »

Hi,

Unless the player instance is also marked Don't Destroy On Load, it will lose the connection.

Do you need a direct reference?

To open the journal UI, just call the Quest Journal component's ToggleJournalUI() or ShowJournalUI() method. If you leave the Quest Journal component's Journal UI field unassigned, it will automatically use the journal UI that's assigned to the Quest Machine GameObject; no need to assign it directly to the Quest Journal.

If you have a UI button that toggles/opens the journal UI, add a QuestJournalButton to it. Configure the Button's OnClick() event to call QuestJournalButton.ToggleJournalUI. It will automatically find the player's Quest Journal and the journal UI.
fallingstarint
Posts: 22
Joined: Fri Oct 01, 2021 11:50 am

Re: Dialogue System Quest Complete issue

Post by fallingstarint »

Oh ok, so the right way to go is to actually have ONE gameobject of my character that will be kept along the whole game by not destroying it!

I did not know that, thank you.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System Quest Complete issue

Post by Tony Li »

No -- while that's supported, I recommend having a separate player GameObject in each scene. Just don't assign any direct references in the inspector between the player GameObject and the Quest Machine or Dialogue Manager GameObjects.
fallingstarint
Posts: 22
Joined: Fri Oct 01, 2021 11:50 am

Re: Dialogue System Quest Complete issue

Post by fallingstarint »

Alright, so I am definitely missing something because:

- If I don't keep the "don't destroy" component to my character, when it arrives in a new scene, the character has an empty journal, with no picture, no quest, nothing.
- If I have a gameobject for my character in every scene, then the spawnpoints don't work from scene to scene.

Kinda perplex here :?:

EDIT: Nevermind, it seems that it is working now for some reason... Ahaha
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System Quest Complete issue

Post by Tony Li »

Hi,

I'm glad it's working now!

In general (mostly for future readers who might have the same issue), you'll want to assign a Save Key to the Quest Journal and add a Position Saver to the player. Then change scenes using any of these methods.
Post Reply