How to let BAR turrets shoot through walls with tweakdefs
Short-range turrets get blocked by T2 walls more often than new players realize. A targeted tweakdef change fixes this in custom games.
Tags: beyond all reason, modding, turrets, defense, tweakdefs, base64, weapondefs
Why turrets bounce off walls
Defense turrets have avoidfriendly and avoidfeature set to true by default. This keeps them from wasting shots on friendly walls, but it also blocks legitimate fire through thin walls. A defense line behind a perimeter wall ends up useless against the very attackers trying to breach it.
The right flags to change
Four weapondef parameters control this behavior:
- avoidfeature set to false lets shots pass through terrain
- avoidfriendly set to false stops the turret from refusing to fire near allies
- collidefriendly controls projectile collision with friendlies
- collideneutral controls projectile collision with neutral objects
Setting the right combination depends on what you want. For a meme lobby where turrets should fire through everything, flip all relevant flags.
Base64 encoding for lobby tweaks
Custom messages in the modding channel disappear when scrolling back. The fix is to encode your tweakdef as a Base64 string and paste it directly into lobby commands. Base64 encoding compresses your Lua table into a single line that the game can decode at match start.
Comments inside tweakdef Lua code do not survive encoding. Strip them out before passing through the Base64 encoder.
Meme lobby caution
Custom unit modifiers like hoversonly or turret-through-walls should stay out of noob lobbies. Most players do not understand what happened when their buildings get shredded by a defense line that should not have been shooting that way. Use custom settings only in private or explicitly labeled games.
Creed of champions
Clear communication about custom settings keeps games fun for everyone. Creed of Champions runs organized matches where players know what to expect before the match starts. No surprises, no blame games, just solid play.
[Crd] 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.