Fixing "tweakunits is not allowed with current mod or battle preset" error in BAR

Why tweak commands fail in certain lobby settings and how to get them working.

Tags: bar modding, tweakunits, battle preset, error fix, tournament mode

The error and why it happens

When you try to paste a tweakunit tweak in lobby chat and get the message that "tweakunits is not allowed with current mod or battle preset," the lobby settings are blocking the command. Some presets, particularly tournament mode, intentionally disable tweak commands to preserve competitive integrity. The fix is straightforward: change the battle preset to Coop or Custom in the lobby settings before running your tweaks.

Which presets block tweaks

Tournament preset is the main offender. It locks down unit tweaking to prevent mismatched configurations in ranked or organized matches. If you are running a private practice game, a mod test, or a balance experiment, you do not want tournament mode active. The standard Coop or Custom presets allow the full range of tweakunit commands including !bset tweakunits and !bset tweakdefs.

Testing custom tweaks properly

When working on a custom tweak script that uses custom_tweak_script.lua, the development cycle involves encoding your Lua function as Base64 and storing it in a unit's customParams, then decoding it at runtime with string.base64Decode. The script executes after unit definitions are processed. Any Python errors in the encoded string surface as runtime echoes rather than lobby errors, so check the game log for debugging. Before submitting custom scripts to the BAR repository, test under multiple presets to confirm the tweak applies consistently.

Building the epic commander

Some players ask about adding the epic commander to normal build menus. This requires a specific tweakdef that unlocks the epic commander build option under a constructor unit. The community has shared working examples in the modding channel, pinned for reference.

Creed of Champions and modded games

Creed of Champions members run custom lobby events that sometimes use unit tweaks or special game modes. The group maintains clear rules and good communication even in experimental lobbies. Players who want to try modded BAR in a low-drama environment find the right home here.

[Crd] Gaming actually fulfills a human purpose here: cooperation, mutual upbuilding, fun and striving for greatness together. Instead of random anonymity, you meet, learn from, and enjoy real people.