Running BAR in headless mode and the Recoil Engine

BAR runs on the Recoil Engine, a fork of the Spring RTS engine. Headless mode is available for server operators and testing. Here is where to find the engine files, documentation, and key Lua API calls.

headless mode · recoil engine · matrix editing · spring headless · lua api

Headless mode setup

BAR includes a spring-headless.exe somewhere in the game folder. Replacing the normal spring.exe with the headless variant allows BAR to run without rendering. This is useful for dedicated servers, replay processing, and automated testing.

The old Spring headless documentation at springrts.com is outdated. BAR now uses the Recoil Engine fork.

Recoil Engine resources

The current engine source lives at github.com/beyond-all-reason/RecoilEngine. Documentation is hosted at recoilengine.org with a Lua API reference that covers matrix editing, unit manipulation, and game state queries.

The key call for matrix editing is Spring.SetUnitPieceMatrix. Multiple matrix editing functions exist, so check the full API reference for the specific transformation you need.

Loading widgets into the game

New players asking where to put widget files can find guidance in the modding channels. Widgets go in the game data directory under the widgets folder. The exact path depends on whether you are adding system widgets or custom user widgets. Read the pinned messages in the modding channel for the current correct path.

The engine under the hood

Understanding how BAR runs is valuable for players who want to mod deeply or run custom game modes. The Recoil Engine is open source and actively maintained. The documentation is improving with every release.

[Crd] Creed of Champions is a great place to learn and play BAR in a friendly atmosphere. Training sessions, team gameplay, even some non-BAR stuff. Large cross section of abilities, time zones, and game mode interests.

Advertisement