Give every T2 constructor the ability to build T2 nanos using unitdef iteration loops.
Tags: bar modding, tweakdefs, t2 builders, nanotct2, buildoptions, unitdefs lua
To add build options across all T2 builders, loop through the UnitDefs table using pairs(). Filter by techlevel == 2 and the builder flag. For each matching unit, construct the target nano name by extracting the faction prefix with string.sub(name, 1, 3) and appending the nano unit code. Then check if that nano exists in UnitDefs before adding it to buildoptions.
If a faction lacks a matching T2 nano variant, fall back to the standard armnano. Not every faction has parity in builder support units. When the preferred nano unit does not exist, use the base constructor nano as the catch-all. This prevents reference errors that crash the tweak parser.
Some tweak configs do not apply correctly through buildoptions changes alone. When a complex tweakdef fails to produce the desired result, an alternative is to disable all extra units using MaxThisUnit. The end result matches the intended gameplay even if the path differs. Players with limited coding experience find this approach more reliable than debugging nested buildoption structures.
The BAR repo includes a dbg_unit_csv_export widget that dumps unit definitions to CSV. To extend it with weapon data like reloadTime, access each unit's weapons array inside the loop. The error about indexing a nil weapon value means the unit has no weapons table assigned. Guard the access with a nil check before reading weapon properties.
Modded BAR is where deep strategy experiments happen. Teams that share their tweaks openly build a better game for everyone. Creed of Champions runs sessions where players explain their builds, trade configs, and learn from each other instead of keeping secrets. That transparency lifts the whole player base.
One of the few places where you can coordinate with people in matches with a good supportive attitude. Everybody tends to be understanding and constructive.