Saving only quests

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
GeoffFree
Posts: 4
Joined: Thu Jul 06, 2023 6:24 am

Saving only quests

Post by GeoffFree »

How do I specifically save only quests? Due to some anomalous issue, I cannot save the entire game otherwise it would break other features. Furthermore, another anomalous issue is causing the quest entries not to change on scene load even though every single value is correct, it gets triggered, and if I trigger it manually after the scene has been loaded it works, but it refuses to actually do anything on scene load. Therefore, I think the only way to truly pull this off is to save only quests, but I can't find the method/function to do this.
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Saving only quests

Post by Tony Li »

Hi,

If it's okay to save quests and variables:

1. Inspect the Dialogue Manager GameObject's Persistent Data Settings section. UNtick everything except Initialize New Variables.

2. To save quests and variables to a string, use this C# code:

Code: Select all

string s = PixelCrushers.DialogueSystem.PersistentDataManager.GetSaveData();
3. To restore:

Code: Select all

PixelCrushers.DialogueSystem.PersistentDataManager.ApplySaveData(s);
Post Reply