Making flying units hover in BAR custom scenarios

Using the hoverAttack flag and unit movement settings to create hovering unit behavior in Beyond All Reason custom games and mods.

Tags: beyond all reason, hover attack, flying units, modding, unit behavior, custom scenarios

The hoverAttack flag

The UnitDef property hoverAttack is a boolean that changes how flying units engage targets. Instead of acting like planes that fly in and out of range, hoverAttack units maintain position over a target while firing. This creates different combat dynamics.

Setting the flag in a unit definition or through tweak code changes attack patterns without rebuilding the entire unit. The flag is documented in the Spring RTS UnitDef reference.

Hover versus plane behavior in practice

Planes in BAR typically circle in, fire, and circle out. This gives natural windows of vulnerability and creates rock-paper-scissors matchups with anti-air. Hover units sit in place while attacking, which exposes them longer but removes the circling delay.

For custom scenario design, hoverAttack units feel more like gunships than fighters. They work well in scenarios designed around direct confrontation rather than hit-and-run tactics.

Setting up custom unit behavior

Customizing unit movement involves several UnitDef properties working together: movement class, turn rate, max speed, and the hoverAttack flag. Changing one without adjusting the others produces weird behavior. A hovering unit that turns slowly feels sluggish and unresponsive.

Testing in isolated scenarios before deploying into full games helps catch animation bugs and movement glitches.

Tweak syntax for hover changes

When modifying flying units through tweakdefs or tweakunits, the same syntax rules apply as all other unit modifications. Simple overrides go through tweakunits. More complex changes involving multiple related properties may need tweakdefs Lua code.

Creed of Champions

Players who tinker with custom scenarios and unit modifications develop deeper knowledge of BAR mechanics. That knowledge transfers directly to ranked play, where understanding unit behavior patterns matters for positioning and target selection. A supportive community makes that learning faster:

[Crd] One of the few places where you can for sure coordinate with people in matches with a good supportive attitude. Everybody tends to be understanding and constructive.