Page 1 of 1

Quest resets to Waiting To Start

Posted: Wed Feb 16, 2022 5:50 pm
by hookkshot
I am in a state where we released a broken quest, and players in our game could restart a quest when they should no of been able to.

What is happening is now that their is a second version of the quest, for some reason between scenes both version of the quest (active and succeeded) transition into 'waiting to start'.

We have since fixed the original problem. But wnat to (without asking our players to restart the game) fix players in this broken state.

Re: Quest resets to Waiting To Start

Posted: Wed Feb 16, 2022 6:22 pm
by Tony Li
Hi,

The Save System component has a version property. It's an arbitrary number that you can set. I recommend using the version property to keep track of saved game file versions. For example, let's say in your patched game you set the save system version to 1. The default value is 0, so that's what was recorded in old saved game files. When you load a saved game, you can check the version of that saved game. If it's 0, you can do some special handling such as cleaning up the quest.

Otherwise, do the old and new quests have different quest IDs? If so, you can write some code that checks for the old quest ID and removes that quest, or that does something similar to handle it the way you want.

From your description alone I can't tell you why the quests are in the waiting to start state. Are you sure the quests on the player's Quest Journal are waiting to start, or just on the Quest Givers? Quests on the Quest Givers are normally left in waiting to start.

Re: Quest resets to Waiting To Start

Posted: Wed Feb 16, 2022 11:19 pm
by hookkshot
It is definitely on the quest Journal. Its the same quest just given to the player twice. Since we use script to give quests from Dialogue system.

It happens when going between scenes. So you have the active quest. Can see it on the HUD, then go to the next scene (Journal and database or static dont destroy on load) and the quest gets set to waiting to start. This only happens on the duplicate quests. hasnt seemed to effect anything else.

There is another quest that stays in the succeeded state.

Re: Quest resets to Waiting To Start

Posted: Wed Feb 16, 2022 11:21 pm
by hookkshot
Just forced giving my self 4 of the same quest.

Go to new scene it brings it down to 1 of that quest.
Go to next scene and it is none

I assume this is due to the quest ID being the same.

Re: Quest resets to Waiting To Start

Posted: Thu Feb 17, 2022 8:59 am
by Tony Li
Yes. Quest IDs should be unique, and it's a good idea to use HasQuest() in your conversation to check if the player has a quest before adding it.

In C# code, you can check if the player has a quest by checking QuestJournal.ContainsQuest("quest ID")

Re: Quest resets to Waiting To Start

Posted: Thu Feb 17, 2022 4:22 pm
by hookkshot
Thats a good Idea I might make a helper function that does both.

Re: Quest resets to Waiting To Start

Posted: Thu Feb 17, 2022 5:10 pm
by Tony Li
Maybe it would be best to write a custom C# method / Lua function for that. Some devs might want GiveQuest() to replace an existing instance while others might want GiveQuest() to not give the quest if the player already has it.