Skip to content

3.2 A Bubble Dialog

BDC_Patrick edited this page Dec 9, 2025 · 11 revisions

Bubble Dialogs

Image Info
Bubble Dialog World-space conversations that appear above characters.
Description

Bubble Dialogs are "NPC Chats" or "Barks" that happen in the game world. Unlike Front Dialogs (which usually pause gameplay), Bubbles run asynchronously in the background. Multiple Bubble Dialogs can run simultaneously alongside a main Front Dialog.

1. Actor Setup

To make an NPC capable of showing a speech bubble, you must configure their Actor components.

  1. Add Component: Attach a BDC_DialogBackend_ActorComponent to your Actor Blueprint.
  2. Setup Identity: In the Component's Details Panel, locate the Participant category.
    • Dialog_ParticipantIDTag: Set a unique GameplayTag (e.g., NPC.Guard_01). This is crucial for the system to know which actor should display the text.
  3. Trigger Logic: Call StartDialog (set Type to DialogBubble) when needed.
    • Optimization Tip: It is recommended to trigger these via BeginOverlap / EndOverlap events or only when the player is close, to reduce the performance cost of rendering Widget Components.

2. Graph Setup

Creating the content for a Bubble Dialog is similar to standard dialogs, with a few specific rules.

  • Message Nodes: Add your text here.
    • Critical: You MUST set the SpeakingParticipant tag in the Message Node details to match the Actor's Dialog_ParticipantIDTag. If this tag is missing or incorrect, the system won't know which actor's head to spawn the bubble over, and nothing will appear.
  • Structure: Ensure the flow ends with an End Node to clean up the widget properly.

Rules & Limitations

Supported Not Supported
  • Message Nodes (Text & Audio)
  • Delay Nodes
  • Branch Nodes (Logic checks)
  • Event Nodes (Trigger gameplay logic)
  • Jumper Nodes & Continue Nodes
  • Option Nodes (Bubbles cannot have player choices)
  • Beacon Nodes
  • InjectContinue (Bubbles cannot be manually skipped/forwarded)

Auto-Forwarding Logic

Bubble Dialogs are always automatic. They advance to the next node by themselves.

  • If a Message Node has a specific AutoForwardTime set, it uses that.
  • If the node's time is not set (or is too short), the system enforces the BubbleMinAutoTime defined in Project Settings (Default: 3.0s).
  • Note: Players cannot manually skip or speed up Bubble text.

3. Widget Implementation

You need a specific Widget class for Bubbles (different from your main HUD). Set this class in Project Settings -> Dialog Widgets -> Widget - Bubble Dialog.

Recommended Layout

  • Root: A SizeBox or ScaleBox to control the overall size.
  • Background: A Border or Image styled like a speech bubble (e.g., with a pointer arrow at the bottom).
  • Content: A RichTextBlock for the message. (Speaker Names and Avatars are rarely used in overhead bubbles, but supported if you want them).

Interface Logic

Implement BDC_DialogBackend_InterfaceUI:

  • OnDialogStarted: Play a "Pop In" animation.
  • OnDialogUpdated: Set the text in your RichTextBlock.
  • OnDialogMaybeHide: (Optional) Play a "Pop Out" or fade animation if the bubble needs to vanish temporarily.
  • OnDialogFinished: Play a closing animation and remove the widget.

Additional Technical Info

  • Background Task: Bubble Dialogs run on a separate logic track within the Subsystem. This means a Bubble Dialog can run at the same time as a Main (Front) Dialog without conflict.
  • Events: Even though Bubbles are automated, if you use an Event Node in a Bubble graph, the Actor's OnReceivedEvent dispatcher will still fire, allowing NPCs to perform actions (like emoting) during their background chatter.
  • Auto pausing: Bubble Dialogs for participating Actors get paused, when a Front Dialog with the same participant is starting. Preventing a Bubble to appear while a normal Message is shown.

Documentation Index

I. What is the Dialog Backend?
II. Setting up
III. Binding UI
IV. The Subsystem
V. The Components
VI. Dispatchers
VII. Others

Demo available: Demo Page

Clone this wiki locally