Skip to content

Shroud, fog and the radar map

How the shroud and the fog of war hide terrain from each house, and how the radar map draws through them.

Features & systemsScenarios & AIMaps & scenarios

Changed in 0.2.0

Two covers hide terrain: the shroud and the fog of war. Every scenario starts fully shrouded. The fog starts off and is switched on by the game options or, in a campaign, by the map. Each house has its own shroud and fog. The tactical view and the radar show the local player’s.

On this page, a human player is the house the player plays in a campaign, and any house a person plays outside a campaign, observers included. In a campaign, the player-controlled houses are the player’s house and every other house the scenario marks PlayerControl=yes; only the player’s house among them is a human player.

The rules.ini settings below affect shroud, fog and the radar. The values are examples; each key page gives the default.

rules.ini
[General]
AircraftFogReveal=4 ; fog radius, in cells, of an airborne aircraft with Sight=0
AllowShroudedSubteranneanMoves=no
AttackingAircraftSightRange=8 ; cells a human player's aircraft reveals when it fires near shroud
LeptonsPerSightIncrease=25 ; leptons of height per 10 percent of extra sight
RevealByHeight=yes
RevealTriggerRadius=7 ; cells the Reveal around waypoint action uncovers
VeteranSight=.5 ; a SIGHT veteran's sight range is multiplied by one more than this
FlashFrameTime=4 ; frames between flashes of a damaged object's radar blip
RadarCombatFlashTime=30 ; frames a damaged object's radar blip keeps flashing
[AudioVisual]
AllyReveal=yes
ShroudGrow=yes
ShroudRate=6 ; game minutes between shroud regrowth passes
FogRate=.1 ; game minutes between fog regrowth passes

A look is the scan an object makes of the cells around it. It uncovers each cell it reaches. The object making it is the looker.

A look uncovers cells for the looker’s house and for every house that shares its view:

  • every house that has spied on the radar of the looker’s house;
  • while AllyReveal=yes, every house that the looker’s house counts as an ally.

A house with a limpet drone attached to the looker also gets the look, as if one of its own objects had made it.

A computer house has its own shroud and fog but ignores them when it chooses targets. The Goto nearby shroud team mission sends a team toward cells that are shrouded for the team’s own house.

Each cell tracks the shroud and the fog separately, for every house. For each cover, a cell can be:

  • mapped, when some part of it is uncovered but a partial piece of the cover may still be drawn over it;
  • clear, when no part of that cover remains over it.

The partial piece drawn over a mapped cell depends on which of its eight neighbors are still unmapped. Some combinations have no matching artwork, so uncovering one cell also uncovers any neighbor that would need such a piece. One reveal can therefore open several cells.

Every map starts fully dark. Reading a scenario’s [Map] Size, which declares the playfield, resets every cell to shrouded and fogged. No setting opens a scenario uncovered. A scenario that starts with the map revealed does it with a trigger.

A raised coordinate is tested against the cell it is drawn over, not the cell it stands on. Every two height levels move the tested cell one step up the screen. At an odd height the coordinate lies between two cells, and it counts as uncovered if either of them is uncovered.

The reverse also applies. When a cell is uncovered for a human player, objects standing on high ground that is drawn over it are discovered by that player too. The game checks the cells below it on screen, one step at a time:

  • the cell itself, if its ground is at most one level high;
  • the next cell down the screen, if its ground is one to three levels high;
  • the cell after that, if its ground is three to five levels high, and so on.

Fogging a cell walks the same cells and records the structures standing on them.

Sight= counts cells, unlike a weapon’s Range=, which is in leptons. An ordinary look lifts both the shroud and the fog from the cells it reaches. A vehicle, infantryman or structure with Sight=0 makes no look at all. Only an aircraft does anything with a zero sight range, as Who looks, and when describes.

For vehicles, infantry and structures, two bonuses raise the range, in this order:

  1. Height. Sight grows by 10 percent for each whole LeptonsPerSightIncrease leptons of height. Height is measured from the map’s lowest level, so standing on a hill counts. One height level is 104 leptons. With the engine default of 50, each level adds two steps: an object one level up sees 20 percent further, and one four levels up sees 80 percent further.
  2. Veterancy. An object with the SIGHT veteran ability then multiplies that range by VeteranSight plus one.

Each step rounds the range down to a whole number of cells. Aircraft get neither bonus.

A look is centered on the cell the looker is drawn over, not the cell it occupies. If that cell lies outside the playfield, the look reveals nothing. Otherwise it covers a disc: every playfield cell whose straight-line distance from the center is within the sight range. The test uses the playfield, not the smaller playable area, so a look can reveal cells in the map border.

With RevealByHeight=yes, high ground can block a cell in the disc. For each cell, the game checks the ground height of one probe cell. The cell is revealed only if the probe’s ground is no more than three height levels above the looker. To find the probe, take the cell’s position relative to the cell the looker stands on, move two cells down the screen, then one cell toward the looker.

Only that probe is checked. Ground between the looker and the cell is not examined, and no setting changes the three-level limit.

With RevealByHeight=no, a vehicle or infantryman that has moved one cell rescans only the outer three rings of its disc. With RevealByHeight=yes, every look scans the whole disc.

A vehicle, infantryman or structure can look only after it has been inside the playable area, the region LocalSize declares inside the playfield. It qualifies when it is placed there or reaches the center of a cell there, and it keeps qualifying when it moves out. It loses the qualification if it is placed outside the playable area, for example by leaving a transport there. When the playable area changes, the game rechecks every object against the cell it stands on, so an object the new area leaves outside also loses it.

Outside a campaign, the vehicles, infantry and structures of a house with MultiplayPassive=yes never look.

Regular looks happen as follows:

  • A vehicle or infantryman looks each time it reaches the center of a cell.
  • An infantryman looks once a second while it is moving in the air, if its Sight= is above zero.
  • An aircraft looks every 15 frames. It skips the playable-area test, the height bonus and the veteran bonus.

A landed aircraft sees one cell, whatever its Sight=.

An airborne aircraft whose type sets Sight=0 lifts only the fog, within AircraftFogReveal cells, and only while fog of war is on. This fog-only look works only on cells already out of the shroud. It applies the height test only while the aircraft flies below half the [General] FlightLevel, the rules-wide value, not the aircraft type’s key of that name.

An object also looks at once when:

  • an aircraft transport sets it down;
  • it finishes a teleport, surfaces from a tunnel, or lands from a jumpjet flight;
  • it arrives by drop pod;
  • it is a structure, and it is captured;
  • it is a vehicle, infantryman or aircraft, and the playable area grows to include it; in a campaign, only a player-controlled house’s objects look then;
  • a human player discovers it.

In a campaign, only the player’s own objects make the discovery look. Outside a campaign, an object looks each time a human player discovers it. The discovery look is an ordinary look: it uncovers ground for the object’s owner and the houses that share the owner’s view, and the player who discovered the object gains nothing from it without that view. Outside a campaign, every human player discovers each object as it is placed, so a structure an ally places uncovers the ground around it at once while AllyReveal=yes.

Terrain objects and animations never look. Only vehicles, infantry, aircraft and structures do.

Several other events reveal ground.

When an object fires at an object that a human player owns, it reveals the ground within two cells of itself to that player if either of these holds:

  • the firer belongs to another house, and that player has not discovered it;
  • the firer stands on ground that is shrouded or fogged for that player, and it is not one of that player’s aircraft.

A human player’s aircraft that fires reveals AttackingAircraftSightRange cells around itself to its owner if the owner’s shroud covers the target, the aircraft’s own position, or any of three points two cells diagonally from the aircraft.

Both firing reveals uncover ground for the house they are made for and for the houses that share its view. In a campaign, both reveals also apply to the other player-controlled houses, and their tests read the player’s own shroud, fog and discoveries.

When a house makes another its ally while AllyReveal=yes, every object of the house that made the alliance looks at once, so the new ally sees what those objects see. Outside a campaign, the objects of a passive house never look, so its alliances reveal nothing.

A spy that enters a Radar=yes structure marks the structure’s owner as spied on by the spy’s house. Every object of the spied house then looks at once. From then on, that house’s looks also uncover ground for the spy’s house until the mark is removed.

The mark is recomputed from the spied house’s remaining radar structures when a spied radar structure is destroyed, or when the house that spied on it captures it.

These trigger actions and this team mission reveal ground for every human player:

An observer’s seat, and a house’s defeat outside coach mode, lift both covers from every cell for that house. Observers and coach mode owns that view. Under coach mode, defeat changes nothing.

The reveal and darkness crate results act for the player who controls the collecting house, as crates describes.

Reveal all map, Reveal map and the reveal crate mark each house they reveal the map to as fully revealed. After that, the four reveals listed above and the reveal crate do nothing more for that house; only an observer’s seat or defeat still reveals everything. Reveal all map therefore cannot lift the fog that Reveal map or the reveal crate left.

Whether fog is on depends on the game type:

  • In a campaign, fog starts off, and only the map’s FogOfWar=yes turns it on.
  • In a skirmish or network game, the game options decide, and the map’s setting is ignored.

When fog is on, the end of scenario loading fogs every cell the local player has not yet uncovered. While fog is on, the shroud is drawn with the fog artwork, so both covers look the same.

A cell that goes under the fog records what stands on it. A structure whose whole footprint is fogged leaves a stand-in on each footprint cell, and the player keeps seeing the structure as it was. A vehicle, infantryman or aircraft leaves no stand-in and is deselected, so it disappears from view. Lifting the fog discards the stand-ins, removing a multi-cell stand-in from every cell it covered.

Looks and most reveals lift the shroud and the fog together. The Reveal map team mission and the reveal crate lift the shroud alone. A fog-only reveal works only on cells already out of the shroud.

Nothing is fogged for an observer or for a defeated player outside coach mode, and the fog is not drawn for them.

Two regrowth passes cover ground again, one for the shroud and one for the fog. Each covers ground for every house except the house of an observer and a house defeated outside coach mode, which keep the whole map.

Both passes leave uncovered the ground that watching objects can still see. Outside a campaign, every vehicle, infantryman and structure on the ground is a watching object, and it keeps ground uncovered for its owner and for the houses that share the owner’s view. Aircraft in flight do not watch.

In a campaign, the watching objects are:

  • the objects on the ground of player-controlled houses that the player has discovered;
  • while AllyReveal=yes, the structures of computer houses allied to the player.

An allied computer house’s vehicles and infantry are not watching objects in a campaign. They uncover ground only when they move, so a mission can keep the ground around them hidden until the player reaches it.

While ShroudGrow=yes and ShroudRate is not zero, a shroud pass runs every ShroudRate game minutes. The first pass runs as soon as both conditions hold; the interval only spaces the passes after it.

Each pass shrouds the edge of every uncovered area: the cells that are mapped but still show a partial shroud piece. Cells deeper inside an uncovered area are clear, so the pass never touches them. The shroud therefore creeps inward one cell per pass and never reappears in the middle of an uncovered area. The watching objects then look again and uncover whatever they can still see.

Creep shadow back in runs one shroud pass on demand, whatever ShroudGrow and ShroudRate say.

While fog of war is on and FogRate is not zero, a fog pass runs every FogRate game minutes. The first pass runs as soon as both conditions hold.

Each pass works on the edge of the fog the way the shroud pass works on the edge of the shroud. It fogs the edge cells that no watching object can see, so the fog also creeps inward one cell per pass. The watching objects only keep their cells clear; they do not uncover new ground.

The exception is an allied computer structure in a campaign while AllyReveal=yes. Its look during the pass is an ordinary one, so each fog pass lifts both covers around it.

Reshroud map and its team mission return every cell to shrouded and fogged for every human player, and clear each such player’s fully-revealed mark so the reveal actions work for them again. An observer, and a player defeated outside coach mode, keep the whole map. The watching objects then look again and uncover what they can still see.

The radar’s background is a picture of every cell in the playable area. Each cell takes the first color that applies:

  1. the radar color of a terrain object on the cell;
  2. the bridge color, for a cell under a bridge;
  3. the radar color of an overlay that is not Tiberium;
  4. the color of the Tiberium growing there;
  5. otherwise, the tile’s low and high colors, adjusted for the theater and brightened by the cell’s height.

Objects appear as blips over that picture, in the owning house’s color. Disguised infantry use the local player’s color instead.

Where several objects share one radar pixel, only one blip is drawn, and the local player’s objects take priority. An object in limbo has no blip. A structure’s pixels that fall outside the radar are not drawn; a vehicle, infantryman or aircraft there is drawn on the nearest edge pixel instead. Which other objects appear at all is decided by the radar test in cloaking and detection.

Damage that has any effect makes the damaged object’s blip flash for RadarCombatFlashTime frames. Only the local player’s objects flash. The blip switches between its normal and inverted color every FlashFrameTime frames.

A white rectangle marks the part of the map the tactical view is showing, and a white frame surrounds the pane. Radar events are drawn over the terrain and the blips; radar event covers the kinds and their timings.

Fog does not hide terrain on the radar. Fogged ground keeps its true color there, even while the tactical view hides it. Only objects drop off the radar under fog.

While the pane is opening or closing, only the frame animation is drawn: 40 frames, four system ticks each. RadarOn plays as the pane starts to open, and RadarOff as it starts to close. Clicks on the pane do nothing unless it is fully open and showing the map.

Whether the pane is raised at all is decided elsewhere. Power output and drain covers the availability test, and ion storms the suppression that overrides it.

Discovery is recorded on each object, separately for each house. Every machine in a network game records the same marks.

Only human players discover other houses’ objects. Outside a campaign, every human player discovers every object as soon as it is placed on the map. In a campaign, the player discovers an object as it is placed if its cell is free of both the shroud and the fog; a structure is also discovered if its cell is completely clear of shroud. In both, an object placed outside the playable area, and an infantryman whose type has Sight=0, start undiscovered by every human player.

After placement, a human player discovers an object when either of these happens:

  • the cell the object is drawn over is uncovered for that player;
  • the object reaches the center of a cell that is completely clear of that player’s shroud.

In a campaign, the player also discovers any object as soon as its position is no longer shrouded, even under fog. An object discovered this way does not spring Discovered by player and does not look, so the event can be missed for it.

A computer house discovers only its own objects, as they are placed. Every house also discovers a structure it builds as soon as it places it.

The first time a human player other than the owner discovers an object:

None of these happens again until the human players’ marks on the object are cleared. That happens when the object goes into limbo, for example by boarding a transport, unless it belongs to a human player or, in a campaign, to any player-controlled house. Computer houses keep their marks. A discovered object can also look, as Who looks, and when describes.

Also in a campaign, the objects of every player-controlled house do not automatically target an object of another house that the player has not discovered, unless that object is an aircraft.

The shroud also limits orders. An order onto a shrouded cell is refused unless the object’s type has MoveToShroud=yes and the cell lies inside the playable area. An allowed order becomes a plain move, except a patrol waypoint order. In a campaign, an order onto a shrouded object also becomes a plain move for a MoveToShroud=yes type and is refused for any other.

A subterranean unit ordered to move onto a shrouded object does nothing unless AllowShroudedSubteranneanMoves=yes. An aircraft ignores that order regardless.

BlendedFog and CameraRange are read but change nothing; their pages explain why.

19 of 19

KeyDescriptionValueWhen omitted
AircraftFogRevealglobal rulesRadius in cells that an airborne aircraft with no sight of its own clears of fog.integer6
AllowShroudedSubteranneanMovesglobal rulesWhether a subterranean unit accepts a click on an object standing under the shroud, and follows a rally point into the shroud.booleanno
AllyRevealglobal rulesWhether a house's objects also reveal terrain for its allies.booleanyes
AttackingAircraftSightRangeglobal rulesRadius in cells revealed when a human player's aircraft fires from or at shrouded ground.integer5
FlashFrameTimeglobal rulesFrames between repaints of a flashing radar blip.integer7
FogRateglobal rulesGame minutes between fog of war regrowth passes.floating point.05
LeptonsPerSightIncreaseglobal rulesLeptons of height that earn a vehicle, infantryman or structure ten percent more sight range.integer50
LocalSizescenariosThe part of the playfield the player can see, scroll to and play in, in cells.rectangle (x,y,w,h)the whole playfield, trimmed like a written value
MoveToShroudAircraftType, BuildingType, InfantryType, UnitTypeWhether the type accepts an order onto ground that is still under the shroud.booleanyes
RadarCombatFlashTimeglobal rulesFrames a damaged object's radar blip keeps flashing for.integer21
RadarOffglobal rulesSound played as the radar pane begins closing.soundnone
RadarOnglobal rulesSound played as the radar pane begins opening.soundnone
RevealByHeightglobal rulesWhether high ground between an object and a cell blocks that cell from being revealed.booleanyes
RevealTriggerRadiusglobal rulesRadius in cells that the reveal-around-waypoint trigger action uncovers.integer5
ShroudGrowglobal rulesWhether the shroud creeps back over terrain that nothing is watching.booleanno
ShroudRateglobal rulesGame minutes between shroud regrowth passes.floating point4
SightAircraftType, BuildingType, InfantryType, UnitTypeRadius in cells that the type reveals around itself for its owner.integer0
Size5 applicable typesHow much room an object takes up inside a transport, or on a scenario the width and height of the playfield.integerVaries by type
VeteranSightglobal rulesSight range of an object holding the sight ability is multiplied by one more than this value.floating point1

History

  1. Changed0.1.0

    Keep limbo objects out of radar tracking

  2. Changed0.2.0In development

    Reveal an ally's structure the moment it is placed

  3. Changed0.2.0In development

    Record discovery the same way on every machine

  4. Changed0.2.0In development

    Keep fogged object redraws inside safe bounds

  5. Changed0.2.0In development

    Watch a multiplayer match as an observer

  6. Changed0.2.0In development

    Give the alliance and spied-radar sweeps an ordinary look

  7. Changed0.2.0In development

    Keep a shroud and fog for every house