Editing Unit CustomParams in BAR: tweakUnits Syntax and Examples

Change unit parameters like stockpile limits through tweakUnits. Here is the exact syntax and where to find more working examples.

Tags: modding · tweakunits · customparams · beyond all reason

customParams Through tweakUnits

Modifying unit parameters like the Juno silo stockpile max uses the customParams block inside tweakUnits. The syntax follows a nested table structure targeting the unit definition name.

To change the arm silo stockpile limit to 5:

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

This goes into your tweakUnits configuration and adjusts the parameter at runtime. The same pattern works for other units with customparams: reference the unit name, drill into customParams, and set the value you need.

Finding Working Parameter Names

The challenge is knowing which customParam keys a unit actually accepts. Read the unit definition file on the Beyond-All-Reason GitHub repository to see available customParams for any unit. The Lua source files list every parameter the unit gadget reads.

If a tweakUnits entry does not work as expected, post the exact syntax you tried in the community Discord. People with working scripts usually share what they have.

Building and Playtesting Mods p2p

You can develop BAR mods independently and playtest them through SkyLobby in peer-to-peer mode. Nothing blocks someone from working on something cool that depends on BAR and running it through SkyLobby for multiplayer testing. Several Recoil games get playtested this way before being shared more widely.

Creed of Champions

Clear information and clean execution help teams improve. When modders share working tweakUnits snippets, everyone saves time and avoids the same dead ends.

"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."

Advertisement