Imported quest machine, already had dialogue system
Re: Imported quest machine, already had dialogue system
Did you tick the Quest Giver's Save Settings > Include In Saved Game Data and set a unique Save Key?
-
- Posts: 95
- Joined: Thu Aug 12, 2021 6:39 pm
Re: Imported quest machine, already had dialogue system
Hi,
Regarding the quest givers, does each quest giver have a unique Saver Key? What info doesn't appear to be saved?
Regarding the HUD, it should automatically update whenever the quest journal changes, including when the quest journal's state is restored from the save system. If you were to tick the Quest Machine GameObject's Debug > Debug Message System checkbox, you would see a lot of messages, including a Refresh UIs message that the HUD listens for.
Can you test it with the example HUD UI included in QM's Demo? Are there any errors or warnings in the Console?
Regarding the quest givers, does each quest giver have a unique Saver Key? What info doesn't appear to be saved?
Regarding the HUD, it should automatically update whenever the quest journal changes, including when the quest journal's state is restored from the save system. If you were to tick the Quest Machine GameObject's Debug > Debug Message System checkbox, you would see a lot of messages, including a Refresh UIs message that the HUD listens for.
Can you test it with the example HUD UI included in QM's Demo? Are there any errors or warnings in the Console?
-
- Posts: 95
- Joined: Thu Aug 12, 2021 6:39 pm
Re: Imported quest machine, already had dialogue system
Hello,
I just have one Dialogue System Quest Giver that has a unique save key and I ticked Include in Saved Game Data and Save Across Scene changes. It's a little different than my Journal in that it only exists in 1 scene whereas the Journal I made persist across scenes. So when the data is loaded from file, maybe the Journal can refresh because it exists at that point whereas the QuestGiver does not. As far as what data doesn't appear to get saved - I'm just looking at the QuestGiver's Quests. I just have one quest. When I accept the quest it disappears but when I leave the scene and come back it's there again. I'd expect if it's saving that the quest list would save/load but I'm not sure how it works.
As for the quest HUD. I swapped in the HUD UI Prefab and it's working so I guess I did manage to mess something up with my HUD variation.
I just have one Dialogue System Quest Giver that has a unique save key and I ticked Include in Saved Game Data and Save Across Scene changes. It's a little different than my Journal in that it only exists in 1 scene whereas the Journal I made persist across scenes. So when the data is loaded from file, maybe the Journal can refresh because it exists at that point whereas the QuestGiver does not. As far as what data doesn't appear to get saved - I'm just looking at the QuestGiver's Quests. I just have one quest. When I accept the quest it disappears but when I leave the scene and come back it's there again. I'd expect if it's saving that the quest list would save/load but I'm not sure how it works.
As for the quest HUD. I swapped in the HUD UI Prefab and it's working so I guess I did manage to mess something up with my HUD variation.
Re: Imported quest machine, already had dialogue system
Even if the quest is in the Quest Giver's list, after returning to the scene is it no longer offerable because the player's journal already has a copy? If so, that's normal behavior.
Since you're doing your own saving and scene changing, two suggestions:
1. Call PixelCrushers.SaveSystem.BeforeSceneChange() before changing scenes. (More info: How To: Change Scenes With Save System)
2. Wait until the end of the frame before calling PixelCrushers.SaveSystem.ApplySavedGameData(). Like you said, maybe the journal isn't ready yet.
Since you're doing your own saving and scene changing, two suggestions:
1. Call PixelCrushers.SaveSystem.BeforeSceneChange() before changing scenes. (More info: How To: Change Scenes With Save System)
2. Wait until the end of the frame before calling PixelCrushers.SaveSystem.ApplySavedGameData(). Like you said, maybe the journal isn't ready yet.
-
- Posts: 95
- Joined: Thu Aug 12, 2021 6:39 pm
Re: Imported quest machine, already had dialogue system
I see. The quest is no longer offerable anyways because I made it only offerable if its state is inactive. So once it's accepted it won't get offered again anyways. I was just curious why the quest list doesn't appear to get saved/loaded or if it should. When I load the game it's from a SaveLoad scene which doesn't have any quest givers so it won't get loaded. I was just wondering if the quest giver should get loaded automatically OnEnable or something like that.
I put in those changes. Do they mess with the sequencer fading? Cause it seems to be getting stuck now.
I put in those changes. Do they mess with the sequencer fading? Cause it seems to be getting stuck now.
Re: Imported quest machine, already had dialogue system
There shouldn't be any interplay between sequencer fading and Quest Machine.
The quest giver's quest list looks the way it does after restoring data because the save system tries to save the minimum amount of data necessary to make things work correctly.
The quest giver's quest list looks the way it does after restoring data because the save system tries to save the minimum amount of data necessary to make things work correctly.