How do I Bark or StartConversation a specified node | entry?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
XiaoFanJx
Posts: 3
Joined: Thu Feb 02, 2023 5:17 am

How do I Bark or StartConversation a specified node | entry?

Post by XiaoFanJx »

My English is not good sry.
I have a configuration sheet
屏幕截图 2023-02-02 181959.png
屏幕截图 2023-02-02 181959.png (10.2 KiB) Viewed 265 times
I want to convert to Dialogue Database in unity , after bark based on the ID
Because my program is Select randomly ID from the pool such as ID POOL1 [3001,3002] ID POOL1 [3001,3002,3003]
Is there a way to put the node | entry and ID binding after that Bark or StartConversation
User avatar
Tony Li
Posts: 22137
Joined: Thu Jul 18, 2013 1:27 pm

Re: How do I Bark or StartConversation a specified node | entry?

Post by Tony Li »

Yes. To start a conversation on a specified dialogue entry:

Code: Select all

int dialogueEntryID = 3002;
DialogueManager.StartConversation("Conversation Title", actorTransform, conversantTransform, dialogueEntryID);
To start a bark on a specified dialogue entry, you will need to create a Subtitle object:

Code: Select all

int dialogueEntryID = 3002;
var conversationModel = new ConversationModel(DialogueManager.masterDatabase, "Conversation Title",
    actorTransform, conversantTransform, false, null, dialogueEntryID);
StartCoroutine(BarkController.Bark(conversationModel.firstState.subtitle));
[Edit: Started Bark as coroutine.]
XiaoFanJx
Posts: 3
Joined: Thu Feb 02, 2023 5:17 am

Re: How do I Bark or StartConversation a specified node | entry?

Post by XiaoFanJx »

Tony Li wrote: Thu Feb 02, 2023 8:28 am Yes. To start a conversation on a specified dialogue entry:

Code: Select all

int dialogueEntryID = 3002;
DialogueManager.StartConversation("Conversation Title", actorTransform, conversantTransform, dialogueEntryID);
To start a bark on a specified dialogue entry, you will need to create a Subtitle object:

Code: Select all

int dialogueEntryID = 3002;
var conversationModel = new ConversationModel(DialogueManager.masterDatabase, "Conversation Title",
    actorTransform, conversantTransform, false, null, dialogueEntryID);
BarkController.Bark(conversationModel.firstState.subtitle);
Thank you for your reply.
BarkController.Bark is not run
maybe StartCoroutine(BarkController.Bark(conversationModel.firstState.subtitle))?
Whether I need to write Importing Your Own Formats? Set the id to the same as in Excel when importing?
User avatar
Tony Li
Posts: 22137
Joined: Thu Jul 18, 2013 1:27 pm

Re: How do I Bark or StartConversation a specified node | entry?

Post by Tony Li »

XiaoFanJx wrote: Fri Feb 03, 2023 1:56 amBarkController.Bark is not run
maybe StartCoroutine(BarkController.Bark(conversationModel.firstState.subtitle))?
Yes, that's correct. I fixed my post above.
XiaoFanJx wrote: Fri Feb 03, 2023 1:56 amWhether I need to write Importing Your Own Formats? Set the id to the same as in Excel when importing?
The Dialogue System can already import Excel: Excel Import. However, Excel is not a good format for dialogue because it doesn't handle branching structures. I only recommend it for linear conversations.
XiaoFanJx
Posts: 3
Joined: Thu Feb 02, 2023 5:17 am

Re: How do I Bark or StartConversation a specified node | entry?

Post by XiaoFanJx »

Tony Li wrote: Fri Feb 03, 2023 7:50 am
XiaoFanJx wrote: Fri Feb 03, 2023 1:56 amBarkController.Bark is not run
maybe StartCoroutine(BarkController.Bark(conversationModel.firstState.subtitle))?
Yes, that's correct. I fixed my post above.
XiaoFanJx wrote: Fri Feb 03, 2023 1:56 amWhether I need to write Importing Your Own Formats? Set the id to the same as in Excel when importing?
The Dialogue System can already import Excel: Excel Import. However, Excel is not a good format for dialogue because it doesn't handle branching structures. I only recommend it for linear conversations.
HI
The import Excel ID seems to be set automatically or One more question
屏幕截图 2023-02-05 162918.png
屏幕截图 2023-02-05 162918.png (58.84 KiB) Viewed 210 times
StandardBarkUI Can't set TextMeshPro? i use TextAnimator Only works on TextMeshPro
User avatar
Tony Li
Posts: 22137
Joined: Thu Jul 18, 2013 1:27 pm

Re: How do I Bark or StartConversation a specified node | entry?

Post by Tony Li »

Hi,

Yes, the Excel importer assigns IDs automatically.

To assign TextMeshProUGUI to Bark Text, unassign the Text field.
Post Reply