Skip to content

FlightLevel

The cruising altitude a type flies at, or the rules-wide altitude used by anything that names none of its own.

Type cruising altitude

Specification — Type cruising altitude
Applies to
AircraftTypeBuildingTypeInfantryTypeUnitType
File
rules.ini
Section
[<ObjectType ID>]
Value
integer
When omitted
-1A stored -1 means the type has no altitude of its own, and every read falls back on the `[General]` figure.

The figure is a height above the ground in leptons, read as a raw count rather than in cells — the stock dropship’s FlightLevel=1600 is a little over six cells’ worth of height. Whenever the engine asks a type how high it flies, it hands back this figure unless the figure is -1, in which case it hands back the rules-wide altitude instead. Writing -1 explicitly is therefore the same as leaving the key out.

An aircraft is created at this height and climbs back to it on takeoff, and several of its missions test its height against the figure exactly to decide whether it is already airborne. The fly locomotor raises the level above the figure when high ground is coming up along the heading, and lowers it toward the target as a hunter seeker closes in. An IsDropship=yes type sinks to a third of the figure once it is within its SlowdownDistance.

The key is accepted in an AircraftType, BuildingType, InfantryType or UnitType section, but only the fly locomotor and the aircraft missions read it, so it does nothing on a type moved any other way.

Rules-wide cruising altitude

Specification — Rules-wide cruising altitude
Applies to
global rules
File
rules.ini
Section
[General]
Value
integer
When omitted
500

The figure is a height above the ground in leptons. Any type that does not carry a cruising altitude of its own takes this one, so the shipped FlightLevel=600 is the height every stock aircraft flies at bar the dropship and the two hunter seekers, which carry figures of their own.

Three other paths read it directly rather than through a type. An animation that is not a ground-layer animation starts at this height. Every object below six tenths of it is drawn in the ground layer and everything at or above it in the top layer, which is what decides whether an object passes over or under the things around it. And an aircraft below half of it takes the height test that blocks AircraftFogReveal behind high ground, which who looks, and when covers.