Modding unit definitions in BAR requires knowing which customParams exist, how to duplicate and modify units, and where to look when documentation comes up short. Here is the practical path.
A common modding task is creating a new unit based on an existing one. The correct approach uses table.copy to clone the source unit, then modifies only the fields that need changing.
A real working example: duplicating the Corscreamer into a modified version involves copying the original UnitDef, setting the customParams i18nFromUnit to point back at the source unit for localization, and adjusting properties like maxWaterDepth or build options. Without the i18nFromUnit customParam, the new unit shows blank or broken strings in the build menu.
A direct question with an unsatisfying answer: no centralized document lists every customParam used across BAR unitdefs. The customParams field accepts arbitrary keys, and different gadgets read different ones. No single file catalogs them all.
The practical approach is filtering by gadget in the BAR repository. Search each gadget file for customParams. references to find which params that gadget reads. For unitdef-specific params, the gadgets directory and tweak units code are the primary sources. This is tedious but accurate.
Players sometimes ask for mods that restrict building to specific unit types, like an air-only lobby. These exist as custom game configurations and work through buildOptions manipulation. By clearing the buildOptions table on certain unit categories and leaving others intact, a lobby can enforce a unit-type restriction.
Such mods require tweaking both the commander build menu and factory build menus, since players can access unit production through multiple paths. The most air-only restricts need to account for air commanders, air factories, and any units with mobile build capability.
When copying unitdefs, the most frequent errors include:
Omitting the table.copy call and assigning the reference directly, which causes changes to affect both units. Both unit entries point at the same table without an explicit copy.
Forgetting to set i18nFromUnit in customParams, which breaks the localized display name in the build menu.
Leaving buildOptions pointing to the original unit's set, which gives the new unit a build menu that does not match its intended role.
Use table.copy, set i18nFromUnit, and check customParams in the relevant gadget files. No shortcut exists for the documentation gap, but filtering the repo by gadget gets the right answers, eventually. Learning the right workflow means spending less time guessing and more time building.
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.