In your StartConversationQuestAction.cs script, is line 20 (or thereabouts):
Code: Select all
[SerializeField] private bool m_specifyEntryID = false;
Code: Select all
[SerializeField] private bool m_specifyEntryID = false;
DS and QM use the same save system. If you're using this method to save DS:hipsterdufus wrote: ↑Sat Sep 30, 2023 11:34 pmI'm using my own save system. For the dialogue system I'm just outputting the entire system as a string (there's a nice method for that) and saving that to a file myself. Can I do something similar for quest machine?
Code: Select all
string s = PersistentDataManager.GetSaveData();
Code: Select all
string s = PixelCrushers.SaveSystem.Serialize(PixelCrushers.SaveSystem.RecordSavedGameData());
Using the DS+QM save system as described above will take care of it.hipsterdufus wrote: ↑Sat Sep 30, 2023 11:34 pmMy player (with a quest journal). Gets destroyed and recreated when changing scenes and loses quests. In this case does it make sense to create a separate quest journal that persists across scenes? My game is single player.
Exactly. You can also set up the NPC's Quest Giver component to be included in save data if you want to record info like the number of times the NPC has given a quest.hipsterdufus wrote: ↑Sat Sep 30, 2023 11:34 pmFor quest givers, I see that the quest gets moved out of the quest giver component when the player accepts it. When the player moves out and back to the scene, the quest list is repopulated (maybe because my quest journal was cleared out?).
No, they use instances in memory so each instance can have its own data. But they're not copied on disk or anything like that. In saved games, they're saved in a compact byte format that only saves the minimum data needed such as the quest state and node states.hipsterdufus wrote: ↑Sat Sep 30, 2023 11:34 pmThese quest objects on the giver and quest journal components aren't actually being copied right? They're just references to the single quest asset in the quest database?
QuestGiver identifies which quests it can talk about. If there's only one quest, it shows dialogue about that quest. If there are multiple, it shows a menu. When showing dialogue about a quest, the Quest Giver compiles a list of quest content. If the quest is offerable, the list contains the Offer Text. If the quest is active or done, the list contains the main info's Dialogue Text from the current state (e.g. Active state) and the Dialogue Text from all of the nodes' current states. You can control the order in which the nodes add their Dialogue Text by moving them up and down in the Node Order reorderable list at the bottom of the main info inspector.hipsterdufus wrote: ↑Sat Sep 30, 2023 11:34 pmWhen I call questGiver.StartDialogue() does it trigger based on the quest node's settings or quest's settings? Wondering how those 2 levels interact.
I recommend looking at MessageQuestCondition.cs. You can write a similar quest condition for your own event system. To do this, duplicate QuestConditionTemplate.cs, move the duplicate into your own scripts folder, rename it, and fill in your code where the comments indicate.hipsterdufus wrote: ↑Sat Sep 30, 2023 11:34 pmHow can I listen for my own event system events instead of the quest machine's event system to progress a quest?
Code: Select all
string s = PersistentDataManager.GetSaveData();
Code: Select all
PersistentDataManager.ApplySaveData(s);
Code: Select all
string s = SaveSystem.Serialize(SaveSystem.RecordSavedGameData());
Code: Select all
SaveSystem.ApplySavedGameData(SaveSystem.Deserialize<SavedGameData>(s));