dialogue history
dialogue history
I'm trying to add an UI to display all the dialogue history, I can manually iterate the conversations and display everything, that's not a problem, just curious if there are any built-in methods to get histories, tks
Re: dialogue history
tks Tony, the example seems that is using OnConversationLine to build up a <Subtitle> list and use DialogueManager.instance.PlaySequence to play the subtitle.
Any idea that I can save the subtitle list so when player reload the game and still get the dialogue log history? should I save the complete subtitle list or maybe just the id and retrieve it back after loading?
Any idea that I can save the subtitle list so when player reload the game and still get the dialogue log history? should I save the complete subtitle list or maybe just the id and retrieve it back after loading?
Re: dialogue history
I recommend saving a list of <conversationID, dialogueEntryID> pairs. This way if your conversation uses cross-conversation links you'll know which conversation to get the dialogue entry from.
Alternatively, if you do text substitution in your dialogue text, you might want to save the actual text from each line's Subtitle.formattedText.text.
Alternatively, if you do text substitution in your dialogue text, you might want to save the actual text from each line's Subtitle.formattedText.text.
Re: dialogue history
in summary, gathering a list of <conversationID, dialogueEntryID> pair and save it
when reloaded, use DialogueSystem built-in methods to retrieve the actual dialogue title/description, actors in my dialogue history UI
ps. I don't have any text substitution so don't need to worry about that
when reloaded, use DialogueSystem built-in methods to retrieve the actual dialogue title/description, actors in my dialogue history UI
ps. I don't have any text substitution so don't need to worry about that
Re: dialogue history
Yup! For future readers who haven't looked up the method to get a dialogue entry, it's:
DialogueManager.masterDatabase.GetDialogueEntry(conversationID, entryID)
Then you can get the dialogue text and run it through FormattedText.Parse() to handle any special formatting codes such as emphasis markup tags.
Example:
DialogueManager.masterDatabase.GetDialogueEntry(conversationID, entryID)
Then you can get the dialogue text and run it through FormattedText.Parse() to handle any special formatting codes such as emphasis markup tags.
Example:
Code: Select all
DialogueEntry entry = DialogueManager.masterDatabase.GetDialogueEntry(conversationID, entryID);
string text = FormattedText.Parse(entry.DialogueText);