Using !bset tweak commands in BAR lobbies without breaking things

How to change game values through lobby commands, Base64 encoding pitfalls, and building influence widgets that do not melt your CPU.

Tags: modding, tweakdefs, bset, lobby commands, beyond all reason

What !bset actually does

BAR lets you modify game parameters at lobby time using !bset commands in lobby chat. The syntax follows !bset <slot> <value> where the slot points to a tweakdef entry and the value is often Base64-encoded. This is the standard way to adjust values like playerCountScale (which scales boss unit HP based on gamesize, calculated as number of players divided by 8).

When a value lives inside unitdefs, you need to target it through the tweakdef system. The unitdef path determines which tweak slot applies, and you cannot just set a raw number — the value must be encoded in the format the tweakdef reader expects.

Common encoding mistakes

The most frequent error with !bset is passing a plain number instead of a properly encoded string. Tweakdefs interpret the input through Base64 decoding, so a value of 4 needs to be base64("4"), not the literal characters 4. When a lobby rejects your command silently or sets a value to zero, encoding is the first thing to check.

Lua modding resources like the Programming in Lua guide at lua.org cover the basics of string encoding and table manipulation. Understanding how lua handles type conversion in customparams saves a lot of trial and error when tweaking lobby parameters.

Building efficient influence widgets

Influence widgets that draw territory control overlays are popular in both custom games and modded matches. The performance trap is updating at full frame rate. A well-built influence widget:

  • Updates at a reduced frequency — every few seconds, not every frame
  • Uses a resolution grid coarser than per-pixel precision
  • Caches influence values between update cycles instead of recalculating

The goal is a widget that stays responsive without burning CPU cycles. A decent resolution grid with automatic updates at 2-3 second intervals gives clean territory visualization at negligible cost. Running these widgets in casual matches does not give any competitive advantage — they only display information that is already available through the game engine.

weapondefs and movedef pitfalls

Mod authors frequently adjust weapondefs and movedef when customizing matches. Two rules prevent the worst errors:

  • Weapondefs — changes to weapon properties like damage, range, or projectile speed require a full lobby restart. Mid-lobby edits after units are selected can create mismatched expectations where one player sees different stats than another.
  • Movedef — modifying movement definitions (speed, turning rate, terrain penalties) affects pathfinding in ways that are not immediately visible. Test thoroughly against AI before running these in team games.

Creed of Champions

Tinkering with game settings is fun, and it is easier when the community around you encourages experimentation rather than mocking mistakes. Creed of Champions keeps things friendly and lets players learn through doing, with people who respond to questions helpfully.

[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."
Advertisement