Skip to content
Proyek

Rubonnek/dialogue-engine

Lihat di GitHub

Tentang

A powerful yet minimalistic dialogue engine for the Godot Game Engine

Gim dan emulasi

Cara angka ini diukur

Yang dapat Anda lakukan

  • :evergreen_tree: Create complex dialogue trees with multiple choices, conditions, and branching paths using branch IDs
  • :arrows_counterclockwise: Support for conditional branching with user-defined callables for dynamic decision-making
  • :speech_balloon: Player choices with options, each linked to specific dialogue entries via goto IDs
  • :pencil2: Dynamic text formatting using callables, arrays, and dictionaries for personalized dialogue

Pertumbuhan bintang terukur

dalam 24 jam
-1
dalam 7 hari
-2
dalam 15 hari
0
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

Dialogue Engine

GitHub Release Github Downloads

A powerful yet minimalistic dialogue engine for the Godot Game Engine, designed for creating branching narratives with player choices, conditions, dynamic text formatting, and metadata support.

:star: Features

  • :evergreen_tree: Create complex dialogue trees with multiple choices, conditions, and branching paths using branch IDs
  • :arrows_counterclockwise: Support for conditional branching with user-defined callables for dynamic decision-making
  • :speech_balloon: Player choices with options, each linked to specific dialogue entries via goto IDs
  • :pencil2: Dynamic text formatting using callables, arrays, and dictionaries for personalized dialogue
  • :label: Named entries for easy reference and lookup within the dialogue tree
  • :package: Metadata support for attaching custom data (e.g., actor names, emotions) to dialogue entries
  • :signal_strength: Comprehensive signal system for dialogue events (started, continued, finished, canceled, etc.)
  • :books: Simple to use -- just write the dialogue in GDScript
  • :art: Easy to customize -- bring your own GUI nodes for presentation
  • :hammer_and_wrench: Automated dialogue graphing and debugging integration with Godot's debugger

:book: Usage

Quickstart

var dialogue_engine : DialogueEngine = DialogueEngine.new()
dialogue_engine.add_text_entry("Hello")

var print_dialogue : Callable = func (dialogue_entry : DialogueEntry) -> void:
    print(dialogue_entry.get_text())

dialogue_engine.dialogue_continued.connect(print_dialogue)

dialogue_engine.advance() # prints "Hello"
dialogue_engine.advance() # Nothing prints -- the dialogue finished.
dialogue_engine.advance() # prints "Hello" again -- the dialogue restarted
dialogue_engine.advance() # Nothing prints -- the dialogue finished.

API Overview

The dialogue engine consists of two main classes:

  • DialogueEngine: Manages the dialogue tree and provides methods to add entries, advance through the dialogue, and handle branching logic. It emits signals like dialogue_continued when a text entry is reached, dialogue_started, dialogue_finished, etc.
  • DialogueEntry: Represents a single node in the dialogue tree. It can contain text, options for player choices, conditions for branching, goto IDs for jumps, and metadata for custom data.

For more detailed API documentation, refer to the class documentation.

:zap: Requirements

  • Godot 4.2.1+

:rocket: Getting Started

  • Clone/download the repository and check out the demos!

:package: Installation

Download or clone this repository and copy the contents of the addons folder to your own project's addons folder, and enable the Dialogue Engine plugin in the Project Settings.

Jelajahi proyek terkait

Memuat…