Logo FSBarV1_Archived

EngineConfig Type

Configuration record for a BAR engine session. Controls engine launch parameters, socket communication, game setup (map, factions, opponent), and timeout behavior.

Record fields

Record Field Description

AppImagePath

Full Usage: AppImagePath

Field type: string

Path to the BAR AppImage used for graphical mode launches.

Field type: string

AutohostPort

Full Usage: AutohostPort

Field type: int option

Loopback UDP port the hub pre-bound for the engine's autohost interface (feature 039, see specs/039-hub-admin-channel/data-model.md §5). When Some p, ScriptGenerator emits AutohostIP = 127.0.0.1 and AutohostPort = p into the per-session springsettings.cfg. When None, the admin channel is not configured for this session (legacy launch path).

Field type: int option

DeathMode

Full Usage: DeathMode

Field type: string

Value rendered for the deathmode modoption in the start script. Defaults to "com" so matches end when the enemy commander dies — required by the trainer to produce a win outcome. Use "neverend" for long-running sessions without termination.

Field type: string

EngineBin

Full Usage: EngineBin

Field type: string

Executable name or path for the engine binary (e.g., "spring-headless").

Field type: string

GameSpeed

Full Usage: GameSpeed

Field type: int

Game speed multiplier. Higher values run the simulation faster (e.g., 100 for 100x speed).

Field type: int

GameType

Full Usage: GameType

Field type: string

Game type identifier including version (e.g., "Beyond All Reason test-29840-d9b7dba").

Field type: string

MapName

Full Usage: MapName

Field type: string

Name of the BAR map to load (e.g., "Red Rock Desert v2").

Field type: string

Mode

Full Usage: Mode

Field type: EngineMode

Whether to launch the engine in headless or graphical mode.

Field type: EngineMode

OpponentAI

Full Usage: OpponentAI

Field type: string

Name of the opponent AI to play against (e.g., "NullAI").

Field type: string

OpponentAIOptions

Full Usage: OpponentAIOptions

Field type: Map<string, string>

Key/value options forwarded to the opponent AI via the [AI1].[OPTIONS] block in the start script. When empty (the default), no [OPTIONS] block is emitted so existing scripts remain unchanged. Used to pass BARb difficulty profiles (e.g. [ "profile", "easy" ]) or other opponent-specific settings.

Field type: Map<string, string>

OpponentSide

Full Usage: OpponentSide

Field type: string

Faction for the opponent team (e.g., "Cortex").

Field type: string

OurSide

Full Usage: OurSide

Field type: string

Faction for our AI team (e.g., "Armada").

Field type: string

ReadTimeoutMs

Full Usage: ReadTimeoutMs

Field type: int option

Optional override for the socket read timeout in milliseconds. When None, falls back to the FSBAR_CLIENT_TIMEOUT_MS environment variable or a 10 000 ms default.

Field type: int option

SocketPath

Full Usage: SocketPath

Field type: string

Filesystem path for the Unix domain socket used to communicate with the HighBar V2 proxy.

Field type: string

SpringDataDir

Full Usage: SpringDataDir

Field type: string option

Optional override for the Spring data directory. When None, the engine default is used.

Field type: string option

TimeoutMs

Full Usage: TimeoutMs

Field type: int

Timeout in milliseconds for the initial socket connection accept.

Field type: int

Type something to start searching.