Runtime Added Quest is not loaded

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
dunehunter
Posts: 1
Joined: Mon Feb 07, 2022 5:16 am

Runtime Added Quest is not loaded

Post 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,
  
};
User avatar
Tony Li
Posts: 22152
Joined: Thu Jul 18, 2013 1:27 pm

Re: Runtime Added Quest is not loaded

Post by Tony Li »

Hi,

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