Hello,
I encountered an issue while loading quest saves and am writing to seek assistance.
When an exception occurs during the quest save loading process, a Clone is returned. This results in the QuestState defaulting to Unknown instead of Active, leaving the quest in an unreceived state.
It seems this problem arises when the saved data during deserialization does not match the asset data.
Could you please advise on a possible solution?
Exception During Quest Save Loading Problem
-
- Posts: 5
- Joined: Wed Jun 19, 2024 9:26 pm
Re: Exception During Quest Save Loading Problem
Hi,
What version of Quest Machine are you using?
If you saved the game in a different version, do you remember what version of Quest Machine it was?
What version of Quest Machine are you using?
If you saved the game in a different version, do you remember what version of Quest Machine it was?
-
- Posts: 5
- Joined: Wed Jun 19, 2024 9:26 pm
Re: Exception During Quest Save Loading Problem
Thank you for your response.
My Quest Machine version is 1.2.34.
Please note that the issue I'm experiencing is not due to importing data from a different Quest Machine version (because I have maintained the same version throughout).
The current issue arises when saving quest data from a previously created quest and then modifying the quest before reloading it.
In my opinion, the problem occurs due to the following steps:
1. Create Quest A.
2. Save progress of Quest A as Quest Data B.
3. Modify Quest A, resulting in Quest A-1.
4. Load progress data B. Since B was created for Quest A, it cannot load values for A-1, resulting in an exception.
5. Fetch a copy of A-1 (using quest.Clone()).
This results in discarding all progress made in A (losing quest state).
My Quest Machine version is 1.2.34.
Please note that the issue I'm experiencing is not due to importing data from a different Quest Machine version (because I have maintained the same version throughout).
The current issue arises when saving quest data from a previously created quest and then modifying the quest before reloading it.
In my opinion, the problem occurs due to the following steps:
1. Create Quest A.
2. Save progress of Quest A as Quest Data B.
3. Modify Quest A, resulting in Quest A-1.
4. Load progress data B. Since B was created for Quest A, it cannot load values for A-1, resulting in an exception.
5. Fetch a copy of A-1 (using quest.Clone()).
This results in discarding all progress made in A (losing quest state).
Re: Exception During Quest Save Loading Problem
Hi,
In version 1.2.34, the positions of two bytes in quest save data were in the incorrect order, which could cause issues like this. It was fixed in version 1.2.35.
Would it be possible for you to back up your project, update to the current Quest Machine version, and start a new save file?
In version 1.2.34, the positions of two bytes in quest save data were in the incorrect order, which could cause issues like this. It was fixed in version 1.2.35.
Would it be possible for you to back up your project, update to the current Quest Machine version, and start a new save file?
-
- Posts: 5
- Joined: Wed Jun 19, 2024 9:26 pm
Re: Exception During Quest Save Loading Problem
Thank you for responding, but that's not the answer I was looking for.
It seems I didn't explain my situation properly. I'm sorry.
Let me explain again:
1. (Editor) Create a quest.
2. (Game) Progress through the quest Data.
3. (Game) Save the quest Data.
4. (Editor) Delete a node from the quest.
5. (Game) Load the quest Data.
6. (Game) The quest Data resets (triggering an exception that calls quest.Clone())
It seems to be a situation like this.
The issue is that quest.Clone() causes the quest to completely reset from the beginning, even if there is progress already made.
It seems that QuestListContainer.cs(ApplyData / quest.Clone()) and QuestStateSerializer.cs are relevant to the issue at hand.
Is there no way to load quest data while preserving progress as much as possible?
It seems I didn't explain my situation properly. I'm sorry.
Let me explain again:
1. (Editor) Create a quest.
2. (Game) Progress through the quest Data.
3. (Game) Save the quest Data.
4. (Editor) Delete a node from the quest.
5. (Game) Load the quest Data.
6. (Game) The quest Data resets (triggering an exception that calls quest.Clone())
It seems to be a situation like this.
The issue is that quest.Clone() causes the quest to completely reset from the beginning, even if there is progress already made.
It seems that QuestListContainer.cs(ApplyData / quest.Clone()) and QuestStateSerializer.cs are relevant to the issue at hand.
Is there no way to load quest data while preserving progress as much as possible?
-
- Posts: 5
- Joined: Wed Jun 19, 2024 9:26 pm
Re: Exception During Quest Save Loading Problem
https://www.pixelcrushers.com/phpbb/vie ... ess#p28871
It seems there was a previous topic about a similar problem.
Is the solution in that topic the only method?
It seems there was a previous topic about a similar problem.
Is the solution in that topic the only method?
Re: Exception During Quest Save Loading Problem
It depends on how drastically the quest has changed. If removing that node changes the context of the quest, then it would be better to make a new quest. If it's just a minor adjustment, then the issue is probably the bug I mentioned above where the save system in this older version of Quest Machine will not be able to reload the quest from a saved game if the number of nodes has changed.
-
- Posts: 5
- Joined: Wed Jun 19, 2024 9:26 pm
Re: Exception During Quest Save Loading Problem
Thank you for your response. It was helpful!
Re: Exception During Quest Save Loading Problem
Glad to help!