Page 1 of 1
Exception During Quest Save Loading Problem
Posted: Wed Jun 19, 2024 9:43 pm
by publicminsu
Hello,
I encountered an issue while loading quest saves and am writing to seek assistance.
- 74905462-599a-4fe2-9862-2dc8a083787e.png (156.29 KiB) Viewed 1540 times
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.
- 1fcdce98-42d3-4c25-a5c9-62c00f4cc263.png (211.66 KiB) Viewed 1540 times
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?
Re: Exception During Quest Save Loading Problem
Posted: Wed Jun 19, 2024 10:08 pm
by Tony Li
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?
Re: Exception During Quest Save Loading Problem
Posted: Fri Jun 21, 2024 3:21 am
by publicminsu
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).
Re: Exception During Quest Save Loading Problem
Posted: Fri Jun 21, 2024 8:18 am
by Tony Li
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?
Re: Exception During Quest Save Loading Problem
Posted: Mon Jun 24, 2024 4:02 am
by publicminsu
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.
- 스크린샷 2024-06-24 165753.png (62.74 KiB) Viewed 1507 times
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?
Re: Exception During Quest Save Loading Problem
Posted: Mon Jun 24, 2024 4:30 am
by publicminsu
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?
Re: Exception During Quest Save Loading Problem
Posted: Mon Jun 24, 2024 7:59 am
by Tony Li
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.
Re: Exception During Quest Save Loading Problem
Posted: Mon Jun 24, 2024 8:47 pm
by publicminsu
Thank you for your response. It was helpful!
Re: Exception During Quest Save Loading Problem
Posted: Mon Jun 24, 2024 9:03 pm
by Tony Li
Glad to help!