Hello!
Is there a way to save every saver component (position, active, destructible etc) except for the Dialogue state itself - conversation state, quests state and variables?
I want to save and load these ones separately, I've tried Record/Apply persistent data but they still apply the Saver component data to objects.
Just want to maintain object persistence between scenes but not the quests and conversation variables so that the player doesn't revert progress when completing a quest in a new scene and then loading back to the first scene when the quest was saved as not completed so it would load as not completed.
Thank you
Save everything but Conversation state and convo variables?
-
- Posts: 24
- Joined: Fri Sep 22, 2023 5:05 pm
Re: Save everything but Conversation state and convo variables?
Hi,
You can remove the Dialogue System Saver component. This is the component that's responsible for saving Dialogue System data (quests, variables, etc.).
You can remove the Dialogue System Saver component. This is the component that's responsible for saving Dialogue System data (quests, variables, etc.).
-
- Posts: 24
- Joined: Fri Sep 22, 2023 5:05 pm
Re: Save everything but Conversation state and convo variables?
Oh I don't want to remove the Saver component from the Dialogue system itself, I just want to be able to choose to save these ones separately, so only save the rest of the Saver components but not the Dialogue System saver and vice versa.
Or to rephrase it, a way to save and apply the Dialogue System's conversation, variables and quest status without saving or applying data to other component savers on game objects, and then save and apply data from these other Saver components separately
Re: Save everything but Conversation state and convo variables?
Hi,
In that case, you could still remove the Dialogue System Saver, and manually call PersistentDataManager.GetSaveData() to get only the DS data:
To restore that data, use PersistentDataManager.ApplySaveData():
The Dialogue System Saver component is really just a Saver script wrapper around these two methods.
In that case, you could still remove the Dialogue System Saver, and manually call PersistentDataManager.GetSaveData() to get only the DS data:
Code: Select all
string s = PersistentDataManager.GetSaveData();
Code: Select all
PersistentDataManager.ApplySaveData(s);
-
- Posts: 24
- Joined: Fri Sep 22, 2023 5:05 pm
Re: Save everything but Conversation state and convo variables?
That's exactly it!I just had to make sure the Playmaker action was doing that function since it has an If/else statement where it can save all the components instead of just the dialogue status. thank you Tony!Tony Li wrote: ↑Tue Aug 13, 2024 2:32 pm Hi,
In that case, you could still remove the Dialogue System Saver, and manually call PersistentDataManager.GetSaveData() to get only the DS data:
To restore that data, use PersistentDataManager.ApplySaveData():Code: Select all
string s = PersistentDataManager.GetSaveData();
The Dialogue System Saver component is really just a Saver script wrapper around these two methods.Code: Select all
PersistentDataManager.ApplySaveData(s);
I just have another question since I can't seem to find this on the documentation - what is the "Conversation State Saver" and how does it differ from Dialogue System Saver? I used to have it in my Dialogue Manager game object but I it's safe to delete it as well then?
EDIT: oops you've already asnwered this exact question here in the forums!
Re: Save everything but Conversation state and convo variables?
To save future readers the trouble of looking it up: ConversationStateSaver saves the state of the active conversation (if any). So when you load the saved game it will resume the conversation in the saved state.