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:
My question is: how to stop this behavior of unwanted data saving?
Quest Machine - Pervasive Saving
Re: Quest Machine - Pervasive Saving
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?
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?
-
- Posts: 6
- Joined: Sun Jul 21, 2024 8:54 pm
Re: Quest Machine - Pervasive Saving
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:
No problems now. Much thanks for assistance!
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:
No problems now. Much thanks for assistance!
Re: Quest Machine - Pervasive Saving
Glad to help! I'm happy you got it working.