Movement and terrain
Which cells an object may enter, which destinations it can reach, and how fast it crosses each cell.
Three separate checks stand between a move order and a moving object:
- A per-step test decides whether the object may enter the next cell.
- A map-wide zone map decides whether the destination can be reached at all, before any route is planned.
- A throttle decides what fraction of its top speed a vehicle crosses each cell at.
An object that will not go where it is sent has failed one of the first two. An object that arrives slower than its Speed= suggests is being held back by the third.
Four inputs feed these checks, and each reaches only some of them. Changing one without the others can leave the result unchanged.
| Input | What it reaches |
|---|---|
The terrain table in rules.ini | The per-step test, the throttle, and (through its Wheel= column only) the zone map |
SpeedType | Picks the terrain table column that the per-step test and the throttle read |
MovementZone | Picks which set of zones decides whether a destination is reachable, and nothing else on this page |
Locomotor | How the object travels. Only the drive locomotor applies the terrain figures to speed, and only the tunnel locomotor adds a test of its own to the per-step test |
The cell
Section titled “The cell”A cell is one square of the map grid. Ranges, footprints, scan radii and waypoints are all written in cells. The engine measures distance in leptons. One cell is 256 leptons across, and one height level is 104 leptons. A setting that takes a distance in cells is converted to leptons as it is read, so 1.5 becomes 384 leptons, and dividing a lepton position by 256 gives the cell that holds it.
A cell has several places to stand, each occupied separately. Three of them are open to infantry, which is how three infantry share one cell. A vehicle or a structure takes the whole cell. A cell under a bridge has a second, separate set of places for the deck, so the ground under the deck and the deck itself are occupied independently.
The terrain table
Section titled “The terrain table”The terrain table is twelve rules.ini sections, one per land type: [Clear], [Road], [Water], [Rock], [Wall], [Tiberium], [Beach], [Rough], [Ice], [Railroad], [Tunnel] and [Weeds]. Each section holds one figure per speed type, Foot=, Track=, Wheel=, Hover=, Winged=, Float=, Amphibious= and Creep=, plus Buildable=. The engine has no built-in values for any of the 96 figures.
A land type is read only from files that contain its section. If no file declares the section, every figure for that land type is zero and Buildable is off. Zero means impassable, not slow, so deleting [Rough] closes rough ground to every infantryman and vehicle instead of speeding it up.
When a file does contain the section, each key it writes replaces the figure already in force and each key it leaves out keeps it. A later file or a map can therefore change one entry without restating the rest.
Each figure is used in two ways:
- Exactly zero refuses the cell. This is the only use the per-step test makes of the table.
- Any other value is a fraction of full speed, where
1is full speed and smaller is slower. Only a vehicle moved by the drive locomotor is slowed by it. Every other object on the ground, including infantry, hovercraft, mechs and tunnelers, uses the zero test alone.
A value above 1 is cut to 1 as it is read, and nothing corrects a negative value. A value with a % sign is divided by 100, so 70% and 0.7 are the same figure, while a bare 70 is cut to 1.
[Water] ; the figures the game ships for water, less Float=Foot=0%Track=0%Wheel=0%Hover=100%Amphibious=80%Buildable=no
[MYSKIMMER] ; a UnitType registered in [VehicleTypes]SpeedType=HoverMovementZone=AmphibiousCrusherLocomotor={4A582742-9839-11D1-B709-00A024DDAFD1} ; hoverThe skimmer needs its first two settings to cross water. SpeedType=Hover makes it read Hover=100%, which is not zero, so the per-step test lets it onto water. MovementZone=AmphibiousCrusher makes water count as reachable on the zone map.
The hover locomotor is not needed to cross water. It moves the skimmer at the same speed whatever the Hover= figure is, as long as it is not zero. The drive locomotor would scale that speed by the figure.
Aircraft never read the Winged column, because the aircraft cell test treats every cell as clear before it reaches the table. The sections the game ships contain no Winged= line, so that column is zero for all twelve land types. A vehicle given SpeedType=Winged is therefore refused every cell on the map until a rules file fills the column in.
Why a cell refuses a vehicle
Section titled “Why a cell refuses a vehicle”A vehicle’s per-step test runs the checks below in this order. Most checks can refuse the cell outright. The rest record an obstruction, which the route search prices instead of avoiding.
- Land type restriction. A vehicle with
MovementRestrictedTo=is refused every cell of any other land type, apart from the tunnel and rail bridge allowances that key describes. - Tunnel direction. A vehicle may not enter a tunnel cell more than a quarter turn off the tunnel’s direction. The same limit applies to a tunnel cell it is leaving, so a vehicle cannot cross a tunnel mouth sideways.
- Height step. A step between cells at different heights is refused unless a ramp or a bridge joins them. Height, ramps and bridges gives the rules.
- Map edge. Once a vehicle has entered the map, cells outside the playable area are refused. A train, a vehicle on the retreat mission and a vehicle in a team that is leaving the map are exempt.
- Locomotor. The tunnel locomotor refuses every cell a subterranean vehicle may not burrow through. The other nine locomotors accept every cell.
- Crate. In a campaign, a computer-controlled vehicle is refused a cell holding a crate.
- Wall. A wall is refused unless the vehicle can get through it. It gets through a
Crushable=yeswall if it can crush, throughCrusher=yesor the veteranCRUSHERability. It gets through any other wall only if its primary weapon’s warhead can destroy that wall. Walls in combat and movement gives the pairings. - Occupants. Each object in the cell adds a verdict. Buildings, gates, allied objects moving or standing still, enemy objects, crushable objects and cloaked objects are all weighed. Some occupants never block:
- the transport the vehicle is boarding, and the repair bay it is entering;
- the refinery bib a harvester is docking at;
- an invisible structure, a limpet mine, an open laser fence and an inactive firestorm wall.
- Terrain figure. The cell is refused when its land type’s figure in the vehicle’s
SpeedTypecolumn is exactly zero. This check comes near the end, so an earlier refusal can hide it. - Reservations. A cell that another object has claimed for its next step counts as blocked by something moving. If enemy infantry claimed it, a vehicle that can crush infantry treats the cell as clear, and one with a weapon that fires at ground targets treats the infantry as destroyable. Any other vehicle is refused.
A terrain object such as a tree counts as destroyable only when the warhead of the weapon the vehicle would use against it has Wood=yes and the terrain type is not Immune=yes. Otherwise the tree refuses the cell.
An IsTrain=yes vehicle ignores every verdict except an outright refusal, both while its route is planned and while it drives.
When no check refuses the cell, the test returns the most severe obstruction it found. From least to most severe, the verdicts are:
- Clear.
- A cloaked enemy.
- Something moving through.
- A closed friendly gate.
- A friendly obstruction that could be destroyed.
- An enemy obstruction that could be destroyed.
- A friendly object standing in the way.
- Strictly prohibited.
Only the last keeps a route out of the cell. The route search enters a cell with any other verdict at a path cost that depends on the verdict, so a route can lead through a wall the vehicle is able to destroy. Route search gives those costs.
A cell under a bridge is tested either at the deck’s height or at ground level. At deck height the terrain figure is skipped, which is how a tracked vehicle crosses a river on a bridge although [Water] Track= is 0. At ground level under the same bridge, the cell is tested exactly as it would be in the open.
Height, ramps and bridges
Section titled “Height, ramps and bridges”Every step compares the height of the cell being left with the height of the cell being entered. A ramp here is a sloped tile, the artwork that carries ground from one height level to the next.
- Same height. Allowed.
- One level apart. Allowed only across a ramp, and the ramp must be the lower of the two cells. Climbing, that is the cell being left; descending, it is the cell being entered.
- Four levels apart. The bridge case. Allowed only where the lower cell is spanned by a bridge and the span can be traveled.
- Any other difference. Refused.
A cliff two levels high stops every vehicle and every infantryman moving across the ground, whatever its terrain figures or movement zone. A tunneler can pass under it by burrowing.
Infantry and aircraft answer differently
Section titled “Infantry and aircraft answer differently”Infantry run a similar test, with these differences:
MovementRestrictedTo=does not apply to them.- Their test never asks the locomotor, so an infantryman moved by the tunnel locomotor is not held to the burrowing test.
- A wall at its last damage stage is a gap they can walk through. A wall at any earlier stage refuses them unless their weapon can destroy walls.
- A computer-controlled infantryman is refused a cell holding a crate in every game mode, not only in a campaign.
- Tiberium gets no separate treatment. Its cells are tested through their land type’s figure like any other ground.
- The terrain figure is skipped while the infantryman is being unloaded, as when it steps out of the structure that built it or out of a transport aircraft.
An aircraft’s test reads no terrain at all. Height, walls, cliffs, water and occupants do not stop it. One rule remains: in a campaign, a player’s aircraft that is not a loaner is refused a shrouded cell.
The zone map
Section titled “The zone map”Before a route is planned, the engine checks that the destination is reachable on the zone map, which is rebuilt when the ground changes. The zone map is built in three stages:
- Every cell gets one of seven blockage ratings.
- Each of the ten movement zone classes accepts some ratings and refuses the others.
- Each connected run of accepted cells becomes one of that class’s movement zones. A destination outside the object’s zone is unreachable.
A cell takes the first rating in this table that fits. The rating ignores the object, its speed type and every terrain column except Wheel, so one rating serves every class.
| Rating | Set by |
|---|---|
| Outside | The cell lies outside the playable area |
| Crushable | The cell has a Crushable=yes overlay |
| Blocked | The cell has a wall overlay |
| Impassable | The overlay’s land type prices Wheel= at exactly zero |
| Water | The land type is Water or Beach, whatever those sections say |
| Impassable | The cell’s land type prices Wheel= at 0.01 or below, or an active firestorm wall stands there |
| Partly blocked | A terrain object covers some, but not all, of the places infantry could stand in the cell |
| Blocked | A terrain object covers all of those places |
| Open land | Nothing above applied |
Because only Wheel= is read, a land type priced at zero for Wheel is rated impassable even when its Track= or Hover= figure is generous. Every class except Subterannean and Fly then loses all of that ground.
Water and beach cells are rated by land type alone. A hovercraft therefore needs both a [Water] Hover= figure above zero, for the per-step test, and a movement zone that accepts water, for the zone map. Neither setting covers for the other.
The two impassable thresholds differ. A cell whose own land type has a Wheel= figure of 0.005 lets a wheeled vehicle step in, but it is rated impassable, so most classes cannot plan a route to it.
The table below shows which classes accept each rating. A movement zone name means nothing more than this row of choices.
| Rating | Movement zones that accept it |
|---|---|
| Open land | All ten |
| Crushable | Crusher, Destroyer, AmphibiousDestroyer, AmphibiousCrusher, Subterannean, InfantryDestroyer, Fly |
| Blocked | Destroyer, AmphibiousDestroyer, Subterannean, InfantryDestroyer, Fly |
| Water | Amphibious, AmphibiousCrusher, AmphibiousDestroyer, Fly |
| Partly blocked | Infantry, InfantryDestroyer, Fly |
| Impassable | Subterannean, Fly |
| Outside | None |
Normal, Amphibious and Infantry all refuse crushable ground, so a plain amphibious vehicle routes around a sandbag wall just as an ordinary vehicle does. No class accepts ground outside the playable area, Fly included, so no route leads there.
Height also separates zones. The zone map compares each cell with its neighbor, not with the cell where the zone started, so:
- A slope that climbs one level per cell never breaks. A long ramp is one zone from bottom to top.
- A drop of four levels or more always separates the cells on either side of it. Its top and bottom share a zone only if some other connection joins them.
- A drop of two or three levels may or may not separate them. The zone map is filled in two directions, and one direction stops at a two-level difference while the other stops at four, so the result depends on which side the fill reached the drop from.
An intact bridge span or a tunnel then links the zones at its two ends. Bridges and tunnels are the only links between zones that the ground itself keeps apart.
The route search prices no terrain
Section titled “The route search prices no terrain”The route search adds up a path cost for each route, and terrain is never part of it. The terrain table reaches the search only through the per-step test, where zero refuses a cell and every other figure is treated the same. A road and a patch of rough ground cost the same, so a route that follows roads does so because of the map’s layout, not because the search prefers roads. The terrain figures act later, on the throttle.
Route search covers what the search does price, and the search settings that no INI key controls.
Why it is slower than its Speed says
Section titled “Why it is slower than its Speed says”Speed= takes a value from 0 to 100. A value above 100 is treated as 100, so raising a fast type’s Speed= past that changes nothing.
For a vehicle moved by the drive locomotor, the distance it covers each frame comes from the chain of factors below. Steps 1 to 4 set the throttle, a fraction from 0 to 1. Steps 1 to 3 are worked out as the vehicle starts each step into a new cell. The terrain affects only the throttle. Steps 5 to 10 are recalculated every frame.
| Step | Factor |
|---|---|
| 1 | The terrain figure for the destination cell’s land type |
| 2 | The slope multiplier, when the ground under the destination is higher or lower than the ground under the vehicle |
| 3 | Three quarters, once the vehicle’s health has fallen to the yellow condition |
| 4 | On an Accelerates=yes vehicle only: at most a fifth while the vehicle is crushing something, otherwise the acceleration ramp toward the throttle from steps 1 to 3 |
| 5 | The type’s top speed, reduced by any limpet drone clamped to the vehicle |
| 6 | The owner’s ground speed bias, which combines the country’s, the difficulty setting’s and the rules-wide bias |
| 7 | The speed multiplier a crate gave the vehicle. Only the first speed crate counts; later ones do not raise it |
| 8 | VeteranSpeed plus one, for a vehicle that has the FASTER ability |
| 9 | The throttle from steps 1 to 4 |
| 10 | Half, while the vehicle is carrying a captured flag |
Several details change the result:
- Step 1 uses the
[Road]figures whenever the destination’s ground is two or more levels from the height the vehicle travels at, as on a bridge deck. A vehicle therefore keeps its speed on a bridge over water. - The slope multiplier depends only on speed type.
TrackusesTrackedUphillandTrackedDownhill. Every other speed type usesWheeledUphillandWheeledDownhill, whatever its name suggests. - If the terrain figure times the slope multiplier is exactly zero, the vehicle moves at half speed instead of stopping.
- Steps 5 to 10 round down to a whole number several times along the way, so a slow type loses proportionally more to each factor than a fast one.
TiltsWhenCrusheschanges only whether the hull tilts while the vehicle crushes something, not its speed.
The damage penalty in step 3 belongs to the drive locomotor alone. Every other object moves at the same speed damaged or undamaged.
What each locomotor drives its speed from
Section titled “What each locomotor drives its speed from”Locomotor= names one of ten travel routines. Only the drive locomotor uses the terrain figures for speed.
| Locomotor | Speed comes from | Terrain figure |
|---|---|---|
| Drive | The full chain above | Sets the throttle |
| Walk, Mech | Steps 5 to 10 above, with the throttle fixed at full | Ignored |
| Hover | The same, times the hover locomotor’s own acceleration ramp | Ignored |
| Tunnel | The same, times TunnelSpeed while digging down and coming up; a fixed rate underground | Ignored |
| Fly | The type’s top speed times the aircraft’s own throttle, and nothing else | Ignored |
| Jumpjet | [JumpjetControls] alone; the type’s Speed= is not read | Ignored |
| Levitate | [LEVITATION] alone; the type’s Speed= is not read | Ignored |
| Drop pod | Its height above the ground, with the rules-wide descent rate as the minimum | Ignored |
| Teleport | Instantaneous | Ignored |
An aircraft’s speed therefore ignores the ground speed bias, the crate multiplier, the veteran ability, the flag penalty and the damage penalty. The setting meant to give aircraft a bias of their own is stored but never read; difficulty settings covers it.
The other movement settings on this page each reach only the locomotors listed here:
| Settings | Read by |
|---|---|
Accelerates, AccelerationFactor, DeaccelerationFactor and the slope multipliers | Drive |
PitchAngle, PitchSpeed, RollAngle, FlightLevel, IsDropship | Fly |
HoverBob, HoverDampen | Hover and levitate |
AllowBurrowing, TunnelSpeed | Tunnel |
SlowdownDistance | Fly and drive |
Climb, CruiseHeight, WobbleDeviation, WobblesPerSecond, TurnRate | Jumpjet, from the shared [JumpjetControls] section only |
Acceleration is read in three places: in [JumpjetControls] for the jumpjet locomotor, in [LEVITATION] for the levitate locomotor, and on a projectile’s BulletType.
ROT affects each locomotor differently:
- A mech stops until it finishes turning, and so does a driving vehicle without a turret. A driving vehicle with a turret keeps moving while it turns.
- A hovercraft turns at twice its
ROT. It steers its direction of travel separately from the facing it is drawn at, so it slides through turns instead of pivoting. - Infantry start with a fixed turn rate instead of their type’s
ROT, and take on theirROTthe first time they are healed.
A running object can be moved by a locomotor other than the one its type names. A tunneler leaving a war factory, a passenger falling in a drop pod and a jumpjet infantryman on the ground are examples. Locomotion and piggybacking covers the swap.
Settings that reach no decision
Section titled “Settings that reach no decision”Four settings in this group are read but never change movement:
MaxBlockCountkeeps a count of blocked frames that nothing acts on.PlayerAutoCrushapplies to houses a player commands, but the only check that reads it runs for computer-controlled houses.- The per-type
AutoCrushhas no effect either. TooBigToFitUnderBridgechanges how a vehicle is drawn against a bridge deck. It does not restrict movement or keep a vehicle off a bridge cell.
Weight and DeployToFire affect other decisions. Weight sets how far a blast rocks a voxel object and whether a vehicle breaks the ice beneath it. DeployToFire limits where a vehicle may fire from, using each land type’s Buildable= flag.
Related settings
41 of 41
| Key | Description | Value | When omitted |
|---|---|---|---|
AccelerationBulletType, global rules, levitation controls | How quickly a homing projectile, a jumpjet unit or a levitating unit changes speed. | integer | Varies by type |
AccelerationFactorAircraftType, BuildingType, InfantryType, UnitType | The amount a vehicle's throttle climbs by on each movement step while it is speeding up. | floating point | .03 |
AcceleratesAircraftType, BuildingType, InfantryType, UnitType | Makes a driving vehicle ease up to speed and brake as it nears its destination. | boolean | yes |
AllowBurrowingtile controls | Ground that a subterranean unit may dive into or surface through. | boolean | yes |
AutoCrushNo effect in some scopes5 applicable types | A parsed per-type flag that nothing acts on, and the IQ at which a computer house starts running things over. | boolean | Varies by type |
Buildableglobal rules | Allows buildings and new Tiberium growth on a land type. | boolean | no |
Climbglobal rules | The leptons of altitude a jumpjet unit gains or loses each game frame. | floating point | 5 |
CruiseHeightglobal rules | The height above ground a jumpjet unit levels off at once it has finished climbing. | integer | 400 |
CrushableNo effect in some scopes12 applicable types | Lets a crusher vehicle drive over the object or overlay, destroying an object or a wall overlay outright. | boolean | Varies by type |
CrusherAircraftType, BuildingType, InfantryType, UnitType | Lets a vehicle drive over crushable objects and walls instead of being blocked by them. | boolean | no |
DeaccelerationFactorAircraftType, BuildingType, InfantryType, UnitType | How hard a vehicle brakes. Each frame its throttle drops by this figure times its top speed. | floating point | .002 |
DeployToFireUnitType | Makes a vehicle attack by deploying into its DeploysInto structure on buildable ground, and stops a human player's vehicle from searching for targets. | boolean | no |
FlightLevel5 applicable types | The cruising altitude a type flies at, or the rules-wide altitude used by anything that names none of its own. | integer | Varies by type |
HoverBobglobal rules | Period in minutes of the vertical bob a hovering unit performs. | floating point | 30 |
HoverDampenglobal rules | Fraction of its vertical motion a hovering unit keeps from one frame to the next. | floating point | .8 |
IsDropshipAircraftType, BuildingType, InfantryType, UnitType | Flies an aircraft as a heavy transport that raises its nose on approach instead of banking. | boolean | no |
IsTrainAircraftType, BuildingType, InfantryType, UnitType | Marks a vehicle as rolling stock, which changes how it finds a path, what blocks it and when it may leave the map. | boolean | no |
LandableAircraftType | Keeps an aircraft under the player's control instead of letting it enter as an unselectable loaner that may leave the map. | boolean | no |
LocomotorAircraftType, BuildingType, InfantryType, UnitType | The class identifier of the locomotion object created to move each instance of the type. | Locomotor class identifier | {4A582747-9839-11D1-B709-00A024DDAFD1} |
MaxBlockCountNo effectlevitation controls | A retry count for blocked levitating units that has no effect. | integer | 4 |
MovementRestrictedToUnitType | Confines a vehicle to cells of one land type, which is how rolling stock is held to the rails. | landtype | none |
MovementZoneAircraftType, BuildingType, InfantryType, UnitType | Selects which terrain the type can cross when the game decides whether it can reach a cell. | mzonetype | Normal |
PitchAngleAircraftType, BuildingType, InfantryType, UnitType | The angle in degrees an aircraft drops its nose by while it is flying fast enough. | floating point | 20 |
PitchSpeedAircraftType, BuildingType, InfantryType, UnitType | The throttle an aircraft must be above before it pitches and banks. | floating point | .25 |
PlayerAutoCrushNo effectglobal rules | Parsed crushing permission that the engine never uses. | boolean | no |
ROT5 applicable types | The rate an object's body and turret turn at, or the rate a homing projectile steers at. | integer | 0 |
RollAngleAircraftType, BuildingType, InfantryType, UnitType | The angle in degrees an aircraft banks by while it is turning. | floating point | 30 |
SlowdownDistanceAircraftType, BuildingType, InfantryType, UnitType | How far short of its destination an object begins slowing down, in leptons. | integer | 500 |
Speed6 applicable types | The top travel speed of an object type, the launch speed of a weapon's projectile, or the travel ceiling every jumpjet unit shares. | integer | Varies by type |
SpeedTypeUnitType | The terrain table column a vehicle's per-cell throttle and passability are read from. | SpeedType | Context-dependent |
TiltsWhenCrushesAircraftType, BuildingType, InfantryType, UnitType | Makes a crushing vehicle tilt as it drives into a sandbag wall. | boolean | yes |
TooBigToFitUnderBridgeUnitType | Splits a vehicle's composed image into two separately sorted pieces while it passes under a bridge. | boolean | no |
TrackedDownhillglobal rules | Speed multiplier for a tracked vehicle stepping to a lower cell. | floating point | 1 |
TrackedUphillglobal rules | Speed multiplier for a tracked vehicle stepping to a higher cell. | floating point | 1 |
TunnelSpeedglobal rules | Multiplier on how fast a subterranean unit sinks and rises, and divisor of its dig-in wait. | floating point | 1 |
TurnRateglobal rules | How fast a jumpjet unit swings around to a new heading. | integer | 3 |
WeightAircraftType, BuildingType, InfantryType, UnitType | How strongly an object resists being rocked, and how heavily it presses on ice. | floating point | 1 |
WheeledDownhillglobal rules | Speed multiplier for a vehicle that is not tracked stepping to a lower cell. | floating point | 1 |
WheeledUphillglobal rules | Speed multiplier for a vehicle that is not tracked stepping to a higher cell. | floating point | 1 |
WobbleDeviationglobal rules | How far a hovering jumpjet unit drifts above and below its flight level. | integer | 40 |
WobblesPerSecondglobal rules | How many complete up-and-down cycles a hovering jumpjet unit performs each second. | floating point | .25 |
No keys match the current filters.