All skills
thedivergentai avatar

/godot-dialogue-system

@9d6e91e

Expert patterns for branching dialogue systems including dialogue graphs (Resource-based), character portraits, player choices, conditional dialogue (flags/quests), typewriter effects, localization support, and voice acting integration. Use for narrative games, RPGs, or visual novels. Trigger keywords: DialogueLine, DialogueChoice, DialogueGraph, dialogue_manager, typewriter_effect, branching_dialogue, dialogue_flags, localization, voice_acting.

Use this Skill: https://skilld.dev/gh/thedivergentai/gd-agentic-skills/godot-dialogue-system

This session only. Nothing lands on disk.

referenceselite-dialogue-patterns.md

≈567 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Elite Dialogue Patterns (load on demand)

MANDATORY for GraphEdit authoring tools, TTS/lipsync, choice analytics, and NPC interaction wiring beyond the Resource Autoload golden path.

GraphEdit auditor (@tool)

dialogue_graph_editor.gd — editor-only visual linking; export to dialogue_resource.gd or JSON for runtime. Never ship GraphEdit as the runtime walker.

Audio-driven lines (TTS / lipsync)

CAUTION: Still allow skip — snap visible_ratio / stop TTS on advance input.

dialogue_lipsync.gd — DisplayServer.tts_speak + boundary callbacks for viseme timing.

Choice analytics

WHY custom Logger: Keeps I/O out of conversation nodes; prefix [CHOICE] lines for funnel tuning (no PII).

dialogue_stat_logger.gd — register via OS.add_logger in boot Autoload.

NPC interaction (signal-up)

extends CharacterBody2D

@export var dialogue: DialogueResource

func interact() -> void:
	DialogueManagerSingleton.start_dialogue(dialogue)

Never get_node() into UI from NPC scripts.

Localization keys

Use text_key + tr() — localized_dialogue_resource.gd. CSV import: Godot i18n docs.

Voice acting (pre-recorded)

@onready var voice_player := $AudioStreamPlayer

func play_voice_line(line_id: String) -> void:
	var audio := load("res://voice/" + line_id + ".mp3")
	if audio:
		voice_player.stream = audio
		voice_player.play()

Drive typewriter length from clip duration when using typebox_effect.gd — still honor skip.

Inline manager tutorial (moved)

Runtime walkers: dialogue_manager_singleton.gd (Resource) or dialogue_engine.gd (JSON). Pick one engine per project.

Dialogue graph Resource shape

class_name DialogueGraph extends Resource

@export var lines: Dictionary = {}  # line_id -> DialogueNode

Production nodes: dialogue_node_data.gd, dialogue_option_data.gd.

Source: SKILL.md on GitHub

No alerts17d4 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    The skill provides a secure and well-structured implementation of a branching dialogue system for the Godot Engine, adhering to best practices such as resource-based data management and signal-based communication.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer7mo

    2/3 files flagged

Signed by skilld at 9d6e91e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 2 months ago

README badge

README badge for thedivergentai/gd-agentic-skills/godot-dialogue-system