Skip to content

Class UTryllRuntimeSettings

ClassList > UTryllRuntimeSettings

More...

  • #include <TryllRuntimeSettings.h>

Inherits the following classes: UDeveloperSettings

Public Attributes

Type Name
int32 ConnectMaxAttempts = 20
float ConnectRetryDelaySeconds = 1.0f
double ConnectionReadyTimeoutSeconds = 10.0
ETryllInferenceEngine EmbeddingEngine = ETryllInferenceEngine::Mock
ETryllInferenceEngine Engine = ETryllInferenceEngine::LlamaCpp
FString GameName
EServerBuildVariant ServerBuildVariant = EServerBuildVariant::Default
int32 ServerPort = 9100
double ServerReadinessTimeoutSeconds = 5.0
FString StorageDataFolder
ETryllInferenceEngine SttEngine = ETryllInferenceEngine::Mock
ETryllInferenceEngine TtsEngine = ETryllInferenceEngine::Mock
bool bAutoConnect = true
bool bAutoCreateSession = true
bool bAutoLaunchServer = true
bool bEnablePlayModeModelGuard = true

Public Functions

Type Name
virtual FName GetCategoryName () override const
FString ResolveStorageDataFolderForServer () const

Public Static Functions

Type Name
FString GetConfiguredStorageDataFolder ()
FString GetStorageRootAbsolute ()
bool MakePathRelativeToStorageRoot (const FString & AbsoluteFilePath, FString & OutRelativePath)
FString NormalizeStorageRelativePath (const FString & RelativePath)
FString ResolveStorageDataFolderForServer (const FString & ConfiguredFolder)

Detailed Description

Project-level settings for the Tryll Client plugin. Edit in Project Settings → Plugins → Tryll Client. Persisted to <YourProject>/Config/DefaultGame.ini under [/Script/TryllClient.TryllRuntimeSettings].

Public Attributes Documentation

variable ConnectMaxAttempts

int32 UTryllRuntimeSettings::ConnectMaxAttempts;

Max number of attempts when establishing a session via UTryllSubsystem::Connect. 1 disables retry. The first call counts as attempt 1.

Sized as a cold-start backstop: after the launcher hands off a still-warming server (see ServerReadinessTimeoutSeconds), the worker retries connect+hello until the server is ready. ConnectMaxAttempts x (ConnectionReadyTimeoutSeconds + ConnectRetryDelaySeconds) must comfortably exceed a realistic cold start; it then bounds the failure (a clear error) instead of retrying forever.


variable ConnectRetryDelaySeconds

float UTryllRuntimeSettings::ConnectRetryDelaySeconds;

Constant delay between connect attempts.


variable ConnectionReadyTimeoutSeconds

double UTryllRuntimeSettings::ConnectionReadyTimeoutSeconds;

Per-attempt bound on how long the connection worker waits for the server's ConnectionReady hello after the TCP connect succeeds. Without this the read was unbounded: a server that accepts the socket but has not finished starting (cold-start "ConnectionReady-late") would hang the worker forever. On timeout the worker reports ConnectFailed, which consumes one attempt and re-drives the connect via the retry budget above.


variable EmbeddingEngine

ETryllInferenceEngine UTryllRuntimeSettings::EmbeddingEngine;

Embedding backend for string-storage / RAG nodes.


variable Engine

ETryllInferenceEngine UTryllRuntimeSettings::Engine;

LLM inference backend for generate / tool-call nodes.


variable GameName

FString UTryllRuntimeSettings::GameName;

Integration identifier sent to the server on every session for telemetry grouping. Use a short, stable, lowercase slug — e.g. "my-game" or "tryll-roleplay-demo". Leave empty to omit (server defaults to "unknown" when telemetry is enabled).


variable ServerBuildVariant

EServerBuildVariant UTryllRuntimeSettings::ServerBuildVariant;

Which bundled server build to launch. Only honored when both Default and Release variants are present; otherwise the single present variant is always used. The editor hides this unless both resolve.


variable ServerPort

int32 UTryllRuntimeSettings::ServerPort;

Known port for the shared editor server. Every in-editor launcher (PIE, the chat panel, the model manager panel) probes this port before spawning and reuses whatever it finds there, so one warm server survives across PIE sessions and multiple open tool windows instead of each spawning its own. Packaged/player builds ignore this and always pick a free ephemeral port.


variable ServerReadinessTimeoutSeconds

double UTryllRuntimeSettings::ServerReadinessTimeoutSeconds;

Seconds the launcher waits synchronously for a freshly spawned server's port to start accepting before it stops blocking the game thread and hands off to the asynchronous connect path. Kept short deliberately: a cold start (DLL paging + first-run antivirus scan of the freshly built exe) can take much longer, and the server is warming, not dead — so on timeout the launcher no longer kills it; the connection worker keeps retrying (see ConnectMaxAttempts) until the server is ready.


variable StorageDataFolder

FString UTryllRuntimeSettings::StorageDataFolder;

Project-relative folder that node storage paths (string / embedded string storages, voice hotwords) resolve against for this session.

Stored relative to the Unreal project directory in editor builds (e.g. "Content/TryllStringStorages") and relative to the packaged game directory in shipping builds. ResolveStorageDataFolderForServer() converts this to an absolute path before CreateSession sends it on the wire.

Leave empty to use the server's configured storage root. Relative paths in node params resolve against the resolved folder; paths that escape it are rejected.


variable SttEngine

ETryllInferenceEngine UTryllRuntimeSettings::SttEngine;

Speech-to-text backend. Set to SherpaOnnx to use voice input.


variable TtsEngine

ETryllInferenceEngine UTryllRuntimeSettings::TtsEngine;

Text-to-speech backend. Set to SherpaOnnx to use spoken replies.


variable bAutoConnect

bool UTryllRuntimeSettings::bAutoConnect;

Connect to the server automatically once the subsystem initializes. The built-in connect-retry (ConnectMaxAttempts / ConnectRetryDelaySeconds) covers the brief window while the launched server comes up. Turn off to call Connect() yourself (e.g. from a loading screen).


variable bAutoCreateSession

bool UTryllRuntimeSettings::bAutoCreateSession;

Configure the session automatically once connected, using the engine fields below. Mirrors bAutoLaunchServer, but for session setup: leave on for the simple "it just works" path; turn off to configure the session yourself (e.g. during a loading screen, or to run multiple sessions with different engines).


variable bAutoLaunchServer

bool UTryllRuntimeSettings::bAutoLaunchServer;

Spawn the bundled tryll_server.exe on Initialize. Set false to run a server yourself.


variable bEnablePlayModeModelGuard

bool UTryllRuntimeSettings::bEnablePlayModeModelGuard;

Editor-only. When true (default), the Play-In-Editor model guard verifies that every registered required model is downloaded before Play starts — it briefly vetoes Play, connects to the server, downloads anything missing (with a progress toast), then resumes Play automatically. Turn this off to enter Play immediately with no pre-flight check (e.g. when you provision models yourself, or to bypass the guard while debugging). No effect in packaged builds, where the guard does not exist.


Public Functions Documentation

function GetCategoryName

inline virtual FName UTryllRuntimeSettings::GetCategoryName () override const

function ResolveStorageDataFolderForServer [1/2]

inline FString UTryllRuntimeSettings::ResolveStorageDataFolderForServer () const

Absolute storage root for CreateSession, or empty when StorageDataFolder is unset.


Public Static Functions Documentation

function GetConfiguredStorageDataFolder

static FString UTryllRuntimeSettings::GetConfiguredStorageDataFolder () 

Configured StorageDataFolder from DefaultGame.ini (preferred) or the settings CDO.


function GetStorageRootAbsolute

static FString UTryllRuntimeSettings::GetStorageRootAbsolute () 

Absolute storage root for editor file picking; project dir when unset.


function MakePathRelativeToStorageRoot

static bool UTryllRuntimeSettings::MakePathRelativeToStorageRoot (
    const FString & AbsoluteFilePath,
    FString & OutRelativePath
) 

Picked absolute file → path relative to the resolved storage root (forward slashes).


function NormalizeStorageRelativePath

static FString UTryllRuntimeSettings::NormalizeStorageRelativePath (
    const FString & RelativePath
) 

Strips accidental parent-folder prefixes (e.g. "StringStorages/RAG/x" when the storage root is already Content/StringStorages). Paths are relative to storage_root.


function ResolveStorageDataFolderForServer [2/2]

static FString UTryllRuntimeSettings::ResolveStorageDataFolderForServer (
    const FString & ConfiguredFolder
) 

Project/game-relative configured folder → absolute path for the server.



The documentation for this class was generated from the following file C:/_tryll/_monorepo3/tryll/clients/unreal/Source/TryllClient/Public/TryllRuntimeSettings.h