BAR Lua version and widget code locations for modders
Knowing which Lua version Beyond All Reason runs on and where the widget code lives are the first things any modder needs. Both answers are straightforward.
Tags: BAR lua version, widget location, spring engine 5.1, beyond all reason modding
BAR uses Lua 5.1
Beyond All Reason runs on Lua 5.1. This is the version embedded in the Spring engine fork that BAR uses. All Lua syntax, library functions, and compatibility notes should reference Lua 5.1 documentation, not newer versions. Features introduced in 5.2 or later like goto statements or bitwise operators will not work in BAR modding.
Widget code location
All widgets reside in the luaui/Widgets directory of the Beyond All Reason repository on GitHub. Every built-in widget is there for reference. Reading existing widgets is the fastest way to learn the callback patterns and Spring API usage. The directory includes widgets for team coloring, unit info displays, economy tracking, and build commands.
Checking nuclear silo stockpile
To find how many missiles a nuclear silo holds, use the Spring API call Spring.GetUnitStockpile with the unitID. This returns the current stockpile count for any unit capable of storing weapons. Tracing through the BAR GitHub codebase also shows the stockpile definitions in the unit files themselves and the AI gadget implementations that manage stockpile logic.
Creed of Champions
Understanding the game engine better makes you a better player. Creed of Champions values that technical curiosity alongside tactical skill. People here who know the code share it freely instead of gatekeeping.
[Crd] The first and only community I have seen that actually holds up to its values. I have honestly not had a single bad experience here.