Skip to content

Ion storms

Scripted global condition that grounds aircraft and hovercraft, calls lightning down on the map, and swaps the scenario to its ion lighting values.

Features & systemsCombat & weaponsSuperweapons & special systems

Changed in 0.2.0

One storm runs at a time, and it covers the whole map for every house. Every storm comes from scenario scripting. No rules setting, timer, or weather model starts one.

A storm grounds objects by cutting the power to their locomotor. Readers who already know locomotors can skip to starting a storm.

A locomotor is the part of an aircraft, vehicle, or infantryman that moves it. It decides whether the object drives, walks, hovers, flies, burrows, or steps. Each object gets the locomotor class that its type’s Locomotor= names. That page lists the ten classes.

Only two classes are ion-sensitive: the flying locomotor, which aircraft use, and the hover locomotor, which hovercraft use. Objects on the drive, walk, jumpjet, tunnel, teleport, mech, levitate, and ballistic locomotors keep their power. Jumpjets follow separate and harsher rules.

On this page, “aircraft” means objects of a type listed in [AircraftTypes]. A vehicle type given the flying locomotor loses power in a storm like an aircraft, but the rules below that name aircraft do not apply to it.

Ion Storm start… takes a number and starts a storm that lasts that many seconds. The action does nothing while a storm is already running.

Ion storm start in… takes a number and starts a storm that lasts that many game frames. The team skips the mission while a storm is already running.

A duration of -1 never expires. Such a storm lasts until Ion Storm stop… or Ion storn end runs. “Ion storn end” is the engine’s spelling of that mission’s name.

Only the team mission can give a duration of -1, because the trigger action turns -1 into -15. Any other duration of 0 or less ends the storm on the frame it breaks or the next one. Such a storm still has every effect of the break, so the airborne aircraft it crashes stay lost.

UseIonStorms=yes in a random map seed makes the generator load the file ION.INI. The generator applies that file’s [General] section over the loaded rules and takes the six ion lighting values from its [Lighting] section. It also adds the file’s trigger types and tag types to the generated map. Storms come only from those triggers; the option does not schedule any storm itself.

Both the trigger action and the team mission start a countdown of IonStormWarning seconds. The storm breaks when the countdown ends. With IonStormWarning=0, there is no countdown and the storm breaks on the frame the action or mission runs.

Each time the remaining time reaches a multiple of 15 seconds, EVA announces the approaching storm and an on-screen message shows for ten seconds. With IonStormWarning=31, the announcements come 30 and 15 seconds before the storm. A countdown of 15 seconds or less gives no announcement.

A second start request during the countdown does not restart it. The storm still breaks when the first countdown ends, but it lasts as long as the second request asked.

When the countdown ends, the engine does the following, in order:

  1. Cuts the power of every object on the map with an ion-sensitive locomotor, and crashes the airborne aircraft among them. Grounded locomotors lists the objects that keep their power.
  2. Makes IonAmbient the target of the ambient fade, and has the player’s radar re-evaluated.
  3. Starts the storm’s audio.
  4. Tints every terrain palette, and the palette of every color scheme with more than one intensity level, with IonRed, IonGreen, and IonBlue. Screen static covers the tactical view while the palettes are rebuilt.
  5. Shows an ion storm message for ten seconds. EVA says nothing when the storm breaks; the countdown announcements are the only spoken warning.

A storm plays either a storm sound over the music or a storm music track in place of it. SOUND.INI decides which: when its [SoundList] names a sound IONSTORM and the game finds a file it can play for at least one of that sound’s samples, the storm uses that sound. The shipped SOUND.INI files do not, so an unmodified game plays the storm track.

  • Storm sound. The sound plays for the whole storm and starts again whenever it ends, including when louder sound effects took its voice, so a sound meant to last the storm should have LOOP in its Control=. The music keeps playing, lowered to IonStormVolume= over FadeOut= seconds. With the sound effect volume at zero the storm is silent, and the music is still lowered.
  • Storm track. The music track playing when the storm breaks pauses where it is, and the track registered as IONSTORM in THEME.INI plays in its place, repeating until the storm ends. With CrossFade= set, the two tracks crossfade over that time; otherwise the paused track fades out over a quarter of a second while the storm track starts at full volume. The change back at the end of the storm takes the same time.

A game saved during a storm starts the storm’s audio again when it is loaded: the storm sound, or the storm track from its beginning. Loading any saved game while a storm plays the storm track first brings back the track that storm paused, as the end of a storm does, so the storm track never carries over into a game without a storm. Winning, losing, restarting or leaving the mission during a storm ends the storm sound and restores the music’s level at once.

Each frame of a storm calls a bolt with a chance of about IonLightningFrequency percent. With IonLightningFrequency=25, a bolt is called on about one frame in four. Digits beyond the first decimal place are dropped.

IonLightningRandomness is the percentage of bolts that strike a random cell. The other bolts are aimed at an object.

A random bolt strikes a random cell of the playfield. It can hit empty ground, including cells outside the playable area.

An aimed bolt first builds a list of candidates, then strikes the center cell of one candidate chosen with equal odds. If the list is empty, no bolt falls that frame. With IonLightningRandomness=0, a storm over a map with no candidates never strikes anything.

Aircraft are never candidates. Every building of any house can be one. A vehicle or infantryman of any house can be one under any of these conditions:

  • it is not on a team, or its team’s TeamType does not set IonImmune=yes;
  • its type sets LightningRod=yes, which puts it back in the list despite IonImmune.

Each object that qualifies joins the list with the chance in this table. A lightning rod raises the chance only while the object holding it has power. A rod on a switched-off building, or on a vehicle or infantryman whose locomotor has lost power, gives the base 2%.

CandidateChance of entering the list
Any building, vehicle or infantryman not covered by a row below2%
Building with LightningRod=yes that is switched on42%
Vehicle or infantryman with LightningRod=yes whose locomotor still has power12%
Aircraftnever

A bolt strikes the ground of its cell, or the bridge deck when the cell has a bridge over it. At the strike point, the engine:

  • plays LightningSound at full volume, wherever on the map the bolt lands;
  • plays the explosion animation that IonLightningDamage and IonStormWarhead select for the cell’s land type;
  • adds a flash of light when that warhead sets Bright=yes;
  • deals IonLightningDamage through IonStormWarhead to everything within the standard explosion radius of 1.5 cells. The bolt has no attacker, so no house gets credit for a kill;
  • throws debris when the strike changed the cell, as described below;
  • draws the bolt as a jagged line from the strike point up to a height of 200 levels.

The strike throws two to six animations picked from MetallicDebris under any of these conditions:

  • the building in the cell after the blast is not the one that stood there before it;
  • the vehicle, infantryman, aircraft, or building nearest the cell’s north corner after the blast is not the one nearest it before. In a cell holding several objects, only that nearest one is compared;
  • the cell’s height changed;
  • the cell held no building, vehicle, infantryman, or aircraft before the blast, and its land type is road, rock, wall, or weeds. Such a cell throws debris on every strike, even when nothing changes.

A vehicle, infantryman, or aircraft on a team whose TeamType sets IonImmune=yes takes no damage from the blast. Unlike the candidate list, this protection covers aircraft. It also covers any explosion whose warhead is the one IonStormWarhead names, not only lightning. LightningRod=yes does not remove this protection, so such a unit attracts bolts and survives them.

Lightning strike at… strikes its waypoint’s cell in the same way, whether or not a storm is running.

Each of the two ion-sensitive locomotors has its own exemption.

An object on the flying locomotor keeps its power if its type sets HunterSeeker=yes.

An object on the hover locomotor keeps its power under any of these conditions:

  • it is in radio contact with a building whose type sets WeaponsFactory=yes;
  • it stands on the first, third, or fourth cell of the second row of a WeaponsFactory=yes building’s foundation.

These exemptions keep a storm from stranding a newly built hovercraft in the factory doorway. An exempt hovercraft keeps its power until it receives a move order during the storm while neither condition holds. It loses power when it receives that order.

An object whose locomotor has lost power cannot move, the same result an EM pulse has on movement. A storm does not stun, so a grounded hovercraft can still fire.

A moving aircraft tumbles, stops, and sinks. A hovercraft drops its move order, drifts as it settles, and comes to rest tilted to the slope of its cell.

An object with an ion-sensitive locomotor that is placed on the map during a storm, such as a newly built aircraft, arrives without power unless an exemption applies.

An aircraft that loses power while off the ground crashes. Its strength drops to zero, its passengers die, and it tumbles down. No house gets credit for the kill. An aircraft already on the ground only loses power.

For the rest of the storm, no aircraft can fire, whatever its weapons. Parking on a repair or reload building does not restore an aircraft’s power. Lightning never aims at aircraft.

The jumpjet locomotor is not ion-sensitive, but a storm destroys a jumpjet that moves while it is off the ground. Such a jumpjet takes damage equal to its current strength through the C4Warhead warhead in [CombatDamage]. Armor does not reduce this damage, and no house gets credit for the kill. A jumpjet hovering in place with no move order survives until it is ordered to move.

A jumpjet on the ground cannot take off during a storm. Move orders route surviving jumpjets on foot, like ordinary infantry.

The player loses the radar for the whole storm, whatever their power and radar buildings. When the storm ends, the radar returns if power and a radar building would otherwise provide it. A player given the whole map keeps the radar during a storm; observers and coach mode owns that rule.

  • A weapon with IonSensitive=yes cannot fire during a storm.
  • A factory that finishes an aircraft during a storm places it on the ground on a nearby cell instead of docking it.
  • A service depot does not restore power to a docked vehicle during a storm, and neither does a repair building the vehicle stands on.

A scenario’s [Lighting] section holds two sets of values: the ordinary Ambient, Red, Green, Blue, Ground, and Level, and their Ion counterparts. A map writes both sets in the same section:

map file
[Lighting]
Ambient=0.870000 ; the level the map fades back to when a storm ends
Red=1.000000 ; the tint the map uses the rest of the time
Green=1.000000
Blue=1.000000
Ground=0.000000 ; ground darkening while no storm runs
Level=0.000000 ; height shading while no storm runs
IonAmbient=0.500000 ; the level the storm fades the map toward
IonRed=1.620000 ; the tint the storm lays over every palette
IonGreen=1.250000
IonBlue=0.340000
IonGround=0.000000 ; ground darkening while the storm runs
IonLevel=0.000000 ; height shading while the storm runs

While a storm runs, cell brightness uses IonLevel and IonGround in place of Level and Ground. Aircraft also take their height brightness from IonLevel, and so do vehicles and infantry above the ground. A palette created during the storm, such as one for a newly lit cell, gets the ion tint at once.

The tint and the light level change on different schedules. The tint switches when the storm breaks and switches back when it ends. The light level fades toward IonAmbient through the ambient ramp, and fades back to Ambient after the storm.

An omitted ion key takes the value of the ordinary key it pairs with, so a map that sets only Ambient, Red, Green, and Blue gets matching ion values. The ground and level keys are the exception.

While the current light level differs from its target, the engine moves it toward the target by AmbientChangeStep, in the same units as Ambient. It then waits AmbientChangeRate minutes, at 900 frames to the minute, before the next step. A step never passes the target. Both the storm’s darkening and the return to daylight use this ramp.

Ambient light <= … and Ambient light >= … are tested only after a fade step. A storm’s darkening and its return to daylight each produce a series of such steps.

Set ambient light... stores its new level at once. While a storm runs, the map does not fade to it; the map fades to that level when the storm ends. Set ambient rate… and Set ambient step… change the ramp’s rate and step for the rest of the scenario, whether or not a storm is running.

A storm ends when its duration runs out, or when Ion Storm stop... or Ion storn end runs. Neither of those stops a storm that is still in its warning countdown, so that storm breaks as scheduled. When a storm ends, the engine:

  1. Restores power to every object with an ion-sensitive locomotor, including those in limbo that the break skipped.
  2. Makes the scenario’s ambient level the target of the ambient fade, so the map fades back instead of snapping. That level is Ambient, or the level a Set ambient light... action stored during the storm.
  3. Has the player’s radar re-evaluated.
  4. Ends the storm’s audio. The storm sound ends, playing its decay if it has one, and the music rises back to its own level over FadeOut= seconds. With a storm track, that track stops and the paused track resumes from where it paused. If the music was changed during the storm, for example by a Play music theme action or the player, the track playing then continues instead and the paused track is dropped.
  5. Removes the ion tint from every terrain palette and color scheme, again behind screen static.

Losses are permanent. Crashed aircraft and destroyed jumpjets do not come back. Nothing schedules another storm; it needs another trigger action or team mission.

Two settings look like ion storm controls but have no effect:

  • IonStormDuration in [General] is not a default storm length. Every storm lasts as long as its trigger action or team mission says.
  • IonStorms in [SpecialFlags] does not enable or disable storms. Scripted storms run whether it is set or cleared.

The ion storm crate result starts no storm. Crates owns that result.

26 of 26

KeyDescriptionValueWhen omitted
AmbientscenariosThe scenario's overall light level, where 1 is full daylight.floating point1
AmbientChangeRateglobal rulesMinutes between one step of the ambient light fade and the next.floating point.2
AmbientChangeStepglobal rulesHow far the ambient light moves on each step of a fade, as a fraction of full ambient light.floating point.1
BluescenariosThe scenario's blue palette tint, where 1 leaves the blue channel unchanged.floating point1
GreenscenariosThe scenario's green palette tint, where 1 leaves the green channel unchanged.floating point1
GroundscenariosA flat darkening subtracted from every cell's brightness, as a fraction of full light.floating point0
HunterSeeker5 applicable typesMarks a type as a hunter-seeker drone, or names the drone a side's hunter-seeker superweapon launches.booleanVaries by type
IonAmbientscenarios, random map generationThe light level the map fades toward while an ion storm runs, where 1 is full daylight.floating pointContext-dependent
IonBluescenarios, random map generationThe blue palette tint in force while an ion storm is running, where 1 leaves the blue channel unchanged.floating pointContext-dependent
IonGreenscenarios, random map generationThe green palette tint in force while an ion storm is running, where 1 leaves the green channel unchanged.floating pointContext-dependent
IonGroundscenarios, random map generationThe flat darkening subtracted from every cell while an ion storm is running, as a fraction of full light.floating pointContext-dependent
IonImmuneTeamTypeExempts the team's members from ion storm lightning damage and from being aimed at.booleanno
IonLevelscenarios, random map generationThe brightness added per height level while an ion storm is running, as a fraction of full light.floating pointContext-dependent
IonLightningDamageglobal rulesThe raw damage each ion storm lightning bolt delivers.integer500
IonLightningFrequencyglobal rulesThe approximate percent chance, on each frame of an ion storm, that the storm tries a lightning bolt.floating point25
IonLightningRandomnessglobal rulesThe percent chance that an ion storm lightning bolt strikes a random cell instead of an object.integer75
IonRedscenarios, random map generationThe red palette tint in force while an ion storm is running, where 1 leaves the red channel unchanged.floating pointContext-dependent
IonSensitiveWeaponTypeStops the weapon from firing while an ion storm is running.booleanno
IonStormWarheadglobal rulesThe WarheadType every ion storm lightning bolt detonates with.classnone
IonStormWarningglobal rulesSeconds of warning between a scripted ion storm being ordered and the storm breaking.integer31
LevelscenariosThe brightness added for each height level of a cell, or a height offset for the map's cells.integer0
LightningRodAircraftType, BuildingType, InfantryType, UnitTypeRaises the type's chance of being picked as the target of an ion storm lightning bolt.booleanno
LightningSoundglobal rulesSelects the sound played by each ion storm lightning bolt.soundnone
MetallicDebrisglobal rulesWreckage animations thrown up by ion storm strikes, collapsing bridges, and destroyed objects with no debris types of their own.typelist(empty)
RedscenariosThe scenario's red palette tint, where 1 leaves the red channel unchanged.floating point1
UseIonStormsrandom map generationMakes the random map generator load `ION.INI`, the file that sets up a generated map's ion storms.booleanno

History

  1. Changed0.1.0

    Stop jumpjet flight processing after ion-storm destruction

  2. Changed0.2.0In development

    Resume the music after an ion storm, or play a storm sound over it

  3. Changed0.2.0In development

    Watch a multiplayer match as an observer