How to deal with a lot of conversations?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
shortlin
Posts: 73
Joined: Wed Jun 03, 2020 1:52 am

How to deal with a lot of conversations?

Post by shortlin »

If I have a lot of conversations in a database,such like 1000 conversations.

Is there a way to manage the conversations easily?just deal these in Unity?

Could we export the conversations to a single file(one conversation,one file) to manage and merge them into a database which the Unity used?

I Knew Dialogue system could use these tools to import to unity
https://www.pixelcrushers.com/dialogue_ ... export.htm

But if I have already typed some draft conversation in a dialogue system database,could I export them out to the tool I choose? such like Talkit file?
(some paid software such like articy:draft and Chat Mapper I could not have much money to deal and Aurora Toolset I don't know Is it possible to manage all the conversation easily to read)

Or should we type it in Talkit,and one conversation step by step to import?(But if we have 1000 conversations,we should import 1000t times...)

Just because We have a lot of event and we use our condition to use the conversation title to start the conversation in a dialogue system database.So if there is only one way to manage the conversations in Unity...That's very difficult to manage.

Is there a better way to manage a lot of conversations?
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to deal with a lot of conversations?

Post by Tony Li »

Here are some options and ideas:

Edit in Unity
If you use the built-in Dialogue Editor, do not use Unity 2019.2 or 2019.3. They have an editor bug that causes very slow performance. Use 2019.4 or 2020.1.

Use forward slashes in conversation titles. This will organize them into submenus. For example, you could title your conversations:
  • Companions/Robot Butler/At Your Service
  • Companions/Robot Butler/Malfunction
  • Companions/Scavenger/Shop
  • Jungle/Leopard Hunter
  • Jungle/Shaman, etc.
Consider Working With Multiple Databases. Make sure to read that link carefully first. Multiple databases have benefits and drawbacks.

If the problem is that there are a lot of conversations in the menu, then using forward slashes and/or multiple databases will help.


Use External Editor
You can export to Chat Mapper or CSV format, or you can write your own script to export to a different format of your choice.

If you don't like any of the external editor options, you can also write your own script to import from your own format. The Templates/Scripts folder contains a starter template to write your own importer.

In addition to the formats listed on the Import & Export page, the Dialogue System Extras page as another importer called JLC Converter.

Note that only the in-Unity Dialogue Editor lets you edit scene events, because it runs inside Unity and can access scenes.
shortlin
Posts: 73
Joined: Wed Jun 03, 2020 1:52 am

Re: How to deal with a lot of conversations?

Post by shortlin »

Thanks your detailed options.

I have some questions:

1.I want to ask forward slashes way.It could let the nodes mode classify the conversations to manage them easily(unfortunately outline mode doesn't work). But I used "DialogueManager.StartConversation(Title_Name)" to call my conversation.So...if I use the forward slashes.. I must modify my Title_Name,but the man who classify the conversations is not me.It means I would not know the classification name before the slash.Is there a way to call the conversation by last string after the last slash?If I want to use the slash, I only thought I should save all conversations' tile(use for run all database and all conversations) in a dictionary,and use the last string to be the dictionary's key....Is it only the way to solve this problem?

2.About to use multi-database I could use "DialogueManager.AddDatabase()" to use "DialogueManager.StartConversation(Title_Name)" call the another database's conversations.But I could not use "Extra Databases" component.I Add this to My init script.(the same place I used "DialogueManager.AddDatabase()") It did not work,when I wanted to use "DialogueManager.StartConversation(Title_Name)" to call the database's conversation which is in the "Extra Databases" component setting.Did I do something wrong?

3.Could JLCDialogueConverter now export this?
sshot-2020-09-08-[18-36-44].png
sshot-2020-09-08-[18-36-44].png (3.47 KiB) Viewed 778 times
I used this tool to export the file,but It showed nothing in the export file in the node .so I don't know If I want to typed the node to link another conversation,how it did?
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to deal with a lot of conversations?

Post by Tony Li »

Hi,
shortlin wrote: Tue Sep 08, 2020 6:44 am1.I want to ask forward slashes way.It could let the nodes mode classify the conversations to manage them easily(unfortunately outline mode doesn't work). But I used "DialogueManager.StartConversation(Title_Name)" to call my conversation.So...if I use the forward slashes.. I must modify my Title_Name,but the man who classify the conversations is not me.It means I would not know the classification name before the slash.Is there a way to call the conversation by last string after the last slash?
Yes. Example:

Code: Select all

void CustomStartConversation(string lastString)
{
    foreach (var conversation in DialogueManager.masterDatabase.conversations)
    {
        if (conversation.Title.EndsWith("/" + lastSting))
        {
            DialogueManager.StartConversation(conversation.Title);
            return;
        }
    }
}
You can make a dictionary so you don't have to loop through all the conversations every time.
shortlin wrote: Tue Sep 08, 2020 6:44 am2.About to use multi-database I could use "DialogueManager.AddDatabase()" to use "DialogueManager.StartConversation(Title_Name)" call the another database's conversations.But I could not use "Extra Databases" component.I Add this to My init script.(the same place I used "DialogueManager.AddDatabase()") It did not work,when I wanted to use "DialogueManager.StartConversation(Title_Name)" to call the database's conversation which is in the "Extra Databases" component setting.Did I do something wrong?
The Dialogue Manager initializes itself in Awake. Use DialogueManager.AddDatabase() in Start.
shortlin wrote: Tue Sep 08, 2020 6:44 am3.Could JLCDialogueConverter now export this?
sshot-2020-09-08-[18-36-44].png
I used this tool to export the file,but It showed nothing in the export file in the node .so I don't know If I want to typed the node to link another conversation,how it did?
I don't know. I didn't write JLC Converter. But it comes with source code. You can check if it does. If it doesn't, you can add it.
shortlin
Posts: 73
Joined: Wed Jun 03, 2020 1:52 am

Re: How to deal with a lot of conversations?

Post by shortlin »

Thank you very much!

But maybe you misunderstand my quiestion 2 (Sorry to my poor English again).

I knew I should use "DialogueManager.AddDatabase()" in Start. I tried it successful before.My question is how to use the "Extra Databases" component.If I do not misunderstand your document about multi-database. "DialogueManager.AddDatabase()" and "Extra Databases" are two ways to deal with multi-database,right?

I tried to add the "Extra Databases" in my init script object ,but it did not work.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to deal with a lot of conversations?

Post by Tony Li »

Add Extra Databases, leave Add Trigger set to On Start, and assign databases to the Databases list. You do not have to assign the same database that is assigned to the Dialogue Manager's Initial Database field since this will already be loaded by the Dialogue Manager. Leave Condition blank. Note that if you tick One Per Frame, and if you have assigned multiple databases to the Databases list, they will not all be ready right away. If you have assigned 3 databases, they will be ready after 3 frames.
Post Reply