The most common tweakdefs mistakes in BAR modding, from malformed definition files to broken syntax, and how to fix them fast.
Tweakdefs go through unitdefs_post.lua, and the most frequent error is malformed definitions. If something is not applying, check the lines around 214-220 in the post-processing file. A common issue is an enveloping while block that never terminates properly. The fix is to remove that while-end block and replace the base64decode part with your actual definition string.
The same pattern applies to tweakunits. Remove the while loop and paste your unit definitions directly into the base64decode section. The engine expects clean Lua tables, and any stray end statement will silently drop your changes. If a tweak seems to do nothing, this is almost always why.
A specific trap people keep hitting: wrapping weapon definitions in an extra set of curly brackets causes the entire weapondefs subtable to resolve as nil. For example, if you write armhawk = { maxacc = 0.25, { weapondefs = { ... } } }, that armhawk.weapondefs is nil. The inner curly brackets make weapondefs an array entry instead of a keyed table entry.
The correct syntax is flat: armhawk = { maxacc = 0.25, weapondefs = { ... } }. One set of brackets, not two. This catches experienced modders off guard because the game does not throw an error. It just silently ignores the weapon change.
BAR provides a lobby input field for disabling specific units. The syntax is straightforward: internal unit names separated by plus signs. Want to block Cortex long-range artillery? Type corint+corbuzz. Each unit has an internal name based on the original TA convention.
You can find internal names by hovering over a unit in-game while holding space. The URL on the BAR website also exposes the internal name in the path. If you are building custom lobbies with restricted unit pools, this is the fastest way to assemble your disable list without digging through Lua files.
The difference between a mod that works and one that breaks silently is almost always syntax discipline. Read the existing post-processing code, apply your changes inside the right table structure, and verify the result before calling it done. The BAR modding community shares working examples openly, so there is no reason to guess at the format when reference code exists in the repo.
"The first and only community I have seen that actually holds up to its values. I have honestly not had a single bad experience here."