Skip to content

LSDE Dialog Engine / DialogBlock

Interface: DialogBlock

Defined in: types.ts:287

Dialog block — displays text spoken by a character.

Remarks

The character is resolved by the onResolveCharacter callback and exposed as context.character in the handler. When nativeProperties.portPerCharacter is enabled, each character gets a dedicated output port and the handler must call context.resolveCharacterPort(character.uuid) to select which port to follow.

If no onDialog handler is registered, the engine silently advances to the next block.

Example

ts
engine.onDialog(({ block, context, next }) => {
  const text = block.dialogueText?.['en'] ?? '';
  const char = context.character;
  showDialogUI(char?.name, text);
  next();
});

See

Extends

Properties

content?

optional content?: string

Defined in: types.ts:292

Raw text content in the primary language.


dialogueText?

optional dialogueText?: Record<string, string>

Defined in: types.ts:294

Localized text map: { locale -> text }.


isStartBlock?

optional isStartBlock?: boolean

Defined in: types.ts:260

When true, this block is the entry point of the scene. Only one per scene.

Inherited from

BlueprintBlockBase.isStartBlock


label?

optional label?: string

Defined in: types.ts:248

Display label assigned in the editor.

Inherited from

BlueprintBlockBase.label


metadata?

optional metadata?: BlockMetadata

Defined in: types.ts:258

Non-logic metadata for display and organization.

Inherited from

BlueprintBlockBase.metadata


nativeProperties?

optional nativeProperties?: NativeProperties

Defined in: types.ts:256

LSDE native execution properties (async, delay, portPerCharacter, etc.).

Inherited from

BlueprintBlockBase.nativeProperties


parentLabels?

optional parentLabels?: string[]

Defined in: types.ts:250

Hierarchy of parent folder labels providing structural context.

Inherited from

BlueprintBlockBase.parentLabels


properties

properties: BlockProperty[]

Defined in: types.ts:252

Custom key-value properties defined by block configuration.

Inherited from

BlueprintBlockBase.properties


structureKey?

optional structureKey?: string

Defined in: types.ts:290

Hierarchical key for tree navigation and localization lookup.


type

type: "DIALOG"

Defined in: types.ts:288

Block type determining behavior and rendering.

Overrides

BlueprintBlockBase.type


userProperties?

optional userProperties?: Record<string, string | number | boolean>

Defined in: types.ts:254

User-defined custom properties dictionary set by the narrative designer.

Inherited from

BlueprintBlockBase.userProperties


uuid

uuid: string

Defined in: types.ts:244

Unique block identifier.

Inherited from

BlueprintBlockBase.uuid