Making edits to Response Dialogue

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
snailBerry
Posts: 4
Joined: Mon Feb 07, 2022 5:15 pm

Making edits to Response Dialogue

Post by snailBerry »

I have so questions about Response Dialogue Templates.

Question 1: Is there a simple way to reset the check marks that show a dialogue response has been clicked in-between convos? Example - player talks to character01 and clicks all responses so those gameObjects have checks visable. Then player talks to character02 so those checks need to be reset for new responses for a new character.

Question 2: After resetting those checks is there a way to save them per character/actor? Example - player goes back to character they talked to before and the responses have check marks for the questions they have asked.

Question 3: (this part is more complicated) I want to create a secondary response template for special dialogue responses. Example - player has 3 available dialogue options. 2 are the normal click and ask, but the third is visually different and has a special interaction onClick.

I can give more information on any question if I need to!
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Making edits to Response Dialogue

Post by Tony Li »

Hi,
snailBerry wrote: Fri Feb 11, 2022 12:25 pmQuestion 1: Is there a simple way to reset the check marks that show a dialogue response has been clicked in-between convos? Example - player talks to character01 and clicks all responses so those gameObjects have checks visable. Then player talks to character02 so those checks need to be reset for new responses for a new character.
How are you keeping track of which responses have been clicked? Are you using SimStatus? If so, you could go through the conversation's dialogue entries and mark them untouched:

Code: Select all

var conversation = DialogueManager.masterDatabase.GetConversation("Some Conversation Title");
foreach (DialogueEntry entry in conversation.dialogueEntries)
{
    DialogueLua.MarkDialogueEntryUntouched(entry);
}
snailBerry wrote: Fri Feb 11, 2022 12:25 pmQuestion 2: After resetting those checks is there a way to save them per character/actor? Example - player goes back to character they talked to before and the responses have check marks for the questions they have asked.
You could save them after the conversation:

Code: Select all

Dictionary<int, string> savedSimStatusForConversation;
...
var conversation = DialogueManager.masterDatabase.GetConversation("Some Conversation Title");
foreach (DialogueEntry entry in conversation.dialogueEntries)
{
    savedSimStatusForConversation[entry.id] = DialogueLua.GetSimStatus(entry);
}
snailBerry wrote: Fri Feb 11, 2022 12:25 pmQuestion 3: (this part is more complicated) I want to create a secondary response template for special dialogue responses. Example - player has 3 available dialogue options. 2 are the normal click and ask, but the third is visually different and has a special interaction onClick.
Make 3 response buttons, and assign them to the StandardUIMenuPanel component's Buttons list. Unassign the Button Template. Set up the first two (elements 0 and 1 in the Buttons list) to be normal click and ask. Set up the third one (element 2 in the Buttons list) to look different and do your special interaction.

When you want a response to go into the special button, include the markup tag [position=2] in the menu text (or dialogue text if you're leaving menu text blank).
Post Reply