Page 2 of 2

Re: Start Conversation by ID

Posted: Thu Mar 04, 2021 1:53 am
by nicmar
Hey, I had the same question, and I have a related question.
In the inspector where i choose a conversation, I have this:

Code: Select all

[ConversationPopup(true)]
[SerializeField] private  string conversation; // Shown WITH database selection field.
This lets me pick from the list of dialogues, but how would I change this so it saves the dialog by id instead in my component, and still allows me to use the dialogue picker?

I'd like this, cause i sometimes rename conversations, and then it breaks.

So also when I'd like to start a conversation by ID, do I need to convert it to a title using:

Code: Select all

var title = DialogueManager.MasterDatabase.GetConversation(id).Title;
Or is there some command to start the dialogue by ID right away?

Thanks :)

Re: Start Conversation by ID

Posted: Thu Mar 04, 2021 8:25 am
by Tony Li
Hi Niclas,
nicmar wrote: Thu Mar 04, 2021 1:53 amIn the inspector where i choose a conversation, I have this:

Code: Select all

[ConversationPopup(true)]
[SerializeField] private  string conversation; // Shown WITH database selection field.
This lets me pick from the list of dialogues, but how would I change this so it saves the dialog by id instead in my
You'd have to write a custom picker script similar to the one used for [ConversationPopup]. It's not already built into the Dialogue System.
nicmar wrote: Thu Mar 04, 2021 1:53 amOr is there some command to start the dialogue by ID right away?
No; keep using that technique.

Depending on your workflow, conversation titles may be more stable than internal conversation IDs. If you're importing from an external source such as articy:draft or maybe even JLC or Yarn in the future, it's possible that the importer will assign different internal IDs each time you import. Also, if you end up using multiple databases (most devs don't), the Unique ID Tool will very likely change internal IDs to ensure they're unique across all databases.

The Dialogue System has a Renamer tool that currently renames variables across all scenes and assets.

In the next update, the plan is to add the ability to rename conversations, quest names, and actor names. Quest and actor names usually aren't too big a deal because you can leave them untouched and rename the Display Name instead.

Re: Start Conversation by ID

Posted: Fri Mar 05, 2021 7:39 am
by nicmar
Great, I will keep the dialogue selection by title for now, and see what the future has to offer :)
Good to know about the renamer tool!