Page 1 of 1

Saving only quests

Posted: Sat Aug 05, 2023 2:51 am
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.

Re: Saving only quests

Posted: Sat Aug 05, 2023 10:27 am
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);