Hi Tony,
As the title said, is it possible to update or add dialogue database on the fly? E.g. calling a web API to retrieve new content and put it into local dialogue database. If yes, could you point me to a proper tutorial or hints?
Thanks for any insights.
PS: The same question to Quest Machine system as well? Is it possible to add hand written quest through web API call to local quest database?
Update/Add Dialogue Database On The Fly
Re: Update/Add Dialogue Database On The Fly
Hi,
1. Put the content in Chat Mapper XML format. You can export this format from the Dialogue Editor window (or from Chat Mapper of course). Then follow these instructions to load at runtime: How to Import Chat Mapper at Runtime.
2. Or do the same with articy:draft XML format as described here: articy:draft Runtime Conversion. You have to export this from articy:draft; you can't export from the Dialogue Editor window to articy:draft XML format.
3. Or do the same with JSON as described in this post.
4. Or you can create the database in a script as described in this post.
1. Put the content is JSON format like this:
and convert JSON back into a quest like this:
2. Or create quests in a script as described in this post: Script Driven Quests
Yes. You have your choice of ways. Here are a few:
1. Put the content in Chat Mapper XML format. You can export this format from the Dialogue Editor window (or from Chat Mapper of course). Then follow these instructions to load at runtime: How to Import Chat Mapper at Runtime.
2. Or do the same with articy:draft XML format as described here: articy:draft Runtime Conversion. You have to export this from articy:draft; you can't export from the Dialogue Editor window to articy:draft XML format.
3. Or do the same with JSON as described in this post.
4. Or you can create the database in a script as described in this post.
Yes again. Here are a couple ways:
1. Put the content is JSON format like this:
Code: Select all
var serializableProxy = new QuestProxy(myQuest);
var json = JsonUtility.ToJson(serializableProxy);
Code: Select all
var serializableProxy = JsonUtility.FromJson<QuestProxy>(json);
var quest = ScriptableObject.CreateInstance<Quest>();
questProxy.CopyTo(quest);
Re: Update/Add Dialogue Database On The Fly
Thanks for the pointers, Tony. It saves me a lot of time for researching!
Re: Update/Add Dialogue Database On The Fly
Glad to help!