Skip to content

ConversationPanelUI ​

Inherits: PanelUI < Control

UI panel for displaying conversations using the new Conversation system Refactored to extend PanelUI instead of MarginContainer

Properties ​

boolenable_text_animationtrue
boolallow_skip_animationtrue
StringNameskip_animation_action&"ui_accept"
boolrequire_player_input_for_dice_rollstrue
PackedSceneresponse_button_scene
Stringhand_in_response_format"Hand in: {quest_name}"
Stringcomplete_quest_button_text"< Complete Quest >"
Stringoffer_quest_response_format"{quest_name}"
Stringaccept_quest_button_text"< Accept Quest >"
Stringdecline_quest_button_text"< Decline >"

Variables ​

ConversationInstanceactive_conversationnull
ConversationInteractionactive_interactionnull
DiceRollPaneldice_roll_panel

Methods ​

voidinitialize_ui( p_system_hub: GameHost.SystemHub )
voidopen_conversation( conversation: ConversationInstance, starting_chat: ConversationChat, interaction: ConversationInteraction )
voidclose_conversation()
voidshow_dice_roll_panel( dice_roll: ConversationDiceRoll )

Property descriptions ​

bool enable_text_animation = true ​

Enable animated text typing effect

bool allow_skip_animation = true ​

Allow skipping text animation with input

StringName skip_animation_action = &"ui_accept" ​

Action to skip text animation

bool require_player_input_for_dice_rolls = true ​

Require player input to start dice rolls (shows dice roll panel)

PackedScene response_button_scene ​

The response button scene

String hand_in_response_format = "Hand in: quest_name" ​

Format string for quest hand-in response buttons. Use {quest_name} as placeholder.

String complete_quest_button_text = "< Complete Quest >" ​

Text for the complete quest button

String offer_quest_response_format = "quest_name" ​

Format string for quest offer response buttons. Use {quest_name} as placeholder.

String accept_quest_button_text = "< Accept Quest >" ​

Text for the accept quest button

String decline_quest_button_text = "< Decline >" ​

Text for the decline quest button

Variable descriptions ​

ConversationInstance active_conversation = null ​

========== RUNTIME STATE ==========

ConversationInteraction active_interaction = null ​

The conversation interaction the panel shows.

DiceRollPanel dice_roll_panel ​

========== UI REFERENCES ==========

Method descriptions ​

void initialize_ui( p_system_hub: GameHost.SystemHub ) ​

Sets the part up with the hub of the game systems: connects the signals it listens to and fills it.

void open_conversation( conversation: ConversationInstance, starting_chat: ConversationChat, interaction: ConversationInteraction ) ​

Open the conversation panel with a conversation and starting chat

void close_conversation() ​

Close the conversation panel

void show_dice_roll_panel( dice_roll: ConversationDiceRoll ) ​

Show the dice roll panel for player interaction