Skip to content

ConversationGraphEditor ​

Inherits: GraphEdit

Graph editor for conversation system with flat response structure Responses stored in conversation.conversation_responses, referenced by ID

Variables ​

Conversationconversation
Stringcurrent_language""
Dictionarychat_nodes{} # chat_id -> ChatGraphNode
Dictionaryresponse_nodes{} # response_id -> ResponseGraphNode
Dictionarydice_roll_nodes{} # dice_roll_id -> DiceRollGraphNode
Array[RequirementGraphNode]requirement_nodes[]
ConversationStartGraphNodestart_nodenull # Only one start node per conversation
Dictionaryrequirement_gate_mappings{} # gate_node_name -> {chat_id, slot_idx}
DialogManagerdialog_manager
PopupMenucontext_menu
Vector2context_menu_position

Methods ​

voidset_dialog_manager( p_dialog_manager: DialogManager )
voidload_conversation( conv: Conversation )
voidsave_layout()
voidclear_graph()
voidset_current_language( language: String )
voidcreate_new_chat()
voidcreate_new_response_node()
voidcreate_new_requirement_gate()
voidcreate_new_dice_roll()
voidcreate_start_node()

Signals ​

conversation_modified() ​

Constants ​

  • const PORT_TYPE_CHAT_INPUT = 0 # Green - Chat entry point (all nodes use this)
  • const PORT_TYPE_RESPONSE_FLOW = 1 # Blue - Response connections
  • const CHAT_NODE_SCENE = "res://addons/chroniclenode/editor_components/editors/behavior/conversations/...
  • const RESPONSE_NODE_SCENE = "res://addons/chroniclenode/editor_components/editors/behavior/conversations/...
  • const REQUIREMENT_NODE_SCENE = "res://addons/chroniclenode/editor_components/editors/behavior/conversations/...
  • const DICE_ROLL_NODE_SCENE = "res://addons/chroniclenode/editor_components/editors/behavior/conversations/...
  • const START_NODE_SCENE = "res://addons/chroniclenode/editor_components/editors/behavior/conversations/...

Variable descriptions ​

Conversation conversation ​

No description yet.

String current_language = "" ​

The language the graph shows and edits: a language code ("" = the source language, the text stored in the conversation)

Dictionary chat_nodes = # chat_id -> ChatGraphNode ​

No description yet.

Dictionary response_nodes = # response_id -> ResponseGraphNode ​

No description yet.

Dictionary dice_roll_nodes = # dice_roll_id -> DiceRollGraphNode ​

No description yet.

Array[RequirementGraphNode] requirement_nodes = [] ​

No description yet.

ConversationStartGraphNode start_node = null # Only one start node per conversation ​

No description yet.

Dictionary requirement_gate_mappings = # gate_node_name -> chat_id, slot_idx ​

No description yet.

DialogManager dialog_manager ​

No description yet.

PopupMenu context_menu ​

No description yet.

Vector2 context_menu_position ​

No description yet.

Method descriptions ​

void set_dialog_manager( p_dialog_manager: DialogManager ) ​

Set dialog manager reference

void load_conversation( conv: Conversation ) ​

Load conversation into the graph editor

void save_layout() ​

No description yet.

void clear_graph() ​

No description yet.

void set_current_language( language: String ) ​

No description yet.

void create_new_chat() ​

No description yet.

void create_new_response_node() ​

No description yet.

void create_new_requirement_gate() ​

No description yet.

void create_new_dice_roll() ​

No description yet.

void create_start_node() ​

No description yet.