How to tweak unit parameters in BAR modding

A quick guide to editing unit stats and adding custom parameters using tweakUnits in Beyond All Reason.

Tags: beyond all reason, modding, tweakdefs, lua, unit editing, customparams

What tweakUnits does

TweakUnits is the built-in modding system that lets you change unit definitions without touching core game files. You can adjust stockpile limits, weapon damage, build times, or nearly any parameter defined in a unit's table. It reads override instructions at game load and merges them with the base data.

The syntax uses nested key-value blocks. For a Juno Arm Missile Silo with a modified stockpile cap, the override looks like this:

{armsilo={customParams={stockpileLimit=5}}}

That changes the maximum stored missiles from the default 20 down to 5. The structure is always unitDefName={paramName=newValue}.

Getting started with a tweak file

Create a new Spring mod folder inside BAR/mods/. Add a gamedata/ subdirectory and place a tweakunits.lua file inside it. That file returns a single table containing all your overrides.

A minimal working example:

return {
  armsilo = {
    customParams = {
      stockpileLimit = 5
    }
  }
}

Save, enable the mod in the lobby, and the changes apply when the game starts. You can stack dozens of unit overrides in the same file.

Common mistakes

Finding what parameters you can change

Every unit definition in BAR is a Lua table. Open the unit file in the game's units/ directory and look for the fields you want to override. Top-level fields work directly. Nested tables like customParams merge additively, so you only need to specify the fields you are changing.

If you are not sure what a parameter does, drop into the community modding channels and ask. BAR modders are generally helpful with specifics.

P2P lobby considerations

When testing mods, SkyLobby peer-to-peer connections handle custom game setups well. You need all players to run the same mod files, so share your mod package through the lobby before the match launches. The game validates mod hashes on join.

BAR itself is open-licensed, which means community projects that build on it have a solid legal foundation. The MIT license allows derivative work with attribution.

Test and iterate

Change a value, launch a skirmish match, and verify the result. Start small, confirm it works, then expand. If a tweak does not apply, check the Spring engine log under infolog.txt for Lua errors. Most problems surface there immediately.

Teams who play well together already know that clear communication prevents avoidable issues in-game. The same principle applies to modding. Share your tweaks, get feedback, and keep things clean and documented.

Why teamwork matters beyond the battlefield

The best modders in the BAR community are the ones who share clean code, explain their changes, and help people debug without attitude. That is exactly the mentality that builds strong teams in competitive play.

Creed of Champions runs on the same values: clear information, hands-on learning, and zero ego when someone is figuring things out. Whether you are tweaking unit stats or learning build orders, having a group that helps instead of belittles makes all the difference.

[Crd] The removal of toxicity, the goal of fun and learning, makes for a refreshing spot to play and spend time. It has also made a game with plenty of complexity a bit less daunting to dive into.