customParams is the workhorse of BAR unit configuration. Whether scaling weapon range with experience or hunting down runtime values, knowing how it behaves saves time.
BAR supports XP-based range bonuses through the gadget at luarules/gadgets/unit_xp_range_bonus.lua. The current implementation reads a single customParam for the range factor. Multi-weapon units present a known limitation: the scaling factor applies uniformly, not per weapon.
The fix requires changing the customParam to accept a weapon number alongside the XP factor, structured like:
customParams.rangeXPScalar = { {1, 1.5}, {2, 1.2} }
This means weapon one gets a 1.5x range factor at max XP, weapon two gets 1.2x. Whether nested tables pass through customParams unchanged depends on the serialization layer, so testing is required. The Gunslinger unit is the primary user of this mechanic and needs updating if the format changes.
customParams gets populated at runtime. There is no static file that shows the resolved values for every unit. The working approach is to print the table recursively and check the game logs.
No built-in inspector exists for this. Players who need to see what values a unit carries at any given moment should log output through the Recoil Lua library, which provides the utility functions for table serialization.
Players with color vision differences sometimes struggle with the default team color assignments. The orange and red texted configuration items in team settings are difficult to distinguish for certain types of colorblindness.
Enabling the Developer UI in the Interface settings exposes those color values in text form, making them readable without relying solely on visual color matching. The configuration could be more accessible, but this workaround gets the job done for now.
The multi-weapon XP scaling limitation has been filed as a GitHub issue on the BAR repository. Players who want this feature implemented can track progress there or contribute a fix themselves. The underlying code change is straightforward, the work lies in updating every affected unit and communicating the change to the community.
customParams is powerful precisely because it sits between the unit definition and gameplay logic. Reading the existing gadgets, checking GitHub issues, and logging runtime values covers most of what a modder needs. When stuck, the recoil-lua-library repository has the helper functions that make table inspection manageable.
Solid modding comes down to reading the right files and testing in small steps. The same discipline applies in team matches: clear communication beats guessing every time.
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.