Logo FSBarV1_Archived

ScriptGenerator Module

Generates Spring engine startup scripts from an EngineConfig.

Functions and values

Function or value Description

generate config

Full Usage: generate config

Parameters:
    config : EngineConfig - The engine configuration specifying map, factions, socket path, and opponent AI.

Returns: string A complete TDF-format script string ready to be written to disk for engine launch.

Generates a Spring engine TDF-format startup script that configures a two-team game with the HighBar V2 AI proxy on team 0 and the specified opponent AI on team 1. The script includes mod options for faction selection, game speed, and debug commands.

config : EngineConfig

The engine configuration specifying map, factions, socket path, and opponent AI.

Returns: string

A complete TDF-format script string ready to be written to disk for engine launch.

generateSpringSettings config

Full Usage: generateSpringSettings config

Parameters:
Returns: string A complete springsettings.cfg text body (each entry terminated by \n).

Generates the contents of springsettings.cfg for a session. Always forces windowed mode (Fullscreen=0, XResolution=1280, YResolution=720). When config.AutohostPort = Some p, also emits AutohostIP=127.0.0.1 and AutohostPort=p so the engine dials back to the hub-bound UDP socket (feature 039). When config.AutohostPort = None, neither autohost line appears.

config : EngineConfig

The engine configuration.

Returns: string

A complete springsettings.cfg text body (each entry terminated by \n).

Type something to start searching.