Page 1 of 1

Error with Duplicate Conversation IDs when Adding Databases

Posted: Tue Jan 21, 2020 10:17 am
by digiwombat
Hi!

I have a lot of characters who will have their own conversations (over 30) and my plan is to store each person's conversations in their own database for sake of keeping organization a bit more reasonable.

I'm adding Databases via code using DialogueManager.AddDatabase() and I've run into a little problem.

All conversations are being added with their original ID. When I use StartConversation(string title) to start the conversation, Dialogue System actually tries to start the correct conversation, but when AddLink starts parsing through, it uses the Integer ID.

The problem is, those int IDs are duplicates. So when I try to play the conversation Gertrude_Interrupt from the added Database for Gertrude, I end up getting dialogue from my Intro conversation from the Main database.

Is there a way to ensure that new IDs are created or that conflicting IDs are changed when adding databases via code? An automatic process is far preferable here since I can't manually change int IDs and even if I could, keeping track of used IDs sounds like a nightmare. Keeping all the conversations in one database is going to be an organizational nightmare since it's like to end up being hundreds of conversations, at least a few dozen per character so hopefully something can be done.

Thanks!

Re: Error with Duplicate Conversation IDs when Adding Databases

Posted: Tue Jan 21, 2020 10:56 am
by Tony Li
Hi,

Run your databases through the Unique UI Tool.

More info: Working With Multiple Databases

Re: Error with Duplicate Conversation IDs when Adding Databases

Posted: Tue Jan 21, 2020 11:02 am
by digiwombat
Thanks.

For some reason I forgot that existed.

Re: Error with Duplicate Conversation IDs when Adding Databases

Posted: Tue Jan 21, 2020 11:19 am
by Tony Li
There are a lot of good tips in the link above, too. Remember that you can use forward slashes in conversation titles to group them into submenus. You can also use Sync Assets to make content in a "global" initial database available in your other databases. And if you decide to use a single database for simplicity, you can use the Merge Database functionality on the Dialogue Editor's Database tab.

Re: Error with Duplicate Conversation IDs when Adding Databases

Posted: Thu Sep 05, 2024 7:27 pm
by gwishinofficial
Hello! Is there any reason this (using the Unique ID Tool) wouldn't work?

In my case I am only using one Database. But whenever I duplicate a conversation to use as a template it assigns the same IDs to the new duplicated convo which I cannot change.

I've selected the relevant Database and hit "process" multiple times with no result. The new convos still display the copied IDs. Am I missing something?

Thanks!

Re: Error with Duplicate Conversation IDs when Adding Databases

Posted: Thu Sep 05, 2024 8:11 pm
by Tony Li
Hi,

This shouldn't be an issue even in older versions of the Dialogue System. But, if possible, can you back up your project, update to the current version, and test it again? This way we'll be looking at the same thing.

Are you right-clicking on a conversation and selecting Duplicate Conversation? Or using Menu > Templates > New From Template? Or something else? I just tested both of those operations, and they create a new conversation with new IDs.

The Unique ID Tool won't make IDs unique within the same database. It will only make IDs unique across multiple different databases.

Re: Error with Duplicate Conversation IDs when Adding Databases

Posted: Fri Sep 06, 2024 4:15 pm
by gwishinofficial
I'm sorry, I think I got confused. I was looking at the individual line IDs which were the same but the actual conversation ID has been assigned a different number.

What I don't understand is how this works with SimStatus. I was using variables but it got annoying to create so many and since this project won't have a TON of lines I decided to turn SimStatus on. But if I'm referencing whether another Dialog number was displayed but that Dialog number has a bunch of twins in other conversations (for instance every conversation has a Dialog 5), I don't understand how it can keep track of whether the specific line I want to track (maybe or maybe not from THIS particular conversation) was displayed or not? Or is SimStatus only for tracking within the same conversation?

Re: Error with Duplicate Conversation IDs when Adding Databases

Posted: Fri Sep 06, 2024 4:35 pm
by Tony Li
SimStatus by itself -- as in:

Code: Select all

Dialog[5].SimStatus == "WasDisplayed"
or:

Code: Select all

Dialog[thisID].SimStatus == "WasDisplayed"
it for checking within the same conversation. However, if you know the other conversation ID (e.g., 7), you can use:

Code: Select all

Conversation[7].Dialog[5].SimStatus == "WasDisplayed"

Re: Error with Duplicate Conversation IDs when Adding Databases

Posted: Fri Sep 06, 2024 6:01 pm
by gwishinofficial
Oof I'm sorry I didn't realize I could do that (add the conversation ID before the dialog ID), well that solves my problems! Thank you, Tony!!

Re: Error with Duplicate Conversation IDs when Adding Databases

Posted: Fri Sep 06, 2024 7:31 pm
by Tony Li
Glad to help!