-
-
Notifications
You must be signed in to change notification settings - Fork 75
Description
Description
Currently, the Dialogue-related Nodes (Message and Choice) have a very pre-defined and limited amount of data, which creates hurdles when you want a dialogue system that goes beyond basic functions. For example:
- The screen should shake when a Choice is hovered.
- A Choice must be visible, but not clickable.
- A Choice leads to a special event, like combat. We want to add the "combat" metadata to edit the Choice's text at runtime.
Basically, there needs to be a way to send custom data to the Dialogue Scene that we can interpret in the GDScript game environment and act accordingly, and given that Orchestrator Nodes can hold metadata, which is saved on the .torch file too, it would be an easy way to add this layer of customization.
Implementation ideas
The implementation would consist in adding aditional "metadata" keys to the dialogue_data Dictionary within the Dialogue Scene.
For the DialogueMessage, a "metadata" key with a Dictionary value containing all metadata <String, Variant> pairs.
For the DialogueChoice metadata, it would require a bit of a refactor. "options" should no longer be an Array[String], but rather an Array[Dictionary], where each value is a data-package of each choice:
- Text
- Visibility
- Metadata Dictionary
P.D.: This method would also improve how "Option Visibility" is handled. Currently, a non-visible Option is not passed to the "options" Array, which is not ideal since it is lost data. All options, visible and otherwise, should be passed to the Godot Scene and let the user handle them as they wish.