Extending a factory build queue requires the correct Lua syntax for appending to buildoptions tables. Common mistakes involve array indexing and missing subtables.
Tags: beyond all reason, modding, buildoptions, factory, tweakdefs, lua, unitdefs
The syntax for adding a new unit to a factory build list appends directly to the buildoptions array. Add the unit name string to the next available index.
This works for both new custom units and existing units you want a different factory to produce. The factory just needs a reference to the target unit name.
When creating an entirely new unit, the unitdef needs buildoptions, customparams, weapondefs, and weapons subtables even if some remain empty. Missing any of these causes the unit to fail silently when the game loads unit definitions.
Multiplying airsightdistance and sightdistance by a factor like 4.8 gives air units dramatically expanded vision. This can make interceptors more useful in custom game modes, though some existing gadgets like unit interceptors may interfere with the intended behavior.
Missiles sometimes explode mid-air before reaching their target due to the unit interceptors gadget. If you are making units interceptable through tweaks, check that gadget to see if it is overriding your changes.
Understanding build mechanics makes for stronger players. Creed of Champions attracts folks who want to dig into the details of how BAR works and share what they learn with teammates.
[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.