Quest contents not loading between scenes

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

Quest contents not loading between scenes

Post by c166 »

Hey Tony,

I'm using the Dialogue System, Quest Machine, Easy Save Integrations and I'm not sure what I'm missing in my set-up, but the Quest data doesn't appear to fully carry through between scenes.

The quest appears in the journal in the first scene as expected
quest_journal_with_quest.PNG
quest_journal_with_quest.PNG (18.27 KiB) Viewed 663 times
When I go to the second scene however, the quest is missing from the journal.
quest_journal_missing_quest.PNG
quest_journal_missing_quest.PNG (13.67 KiB) Viewed 663 times
The HUD displays the expected quest objective in the second scene. However, it doesn't update as expected when the monster is killed.
beholder_kill_hud_not_updating.PNG
beholder_kill_hud_not_updating.PNG (14.33 KiB) Viewed 663 times
The debug seems to show that the message is sent as expected.
kill_beholder_debug.PNG
kill_beholder_debug.PNG (7.83 KiB) Viewed 663 times
The above seems to imply that it's the actual Quest that isn't carried over (i.e. no listener to receive/ update the message). But I'm not sure what I'm missing.

Note that the original player object (with the quest journal) is NOT in the second scene. I also did not set-up a Dialogue Manager/ Quest Machine in the second scene so it's relying on the persistent object setting (which I assume would have included the Quest contents).
persistent_objects.PNG
persistent_objects.PNG (23.79 KiB) Viewed 663 times
I am using the `SaveSystem.LoadScene`, and have set a bunch of the saver components onto the DialogueSystem as per the demos/ docs based on my understanding. My understanding is that Quest Machine data will be saved via the Dialogue System saver/ intergration. Also the integration of easy save is just to change the persistent data object to an `ES3SavedGameDataStorer` as opposed to the in-built options if I'm using the in-built systems that are linked to the Dialogue System.

The saving appears to work for GameObjects (remains inactive after being set inactive between scenes + using a multi-active saver component).
dialogue_system_saver.PNG
dialogue_system_saver.PNG (28.17 KiB) Viewed 663 times
dialogue_system_toggles_v2.PNG
dialogue_system_toggles_v2.PNG (36.3 KiB) Viewed 663 times
So overall, I'm wondering what part I'm missing to get the quest contents to transfer to the second scene where the objective is (where the enemy is/ where the message gets sent upon defeat)

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

Re: Quest contents not loading between scenes

Post by Tony Li »

Hi,

When you get to the second scene, you still need a QuestJournal component. This is the component that holds the player's quest list. You could make the QuestJournal GameObject Don't Destroy On Load, or add an instance of it to the second scene. The QuestJournal should have the same Save Key value as in the first scene.

A few other minor notes:

SavedGameDataStorers (e.g., ESSavedGameDataStorer) isn't involved when changing scenes, only when saving a game to storage (e.g., disk), so that's not an issue.

You can UNtick the Dialogue Manager's Persistent Data Settings > Include All Item & Quest Data checkbox if you want, unless you need to save changes to the Item[] table. Quests are maintained in Quest Machine, not the Dialogue System's Persistent Data Settings.
Post Reply