Edit of asset "DialogueDSL" Accepted
| Old/Current | New/Edit | |
|---|---|---|
| Title | DialogueDSL | |
| Description |
DialogueDSL is a plugin for [Godot 4.6+](https://godotengine.org/) for creating script-based dialogues with GDScript integration, providing backend that connects to custom UI via a simple interface Source code and latest versions on [Github](https://github.com/zHoeshin/DDSL) Documentation on [ReadTheDocs](https://dialoguedsl.readthedocs.io/en/latest/) # Features - built-in syntax highlighting for `.ddsl` dialogue scripts - translation support - no dependencies - integration with GDScript - simple interface for creating dialogue UI - custom input types creation - structured branching over jumping Source code and latest versions on [Github](https://github.com/zHoeshin/DDSL) The documentation for the plugin is hosted on the [Github Wiki](https://github.com/zHoeshin/DDSL/wiki) of the repository ## Basic usage Dialogue scripts can be created anywhere within the game's project folder. For this, create a text file, and end it with `.ddsl`, then fill it with the dialogue, for example ```ddsl edwin = ^"res://sprites/portraits/edwin.png" edwin: "Hello, little rover. Are you lost?" { autoconfirm = true } <- option - "Yes" edwin: "Oh, well, we can't have that here. Come, follow me" Cutscenes.trigger("edwinTavernWalk") - "No" edwin: "Are you sure? Well, then... Hope this helps you in your journey" Inventory.add("potion/health2") edwin: "If you need me, you can find me in my tavern" - "Kill all humans" ? Inventory.has("weapon/knife") # this branch is not created unless the player has a knife edwin: "Why, why, so aggressive! And here I thought you were a friendly little roomba!" edwin: "I say, you shouldn't have this" Inventory.remove("weapon/knife") edwin: "Are you even old enough to have a knife? When were you born?" age <- number(1980, 10000) ? Time.get_time_dict_from_system()["year"] < age edwin: "A time traveller too? I find it hard to believe." edwin: "I think you should come with me" Cutscenes.trigger("edwinTavernWalk") ``` Once a dialogue file is created, it can be executed in-game in two primary ways ```gdscript # Note that there is no default dialogue box provided so Dialogue will error during execution if one is not explicitly set Dialog.setBox(someDialogBoxScene) # The main way the dialogues can interact with GDScript is via explicit object bindings # Global bindings are permanent between all dialogue calls Dialog.bindGlobal(InventoryManager, "Inventory") # This will start the dialogue without blocking current execution, executing _dialog_callback after the dialogue finishes Dialog.start("res://path/to/dialog.ddsl", null, {}, _dialog_callback) # Current execution will be paused for the duration of the dialogue # `value` will be assigned to a dictionary containing all variables created during script execution var vars = await Dialog.start("res://path/to/dialog.ddsl") ``` |
DialogueDSL is a plugin for [Godot 4.6+](https://godotengine.org/) for creating script-based dialogues with GDScript integration, providing backend that connects to custom UI via a simple interface Source code and latest versions on [Github](https://github.com/zHoeshin/DDSL) Documentation on [ReadTheDocs](https://dialoguedsl.readthedocs.io/en/latest/) # Features - built-in syntax highlighting for `.ddsl` dialogue scripts - translation support - no dependencies - integration with GDScript - simple interface for creating dialogue UI - custom input types creation - structured branching over jumping Source code and latest versions on [Github](https://github.com/zHoeshin/DDSL) The documentation for the plugin is hosted on the [Github Wiki](https://github.com/zHoeshin/DDSL/wiki) of the repository ## Basic usage Dialogue scripts can be created anywhere within the game's project folder. For this, create a text file, and end it with `.ddsl`, then fill it with the dialogue, for example ```ddsl edwin = ^"res://sprites/portraits/edwin.png" edwin: "Hello, little rover. Are you lost?" { autoconfirm = true } <- option - "Yes" edwin: "Oh, well, we can't have that here. Come, follow me" Cutscenes.trigger("edwinTavernWalk") - "No" edwin: "Are you sure? Well, then... Hope this helps you in your journey" Inventory.add("potion/health2") edwin: "If you need me, you can find me in my tavern" - "Kill all humans" ? Inventory.has("weapon/knife") # this branch is not created unless the player has a knife edwin: "Why, why, so aggressive! And here I thought you were a friendly little roomba!" edwin: "I say, you shouldn't have this" Inventory.remove("weapon/knife") edwin: "Are you even old enough to have a knife? When were you born?" age <- number(1980, 10000) ? Time.get_time_dict_from_system()["year"] < age edwin: "A time traveller too? I find it hard to believe." edwin: "I think you should come with me" Cutscenes.trigger("edwinTavernWalk") ``` Once a dialogue file is created, it can be executed in-game in two primary ways ```gdscript # Note that there is no default dialogue box provided so Dialogue will error during execution if one is not explicitly set Dialog.setBox(someDialogBoxScene) # The main way the dialogues can interact with GDScript is via explicit object bindings # Global bindings are permanent between all dialogue calls Dialog.bindGlobal(InventoryManager, "Inventory") # This will start the dialogue without blocking current execution, executing _dialog_callback after the dialogue finishes Dialog.start("res://path/to/dialog.ddsl", null, {}, _dialog_callback) # Current execution will be paused for the duration of the dialogue # `value` will be assigned to a dictionary containing all variables created during script execution var vars = await Dialog.start("res://path/to/dialog.ddsl") ``` |
| Category | Misc | |
| License | Apache-2.0 | |
| Repository Provider | GitHub | |
| Repository Url | https://github.com/zHoeshin/DDSL | |
| Issues Url | https://github.com/zHoeshin/DDSL/issues | |
| Godot version | Godot 4.6 | |
| Version String | 1.3.1 | 1.3.1 |
| Download Commit | 370adb65511213979602352246ee4f7de6916e8d | 370adb65511213979602352246ee4f7de6916e8d |
| Download Url (Computed) | https://github.com/zHoeshin/DDSL/archive/370adb65511213979602352246ee4f7de6916e8d.zip | https://github.com/zHoeshin/DDSL/archive/370adb65511213979602352246ee4f7de6916e8d.zip |
| Icon Url |
https://raw.githubusercontent.com/zHoeshin/DDSL/refs/heads/main/examples/images/icon.png
|
|