Lose accepted quest data

Announcements, support questions, and discussion for Quest Machine.
Post Reply
bitmore
Posts: 11
Joined: Mon Nov 08, 2021 3:16 am

Lose accepted quest data

Post by bitmore »

Hi Tony,
My quest giver has a quest let's call it QuestA. The player accepted the quest and QuestA appear in the player's Quest Journal.
Then I add a custom QuestContent script and edit the QuestA in quest editor, adding the custom quest content to Active Dialogue Text. After doing this I play the game in editor, the QuestA doesn't show up in the player's Quest Journal. As the quest has been given to player before so it can't be found on the quest giver either.

Then I Clear Saved Games in Pixel Crushers SaveSystem, play the game, accept the quest, stop and play again, everything works well.

I'm not sure if it is my changes to the quest caused the data to lose.
My concern is, is there any chance that if the developer makes changes to the quests that have already been set, it will cause the data to lose? If so, this could be a problem if we make updates after the game has been published.

EDIT:
After another test, the player loses the accepted quest if a new counter was added to the quest. This makes sense since a new counter could change the quest's true condition. So we can't redesign the quests if the game has been published, right?
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Lose accepted quest data

Post by Tony Li »

Hi,

Yes, that's correct. You can add new quests, and you can change the text inside quests, but you can't change the quest structure. This is primarily because quests are saved in a very compact manner to keep saved game files small, but also because -- as you mentioned -- adding or removing counters or conditions could totally change the player's place in their saved version of the quest.
bitmore
Posts: 11
Joined: Mon Nov 08, 2021 3:16 am

Re: Lose accepted quest data

Post by bitmore »

If the game has been published, then we found a logic bug and have to add/remove the quest node, is there anything we can do to fix this? Like a script that checks the quest isn't in the player quest journal and also not in the quest giver, then we can re-give it to the player, although the progress of the quest will be reset?
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Lose accepted quest data

Post by Tony Li »

It would probably be more robust to remove the quest from your quest database and add a new quest with a new quest ID. Otherwise you might not know if the version in the player's journal is the old version or the new version of the quest. For example, if the old quest's ID is "bakePie", you could replace it with a new quest with ID "bakePie-v2".

You could make subclasses of QuestJournal and QuestGiver. Override the load game routine's ApplyData() methods to check if each quest is still in the quest database(s) that are assigned to the Quest Machine GameObject. If not, don't load that quest back into the list. Instead, check if there's a new version of the quest by ID (e.g., "bakePie-v2" or even "bakePie-v3", etc.). If so, add that quest instead.
Post Reply