BAR tweakdefs and Base64 encoding: a practical guide
Lobby tweaks in BAR rely on Base64-encoded strings. Getting the encoding wrong breaks the entire tweak string. Here is how to encode correctly, common pitfalls, and the difference between tweakunits and tweakdefs.
URL-safe Base64 is required
BAR tweak strings need URL-safe Base64 encoding. A standard Base64 encoder will produce strings that fail silently. Make sure the encoding mode is set to URL-safe before generating anything. Also remove any trailing padding characters at the end of the encoded string. Those equals signs will break the tweak.
Tweakunits versus tweakdefs
The distinction matters:
- Tweakunits modify individual unit properties — health, cost, build time, weapon damage. Changes apply to specific named units.
- Tweakdefs modify global game definitions — mod options, presets, system-level behavior. Changes apply across the entire match.
Pick the right tool before you start encoding.
Changing wind turbines to fixed energy output
Wind turbines use the windgenerator parameter for variable output tied to map wind settings. To get a fixed output instead, remove the wind parameters entirely and add energymake. Setting windgenerator to 0 without adding energymake produces zero output, which is almost certainly not the intended result.
Encoding mistakes are the top tweak failure
The most common reason a tweak does nothing in the lobby is bad encoding. Double-check that you are using URL-safe mode and removed padding. If the tweak still does not apply, verify the structure of the JSON or data you are encoding, not the encoding itself.
[Crd] Before discovering Creed, I was thinking the only thing that separates BAR from the perfect RTS is a friendly and safe social environment for new players to learn and feel included.