Quest Machine Saved Game Question
Posted: Wed Jan 22, 2020 8:53 am
If you're using Quest Machine quests, you don't have to add them to the Dialogue System's database in the Dialogue Editor. However, it's fine for you to add them as empty quests so you can easily reference the quest names in conversations' "..." dropdown menus.Hi Tony, I'm having a problem with Quest Machine. I set a single quest giver (i.e QuestMaster) that holds all quests given to player, the QuestMaster can give quest to player just fine but why the quest state on QuestMaster side doesn't update when I finish the quest (listed as success on quest journal) thus the quest states on PlayerPrefs are always set to
"unassigned", as in the game is unable to save quest states.
I've put the quests on quest database correctly and set both "include in save data" and "save across scene change" for both QuestMaster and Journal, the quest is started from a Dialogue System conversation (i.e GiveQuest("QuestMaster", "cursedSanctuaryScroll")) but whether I put any quest on Dialogue Editor's Quests/Items list doesn't affect anything. What
step did I miss at setting up the QuestMaster?
When the player accepts a quest from the NPC (QuestMaster), the player's QuestJournal will receive a copy of the quest. When the player completes the quest, this copy's state will be set to Success. The original quest in QuestMaster's QuestGiver list will be unchanged, except for the cooldown time if it's a repeatable quest with a cooldown duration.
Since you've ticked Include In Save Data and Save Across Scene Changes for the player's QuestJournal and QuestMaster's QuestGiver, this information should be included in saved games. When you load the saved game, the copy in the player's QuestJournal should still be set to Success. The original in the QuestMaster's QuestGiver list should still have its original values.
If that's not the case in your project, please check the Console window for any errors or warnings. Also make sure the save system is fully set up with these components: SaveSystem, data serializer (e.g., JsonDataSerializer), and data storer (e.g., PlayerPrefsSavedGameDataStorer). You can tick the Debug checkboxes on the components to log extra info to the Console.
If that doesn't help, please feel free to send a reproduction project to tony (at) pixelcrushers.com. I'll be happy to take a look.
You can also tick the Debug checkboxes on the save system components in Quest Machine's included demo scene. If you play this scene, you can see what kind of information the Debug checkboxes log when you save and load a game.