VaelisDocs
v1.0.0
Components · v1.0.0

ChatLog

Vaelis 1.0.0 ChatLog component reference: fields, script API, behavior and examples.

View as Markdownllms.txt
ScopeThis page documents the ChatLog component in Vaelis 1.0.0. Runtime fields are serialized scene data; the Script API section lists only members intentionally exposed to game scripts.
Where to find it in the editorTop UI → Chat Log, or Inspector → Add Component → Chat Log.

#What it does

Scrollable-style conversation log component for UI dialogue.

Component setup & editor toolsChatLog provides a dialogue/log display component intended for scripted text updates.

#How to add and use ChatLog

Editor path: Select the target entity in the Hierarchy (left side) → look at the Inspector (right side) → click Add Component at the bottom of the Inspector → search for ChatLog → click the component row. The Add Component picker is a centered modal with a search box; it only lists components not already attached.

For components with a dedicated editor tool, the tool is opened or activated from the location described below. Do not assume that adding the component alone activates its editor; some systems require a separate window, panel, or viewport tool.

#Component setup & editor tools

  • Inspector → ChatLog: configure the log; use its script-facing API for runtime messages/entries.

#What you should see after adding it

The component appears as its own section in the Inspector. Its serialized settings are listed in the Component data table below. If a field is conditional, it appears only when the relevant mode/type is selected. If a field is a runtime state field (for example grounded or resolved velocity), treat it as read-only diagnostic state unless the API reference explicitly documents it as writable.

#How to read the settings

For every setting below, the documentation distinguishes type, default, meaning, and tuning direction where behavior is known. When a value represents a direction, use the engine's coordinate convention documented in Coordinate system; do not substitute Unity/Godot conventions.

#Component data

FieldTypePurposeDefault
messagesarrayCurrent messages.[]
maxMessagesnumberMaximum retained messages.50
visibleCountnumberMessages visible at once.6
widthnumberLog width.320
lineHeightnumberLine height.26
fontSizenumberFont size.16
fontFamilystringFont family.Arial
messageColorhex stringMessage color.#ffffff
senderColorhex stringSender name color.#ffd700
backgroundColorhex stringBackground.#000000
backgroundOpacitynumberBackground opacity.0.5
paddingnumberPadding.10
showSenderbooleanShow sender names.true
screenSpacebooleanUse screen-space UI behavior.true
visiblebooleanVisibility.true

#Tuning behavior

These are the practical direction-of-change rules for the most important controls on this component.

SettingWhat changing it does
maxMessagesTotal retained history before oldest messages are dropped.
visibleCountHow many recent messages are shown at once.
backgroundOpacity0 transparent, 1 opaque.
lineHeightHigher creates more vertical spacing between messages.

#Script API

MemberKindDescription
messagesPropertyRead-only snapshot of messages {sender,text,senderColor}.
maxMessagesPropertyMaximum retained messages.
visibleCountPropertyNumber of visible rows.
widthPropertyPanel width.
lineHeightPropertyLine height.
fontSizePropertyFont size.
fontFamilyPropertyFont family.
messageColorPropertyMessage color.
senderColorPropertyDefault sender color.
backgroundColorPropertyBackground color.
backgroundOpacityPropertyBackground opacity.
paddingPropertyPadding.
showSenderPropertyShow sender names.
screenSpacePropertyScreen-space mode.
visiblePropertyVisibility.
send(sender, text, color)MethodAppend a message.
clear()MethodClear the log.

#Examples

js
this.chat.send("Guard", "Halt!", "#ef4444");
Need the full workflow?Components: complete workflow covers adding, configuring, testing, combining, and removing components.