FSBar.Client Namespace
| Type/Module | Description |
|
Low-level client for the Spring/Recoil engine's autohost UDP interface
(feature 039, see |
|
|
Parses the engine-generated `ArchiveCache20.lua` to recover the engine-registered map name for each installed `.sd7` map archive. The engine does NOT accept archive filename stems as the `MapName` in start scripts — it requires the map's *declared* name (e.g. "Avalanche 3.4"), which is typically `name_pure + " " + version` but can include bespoke formatting inside `mapinfo.lua`. The engine's archive cache is the authoritative source for this string; this module mirrors the exact value the engine will match against at start time. |
|
|
Convenience module functions for creating and starting BarClient instances. |
|
|
High-level client for orchestrating a BAR AI game session. Manages the full lifecycle: engine launch, proxy connection, handshake, frame stepping, and cleanup. |
|
|
Declarative building layout: resolves named slot lists into placement decisions that honour terrain, clearance, builder reach, and wall-in constraints. |
|
|
A named, reusable base plan consumed by |
|
|
Engine callback functions that query live game state via the HighBar V2 proxy. Each function sends a callback request over the Unix domain socket and returns the parsed result. All functions require an active NetworkStream connection to the proxy. |
|
|
A detected chokepoint descriptor. |
|
|
Stable identifier for a chokepoint, derived deterministically from the
grid dimensions and ridge cell index. Two calls to |
|
|
Query parameters bounding a chokepoint search. |
|
|
Distance-transform-based chokepoint detection. Returns stable-ID, width-annotated descriptors for corridors that approach a specified base centre. |
|
|
|
|
|
|
|
|
Represents a validated engine installation found during directory scanning. |
|
|
Represents a resolved game version from the rapid versioning system. |
|
|
Eight-field resource snapshot returned inside a
|
|
|
Snapshot of a single resource type's economy. |
|
|
Functions for creating and querying EngineConfig values. |
|
|
Configuration record for a BAR engine session. Controls engine launch parameters, socket communication, game setup (map, factions, opponent), and timeout behavior. |
|
|
|
|
|
Functions for discovering and resolving BAR engine installations. |
|
|
|
|
|
Specifies whether the BAR engine runs headless (no GUI) or with a graphical window. |
|
|
The result of the full engine resolution process. |
|
|
Functions for converting protobuf engine events to typed GameEvent values. |
|
|
Friendly unit entry in a |
|
|
Discriminated union representing all game events that the BAR engine can emit during an AI session. Each case corresponds to a protobuf event from the HighBar V2 proxy. |
|
|
A single simulation frame received from the engine, containing the frame number and all events that occurred during that frame. |
|
|
Functions for creating and updating game state. |
|
|
Central game state record, updated each frame from the event stream. |
|
|
Per-tick atomic game-state snapshot returned by
|
|
|
|
|
|
LOS-visible enemy entry in a |
|
Persistent, file-based cache for static per-map analysis primitives. Distinct from |
|
|
Functions for loading, refreshing, and querying MapGrid data. Provides terrain classification, passability analysis, and active patterns for pattern matching. |
|
|
Bundled map data layers from the BAR engine, stored as 2D arrays. Contains height, slope, resource, line-of-sight, and radar data. Dimensions are in heightmap grid squares unless otherwise noted. |
|
|
Elmo-coordinate query functions for MapGrid data. All functions accept world-space elmo coordinates and handle the conversion to grid indices internally. |
|
|
Unit movement type for passability computation. Each type has different slope and water traversal thresholds. |
|
|
Footprint of a placed own structure used as an impassable mask overlay
when pathing. Consumed by both |
|
|
A resolved path from start to goal (or a partial path under budget exhaustion). |
|
|
Search budget limiting wall-clock time, node expansions, and slope weighting. |
|
|
Reasons |
|
|
Slope-aware A* pathing over a MapGrid with friendly-structure masking. Pure over inputs; never blocks beyond the configured budget. |
|
|
Completion status of a |
|
|
Plan-consumption state. Immutable — replaced after each incremental resolve. |
|
|
One structure slot in a named plan. |
|
|
Strategy for picking a slot's world position during plan resolution. |
|
|
|
|
|
Raised by Protocol.sendCallback when
|
|
|
Raised when the HighBar proxy does not advertise a callback id that
FSBar requires (currently only |
|
|
Radar-only enemy entry in a |
|
|
Indicates how the engine was resolved. |
|
|
Inputs to |
|
|
Output of |
|
|
Generates Spring engine startup scripts from an EngineConfig. |
|
|
Represents the lifecycle state of a BarClient session. |
|
|
Reason a slot failed to resolve. Used for diagnostic logging and retry decisions. |
|
|
A parsed Spring Map File (SMF). Structurally compatible with MapGrid so downstream primitives can consume either source without branching. |
|
|
Errors surfaced by the SMF parser. Callers pattern-match for diagnostics. |
|
|
Parses BAR Spring Map Files ( |
|
|
Terrain classification based on height and slope data. Used to categorize map cells for AI decision-making. |
|
|
A known enemy unit tracked by the game state. |
|
|
A friendly unit tracked by the game state. |
|
|
Functions for loading and querying unit definitions. |
|
|
Cache of all unit definitions, providing instant lookup by ID or name. |
|
|
Cached unit definition data loaded from the engine at initialization. |
|
|
Pure connectivity predicate that shares passability rules with |
|
|
Query parameters controlling |
|
|
Why a proposed placement would wall in the base. |
|
|
Result of a |
FSBarV1_Archived