Quest Machine - Pervasive Saving

Announcements, support questions, and discussion for Quest Machine.
Post Reply
StateOfArtGameStudio
Posts: 6
Joined: Sun Jul 21, 2024 8:54 pm

Quest Machine - Pervasive Saving

Post by StateOfArtGameStudio »

Hello!

I have a little trouble with Quest Machine saving mechanics.
I have a custom save system that has also nested dialog system save. So I use RecordData() method to perform save and load it. And it works fine.

I noticed a problem when I played a scene twice without performing a save.
Although I saved nothing, on second run I saw my intro quest already gone from my quest giver.
I done a little debugging to find that there is some persistent data on quests. I cannot figure out how to get rid of it.

I attach my debug to show where the quest gots deleted from quest giver:
debug.png
debug.png (23.47 KiB) Viewed 66 times
mostEssential.png
mostEssential.png (17.32 KiB) Viewed 66 times
My question is: how to stop this behavior of unwanted data saving?
User avatar
Tony Li
Posts: 22034
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest Machine - Pervasive Saving

Post by Tony Li »

Hi,

QuestGiver.Start() calls the base method QuestListContainer.Start(), which sets the questList property to a list of instantiated versions of the quests in the QuestGiver's quests list. Unless your custom code is doing something to prevent this, it shouldn't remove quests from the QuestGiver's quests list between play mode sessions.

For example, please play the Demo scene twice. You'll notice that the Villager NPC's quests list is the same every time you enter play mode.

If that doesn't help, would you please provide more details?
StateOfArtGameStudio
Posts: 6
Joined: Sun Jul 21, 2024 8:54 pm

Re: Quest Machine - Pervasive Saving

Post by StateOfArtGameStudio »

I cannot determine which is better - your assets, documentation or support.

My load system does most of its job already on awake. And the issue was happening because the intro quest was offered on awake already. To solve the problem I extended quest giver with bool "initialized" and run following method:
DialogCoroutine.png
DialogCoroutine.png (9.38 KiB) Viewed 57 times
No problems now. Much thanks for assistance!
User avatar
Tony Li
Posts: 22034
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest Machine - Pervasive Saving

Post by Tony Li »

Glad to help! I'm happy you got it working.
Post Reply