How to use base64 tweakunits to limit units in BAR lobbies

Setting unit limits for custom BAR matches requires encoding a Lua table in base64 and pasting it into the lobby advanced options. Here is the exact process.

Tags: BAR tweakunits, base64 encoding, unit limits, custom game modes, beyond all reason

Why tweakunits needs base64

The lobby advanced options panel accepts tweakunit definitions as base64-encoded Lua tables. This lets you disable specific units, set max counts, or override properties without distributing a separate mod file.

Step-by-step process

First, find the internal unit names. The unit definition file lives in the Beyond All Reason repository at language/en/units.json. You need the internal names like dwagon or tyran, not the display names.

Build a Lua table with the structure you want. The most common pattern is setting maxthisunit to zero for units you want to ban entirely. Each unit gets its own entry inside the enclosing braces.

A working example looks like this: lua { dwagon = { maxthisunit = 0 }, tyran = { maxthisunit = 0 }, }

Encode that string using any base64 encoder. After encoding, remove any trailing equals signs from the result. The lobby parser does not expect them.

Paste the cleaned base64 string into advanced options under cheats and tweakunits. The lobby will apply your unit limits on game start.

Banning multiple units at once

Duplicate the unit entry pattern for every unit you want to restrict. Each entry needs its own nested table with the property you are changing. The structure stays the same regardless of how many units you list.

Keep the entire Lua table as a single string before encoding. Adding line breaks inside the table before encoding can cause parsing errors.

Common pitfalls

The engine previously distinguished between engine names and game names in tweak configurations. Use the current game internal names from units.json rather than legacy identifiers. If a tweak does not apply to a simple unit like a pawn, verify that the unit name matches the current game definition exactly.

Property names have also shifted in past releases. When in doubt, check the changelog for the engine version you are running. Properties like energyUpkeep replaced older naming conventions.

Quick reference

Creed of Champions

Custom game modes are a great way to experiment and learn BAR mechanics without pressure. Creed of Champions runs a structured environment where players of all skill levels can practice, compete, and improve together. The focus stays on teamwork, respectful communication, and steady progression.

[Crd] 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.

Whether you are running a max-unit chaos lobby or drilling build orders, having teammates who share the commitment to improvement makes every match better.