Yet another (linear) dialogue system/addon/plugin for Godot. With features such as:
- โ๏ธ Text-based, human-readable syntax.
- โก Simple setup. Get started in just 7 lines of codes!
- ๐ ....
- ๐ And 100% written in GDScript!
| Rendered | Written |
|
|
|
# Load your epic dialogue!
var epic_dialogue := Dialogue.load('res://epic_dialogue.dlg')
# Set up the stage
@export var my_stage: TheatreStage
func _ready():
# Start your dialogue
my_stage.start(epic_dialogue)
func _input(event):
# When the space/enter key is pressed,
if event.is_action_pressed('ui_accept'):
# Progress your dialogue
my_stage.progress()Important
This project is still in development and is subject to frequent breaking changes, and bugs. Check out the Issues page for known bugs & issues, and Common Troubleshooting documentation page if you encounter any issues.
Run the command below in your Godot project directory. Or download and install it manually.
curl -L 'https://nnda.dev/theatre/latest' | tar zxv --strip-components=1The URL above is just a redirect to the main branch tarball :p
Insert static...
Dia:
"Let's meet {player}. Don't keep {player_pronoun} waiting."...or dynamic variables.
Execute, evaluate, and insert any valid GDScript expressions to the dialogue.
Ritsu:
"HEY {( Player.name.to_upper() )}!!"Dia:
"Your operating system is {( OS.get_name() )}.
It is currently {( Time.get_time_string_from_system(false) )}."Fine-tune your dialogue flow with {delay} and {speed}.
Godette:
"Hello!{delay = 0.7} Nice to meet you."Ritsu:
"{speed = 1.5} AAAAAAAAAAAAAAAAA!!!!"Manipulate in-game object properties & variables.
Ritsu:
UI.portrait = "ritsu_smile.png"
"Cheers!"Ritsu:
Global.friendship_lv += 1
"Yay!"Connect your story to the game with function calls.
{player}:
Player.heal(20)
"Thanks! That feels so much better."Call functions or set properties/variables at specific points in the Dialogue.
Dia:
"Let's brighten up the room a little...{d = 1.1}
Background.set_brightness(1.0)
# or
Background.brightness = 1.0
there we go."๐ More comprehensive Dialogue features documented here.
Write your epic Dialogue!
# Write it in a *.dlg file, and load it.
var epic_dialogue := Dialogue.load("res://epic_dialogue.dlg")
# Write it directly with triple quotation marks.
var epic_dialogue := Dialogue.new("""
Dia:
"Loading the Dialogue written in a *.dlg file
is much better for performance."
:
"It'll keep things clean and efficient."
:
"Plus, youโll have syntax highlighting
for better readability."
""")Set the Stage! Add
and
TheatreStage
node to your scene. Structure your scene like the following: DialogueLabel
Adjust the position and size of the
to your liking. PanelContainer
Select the
node, and reference the
TheatreStage
&
Label
node to display your Dialogue. Adjust and configure your
DialogueLabel
via the inspector. Alternatively, you can also set them in script: TheatreStage
Reference the
node in the script, and set up a way to progress your Dialogue with TheatreStage
TheatreStage.progress().
func _input(event):
if event.is_action_pressed('ui_accept'):
my_stage.progress()And finally, start the
with your TheatreStage
epic_dialogue.
func _ready():
my_stage.start(epic_dialogue)๐ More detailed quick start tutorial here.
- Theatre is licensed under MIT.
- Theatre logo, created by nnda, is licensed under CC-BY 4.0.
- Class icons from @fontawesome (recolored), are licensed under CC-BY 4.0.