I'm trying to develop an "insult system" (A little bit Monkey Island inspired) where an NPC barks an insult at the player. The player has a window of time to press an input to "retort". I want to be able to have specific "retort" lines triggered that relate to the original insult.
I'm using a conversation for the barks, so I can choose a random bark from a list of valid ones based on game conditions. Ideally I'd like to just add appropriate "retorts" as child nodes to the original insults. But I need to work out how to store the original node, and then get the next valid child node for a separate bark event.
Can you describe a way to achieve this? Would I need to do something bespoke like store the original insult ID and then directly get the child's ID?
Re: Bark response system
Posted: Sat Jul 12, 2025 9:12 pm
by Tony Li
Hi,
You probably don't need to do anything custom for that. Here's a simple example:
1. Wrote a conversation (intended to be an interactive conversation, not a bark) that has two NPC insults followed by player responses:
retortConversation.png (38.63 KiB) Viewed 178 times
I ticked conversation properties > Override Display Settings > Input Settings and set a Response Timeout value.
2. Added a capsule for the NPC. Gave it a Usable, Dialogue Actor (pointing to a child overhead bubble subtitle panel), and Dialogue System Trigger that starts the conversation.
3. Added a Selector to the Main Camera that can select Usables at the mouse position.
I just used the Basic Standard Dialogue UI's response menu, but you could use a different dialogue UI that assigns specific inputs to each response button, like this: (instructions)
Re: Bark response system
Posted: Sun Jul 13, 2025 7:01 pm
by cassbaygames
Hi Tony, thanks so much for your reply.
Unfortunately I haven't managed to communicate what I'm trying to do properly. I will try again as this solution isn't what I am after.
I don't want to enter a conversation, what I'm trying to do is just with barks. The original insult is a bark, and I want the player to have the option to simply press a dedicated key that will respond with another bark.
Here is a video of what I currently have:
In the example the NPC randomly decides to bark an insult: "Is that a mop?"
Then the players presses a key to trigger an insult back: "You call that a weapon..."
Right now these are pulling from different conversations to select the subtitle for each bark. I want the player's "retort" to be related to the original insult. Ideally I would simply write the retorts as child nodes of the original insults. But because this is not a conversation interaction and only in barks.
I would like to be able to remember the last node that was barked by an enemy (original insult node), and then if the player triggers a bark in time, jump to a valid child node of that original insult node. This way I could simply create a conversation that had original insult nodes, and then relevant retorts as children beneath those.
Re: Bark response system
Posted: Sun Jul 13, 2025 8:38 pm
by Tony Li
Hi,
Sure, you can do that. If you're using barks, add a script with an OnBarkLine(Subtitle) method to the Dialogue Manager. In this method, record the dialogue entry. Example:
void Retort()
{
// Get the first entry linked from the bark:
var retortEntry = DialogueManager.masterDatabase.GetDialogueEntry(lastBarkedEntry.outgoingLinks[0]);
var conversationTitle = DialogueManager.masterDatabase.GetConversation(retortEntry.conversationID).Title;
// Then bark it back:
DialogueManager.Bark(conversationTitle, player, npc, retortEntry.id);
}
Re: Bark response system
Posted: Sun Jul 13, 2025 11:36 pm
by cassbaygames
Hi Tony, that's working flawlessly. Amazing support thank you! I'm going to enjoy digging into this now - a fun little detail for players to mess around with for a little flavour.