Save Conversation Fields?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
alfonso
Posts: 104
Joined: Mon Jul 13, 2015 6:31 am

Save Conversation Fields?

Post by alfonso »

Hi Tony

I'm with de save / load of the game and i have a little question, in my test of saving the "Dialogue System Data" i have used

Code: Select all

GetComponent<PixelCrushers.DialogueSystem.GameSaver>().OnUse();
and call the "PlayerPrefs.SetString(key, PersistentDataManager.GetSaveData());" and if i see data in playersPrefs i dont see any information about Conversation, only this:

Code: Select all

Variable["Alert"]=""; 

Variable["Character"]="\"\""; 

Variable["SavedLevelName"]="TestingAlfonso"; 

Item["Quest_1"]={Status="", Name="Quest 1", Description="Quest1 Description", Is_Item=false, Success_Description="Quest1 Success Description", Failure_Description="Quest1 Failure Description", State="unassigned", Trackable=false, Abandonable=false, }; 

Actor["Player"]={Status="", Name="Player", Pictures="[]", Description="", IsPlayer=true, }; 

Actor["Detective"]={Status="", Name="Detective", Pictures="[]", Description="", IsPlayer=false, }; 

StatusTable = ""; 

RelationshipTable = ""; 
For example in each Conversation i have a field called "Count" to know how many times the player talks with the npc how has that conversation.

The question is:

This kind of stuff is managed by the GameSaver or by me? in the other hand, in the data i put before is necesary the information of the actors and quest? i mean, the state of the quest is important but the name, descreption, etc? this info comes in the database and for load the progression i dont see the importance of this stuff, same with the actors, but not sure if is here for something i dont see yet.

Thanks so much :)
alfonso
Posts: 104
Joined: Mon Jul 13, 2015 6:31 am

Re: Save Conversation Fields?

Post by alfonso »

in the other hand, in the data i put before is necesary the information of the actors and quest? i mean, the state of the quest is important but the name, descreption, etc? this info comes in the database and for load the progression i dont see the importance of this stuff
sorry, it was my fault. I didn't see i had active the option to put all the information of the item :oops: but the actors is necesary to save for something special?
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Save Conversation Fields?

Post by Tony Li »

Hi Alfonso,

The Saved Game Data page lists what info is saved by default. To keep saved games small, the save system doesn't save all fields by default.

It saves all actor fields. When developers add custom fields to actors, it's usually important to save them.

For quests (which can contain a lot of text), it only saves the state and track info by default. As you already mentioned, if you tick the checkbox or set PersistentDataManager.includeAllItemData = true, it will save all quest/item fields.

For conversations, it only saves SimStatus (and only if PersistentDataManager.includeSimStatus is true).

To save additional data, you can write a persistent data component or a GetCustomSaveData delegate.
Post Reply