Conversations not being saved in Textline Lobby demo
Conversations not being saved in Textline Lobby demo
Hi Tony!
I wanted to ask about the Textline Lobby demo again that I've been using -- currently, when I run the demo the options aren't saved after the game is stopped and restarted(I don't see the option to continue game after playing through all of the text options). Not sure if there's a box I have to check to enable that but the Save Helper is attached to the "0 Lobby" scene so I thought it should have been saving and I see it saving when I exit and reenter conversations but after I stop the game and hit play again in Unity the data is wiped. Thanks!
Jenny
I wanted to ask about the Textline Lobby demo again that I've been using -- currently, when I run the demo the options aren't saved after the game is stopped and restarted(I don't see the option to continue game after playing through all of the text options). Not sure if there's a box I have to check to enable that but the Save Helper is attached to the "0 Lobby" scene so I thought it should have been saving and I see it saving when I exit and reenter conversations but after I stop the game and hit play again in Unity the data is wiped. Thanks!
Jenny
Re: Conversations not being saved in Textline Lobby demo
Hi Jenny,
Let's make sure the Lobby example is working as-is in your project first. Please make sure the Lobby Example's "0 Lobby" scene is added as the first scene in build settings, and "1 Gameplay" is added as the second scene:
Then open "0 Lobby" and inspect the Menu System GameObject. Find the PlayerPrefs Saved Game Data Storer component, and click Clear Saved Games to make sure we're starting from a clean slate:
Then play "0 Lobby". You should see Adam, Barbara, Charlie:
Click on Adam and play through a few lines:
Then click Menu to go back to the Lobby. Then quit the game and play it again. You should now see a additional Continue Game and Restart Game buttons:
If you click on Continue Game and then click on Adam, you should see the same Adam conversation that you left from your last play-through:
Let's make sure the Lobby example is working as-is in your project first. Please make sure the Lobby Example's "0 Lobby" scene is added as the first scene in build settings, and "1 Gameplay" is added as the second scene:
Then open "0 Lobby" and inspect the Menu System GameObject. Find the PlayerPrefs Saved Game Data Storer component, and click Clear Saved Games to make sure we're starting from a clean slate:
Then play "0 Lobby". You should see Adam, Barbara, Charlie:
Click on Adam and play through a few lines:
Then click Menu to go back to the Lobby. Then quit the game and play it again. You should now see a additional Continue Game and Restart Game buttons:
If you click on Continue Game and then click on Adam, you should see the same Adam conversation that you left from your last play-through:
Re: Conversations not being saved in Textline Lobby demo
Thanks Tony! For some reason the example as-is doesn't save either --
This is the screenshot of the Save Helper. Seems to be set up the same way so I'm not sure what else would interfere with the saving and persistent storage. I didn't change anything in the example code. Thanks!Re: Conversations not being saved in Textline Lobby demo
Also, would I have to add the checkbox to use a "saved game?"
Turning it on does trigger a bug:
And the line that this is referring to is: saveHelper.QuickSave();
Thanks!
Just found this in the DialogueSystem wizard. Thanks!Turning it on does trigger a bug:
Code: Select all
NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.DialogueSystem.MenuSystem.MenuUtility+<ReturnToTitleWhenDoneSaving>d__6.MoveNext () (at Assets/Dialogue System Extras/Textline/Scripts/MenuUtility.cs:64)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at /Users/builduser/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
Thanks!
Re: Conversations not being saved in Textline Lobby demo
Hi,
You can remove the SaveSystem component from the Dialogue Manager GameObject. In the Textline framework, the SaveSystem component is on the Menu System GameObject.
Please inspect the Menu System GameObject and tick the Debug checkboxes on the Save System component and the PlayerPrefs Saved Game Data Storer component.
If you don't see any of these components, please add them: Save System, PlayerPrefs Saved Game Data Storer, Json Data Serializer, and Auto Save Load. On Auto Save Load, make sure Save On Quit and Save On Pause are ticked.
Then play the game again, run through a line or two of Adam's conversation, return to the menu, and exit play mode. When you do this, you should see two lines similar to:
You can remove the SaveSystem component from the Dialogue Manager GameObject. In the Textline framework, the SaveSystem component is on the Menu System GameObject.
Please inspect the Menu System GameObject and tick the Debug checkboxes on the Save System component and the PlayerPrefs Saved Game Data Storer component.
If you don't see any of these components, please add them: Save System, PlayerPrefs Saved Game Data Storer, Json Data Serializer, and Auto Save Load. On Auto Save Load, make sure Save On Quit and Save On Pause are ticked.
Then play the game again, run through a line or two of Adam's conversation, return to the menu, and exit play mode. When you do this, you should see two lines similar to:
Code: Select all
TextlineDialogueUI.OnRecordPersistentData: Saving current conversation to DialogueEntryRecords_Adam
Save System: Storing in PlayerPrefs key Save1: {"m_sceneName":"1 Gameplay","m_list":[{"key":"Dialogue Manager"...
Re: Conversations not being saved in Textline Lobby demo
Thanks Tony! I turned on the Debug and checked that all of the components were there. I see this when I run through Charlie's dialogue and then go back to the menu, implying that something was saved:
However, when I restart the scene, the Continue screen doesn't show up. Could I perhaps be saving to the wrong PlayerPref key? I'm using Unity 2018.4.01f. Thanks!
Code: Select all
TextlineDialogueUI.OnRecordPersistentData: Saving current conversation to DialogueEntryRecords_Charlie
Save System: Storing in PlayerPrefs key Save0: {"m_sceneName":"1 Gameplay","m_list":[{"key":"Dialogue Manager","sceneIndex":-1,"data":"Variable={Alert=\"\", Conversation=\"Charlie\", SavedLevelName=\"1 Gameplay\", Actor=\"Player\", Conversant=\"Charlie\", ActorIndex=\"Player\", ConversantIndex=\"Charlie\", Chapter=3, CurrentConversationActor_Charlie=\"Player\", CurrentConversationConversant_Charlie=\"Charlie\", DialogueEntryRecords_Charlie=\"5;3;1;3;2;3;3;3;4;3;5;\"}; Actor={Player={Name=\"Player\", Pictures=\"[]\", Description=\"\", IsPlayer=true}, Adam={Name=\"Adam\", Pictures=\"[]\", Description=\"\", IsPlayer=false}, Barbara={Name=\"Barbara\", Pictures=\"[]\", Description=\"\", IsPlayer=false}, Charlie={Name=\"Charlie\", Pictures=\"[]\", Description=\"\", IsPlayer=false}}; StatusTable = \"\"; RelationshipTable = \"\"; "}]}
UnityEngine.Debug:Log(Object)
PixelCrushers.PlayerPrefsSavedGameDataStorer:StoreSavedGameData(Int32, SavedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/Storers/PlayerPrefsSavedGameDataStorer.cs:60)
PixelCrushers.<StoreSavedGameDataAsync>d__8:MoveNext() (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/Storers/SavedGameDataStorer.cs:48)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
Re: Conversations not being saved in Textline Lobby demo
Hi,
Try setting the Auto Save Load component's save slot number to 0. I believe it defaults to 1.
Try setting the Auto Save Load component's save slot number to 0. I believe it defaults to 1.
Re: Conversations not being saved in Textline Lobby demo
Thanks Tony! Changing the Save slot on the Auto Save + Checking the Load On Start box ended up working!
However, as soon as I open the game this "Load on Start" setting causes the game too jump into the conversation scene that I left off at (but it saves now!). Is there a way to have it instead stay on the Lobby scene on Load?
However, as soon as I open the game this "Load on Start" setting causes the game too jump into the conversation scene that I left off at (but it saves now!). Is there a way to have it instead stay on the Lobby scene on Load?
Re: Conversations not being saved in Textline Lobby demo
Actually I figured it out -- I had to uncheck "Save Current Scene" and it goes to the Lobby screen! Everything saves and loads but I don't see the "Continue Game" button and I don't see the anything under the "Saved games" list even after having a saved game.
Maybe the save slot is still in the wrong place?
Maybe the save slot is still in the wrong place?
Re: Conversations not being saved in Textline Lobby demo
Hi,
Keep Save Current Scene ticked.
Untick the Auto Save Load component's Load On Start.
Keep Save Current Scene ticked.
Untick the Auto Save Load component's Load On Start.