OpenRA/OpenRA · error · YamlException

Hovers.Ticks must be higher than zero.

Error message

Hovers.Ticks must be higher than zero.

What it means

Thrown in HoversInfo.RulesetLoaded when Ticks is less than 1. Ticks defines the number of game ticks for the hovering bob animation cycle; it must be at least 1 to produce any animation. A value of 0 or negative would cause division-by-zero or undefined oscillation behavior.

Source

Thrown at OpenRA.Mods.Common/Traits/Render/Hovers.cs:50

		[Desc("Amount of ticks it takes to fall to the ground from the highest point when disabled.")]
		public readonly int FallTicks = 10;

		[Desc("Amount of ticks it takes to rise from the ground to InitialHeight.")]
		public readonly int RiseTicks = 20;

		[Desc("Initial Z axis modifier relative to actual position.")]
		public readonly WDist InitialHeight = new(43);

		public override object Create(ActorInitializer init) { return new Hovers(this); }

		public override void RulesetLoaded(Ruleset rules, ActorInfo ai)
		{
			if (BobDistance.Length > -1)
				throw new YamlException("Hovers.BobDistance must be a negative value.");

			if (Ticks < 1)
				throw new YamlException("Hovers.Ticks must be higher than zero.");

			if (FallTicks < 1)
				throw new YamlException("Hovers.FallTicks must be higher than zero.");

			if (RiseTicks < 1)
				throw new YamlException("Hovers.RiseTicks must be higher than zero.");

			if (InitialHeight.Length < RiseTicks)
				throw new YamlException("Hovers.InitialHeight must be at least as high as RiseTicks.");

			base.RulesetLoaded(rules, ai);
		}
	}

	public class Hovers : ConditionalTrait<HoversInfo>, IRenderModifier, ITick, ISync
	{
		readonly HoversInfo info;
		readonly int stepPercentage;

View on GitHub (pinned to a520984d91)

Solutions

  1. Set Ticks to a positive integer representing the bob cycle length in game ticks, e.g. 'Ticks: 20'.
  2. If you want to disable hovering entirely, remove the Hovers trait rather than setting Ticks to 0.

Example fix

// before
Hovers:
  Ticks: 0

// after
Hovers:
  Ticks: 20
Defensive patterns

Strategy: validation

Validate before calling

if (hoversInfo.Ticks < 1)
    Log.Error($"Hovers.Ticks must be >= 1, got {hoversInfo.Ticks}");

Prevention

When it happens

Trigger: A mod sets Ticks to 0 or a negative value on a Hovers trait. The check 'Ticks < 1' catches both zero and negatives.

Common situations: Explicitly setting 'Ticks: 0' to try to disable bobbing; copy-pasting a trait and not filling in valid values; misunderstanding the field semantics.

Related errors


AI-assisted analysis of OpenRA/OpenRA@a520984d91 (2026-08-13). Data as JSON: /api/errors/73822705d00d8b49. Report an issue: GitHub.