Practical BAR Modding Notes from Modding-0120

Using !bset tweak commands, LuaHandle API limits, and the reality of adding new units in tweakdefs.

Tags: modding, tweakdefs, !bset, unitdefs

Adding new units via UnitDefs has limits

UnitDefs can insert new units into the unit table, but the results are partial. New units lack entries in the language file, meaning they display as raw internal names on the HUD. Custom models cannot be added through tweakdefs, including texture swaps. Animation files between different units are rarely compatible.

Tweakdefs works well for modifying existing units. Adding truly new content requires deeper integration into the game files.

Available APIs for widget development

Widget developers who assume only BAR-specific files provide available API calls miss the broader Spring RTS ecosystem. The LuaHandle documentation at beyond-all-reason.github.io/spring/ldoc/modules/LuaHandle.html lists every available call. This includes engine-level functions not specific to BAR widgets.

Check the full LuaHandle reference before deciding a feature is impossible.

Using !bset tweak commands in lobbies

BAR lobby tweak commands use the !bset prefix followed by a tweak slot and an encoded value. Common examples include !bset tweakunits 1 for the first tweakunits slot. The value must be properly encoded for the target tweak type.

Players who discover the tweak limit and need multiple tweak sections should use separate slots with sequential numbering. Each !bset command targets a distinct slot, spreading modifications across multiple entries.

Faction-specific unit modifications

Units tied to specific factions require either naming convention filtering or faction ID checks. The three-faction structure in BAR means bulk modifications should account for faction boundaries. Modders who want to change all units within one faction use prefix matching on the unit name string.

Watch BAR gameplay on the official YouTube channel to see how faction balance works in practice.

Creed of Champions

Knowing what the game can and cannot do through modification prevents wasted effort. Communities that share this knowledge help everyone work smarter.

One of the few places where you can for sure coordinate with people in matches with a good supportive attitude. Everybody tends to be understanding and constructive.
Advertisement