Quest condition save data

Announcements, support questions, and discussion for Quest Machine.
Post Reply
User avatar
nratcliff
Posts: 23
Joined: Tue Sep 27, 2022 10:47 am

Quest condition save data

Post 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?
Lead Dev @ aesthetic.games
Creator of Easy Feedback Form
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest condition save data

Post 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
User avatar
nratcliff
Posts: 23
Joined: Tue Sep 27, 2022 10:47 am

Re: Quest condition save data

Post 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!
Lead Dev @ aesthetic.games
Creator of Easy Feedback Form
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest condition save data

Post by Tony Li »

Glad to help!
Post Reply