Page 1 of 1

Quest condition save data

Posted: Thu Nov 10, 2022 2:53 pm
by nratcliff
I have a quest condition that holds an identifier used to find a target village in my game's world. When the quest is started, the condition gets the quest giver's current village identifier in StartChecking. After starting the quest, I want to be able to save the active quest when I exit the game then restore the active quest and quest condition with the same village identifier. I am already using the save system and all quests have been saved/loaded fine so far.

I tried adding the village identifier to the questNode's tag dictionary when we first get it but it appears that the tag dictionary contents are not loaded until after the node's state is loaded and StartChecking is called. What's the best practice for saving additional data for quest conditions like this target village ID?

Re: Quest condition save data

Posted: Thu Nov 10, 2022 3:26 pm
by Tony Li
Hi,

The load order fortunately happens to be arbitrary there, so here's a patch that loads the quest node's tag dictionary before setting the state. This change will be in the next update, too.

QM_QuestNodeLoadPatch_2022-11-10.unitypackage

Re: Quest condition save data

Posted: Thu Nov 10, 2022 3:36 pm
by nratcliff
Amazing turnaround time! Looks like your patch does exactly what I thought about doing but I was afraid of unforeseen consequences of changing the order there.

Thanks as always!

Re: Quest condition save data

Posted: Thu Nov 10, 2022 3:37 pm
by Tony Li
Glad to help!