Page 1 of 1

Runtime Added Quest is not loaded

Posted: Tue Feb 08, 2022 12:21 am
by dunehunter
I'm adding quest in runtime use QuestLog class as below:

Code: Select all

QuestLog.AddQuest(questName, questDesc);

Code: Select all

string saveString = PixelCrushers.DialogueSystem.PersistentDataManager.GetSaveData();
writer.Write(saveString);
EDIT: So I debugged a bit and save string data has my new quest, but the issue is when I'm calling

Code: Select all

PixelCrushers.DialogueSystem.PersistentDataManager.ApplySaveData(saveString);
Quest added in runtime is not recovered, only pre-created quests are loaded.

Here's an example of my quest json in save file

Code: Select all

Item[
  "minor_quest_transport_Villager2"
]={
  Name="minor_quest_transport_Villager2",
  Description="",
  State="active",
  CarryObject="Carriable_bale3",
  Count=0,
  TargetCount=3,
  Location="Transport Location",
  Agent="Villager2",
  Reward=100,
  
};

Re: Runtime Added Quest is not loaded

Posted: Tue Feb 08, 2022 9:26 am
by Tony Li
Hi,

Does it work if you tick the Dialogue Manager's Persistent Data Settings > Include All Item & Quest Data?