ClydeDialogueConfig

Node to configure the Dialogue helper. Allow customising, dialogue bubbles, input options, etc.

Add this to the canvas used as HUD in your scene, as it will create the dialogue box for you.

Properties

Type Method Default
PackedScene _dialogue_bubble
Node _dialogue_bubble_container
String _next_content_input_action_name "ui_accept"
String _cancel_selection_input_action_name "ui_cancel"
String _select_option_input_action_name "ui_accept"
String _next_option_input_action_name "ui_down"
String _previous_option_input_action_name "ui_up"

Methods

Return Method
Dictionary _load_dialogue_data(dialogue_path: String, block_name: String)
void _persist_dialogue_data(dialogue_path: String, block_name: String, dialogue_data: Dictionary)
void _on_external_variable_update(variable_name: String, value: Variant)
Variant _on_external_variable_fetch(variable_name: String)

Property descriptions

PackedScene _dialogue_bubble

The scene to be used as dialogue bubble


Node _dialogue_bubble_container

Where in the tree should dialogue bubbles be added to. If no Node selected this Node's parent will be used


String _next_content_input_action_name = "ui_accept"

Action name from Input Map to listen to go to next content


String _cancel_selection_input_action_name = "ui_cancel"

Action name from Input Map for when in selection mode, try to stop selection


String _select_option_input_action_name = "ui_accept"

Action name from Input Map to listen to select highlighted option


String _next_option_input_action_name = "ui_down"

Action name from Input Map to listen to go to next option


String _previous_option_input_action_name = "ui_up"

Action name from Input Map to listen to go to previous option


Method descriptions

Dictionary _load_dialogue_data(dialogue_path: String, block_name: String)

This method should be overriden
Should return any existing persistence object for the dialogue. Return empty if first run.


void _persist_dialogue_data(dialogue_path: String, block_name: String, dialogue_data: Dictionary)

This method should be overriden
Called after a dialogue is finished. Should be used for persisting dialogue data.


void _on_external_variable_update(variable_name: String, value: Variant)

This method should be overriden
Called when an external variable is updated via dialogue (i.e. { set @hp = 100 })
This method should be used to update the external storage with the new value.


Variant _on_external_variable_fetch(variable_name: String)

This method should be overriden
Called when an external variable is accessed in the dialogue (i.e. @is_alive).
The value returned in this method will be used in the dialogue.