Error with Duplicate Conversation IDs when Adding Databases
- digiwombat
- Posts: 50
- Joined: Sun Jun 16, 2019 4:59 am
Error with Duplicate Conversation IDs when Adding Databases
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!
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!
- digiwombat
- Posts: 50
- Joined: Sun Jun 16, 2019 4:59 am
Re: Error with Duplicate Conversation IDs when Adding Databases
Thanks.
For some reason I forgot that existed.
For some reason I forgot that existed.
Re: Error with Duplicate Conversation IDs when Adding Databases
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.
-
- Posts: 14
- Joined: Wed Apr 24, 2024 10:13 pm
Re: Error with Duplicate Conversation IDs when Adding Databases
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!
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
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.
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.
-
- Posts: 14
- Joined: Wed Apr 24, 2024 10:13 pm
Re: Error with Duplicate Conversation IDs when Adding Databases
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?
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
SimStatus by itself -- as in:
or:
it for checking within the same conversation. However, if you know the other conversation ID (e.g., 7), you can use:
Code: Select all
Dialog[5].SimStatus == "WasDisplayed"
Code: Select all
Dialog[thisID].SimStatus == "WasDisplayed"
Code: Select all
Conversation[7].Dialog[5].SimStatus == "WasDisplayed"
-
- Posts: 14
- Joined: Wed Apr 24, 2024 10:13 pm
Re: Error with Duplicate Conversation IDs when Adding Databases
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!!