Candy Logo Copyright © 2025-2026 Candy Arts

Chat Mode
Chat mode stacks Spoken Lines one under the other, like a messaging app. The player can scroll back through them, up to the first Line. The Chat consists of three UI Elements: - Chat_Box (Chat_Box.gd): lays out one or more Chat_Channels, and is displayed while one of them is visible. It has no settings of its own. - Chat_Channel (Chat_Channel.gd): runs the Lines (voice, typewriter, advance) and retains every Line. The Engine's chat_path (in ui_elements_paths) points at a Chat_Channel, not at the Chat_Box. - Chat_Line (Chat_Line.gd): displays one Line, with a portrait and a speaker label on each side of the text. When a Dialogue's Lines are retained after it ends, a Chat_Separator scene is placed between them and the next Dialogue's Lines. Engine Settings The following settings are available in the Engine (Candy_Engine.gd):
SettingPurpose
chat_portrait_modeThe logic for displaying the speaker's portrait: "Off": Display no portrait. "All": Display a portrait for every speaker. "Player": Display a portrait only when the Actor is in the player_refs array (Player_Refs.gd). "NPC": Display a portrait only when the Actor is NOT in the player_refs array (Player_Refs.gd). "VN": Display no portrait when the Actor has a VN bust on screen.
chat_text_bbcodeBBCode tags wrapped around the spoken text. Write the opening tags only: the Engine adds the closing tags.
chat_speaker_bbcodeBBCode tags wrapped around the speaker name. Write the opening tags only: the Engine adds the closing tags.
chat_show_speakerWrite the speaker's name at the start of the spoken text.
chat_speaker_prefixText added before the speaker's name, when chat_show_speaker is true.
chat_speaker_suffixText added after the speaker's name, when chat_show_speaker is true.
chat_end_of_line_stringThe end-of-line string before advancing to the next Line.
chat_advance_stringThe end-of-line string after advancing to the next Line.
lexicon_chat_modeEnable Lexicon formatting in the spoken text.
chat_line_sceneThe scene each Line is displayed in (a Chat_Line): a path, or a file name in chat_lines_folder (Candy_Properties.gd).
chat_speaker_displayWhen a Line displays the speaker's name label: "Every_Line": On every Line. "Speaker_Change": Only on the first of several Lines in a row from the same speaker.
chat_portrait_displayWhen a Line displays the speaker's portrait (if chat_portrait_mode allows one at all): "Every_Line": On every Line. "Speaker_Change": Only on the first of several Lines in a row from the same speaker. "Speaker_Or_Portrait_Change": Also when the same speaker's portrait changes.
chat_alignmentWhich side of the text a Line's portrait and name are on. The text aligns to the same side. "Left" / "Right": Always that side. "Alternate": The side opposite the previous Line's when the speaker changes, the same side while the same speaker continues. A Dialogue's first Line starts on the left.
chat_keep_portrait_spaceReserve the space of a portrait that isn't displayed on a Line, so that texts line up.
chat_keep_speaker_spaceReserve the space of a name label that isn't displayed on a Line.
chat_keep_alternate_portrait_spaceReserve the space of the portrait on the other side of the text.
chat_keep_alternate_speaker_spaceReserve the space of the name label on the other side of the text.
writing_speedTypewriter speed, in characters per second. 0 displays the whole Line at once.
continue_fast_speedTypewriter speed while the speed-up input is held.
continue_slow_speedTypewriter speed while the slow-down input is held.
sync_write_speed_voiceMatch the typewriter's speed to the voice file's length. The synchronization is lost if the player accelerates or slows down the writing.
auto_advanceSeconds to wait before automatically advancing to the next Line. -1: Disable (manual advance only). 0: Advance immediately when writing is finished.
auto_advance_per_characterSeconds added to auto_advance for each character the Line displays (e.g. 0.05 adds 5 seconds to a 100-character Line). Ignored when auto_advance is -1.
enable_voicePlay voice files or TTS for Spoken Lines.
await_voice_playbackDisable advancing until voice playback has finished.
text_to_speechText-To-Speech: "Off": Don't use Text-To-Speech. "Simple": Use the spoken text (without BBCode tags) for Text-To-Speech. "Advanced": Use the _TTS Variation for Text-To-Speech. Additional TTS modes are created in the tts() hook function (Tts.gd).
tts_advanced_fallbackThe TTS mode to use instead of "Advanced" when a Line has no "_TTS" Variation. Without TTS modes of your own, the only values are "Simple" and "Off".
llm_modeQuery an LLM to write the text to display.
write_dialogue_historyLog Spoken Lines in the Dialogue History.
These Chat settings apply to the whole chat rather than to each Line, so Actors and Spoken Lines can't override them:
SettingPurpose
persistent_chatLeave the chat visible when the Dialogue Mode changes between Spoken Lines.
chat_clear_on_startClear the chat's Lines when a Dialogue starts.
chat_clear_on_endClear the chat's Lines when a Dialogue ends.
chat_hide_on_endHide the chat when a Dialogue ends.
chat_separator_sceneThe scene placed between two Dialogues' Lines when they aren't cleared (a Chat_Separator): a path, or a file name in chat_separators_folder (Candy_Properties.gd).
default_image_extensionDefault file extension to use when an image file name is provided without one.
default_sprite_extensionDefault file extension to use when a spritesheet file name is provided without one.
default_animated_sprite_extensionDefault file extension to use when a SpriteFrames file name is provided without one.
default_video_extensionDefault file extension to use when a video file name is provided without one.
default_animated_image_fpsDefault frame rate to use for frame-folder animations.
default_sprite_fpsDefault frame rate to use for Sprite2D/3D animations.
default_animated_sprite_fpsDefault frame rate to use for SpriteFrames animations saved with no speed of their own.
default_video_fpsFrame rate a Portrait_Stop frame counts at, for videos whose frame rate can't be read.
animation_folder_cacheMemory budget (MB) for animation folders.
animation_folder_streamHow many frames to load while an animation folder is streamed.
UI Settings The following settings are available in the Chat_Channel (Chat_Channel.gd): Overrides Each of these replaces the Engine setting of the same purpose while its enable_ switch is on (e.g. enable_writing_speed):
SettingOverrides
portrait_modechat_portrait_mode
text_bbcodechat_text_bbcode
speaker_bbcodechat_speaker_bbcode
show_speakerchat_show_speaker
speaker_prefixchat_speaker_prefix
speaker_suffixchat_speaker_suffix
end_of_line_stringchat_end_of_line_string
advance_stringchat_advance_string
lexicon_modelexicon_chat_mode
line_scenechat_line_scene
speaker_displaychat_speaker_display
portrait_displaychat_portrait_display
alignmentchat_alignment
keep_portrait_spacechat_keep_portrait_space
keep_speaker_spacechat_keep_speaker_space
keep_alternate_portrait_spacechat_keep_alternate_portrait_space
keep_alternate_speaker_spacechat_keep_alternate_speaker_space
clear_on_startchat_clear_on_start
clear_on_endchat_clear_on_end
hide_on_endchat_hide_on_end
separator_scenechat_separator_scene
writing_speedwriting_speed
continue_fast_speedcontinue_fast_speed
continue_slow_speedcontinue_slow_speed
sync_write_speed_voicesync_write_speed_voice
auto_advanceauto_advance
auto_advance_per_characterauto_advance_per_character
enable_voiceenable_voice
await_voice_playbackawait_voice_playback
text_to_speechtext_to_speech
tts_advanced_fallbacktts_advanced_fallback
llm_modellm_mode
write_dialogue_historywrite_dialogue_history
Other
SettingPurpose
channel_nameA name for this channel. Not displayed yet.
scroll_stepHow far one turn of the mouse wheel scrolls, in pixels.
follow_marginHow close to the bottom the chat must be scrolled to continue following new Lines, in pixels.
view_marginExtra room above and below the view where Lines are already displayed, in pixels, so that they don't pop in while scrolling.
default_zThe chat's Z-order.
The following settings are available in the Chat_Line scene (Chat_Line.gd): Portrait Files These replace the Engine setting of the same name, unless left at their inherit value (empty for extensions, 0 for frame rates, -1 for the cache and stream):
SettingPurpose
default_image_extensionExtension appended to portrait files named without one (TextureRect, NinePatchRect, TextureButton).
default_sprite_extensionExtension appended to spritesheet files named without one (Sprite2D, Sprite3D).
default_animated_sprite_extensionExtension appended to SpriteFrames files named without one (AnimatedSprite2D, AnimatedSprite3D).
default_video_extensionExtension appended to video files named without one (VideoStreamPlayer).
default_animated_image_fpsFrame rate of frame-folder animations (TextureRect, NinePatchRect).
default_sprite_fpsFrame rate of spritesheets (Sprite2D, Sprite3D).
default_animated_sprite_fpsFrame rate of SpriteFrames animations saved with no speed of their own.
default_video_fpsFrame rate a Portrait_Stop frame counts at, for videos whose frame rate can't be read.
animation_folder_cacheMemory budget (MB) of one animation folder: one that fits stays loaded, one that doesn't is streamed.
animation_folder_streamHow many frames are loaded ahead while an animation folder is streamed.
portrait_wThe width Sprite2D and Sprite3D portraits are scaled to.
portrait_hThe height Sprite2D and Sprite3D portraits are scaled to.
Actor Overrides The following overrides can be assigned to Actors (actors dictionary):
PropertyOverrides
ChatPortraitModechat_portrait_mode
ChatTextBBCodechat_text_bbcode
ChatSpeakerBBCodechat_speaker_bbcode
ChatShowSpeakerchat_show_speaker
ChatSpeakerPrefixchat_speaker_prefix
ChatSpeakerSuffixchat_speaker_suffix
ChatEndOfLineStringchat_end_of_line_string
ChatAdvanceStringchat_advance_string
LexiconChatModelexicon_chat_mode
ChatLineScenechat_line_scene
ChatSpeakerDisplaychat_speaker_display
ChatPortraitDisplaychat_portrait_display
ChatAlignmentchat_alignment
ChatKeepPortraitSpacechat_keep_portrait_space
ChatKeepSpeakerSpacechat_keep_speaker_space
ChatKeepAlternatePortraitSpacechat_keep_alternate_portrait_space
ChatKeepAlternateSpeakerSpacechat_keep_alternate_speaker_space
DialogueModedialogue_mode
WritingSpeedwriting_speed
ContinueFastSpeedcontinue_fast_speed
ContinueSlowSpeedcontinue_slow_speed
SyncWriteSpeedVoicesync_write_speed_voice
AutoAdvanceauto_advance
AutoAdvancePerCharacterauto_advance_per_character
EnableVoiceenable_voice
AwaitVoicePlaybackawait_voice_playback
TTStext_to_speech
TTSAdvancedFallbacktts_advanced_fallback
LLMllm_mode
WriteDialogueHistorywrite_dialogue_history
The Actor's DisplayName is the name displayed in the Line's speaker label and at the start of the text, translated into the Engine's current language (see Translating Names). A Line retained in the Chat retains the name it arrived with, even if the language changes later. Portrait Overrides A config.txt file in a portrait file's folder overrides the UI and Engine settings for the files of that folder:
KeyOverrides
extensionThe extension settings (default_image_extension, default_sprite_extension, default_animated_sprite_extension, default_video_extension).
fpsThe frame rate settings (default_animated_image_fps, default_sprite_fps, default_animated_sprite_fps, default_video_fps).
cacheanimation_folder_cache
streamanimation_folder_stream
FilesSettings for one file each, named as it is in the folder: fps, cache and stream override the folder's own.
For example: extension = png fps = 12 Files: { sprite_sheet_4x2-1.png: {fps = 8} } A frame-folder animation can also contain its own config.txt, with a single fps = <number> line. Line Overrides The following overrides can be assigned to Spoken Lines:
KeyOverrides
Portrait_Modechat_portrait_mode
Text_BBCodechat_text_bbcode
Speaker_BBCodechat_speaker_bbcode
Show_Speakerchat_show_speaker
Speaker_Prefixchat_speaker_prefix
Speaker_Suffixchat_speaker_suffix
End_Of_Line_Stringchat_end_of_line_string
Advance_Stringchat_advance_string
Lexicon_Modelexicon_chat_mode
Line_Scenechat_line_scene
Speaker_Displaychat_speaker_display
Portrait_Displaychat_portrait_display
Alignmentchat_alignment
Keep_Portrait_Spacechat_keep_portrait_space
Keep_Speaker_Spacechat_keep_speaker_space
Keep_Alternate_Portrait_Spacechat_keep_alternate_portrait_space
Keep_Alternate_Speaker_Spacechat_keep_alternate_speaker_space
Dialogue_Modedialogue_mode
Writing_Speedwriting_speed
Continue_Fast_Speedcontinue_fast_speed
Continue_Slow_Speedcontinue_slow_speed
Sync_Write_Speed_Voicesync_write_speed_voice
Auto_Advanceauto_advance
Auto_Advance_Per_Characterauto_advance_per_character
Enable_Voiceenable_voice
Await_Voice_Playbackawait_voice_playback
TTStext_to_speech
TTS_Advanced_Fallbacktts_advanced_fallback
LLMllm_mode
Write_Dialogue_Historywrite_dialogue_history