Manual weapon fire and stockpile limits in BAR mods

How to configure manual weapon firing, stockpile limits, and BARB settings in Beyond All Reason mods.

Manual weapon control via commandFire

Beyond All Reason exposes two fields for manual weapon control. The weapon definition field commandFire determines whether a weapon can be manually targeted and fired. The unit definition field canManualFire governs whether the unit responds to manual fire orders at all.

These fields work together. A weapon needs commandFire enabled, and the unit carrying it needs canManualFire set to true. When only one side is configured, the weapon appears in the UI but does not respond to fire commands, or the unit receives fire orders but its weapons remain on auto-targeting. Setting both correctly gives modders full manual control over unit armaments.

Stockpile limits through customParams

Stockpile-capable weapons draw their ammunition limit from the unit customParams field stockpileLimit. The reference implementation lives in unit_stockpile_limit.lua, which reads this parameter and enforces the cap during gameplay. Modders can set a custom stockpile limit by adding stockpileLimit to the unit customParams table in a tweakUnits override.

This approach works for both increasing and decreasing the stockpile capacity of existing units. Testing in skirmish mode with a controlled unit confirms the new limit before deploying the tweak to multiplayer matches.

BARB settings require host control

BARB (Beyond All Reason Bot) settings must be configured by the lobby host. The reason is architectural: BARB runs as a LuaAI gadget on every player computer simultaneously. The host commands propagate through the gadget system, and only the host has the authority to change BARB parameters mid-lobby.

Modders writing custom bot behaviors need to account for this host-only restriction. Client-side changes to BARB settings silently fail because the gadget network only accepts authoritative input from the host machine.

Creed of champions

"One of the few places where you can for sure coordinate with people in matches with a good supportive attitude." \u2014 Creed of Champions community member

Testing custom weapon settings and stockpile limits works best in coordinated matches. The Creed of Champions lobby provides an environment where players understand the purpose of modded gameplay and provide useful feedback on weapon behavior changes.