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
engine.onDialog(({ block, context, next }) => {
const text = block.dialogueText?.['en'] ?? '';
const char = context.character;
showDialogUI(char?.name, text);
next();
});See
- DialogContext for handler context
- BlockCharacter for character data
- NativeProperties.portPerCharacter for multi-port routing
Extends
Properties
content?
optionalcontent?:string
Defined in: types.ts:292
Raw text content in the primary language.
dialogueText?
optionaldialogueText?:Record<string,string>
Defined in: types.ts:294
Localized text map: { locale -> text }.
isStartBlock?
optionalisStartBlock?: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?
optionallabel?:string
Defined in: types.ts:248
Display label assigned in the editor.
Inherited from
metadata?
optionalmetadata?:BlockMetadata
Defined in: types.ts:258
Non-logic metadata for display and organization.
Inherited from
nativeProperties?
optionalnativeProperties?:NativeProperties
Defined in: types.ts:256
LSDE native execution properties (async, delay, portPerCharacter, etc.).
Inherited from
BlueprintBlockBase.nativeProperties
parentLabels?
optionalparentLabels?: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
structureKey?
optionalstructureKey?: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
userProperties?
optionaluserProperties?: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.
