Hi, I have just been trying to get familiar with the dialogue system in the last few days and want to try and integrate it into the mobile rpg I am in the early middle stages of developing. I already have my own serialisation and scene loading (using addressables) systems so I want to use just the conversation and quest systems. I saw in the manual I can save just that and pretty much leave out the rest which is good.
I am trying to work out the best approach for the dialogue database architecture. Being a mobile game with many scenes (~50) across which will be a lot of conversation and quests etc I am thinking it would be best to deal with the complication of having multiple databases. My initial idea is a global conversation database with all quests, plus a per scene database with scene specific conversations. If instead I started with a single database for simplicity, is it difficult to break that out to global plus scene specific databases later?
Any advice would be greatly appreciated.
So far in my game I have been quite careful to support unity hot reloads with my code which although a fair bit of extra work I find quite useful. what is lost from dialogue system's state during hot reloads?
Getting started for mobile RPG
Re: Getting started for mobile RPG
Hi,
And to deserialize that string back into the Dialogue System:
Regardless of whether you use a single database or multiple, use forward slashes in your conversation titles to group them into submenus. You can do the same for quest names, too. For variables, you can group them using periods ( . ).
Yup, to serialize the Dialogue System's runtime dialogue database info to a string:PigletPants wrote: ↑Sun Apr 18, 2021 8:15 pmI already have my own serialisation and scene loading (using addressables) systems so I want to use just the conversation and quest systems. I saw in the manual I can save just that and pretty much leave out the rest which is good.
Code: Select all
string s = PersistentDataManager.GetSaveData();
Code: Select all
PersistentDataManager.ApplySaveData(s);
To break up a database, you can duplicate the database and then delete what you don't need out of each. You'll also want to use database syncing to sync (copy) the quests from your global database into the scene-specific databases. Info: Working With Multiple DatabasesPigletPants wrote: ↑Sun Apr 18, 2021 8:15 pmI am trying to work out the best approach for the dialogue database architecture. Being a mobile game with many scenes (~50) across which will be a lot of conversation and quests etc I am thinking it would be best to deal with the complication of having multiple databases. My initial idea is a global conversation database with all quests, plus a per scene database with scene specific conversations. If instead I started with a single database for simplicity, is it difficult to break that out to global plus scene specific databases later?
Regardless of whether you use a single database or multiple, use forward slashes in your conversation titles to group them into submenus. You can do the same for quest names, too. For variables, you can group them using periods ( . ).
Are you talking about disabling domain reloading for faster play mode entry (which the Dialogue System fully supports), or actual hot reload while it's running? For actual hot reloading, you may need to reinitialize the Lua environment (e.g., call DialogueManager.ResetDatabase).PigletPants wrote: ↑Sun Apr 18, 2021 8:15 pmSo far in my game I have been quite careful to support unity hot reloads with my code which although a fair bit of extra work I find quite useful. what is lost from dialogue system's state during hot reloads?
-
- Posts: 2
- Joined: Sun Apr 18, 2021 7:50 pm
Re: Getting started for mobile RPG
Thanks for speedy reply and that the tip Tony.Tony Li wrote: ↑Sun Apr 18, 2021 9:14 pm To break up a database, you can duplicate the database and then delete what you don't need out of each. You'll also want to use database syncing to sync (copy) the quests from your global database into the scene-specific databases. Info: Working With Multiple Databases
Actually my setup is such that I always have a Main Scene open from game launch to finish. It holds game managers, gui stuff etc that is always used, and I load in and out Level Scenes as required. I was thinking since I would have my main dialogue manager in the Main Scene with all global conversations and all quests since it would always be available and I will add and remove the local scene databases (just for conversations) as scenes change.
Actual hot reloading. I will keep that in mind and see how it goes.PigletPants wrote: ↑Sun Apr 18, 2021 8:15 pm Are you talking about disabling domain reloading for faster play mode entry (which the Dialogue System fully supports), or actual hot reload while it's running? For actual hot reloading, you may need to reinitialize the Lua environment (e.g., call DialogueManager.ResetDatabase).