hi, great plugin
just wondering is it possible to pull conversations/quest info from a database (e.g. local sqlite)?
conversations from database
Re: conversations from database
Hi,
Thanks!
Yes, you can do that. Put your conversations and quests in a dialogue database, and export it as a Chat Mapper XML text file. Then store the text in your SQLite database. To pull it, retrieve the text from the SQLite database and use ChatMapperProject.Load(filename).ToDialogueDatabase() to convert it back into a dialogue database. Then use DialogueManager.AddDatabase() to add it to the runtime environment. This post has more details.
As another option, you can serialize your dialogue database directly to a string using JsonUtility and store that string in your SQLite database. Then, after pulling it back from SQLite, use JsonUtility to deserialize it back into a dialogue database. This is an alternative to converting it to Chat Mapper XML format.
If you only need to add quests, you can add them individually at runtime using QuestLog.AddQuest().
The Dialogue System also supports asset bundles. You can put dialogue databases and other assets such as voiceover files in them, and load them at runtime.
Thanks!
Yes, you can do that. Put your conversations and quests in a dialogue database, and export it as a Chat Mapper XML text file. Then store the text in your SQLite database. To pull it, retrieve the text from the SQLite database and use ChatMapperProject.Load(filename).ToDialogueDatabase() to convert it back into a dialogue database. Then use DialogueManager.AddDatabase() to add it to the runtime environment. This post has more details.
As another option, you can serialize your dialogue database directly to a string using JsonUtility and store that string in your SQLite database. Then, after pulling it back from SQLite, use JsonUtility to deserialize it back into a dialogue database. This is an alternative to converting it to Chat Mapper XML format.
If you only need to add quests, you can add them individually at runtime using QuestLog.AddQuest().
The Dialogue System also supports asset bundles. You can put dialogue databases and other assets such as voiceover files in them, and load them at runtime.