Using !bset and tweak commands in BAR lobby chat

How lobby chat commands like !bset hook into tweakdefs, and why wind multipliers change energy output rather than actual wind speed.

Tags: bar lobby, bset commands, tweakdefs, wind generator, lobby chat

What !bset does

The !bset command in BAR lobby chat lets hosts apply tweak configurations without leaving the lobby interface. It writes into the tweak unit or tweak defs slot that the lobby serializes into the game modoptions when the match starts. The command expects a correct tweak slot name followed by an encoded value.

Wind turbines and energy multipliers

A common source of confusion comes from how wind generators work in BAR. Wind speed displayed in the game interface comes from a separate engine system. Tweakdefs cannot change that display value. What tweakdefs can change is how much energy each wind turbine produces per wind level. Setting a wind multiplier of 30 does not make the wind blow harder. It makes each wind turbine output thirty times its base energy at the current wind level. If wind is at speed 10, a turbine producing 16 energy per wind level would output 30 times that amount. This distinction matters because players looking at the wind speed indicator will not see any change. The energy bar and income numbers will reflect the multiplier, but the wind display stays where the engine puts it.

Applying multipliers across all factions

Wind generators exist for each faction: armwin, corwin, and legwin. A tweak that targets only armwin will leave the other two factions unchanged. To affect all wind turbines, you need entries for each faction: UnitDefs["armwin"].customparams.energymultiplier = 2 UnitDefs["corwin"].customparams.energymultiplier = 2 UnitDefs["legwin"].customparams.energymultiplier = 2

Missing subtables cause silent failures

New tweakdefs fail without visible error messages when expected subtables are missing. Fields like buildoptions, customparams, weapondefs, and weapons need to exist before you write into them. If you try to set a customparams value on a unit that does not have a customparams table in its definition, the change silently does nothing. Always check the unit's base file before targeting nested fields.

Learning tweak commands the right way

The BAR modding community is generous with helping people through configuration issues. Getting a tweak working takes patience with the syntax and a willingness to check actual source files rather than guessing field names.

"Crd is the first really comfortable community I have been a part of. Everyone is nice and kind, the atmosphere is relaxed, and I am not getting yelled at for not being optimal." [Crd]

Creed of Champions runs regular training sessions where members practice exactly this kind of technical skill building in a no-pressure environment.