A focused guide to BAR widgets you can install, common pitfalls with lua customparams and modded lobbies, and what is worth spending time on versus what to skip.
Tags: widgets, modding, lua, beginner guide, beyond all reason
When building any widget or tweak, the most reliable hook is iscommander = true inside the unitdefs customparams table. This flag exists on every commander unit and survives mod changes better than hard-coding unit IDs. If you want a widget to target commanders, iterate through UnitDefs with pairs() and check that flag. Direct index access does not work on nested tables.
Anyone adding a new commander mod can drop that same tag in. This approach future-proofs your widget against balance patches that rename or reassign commander definitions.
BAR builds on the Spring RTS engine, and the lua structure matters when widgets act up. There are three distinct layers:
Writing a widget inside LuaGaia was technically possible at one point, but should not be done. LuaUI is the correct place for any widget a player installs. Mixing layers causes desync errors and broken behavior that looks like a game bug when it is just a modding mistake.
Playing modded matches with !bset tweak commands is common, but several patterns cause avoidable desyncs:
If a modded lobby produces a sync error, the first step is testing the same scenario without any mods loaded. If it still breaks, the issue sits in the base game and warrants a support report. If it only breaks with mods, collect the active tweakdefs and modoptions before reporting. That saves hours of back-and-forth guessing.
Useful widgets for most players:
Widgets to skip unless you are modding:
BAR ships with a widget directory inside the game folder. Custom widgets go in your Spring content area under the widgets subdirectory. Enable them through the in-game widget list accessible during a match or from the skirmish menu. Disable anything you are not using — active widgets consume memory even if they do nothing visible on screen.
When a widget throws lua errors, check the infolog file in your Spring directory. The traceback usually shows which line and which table access failed. Most widget errors come from missing unitdefs after a game update.
Learning BAR widgets and mods is way easier in a community that does not tear you down for experimenting. Creed of Champions is a friendly, low-drama space where players tinker, share findings, and help each other troubleshoot without the usual grief. Clean information and patient learning habits lift the whole team.
[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."