How to track your own built units with Spring API, optimize rally points with guard commands, and install custom keybind widgets.
Spring.GetTeamUnitsByDefs() returns units for an entire team. If you need only the units you personally built, filter the results using Spring.GetUnitAllyTeam(). Compare the ally team ID to your own player info obtained through Spring.GetPlayerInfo(). The function returns an array of unitIDs that match your criteria.
For example, to count personal armada wind generators, iterate through matching unitIDs and check against UnitDefs for the specific unit type. The pattern applies to any unit: filter by ally team first, then narrow by unit definition.
Units in BAR sometimes take inefficient routes when moving from a rally point to a guard position. The most common fix is issuing a guard command immediately when the unit finishes building. This eliminates the rally-to-position walk entirely.
Another approach builds a small obstacle like two dragon teeth at the rally point exit. The sixteen metal investment forces units to reposition naturally instead of walking across the map before starting their guard. Alternatively, just move units slightly to the side and start assisting an existing structure. This avoids the routing problem with minimal effort.
The ingame keybind editor lets you modify keybinds without editing config files manually. It installs as a widget in the LuaUI/Widgets folder but requires dependency order:
Enable them in that order. The keybind editor shows a movable window in-game. Backup your existing uikeys.txt file before using the widget since the backup function has not been extensively tested.
You can also control widget state programmatically. Calling widgetHandler:DisableWidget("Camera Minimum Height") from within another widget lets you toggle system widgets on and off based on game conditions.
Getting your controls and unit management right before a game starts means fewer mistakes during it. Creed of Champions members share configuration files, keybind setups, and widget recommendations freely. Everyone benefits when experienced players pass along what works.
[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.
Competitive play. Zero team-blame.