Integration: Blueprint, Console, Logs

This document is for developers who drive CBMKit characters from their own game logic. It covers:

  1. The Blueprint functions and events you need most
  2. Console commands
  3. Log and statistics files
  4. Command-line arguments
  5. Settings that the other documents do not cover

Every function and event below also has a tooltip in the Blueprint editor. This document lists the most useful ones and shows how to combine them. Blueprint shows C++ names with spaces, for example SubmitInput appears as Submit Input. Both names are given.

Setup of characters, run types, chat, and streaming is in GETTING_STARTED.md, CHARACTERS.md, COMPANION.md, BROADCAST.md, and CHAT.md.

1. Blueprint integration

1.1 Objects you work with

Object (C++ class) What it does How to get it in Blueprint How to get it in C++
CBM Conversation Subsystem (UCBMConversationSubsystem) Input queue, turns, history, run type, prompt mode, states, memory. The main entry point Get Conversation (category CBMKit), or Get CBM Conversation Subsystem GameInstance->GetSubsystem<UCBMConversationSubsystem>()
CBM Character Component (UCBMCharacterComponent) One character in the level: audio, lip sync, emotion, actions Get Component by Class on the character actor, or Get Active Character / Get Characters on the conversation subsystem Actor->FindComponentByClass<UCBMCharacterComponent>()
CBM Topic Subsystem (UCBMTopicSubsystem) Topics and scenarios (Broadcast run type only) Get CBM Topic Subsystem GameInstance->GetSubsystem<UCBMTopicSubsystem>()
CBM Voice Input Subsystem (UCBMVoiceInputSubsystem) Microphone, voice activity detection, STT (Companion run type only) Get Voice Input (category CBMKit), or Get CBM Voice Input Subsystem GameInstance->GetSubsystem<UCBMVoiceInputSubsystem>()
CBM Chat Subsystem (UCBMChatSubsystem) Live chat sources. Module CBMKitChat Get CBM Chat Subsystem GameInstance->GetSubsystem<UCBMChatSubsystem>()
CBM Service Subsystem (UCBMServiceSubsystem) STT, LLM, and TTS service state. Engine subsystem, one per process Get Services (category CBMKit), or Get CBM Service Subsystem UCBMServiceSubsystem::Get()
CBM Stats Subsystem (UCBMStatsSubsystem) Response time, sync rate, uptime Get CBM Stats Subsystem UCBMStatsSubsystem::Get(WorldContextObject)
CBM Character Library (UCBMCharacterLibrary) Static helper functions: submit chat, donations, game events, voice text, images Call the functions directly (category CBMKit) UCBMCharacterLibrary::SubmitGameEvent(...)

C++ projects add "CBMKit" to PublicDependencyModuleNames in their .Build.cs. Add "CBMKitChat" for the chat subsystem and "CBMKitBroadcast" for the ffmpeg output subsystem.

A character joins the conversation when its CBM Character Component begins play. Get Characters returns all registered characters. Get Active Character returns the character that speaks now, else the last speaker in a room, else the last registered character.

1.2 Inputs and the run type

Every input has a source (ECBMInputSource). The run type decides which sources are used. Inputs with a source that is not used are dropped and a LogCBM line Input dropped: ... is written.

Source Companion Broadcast Meaning
Voice used dropped The player's speech
Chat dropped used A viewer chat message
Donation dropped used A donation message
System used used An instruction or game event. Not shown as said by a person

Is Input Allowed (IsInputAllowed(Source), static) returns this table for the current run type.

The queue picks inputs in this order: Voice, Donation, Chat, System. Inside one source, a higher Priority comes first, then the older input. One turn answers up to 5 queued inputs of the non-system sources together (change with Set Max Batch Size). A System input is always answered in its own turn.

1.3 Send input to a character

Submit Input (UCBMConversationSubsystem::SubmitInput(FCBMCharacterInput)) is the general function. It returns nothing. Empty text is ignored.

Fields of FCBMCharacterInput:

Field Type Meaning
Source ECBMInputSource See 1.2. Default Chat
Platform String A label such as youtube or mygame. Written to the stats file for system-only turns. Do not use room, idle, or greeting: CBMKit uses these values internally
Author String Name of the person. Used in the prompt for Chat and Donation. Ignored for Voice and System
Text String The message. Leading and trailing spaces are removed
Priority Integer Higher is answered first within the same source. Default 0
Timestamp DateTime Empty = now (UTC). For Voice, an older time counts as waiting time in the stats, up to 30 seconds
Image Byte array JPEG or PNG bytes sent with the turn. Needs a vision-capable LLM
TargetCharacter Name CharacterId of the room character who must answer. None = chosen by a name in the text, then in turn

Steps:

  1. Call Get Conversation.
  2. Use a Make node for the FCBMCharacterInput struct. Set Source, Text, and the other fields you need.
  3. Call Submit Input on the conversation subsystem.

Shorter helper functions in CBM Character Library. They return false when the text is empty, no conversation subsystem exists, or the source is not used in the current run type:

Blueprint node C++ Source and Platform it sends
Submit Chat (Author, Text, Platform) SubmitChat Chat, your Platform
Submit Donation (Author, Text, Platform) SubmitDonation Donation, your Platform
Submit Voice Text (Text) SubmitVoiceText Voice, mic. Text you recognized yourself
Submit System Prompt (Text) SubmitSystemPrompt System, system. An instruction for the character
Submit With Image (Source, Author, Text, Image, Platform) SubmitWithImage Your source, with an image
Submit Game Event (Event Name, Detail, Target Character) SubmitGameEvent System, event. See 1.4

To get an image: Capture Screen Image (CaptureScreenImage: game viewport, desktop, or window) or Capture Render Target Image (CaptureRenderTargetImage). Both return JPEG bytes. Is Vision Available tells you whether the LLM accepts images.

C++ example:

#include "CBMConversationSubsystem.h"

if (UCBMConversationSubsystem* Conversation = GetGameInstance()->GetSubsystem<UCBMConversationSubsystem>())
{
    FCBMCharacterInput Input;
    Input.Source = ECBMInputSource::Chat;
    Input.Platform = TEXT("mygame");
    Input.Author = TEXT("Player2");
    Input.Text = TEXT("Can you see the boss?");
    Conversation->SubmitInput(Input);
}

1.4 Tell characters about game events

Submit Game Event (UCBMCharacterLibrary::SubmitGameEvent) tells the character that something happened in the game. Use it for level start, a boss kill, a death, an item pickup, and similar moments.

  1. Call Submit Game Event.
  2. Set Event Name, for example Boss defeated.
  3. Set Detail, for example The player beat the fire dragon on the first try. Leave it empty to send the event name only.
  4. In a room, set Target Character (advanced pin) to the CharacterId that must react. None = the normal speaker choice.

The text is built from the prompt file system/input_event.txt. The shipped English file is [Game event: {event}] {detail}. Edit this file to change the wording (file lookup is in CHARACTERS.md).

Game events are System inputs. They are used in both run types. They wait in the queue behind voice, donation, and chat inputs, and they are removed after ChatExpireSeconds (default 60) if no turn picked them up.

Other ways to give game information to the character:

Node C++ Use
Set Context Block (Key, Text) SetContextBlock A text block added after the input of every turn, ordered by key. Use it for state that lasts, for example Current area: Ice Cave. HP: 30%. Empty text removes the block. Does not start a turn
Set Character State (Character Id, State, Value) SetCharacterState Sets a state value (see 1.7). The value is shown to the LLM every turn
Set Idle Talk Override (Text) SetIdleTalkOverride Text used instead of the normal idle talk prompt while set. Empty = default

1.5 React to what the character does

Events on the CBM Character Component (bind them with Bind Event to ... or the component's event list):

Event C++ Parameters When it fires
On Character Action OnCharacterAction Action (Name), Value (String) The LLM wrote an action tag [act:name] or [act:name:value]. With TTS it fires when the sentence with the tag starts playing. Without TTS it fires when the sentence text arrives. Tags after the last sentence fire when the turn ends, but not when the turn was interrupted
On Speaking State Changed OnSpeakingStateChanged bSpeaking The character starts or stops speaking
On Speech Segment Started OnSpeechSegmentStarted Segment (FCBMSpeechSegmentInfo) One sentence starts playing. The struct has TurnId, SegmentIndex, bLastInTurn, Text, Emotion, Duration, Actions
On Speech Segment Finished OnSpeechSegmentFinished Segment One sentence finished or was stopped
On Subtitle OnSubtitle Text Same moment as On Speech Segment Started. Only the sentence text
On Emotion Changed OnEmotionChanged New Emotion, Previous Emotion The face emotion changed
On Turn Finished OnTurnFinished TurnId The character finished playing all sentences of a turn

Only the actions in Project Settings > Plugins > CBM > Action > Actions, or in the character definition's own list, are accepted. How to write the action list is in CHARACTERS.md.

Steps to run game logic from an action:

  1. Add the action, for example wave with the description Wave at the viewer., to Actions.
  2. In the character Blueprint, select the CBM Character Component and add On Character Action.
  3. Add a Switch on Name on Action. Add a pin wave and play your montage there.
  4. Use Value when the action takes a value, for example [act:look:left] gives Value left.

To fire the same event from your own code, call Trigger Action (TriggerAction(Action, Value)).

Events on the CBM Conversation Subsystem:

Event C++ Parameters When it fires
On Startup Finished OnStartupFinished none Once, when no service is starting any more. See 1.10
On Speaker Changed OnSpeakerChanged TurnId, Speaker (component) Before On Turn Started, with the character that speaks this turn
On Turn Started OnTurnStarted TurnId, InputText A turn starts. InputText is the inputs as the LLM sees them, one per line
On Emotion Detected OnEmotionDetected TurnId, Emotion The reply contains an emotion tag
On Assistant Sentence OnAssistantSentence TurnId, SegmentIndex, Text, Emotion One sentence of the reply text is ready. Fires before the audio plays
On Assistant Text OnAssistantText TurnId, FullText The spoken text so far, after each sentence
On Turn Completed OnTurnCompleted TurnId The turn ended (finished, interrupted, or failed)
On Turn Logged OnTurnLogged Record (FCBMTurnRecord) The turn record was written. Has inputs, system prompt, reply, spoken text, emotions, actions, seconds, error
On Conversation Error OnConversationError Error An LLM or TTS error, for example TTS service unavailable; replies are text-only.
On Character State Changed OnCharacterStateChanged CharacterId, State, Value A state value changed. Not fired by DecayPerMinute

When the TTS service is not ready, replies are text-only. Then the component events On Subtitle and On Speech Segment Started do not fire. Use On Assistant Sentence for subtitles if your game must also work without TTS.

Events on the CBM Voice Input Subsystem (Companion run type):

Event C++ Parameters When it fires
On Voice Activity OnVoiceActivity bSpeaking The player starts or stops speaking (voice activity detection)
On Voice Transcribed OnVoiceTranscribed Text STT returned text. The text is then submitted as a Voice input automatically. Do not submit it again

When the player starts speaking while a character speaks, the turn is interrupted, but only with push-to-talk or with bMuteMicWhileSpeaking off.

1.6 Interrupt and clear

Node C++ Effect
Interrupt UCBMConversationSubsystem::Interrupt Cancels the running LLM and TTS request, ends the turn as interrupted, and stops all characters. Queued inputs stay
Interrupt Character UCBMCharacterLibrary::InterruptCharacter Same as Interrupt
Clear Pending Inputs ClearPendingInputs Removes all queued inputs. The running turn continues
Clear History ClearHistory Forgets the conversation history. Memory facts stay
Stop Speaking UCBMCharacterComponent::StopSpeaking Stops the audio of one character only. The LLM keeps running

To stop everything now: call Clear Pending Inputs, then Interrupt.

Queries: Is Turn Active, Get Current Turn Id (-1 when no turn), Get Pending Input Count, Get Pending Inputs (queue order, without images), Is Character Speaking, Is Conversation Idle (no turn, input, room reply, memory job, or planner request is running).

1.7 Emotion, state, mode, world

Node C++ Effect
Set Emotion (Emotion, Hold Seconds, Play Motion) UCBMCharacterComponent::SetEmotion Sets the face emotion of one character. Hold Seconds < 0 = the emotion profile value. Play Motion (advanced) also plays the emotion motion
Get Current Emotion GetCurrentEmotion The emotion now
Play Emotion Motion (Emotion) PlayEmotionMotion Plays a motion of that emotion. Returns false when the profile has no entry
Set Character State (Character Id, State, Value) UCBMConversationSubsystem::SetCharacterState Sets a state such as mood. Clamped to the state's Min and Max. Unknown states are ignored
Add Character State (Character Id, State, Delta) AddCharacterState Adds to a state
Get Character State (Character Id, State) GetCharacterState Returns the value. A state that was never set returns its Default
Reset Character States (Character Id) ResetCharacterStates Back to the defaults
Set Prompt Mode (Character Id, Mode) SetPromptMode Uses characters/<C>/modes/<Mode>.txt. Character Id None = every character. Empty Mode = the definition's PromptMode
Set Prompt World (World) SetPromptWorld Uses worlds/<World>.txt for every character. Empty = each definition's world, else the project setting
Set Persona Text / Reload Persona SetPersonaText / ReloadPersona Replace the persona text, or read it from the files again

For the state functions, Character Id None means the active character. States are defined in Project Settings > Plugins > CBM > State or in the character definition (see CHARACTERS.md).

The built-in emotion names are normal, happy, sad, angry, surprised, embarrassed.

1.8 Topics and scenarios (Broadcast run type)

Topics give the characters a subject to talk about without input. All start functions return false in the Companion run type. Switching to Companion stops the topic.

Node C++ Effect
Start Topic (Topic) UCBMTopicSubsystem::StartTopic Starts the steps of system/topic_default.txt with this topic. Returns false for empty text
Start Scenario (Scenario Name, Topic) StartScenario Starts scenarios/<Scenario Name>.txt. Topic fills {topic}. Empty Topic = the topic in the file
Start Scenario Data (Scenario) StartScenarioData Starts an FCBMScenario you build in Blueprint (Topic and an array of FCBMTopicStep)
Next Topic Step NextTopicStep Ends the current step. Needed for a step with bManual
Stop Topic StopTopic Ends the topic
Is Topic Active / Get Topic State IsTopicActive / GetTopicState State: topic, step index and count, current step, turns in step, waiting for next, planning, covered steps
Get Scenario Names GetScenarioNames File names under scenarios/
Get Suggestions / Clear Suggestions GetSuggestions / ClearSuggestions Topic suggestions from chat (see TopicSuggestPrefix in section 5)

Events: On Topic Started, On Topic Step Changed, On Topic Finished (all with FCBMTopicState), On Topic Suggested (with FCBMTopicSuggestion: Author, Text).

Scenario file format: CHARACTERS.md. Operator use during a stream: BROADCAST.md.

1.9 Run type

Node C++ Effect
Get Run Type GetRunType Companion or Broadcast
Set Run Type (Type) SetRunType Switches the run type and saves it. In the editor (also in PIE) it is saved to Config/DefaultGame.ini. In a packaged game it is saved to the user's Saved/Config/Windows/Game.ini

What changes on a switch:

A -CBMRunType= command-line value (section 4) is dropped after Set Run Type.

1.10 Wait for the services

The STT, LLM, and TTS services load when the game starts. This can take a minute. Inputs you submit earlier stay in the queue. A turn starts only when the LLM is ready and TTS is no longer starting.

Ways to wait:

  1. On Startup Finished on the conversation subsystem. Fires once when no service is in the Starting state. A service can be Ready or Failed at this moment. Is Startup Finished returns the same as a bool. Bind the event and check the bool first, because the event may have fired before you bind it.
  2. On Service State Changed (Kind, State) on CBM Service Subsystem. Fires for each change of STT, LLM, or TTS.
  3. Are All Services Ready (CBM Character Library or CBM Service Subsystem). STT counts only in the Companion run type.

Other service nodes: Get Service State (Kind), Is Service Ready (Kind), Is Any Service Starting, Start Services, Stop Services, Restart Service (Kind), Is Service External (Kind), Get LLM Model Name.

After startup the character says a greeting if no input is queued at that moment.

1.11 User name and character language

Node C++ Effect
Set Companion User Name (Name) UCBMConversationSubsystem::SetCompanionUserName (static) The name the companion character uses for the player. Trimmed, at most 32 characters. Saved to the user's Saved/Config/.../Game.ini, never to DefaultGame.ini. Empty = no name
Get Companion User Name GetCompanionUserName The saved name
Set Character Language (Language) SetCharacterLanguage Sets Character Language (PromptLanguage), for example en or ko. Empty = same as the UI. Saved. Clears the conversation history when the language changes. A character definition with its own Language keeps it
Get Character Language GetCharacterLanguage The language of the active character

Details: COMPANION.md (user name) and GETTING_STARTED.md (language).

1.12 Other useful nodes

Node Object Effect
Set Voice Input Enabled / Is Voice Input Enabled Voice Input Microphone on or off. Stays off in Broadcast
Set Push To Talk / Set Push To Talk Pressed Voice Input Push-to-talk mode, and the key state from your input binding
Get Input Level Db, Is User Speaking Voice Input Microphone level and voice activity, for a level meter
Set Idle Talk Enabled Conversation Off = the character does not talk on its own when nobody speaks
Set Room Enabled Conversation Several characters share one conversation (Broadcast only)
Set Vision Source Conversation Screen or webcam image attached to turns automatically
Get Turn Log Conversation The last 100 turn records, oldest first
Get Memory Facts (Character Id) / Flush Memory / Clear Memory (Character Id) Conversation Stored memory facts. Same as the CBMKit.Memory.* commands
Get Summary, Get Recent Turns, Get Health, Reset Stats Stats Numbers shown by CBMKit.Stats
Inject Message Chat Send an FCBMChatMessage as if it came from chat. It goes through the chat filters. See CHAT.md
On Chat Message Chat Every received chat message, before filters
Set Settings Window Open CBM Companion UI Subsystem Open or close the in-game settings window

2. Console commands

Open the console with the ~ key in PIE or in a game build. Commands that need a game world do nothing when no game is running.

Command Arguments Effect
CBMKit.RunType [companion|broadcast] Switches the run type and saves it, like Set Run Type. Not case-sensitive. No argument = writes the current run type to the log. An unknown value writes a warning
CBMKit.UserName [name] Sets the companion user name. All arguments are joined with spaces. No argument = clears the name. Writes the result to the log
CBMKit.Mode <mode|-> [CharacterId] Selects the prompt mode file characters/<C>/modes/<mode>.txt. - = the definition's mode. No CharacterId = every character
CBMKit.Topic <topic> Starts a topic, like Start Topic. All arguments are joined with spaces. Broadcast only
CBMKit.Scenario <name> [topic] Starts scenarios/<name>.txt. The remaining arguments are the topic. No topic = the topic in the file. Broadcast only
CBMKit.TopicNext none Goes to the next topic step
CBMKit.TopicStop none Stops the topic
CBMKit.Memory.Show [CharacterId] Writes the stored memory facts to the log. No CharacterId = the active character
CBMKit.Stats none Writes response time, chat reflection, sync rate, uptime, errors, and the stats folder to the log
CBMKit.Stats.Reset none Clears the counters of this session. Files already written stay
CBMKit.Operator none Opens the Operator Panel window
CBMKit.DevPanel none Opens the Developer Panel window (title CBM Developer Panel)
CBMKit.Pack.AddVoice <pack> <voice> Editor only. Copies <LocalAIRoot>/models/tts/<voice>/voice.json to <pack>/voices/<voice>/voice.json. Writes copied or the error to the log (category LogTemp)
CBMBroadcast.Start [url or file] Starts the built-in ffmpeg output. The argument replaces the URL in the settings for this run, for example rtmp://... or D:/rec/test.mkv. See BROADCAST.md
CBMBroadcast.Stop none Stops the ffmpeg output
CBMBroadcast.Stats none Writes sent, duplicated, and dropped frames, ffmpeg fps, bitrate, and speed to the log

CharacterId is the CharacterId field of a character definition. Arguments with spaces are split into separate arguments by the console.

3. Logs and statistics

3.1 Output Log categories

Category Module
LogCBM CBMKit: services, conversation, turns, voice input, memory, topics, stats
LogCBMChat CBMKitChat: chat sources and filters
LogCBMBroadcast CBMKitBroadcast: ffmpeg output

Filter the Output Log by these names. To see more detail, use the engine console command Log LogCBM Verbose.

3.2 Conversation log

Item Value
Setting bWriteConversationLog (Project Settings > Plugins > CBM > Operator), default on
Folder <Project>/Saved/CBMKit/logs
File conversation_<YYYYMMDD>_<HHMMSS>.jsonl. One file per game session. The time is the local time when the first turn was written
Format JSON Lines: one JSON object per line, one line per finished turn. UTF-8 without BOM
Not written In commandlets

Fields of each line:

Field Meaning
turn Turn ID
time Turn start time, ISO 8601
speaker Name of the character that spoke
inputs Array of the inputs as the LLM saw them
system The system prompt. Written only when it differs from the previous line
messages History and the user message, role: content per message
image true when an image was sent
reply Model output with its tags
spoken Text that was spoken
emotions Array of emotion tags
actions Array of actions, name or name:value
seconds Turn length in seconds, 2 decimals
interrupted true when the turn was interrupted
error Error text. Present only when there was an error

In Blueprint, Get Conversation Log Path returns the file path (empty until the first turn is written). On Turn Logged gives the same data as an FCBMTurnRecord. The Developer Panel shows the same log.

3.3 Statistics files

The CBM Stats Subsystem writes CSV files to <Project>/Saved/CBMKit/stats. Get Stats Directory returns this path. Files are not written in commandlets, on a dedicated server, or with the -CBMNoStats command-line argument. All files are UTF-8 without BOM.

File Content
turns_<YYYY-MM-DD_HH-MM-SS>.csv One row per finished turn. One file per session
sessions.csv One row per session, added when the game ends normally
heartbeat.csv The current session row, rewritten every 30 seconds. Deleted at a normal end. If it exists at the next start, its row is added to sessions.csv as abnormal

Columns of turns_*.csv:

Column Meaning
time Local time the turn ended, HH:MM:SS
turn Turn ID
source voice, chat, donation, or system. voice when any input of the turn was voice
speaker Character name
inputs Number of voice, chat, and donation inputs in the turn
latency_s Seconds from the newest input to the first audio (text-only: the first sentence). Empty = not measured
queue_s Seconds the newest input waited before the turn started
first_token_s Seconds from turn start to the first LLM token
first_sentence_s Seconds from turn start to the first complete sentence
first_audio_s Seconds from turn start to the first audio
total_s Turn length in seconds
segments Sentences played
synced Sentences that started on time (within 0.2 s), moved the mouth, and had an emotion in the profile
text_only 1 = no TTS this turn
interrupted 1 = interrupted
failed 1 = not interrupted and no reply
input First 80 characters of the last input. For a system-only turn, its Platform (for example idle, event, greeting)

Columns of sessions.csv and heartbeat.csv:

Column Meaning
session Session start, YYYY-MM-DD_HH-MM-SS
end Time the row was written
ended normal or abnormal
session_s Session length in seconds
measured_s Seconds measured for uptime (after startup finished)
uptime_pct Percent of measured time in which every item of Get Health was up: LLM, TTS, STT (when voice input is on), and connected chat sources
turns, failed_turns Turn counts
voice_n, voice_avg_s, voice_max_s Voice input count, average and maximum seconds to the reply
chat_n, chat_avg_s, chat_max_s Same for chat and donation inputs
chat_dropped Chat and donation inputs removed from the queue
sync_n, sync_ok, sync_pct Sentences played, sentences in sync, percent
errors Conversation errors

3.4 Service logs

When a service runs as a separate process (backend HttpServer), its output is written to <Project>/Saved/Logs/LocalAI_<service>.log, where <service> is stt, llm, or tts. The file is replaced each time the service starts. Open the folder with Tools > CBM > Open Logs Folder in the editor. Services that run inside Unreal (InProcess) write to LogCBM in the normal Unreal log.

Logs of the LocalAI installer are in the logs folder of the LocalAI root (GETTING_STARTED.md).

4. Command-line arguments

Argument Effect
-CBMRunType=companion or -CBMRunType=broadcast Uses this run type instead of the Project Settings value. Not case-sensitive. An unknown value is ignored. Set Run Type or CBMKit.RunType drops it for the rest of the session
-CBMNoStats No statistics files (section 3.3). Counters in memory still work
-CBMGgmlBackend=vulkan, cuda, or cpu GPU backend of the LLM and STT that run inside Unreal. Replaces ggml_backend in <LocalAIRoot>/services.json. An unknown value writes a warning and uses Vulkan
-CBMVisionDump=<folder> Saves each automatically captured vision image as <folder>/turn<N>.jpg. For checking what the LLM sees
-culture=en or -culture=ko Engine argument. Sets the UI language of CBMKit windows, the loading screen, and the settings window. When Character Language is empty, the characters also use this language if prompts exist for it

Example:

UnrealEditor.exe "<Project>.uproject" -game -culture=en -CBMRunType=companion -CBMNoStats

Arguments such as -CBMTestRoot=, -CBMExternalMock=, and -CBMTTSDumpDir= are used only by the plugin's automation tests.

5. Settings reference

Project Settings > Plugins > CBM. These settings are not described in the other documents. The other settings are in GETTING_STARTED.md, COMPANION.md, and CHARACTERS.md.

Category Setting Default Meaning
LLM Temperature 0.8 LLM sampling temperature for conversation turns. Lower = more predictable replies
LLM MaxTokens 200 Maximum tokens of one reply
LLM MaxHistoryTurns 12 Turns kept in the history. The history holds twice this number of entries (inputs and replies)
Chat MaxPendingChat 30 Maximum Chat inputs in the queue. Over the limit, the chat input with the lowest priority is removed first, the oldest among equals. Removed inputs are counted as dropped
Chat ChatExpireSeconds 60 Chat and System inputs that wait longer are removed from the queue. 0 = never. Voice and Donation inputs do not expire
Memory MemoryMaxPromptChars 400 Characters of remembered text added to one turn. 0 = store only
Memory MemoryMaxPromptFacts 6 Maximum remembered facts added to one turn
Memory MemoryExtractEveryLines 16 Stored lines that start a fact extraction in the next quiet moment
Memory MemoryExtractIdleSeconds 4 Seconds without input and speech before extraction runs. New input cancels a running extraction
Memory MemoryMaxFactsPerCharacter 2000 Maximum stored facts per character
Operator bOpenOperatorPanel on Broadcast only: open the Operator Panel when the game starts or the run type changes to Broadcast
Operator bWriteConversationLog on Write the conversation log (section 3.2)
Topic bTopicPlanner on Use the LLM to split a topic into talking points and to summarize each step. Runs on the same LLM as the conversation
Topic TopicPlannerPoints 3 Talking points the planner makes, 1 to 8
Topic TopicPlannerMaxTokens 200 Maximum tokens of one planner answer
Topic TopicPlannerTimeoutSeconds 30 Seconds the topic waits for the planner before it continues without it
Topic TopicTurnGapSeconds 5 Quiet seconds after a turn before the topic starts the next one
Topic TopicSuggestPrefix !topic, !주제 Comma-separated prefixes. A chat message that starts with one (not case-sensitive) is kept as a topic suggestion and not answered. Empty = off
TTS TTSProviderName GenericHttp Provider used when TTSBackend is Provider
TTS TTSProviderConfig empty Provider config file. Empty = <LocalAIRoot>/providers/generic_http.json
TTS bTTSProviderFallback on When the provider is unavailable, use the local voice. Off = TTS fails

External API backends (Tools > CBM > AI Connections) are described in EXTERNAL_API.md.