Sharing tweak configurations across BAR lobbies relies on base64 encoding. Getting the encoding right and knowing which unitdef fields actually respond to changes saves hours of debugging.
Tags: BAR modding, base64 encoding, unitdefs, weapondefs, lua scripting
BAR lobby tweaks need a compact, copy-paste-friendly format. Base64 turns a Lua table into a short string you can drop into chat and have another player decode on their end. The encoding itself does not change the tweak logic — it is purely a transport mechanism. If someone built a local tool to handle encoding instead of bouncing between external websites, that is a quality of life improvement worth sharing with the community. Cleaner tooling means fewer mistakes when passing configs around.
A common structural mistake is mixing up what you are iterating over. UnitDefs contains unit-level definitions like costs, build times, and health pools. WeaponDefs governs individual weapon behavior — damage, range, reload time. These are separate tables in the engine, and checking ud.weapondefs inside a UnitDefs loop does not give you direct access to weapon properties the way you might expect.
When you see a script that tries to set ud.health = /2 for all units with weapons, that syntax is invalid Lua. You cannot divide in-place like that. The correct pattern reads the current value, performs the math, and writes back the result. Same applies to costs and build times on weapon-bearing units — handle each unit once, compute values cleanly, assign once.
If you want to modify only certain units — say, removing Raptors from a custom game — you need to handle faction definitions properly. Each faction has its own starting unit setup and commander definition. Simply tweaking a value on one faction and assuming it propagates to all others will leave gaps. You need to either iterate all faction definitions explicitly or use a unit name prefix check to catch matching units across both sides.
A quick pattern: use string.sub on the unit name to check faction prefix, then apply changes only to matching entries. If the value simply does not respond to your change, the most likely cause is that the field was never defined in that unit's entry in the first place.
The workflow for a clean tweak exchange is straightforward:
Steps one and four are where most failures happen. Always test before sharing, and always confirm the other side received what you intended.
Teams that take time to set up clean rules and working configurations before a match start on a better footing. The Creed of Champions community welcomes players who put in this kind of preparation — serious about good games, not about drama when things go sideways. Better teammates make better games.
[Crd] The removal of toxicity, the goal of fun and learning, makes for a refreshing spot to play and spend time. It has also made a game with plenty of complexity a bit less daunting to dive into.