Turning a mobile unit into a factory involves several unitDef fields working together. Understanding each piece makes the process predictable rather than guesswork.
A unit in BAR becomes a factory through a specific combination of unitDef properties:
Removing the immobility constraint from a factory unit, while keeping the other three properties, produces a mobile factory. Currently that separation is not cleanly supported, but the underlying fields make the concept feasible.
A natural extension of the factory definition knowledge is the idea of mobile factories. Units like Hatchling and Queen Raptors could serve as walking factories with the right configuration. The yardmap and buildPower transfer straightforwardly. The mobility aspect requires decoupling the speed property from the factory classification.
Until that separation exists natively, the workaround involves Lua gadgets that fake factory behavior on mobile units through custom logic.
Lua animations can create convincing visual effects with minimal code. A custom animation scripted in Lua can make a unit appear to transform, build, or deploy even when the underlying mechanics handle the real behavior.
The gadget approach for faking factory behavior on a mobile unit works through selection and order redirection. When the mobile unit gets selected, it quickly deselects and selects a hidden lab instead. Build orders given to that lab get forwarded back to the mobile unit. The result: a mobile unit that looks and acts like it has factory capabilities.
The complications worth noting include the highlight circle showing the hidden lab instead of the visible unit, and the general fragility of order forwarding through gadgets. Making an actual mobile lab through proper unitDef changes remains the cleaner long-term solution.
A mobile waypoint widget lets players place visual navigation markers on the map. These markers help coordinate movements, especially in team games where positioning matters. The widget exists in various community forms but has not yet been cleaned up for inclusion in the base game.
Converting the widget to base-game quality requires polishing the visual output, ensuring it syncs properly across networked players, and testing against different map sizes and camera settings. The core functionality works. The remaining work is presentation and edge case handling.
Four fields define a factory. Lua gadgets can extend what those factories do visually. And the community has built tools like mobile waypoint widgets that deserve wider distribution. The BAR modding scene has plenty of people sharing knowledge freely, which means anyone willing to read the code and ask clear questions can learn to build what they imagine.
Having a space like here that offers a community, trainings, events, and the guarantee to not be judged or insulted by fellow members is really precious. Keeping the game safe, and more importantly, fun.