Skip to content

Warheads and damage

Gathers the objects one blast reaches and turns the warhead's figures into the strength each of them loses.

Features & systemsCombat & weaponsWeapons, warheads & projectiles

Damage reaches an object in two stages. A blast starts from one point on the map and gathers what stands near it, carrying a raw damage figure, the object to credit with whatever it kills, and a warhead; a shell landing, a Tiberium field chain-reacting, an exploding barrel, a lightning bolt from an ion storm and the charge an engineer leaves on a bridge all raise one. The conversion then runs separately for each object the blast gathered, turning that one raw figure into the strength that particular object loses. The conversion also runs for damage that never came from a blast at all, such as the tick a base takes while it is short of power.

This page owns both stages. Firing geometry and beam weapons settles the raw figure a shot leaves with; projectile flight and impact settles where the blast is placed and how many blasts one shot delivers; and what a destroyed object leaves behind belongs to destruction and debris.

A WarheadType is a rules section describing what damage does once it has arrived. The [Warheads] list registers one, and a weapon’s Warhead= names the one its shots carry; that page covers what a name nothing declares produces, and what happens to a weapon carrying no warhead at all.

The division of labor is fixed. The weapon holds how much damage a shot carries and the projectile holds how it travels; the warhead holds what that figure is worth against each kind of target, how quickly it thins with distance, and every effect the blast has on the ground it lands on.

rules.ini
[MyShellWH] ; a WarheadType registered in [Warheads]
Verses=100%,80%,60%,40%,20% ; against none, wood, light, heavy and concrete armor
Spread=5 ; how slowly the damage thins with distance
ProneDamage=50% ; what reaches an infantryman lying down
AnimList=MYBANG16,MYBANG24 ; example AnimTypes

Verses is a list of five entries in a fixed order, one for each armor class an object type can carry, so the warhead above is worth its whole figure against an unarmored target and a fifth of it against a concrete one.

Three warhead settings replace all of this rather than shaping it. A shot whose warhead is EMEffect=yes spends its figure as a pulse and one whose warhead is Webby=yes spends it as a web, so neither reaches the sweeps below; a weapon whose warhead carries a LimpetFactor of 1 or more fires no shot at all when its target is an object rather than a cell.

The list of candidates is built first and in full, and only once it is complete is anything damaged. Two sweeps fill it, and a candidate gathered by either goes on to the same tests.

The first sweep is by cell. The blast’s own cell and the eight around it are walked in turn and everything standing in each of them is added — a structure, a vehicle, an infantryman, a landed aircraft, a tree. Damage never spills further than one cell this way, whatever Spread says.

Two candidates are left out of this sweep:

  • the object credited with the blast, so a shot never damages its own firer through this route;
  • a vehicle whose type is named in HarvesterUnit, while the harvester truce or a scenario’s harvester-immunity option is in force.

A cell carrying an IsVeinholeMonster=yes overlay also offers a veinhole monster, which that page covers.

Which list of occupants each cell offers is settled once, from the blast’s own cell alone. Where that cell lies under a bridge and the blast stands more than 208 leptons above the ground there — a lepton being the engine’s internal distance unit, at 256 to the cell — all nine cells are read for what stands on their bridge decks; otherwise all nine are read for what stands on the ground. A blast on a bridge therefore misses everything on the ground in the neighboring cells, and one under a bridge misses everything up on the deck.

Whenever the blast stands above the ground at the middle of its own cell, a second sweep runs in addition to the first, and it is not restricted to cells at all. Three whole lists are walked — every aircraft in the game, every infantryman whose type is JumpJet=yes, and every vehicle whose type is Jellyfish=yes — and each one found is added under all of:

  • it is placed on the map;
  • it has strength left;
  • it lies within one cell of the blast, measured in three dimensions, so height counts against the same allowance as ground distance.

This is the only route by which a blast reaches anything that is flying. An object off the ground is not entered in any cell’s list of occupants — an aircraft in flight and a jumpjet soldier in the air are both taken out of the cell they were standing in — so the nine-cell sweep cannot see them however close the blast lands. A shell that goes off one lepton above the ground opens this sweep exactly as an airburst overhead does, and a shot that lands flat on the ground opens it not at all.

Three things about the sweep are worth reading off its conditions:

  • Nothing here asks whether the candidate is actually airborne. An aircraft sitting on the ground and a jumpjet soldier standing on its feet are both walked in by this sweep as well as by the cell sweep, and the duplicate is discarded.
  • The object credited with the blast is not excluded here as it is from the cell sweep, so an aircraft can be caught by a blast it is itself responsible for.
  • Every cell of a wide-area blast is placed exactly at that cell’s ground level, so none of them opens this sweep. A wide blast reaches nothing that is off the ground, however large its radius.

Everything gathered is then tested, in the order the engine asks. A candidate is damaged under all of:

  • it is still in play, which a candidate destroyed earlier in the same blast is not;
  • it is not a structure whose type is InvisibleInGame=yes;
  • its strength is above zero;
  • it is placed on the map and not in limbo;
  • it lies within one and a half cells of the blast, at the distance the blast measures it at;
  • any of:
    • the warhead is not the one IonStormWarhead names;
    • the candidate is neither an infantryman, a vehicle nor an aircraft;
    • it belongs to no team;
    • its team’s type is not IonImmune=yes.

The figure that arrives is the blast’s raw damage, and it is the same figure for every candidate. Each one then works it down on its own account, so two objects standing in one explosion can lose very different amounts. The steps run in this order.

  1. A prone soldier. An infantryman lying down keeps only the warhead’s ProneDamage fraction of the figure, and never less than one point.
  2. A web. A Webby=yes warhead sets the figure to nothing for any infantryman that is not web-immune, and entangles it instead.
  3. The house divisors. The figure is divided by the house’s armor divisor — the product of the country’s figure and the difficulty’s, which difficulty settings sets out — and again by the object’s own, which is 1 until an armor crate changes it.
  4. The veteran bonus. An object holding the STRONGER ability divides again by VeteranArmor plus one.
  5. The floor of one. Whatever steps 3 and 4 left is raised back to one point, so no divisor can take a hit to nothing.
  6. Type immunity. TypeImmune=yes ends the sequence outright when the attacker is the same type and belongs to the same house.
  7. Object immunity. Immune=yes ends it as well, and so does a target already at zero strength.
  8. The armor table. The figure is multiplied by the warhead’s Verses entry for the target’s Armor= class and truncated to a whole number.
  9. Distance. The result is divided by the number of distance steps between the blast and the target, as the next section derives.
  10. The floor. Inside four distance steps, the result is raised to MinDamage.
  11. The ceiling. The result is capped at MaxDamage, once per object rather than once per blast.
  12. Applied. What is left is taken off the target’s strength, cut back first to the strength that was there, so a killing blow is recorded at what the target still had rather than at what was aimed at it.

Damage the engine marks as forced skips almost all of it. Steps 1 and 3 through 6 are refused for a forced hit, step 7 is bypassed, and steps 8 through 11 are skipped entirely, so a forced hit lands at exactly its written figure. Only the web of step 2 and the application of step 12 still run. Two other things end the sequence at step 8: a blast carrying no warhead at all, and a scenario running with Inert=yes, both of which reduce the figure to nothing there.

The distance a target is measured at is not simply how far it stands from the point of impact. Three adjustments come first.

  • A height difference of less than one terrain level — 104 leptons — is discarded, so a target perched a fraction of a level above or below the blast is measured as though it stood level with it.
  • An aircraft is measured at half its true distance. That widens the reach that finds it and softens the thinning that follows, so the same shot landing beside an aircraft and beside a vehicle hurts the aircraft more.
  • A structure standing in the blast’s own cell is measured at zero — a direct hit — however far its center lies from the impact. This holds only while nothing else stands in that cell: structures are added to the end of a cell’s list of occupants and this test reads the front of the list, so an infantryman on the same cell displaces the structure from it and the structure is measured from its own center like anything else.

That distance in leptons is then turned into a number of steps. It is divided by three times the warhead’s Spread, and the result is held between 0 and 16. The damage is divided by the number of steps, and a count of zero divides by nothing. Both divisions discard their remainder, which is what turns a smooth falloff into the handful of thresholds below. Every one of them is a distance in leptons and every one scales with Spread.

Distance
Full damage out to6 × Spread − 1
Halved from6 × Spread
Down to a sixteenth from48 × Spread
MinDamage floor applies inside12 × Spread

At the default Spread=1 that puts the halving 6 leptons out — a fortieth of a cell — so anything but a direct hit is thinned hard. It also puts the sixteenth step at 48 leptons, well inside the blast’s one-and-a-half-cell reach. From Spread=8 upward the sixteenth step lies beyond that reach entirely and is never used.

A weapon whose Damage= is negative mends rather than hurts, and the figure takes a different route through everything above. None of the reductions touch it: the prone fraction, the house divisors, the veteran bonus, type immunity, the armor table, the distance thinning, the floor and the ceiling are all refused or returned before. Two conditions decide whether it lands:

  • the target lies within 8 leptons of the blast — a thirty-second of a cell — so a healing shot mends what it strikes and nothing standing beside it;
  • the target is not Immune=yes and has strength left, since nothing revives an object already at zero.

What lands is the whole figure, added to strength and clamped at the type’s maximum. The hit is reported as no damage at all, so nothing springs from it and the target does not turn on the healer.

Clearing a limpet mark is the one consequence that does not wait for the 8-lepton test. It runs for every object the blast reached — everything inside the one-and-a-half-cell test — and ahead of the immunity check, so a healing blast strips the marks off everything around it and mends only what it landed on.

Everything above concerns objects. A blast also works on the ground it lands on, and those effects run after the damage has been handed out, in this order. Those that weigh a figure at all weigh the blast’s raw damage rather than what any object ended up losing, so armor and distance never move a blast across one of their thresholds.

  1. Rocker=yes tips the vehicles in the seven-by-seven block of cells around the blast.
  2. A ChainReaction=yes overlay in the blast’s own cell is set off, and that cell’s Tiberium is reduced by a tenth of the figure. A Tiberium overlay additionally requires a Tiberium=yes warhead, and several of the blasts the engine raises for itself ask for no chain reaction at all.
  3. A wall overlay in that cell is reduced by the figure, for a Wall=yes warhead or a Wood=yes one standing over a wood-armored wall.
  4. A bridge span at that cell is rolled for against BridgeStrength, with DestroyableBridges=yes and a Wall=yes warhead.
  5. An Explodes=yes overlay in that cell is cleared and goes off for AmmoCrateDamage.
  6. The ground is cratered on a Deform roll, made only above DeformThreshhold.
  7. A destroyable cliff at that cell is rolled for against CollapseChance.
  8. The warhead’s Particle system releases one particle.
  9. A Wall=yes or Fire=yes warhead cracks the ice beneath the blast.

The explosion animation and the lighting flash are not among them. AnimList, the SplashList substitution Conventional=yes makes over water, and the Bright=yes flash are all read by whatever raised the blast rather than by the blast itself, so which of them appear depends on the path that produced the explosion as well as on the warhead.

Three more warhead settings act on the victim rather than on the blast, and each is owned where its consequence is. InfDeath picks the death a killed infantryman performs; Sparky=yes chooses the flames a structure shows as it drops a damage level and sets a struck tree alight; Veinhole=yes decides who the victim blames for damage that names no attacker, which target selection sets out along with every other route from a hit to a shot fired back.

A second routine exists for blasts far larger than one and a half cells. It walks a square block of cells around its center and puts an ordinary blast into each one, with each cell’s share scaled by how far that cell lies from the middle. ExpSpread owns that scaling, which does not work the way the falloff above does.

No shot landing ever reaches it. The only route to it from a detonating projectile is a fallback meant to cover a nuclear blast whose explosion animation could not be built, and AtomDamage records why that fallback is never taken. Two paths do reach the routine, and both are deaths rather than impacts: the collateral blast an Explodes=yes object makes as it dies, and the extra blast a loaded harvester adds under TiberiumExplosive=yes.

46 of 46

KeyDescriptionValueWhen omitted
AmmoCrateDamageglobal rulesRaw damage of the blast an exploding overlay leaves behind when it is set off.integer100
AnimListWarheadTypeThe impact animations of the warhead, chosen by the damage the blast carries.list of AnimTypesnone
ArmorNo effect in some scopes14 applicable typesAn object type's armor class, or on a country or difficulty setting the divisor of the damage its objects take.ArmorTypeVaries by type
AtomDamageNo effectglobal rulesRaw damage of a wide-area nuclear blast that nothing in play reaches.integer1000
BridgeStrengthglobal rulesHow hard a bridge is to bring down, and the damage a demolition charge does to one.integer1000
BrightWeaponType, WarheadTypeLights the ground around an explosion with a brief flash.booleanno
ChainReactionOverlayTypeWhether damage to the overlay's cell can set off the Tiberium standing there.booleanno
CollapseChanceglobal rulesPercent chance that a destroyable cliff comes down when something reaches its cell.integer100
ConventionalWarheadTypeA blast landing on water plays a splash from the shared list instead of the warhead's own animations.booleanno
DamageAnimType, ParticleType, VoxelAnimType, WeaponTypeA weapon's damage per shot, or the damage an animation, particle or voxel animation delivers through its own warhead.floating pointVaries by type
DeformWarheadTypeThe chance, in percentage points per point of damage, that a blast lowers the ground under it.floating point0
DeformThreshholdWarheadTypeDamage at or below this figure never craters the ground.integer0
DestroyableBridgesscenariosWhether a wall-destroying blast can bring a bridge span down.booleanUnchanged
EMEffectWarheadTypeMakes the warhead's detonation create an EM pulse instead of applying blast damage.booleanno
ExpSpreadglobal rulesDivisor that turns an exploding object's collateral damage into the radius of its death blast.floating point.5
Explodes5 applicable typesBlasts the surroundings when an object of this type is destroyed, or detonates an overlay when any explosion reaches its cell.booleanno
FireWarheadTypeThe blast cracks the ice it lands on, and the attack cursor stops offering destroyable cliffs.booleanno
HarvesterUnitglobal rulesUnitTypes the engine treats as a house's harvesters when it counts or replaces them.typelistnone
ImmuneNo effect in some scopes12 applicable typesExempts the type from every damage path that is not applied as forced.booleanVaries by type
InertscenariosStrips all damage out of the scenario's weapons.booleanUnchanged
InfDeathWarheadTypeThe death sequence an infantryman killed by the warhead performs.integer0
InvisibleInGameBuildingTypeWhether the structure is drawn at all, offered to the player, or plotted on the radar.booleanno
IonImmuneTeamTypeExempts the team's members from ion storm lightning damage and from being aimed at.booleanno
IonStormWarheadglobal rulesSelects the WarheadType every ion storm lightning bolt detonates with.classnone
IsVeinholeMonsterOverlayTypeLets an explosion collect the veinhole monster standing under the overlay.booleanno
JellyfishUnitTypeReplaces a vehicle's whole firing behavior with an automatic sting on everything in the cells around it.booleanno
JumpJetInfantryTypeMarks the InfantryType as a jumpjet, so it routes, is targeted and dies as an air unit.booleanno
LimpetFactorWarheadTypeThe percentage of a vehicle's speed a limpet attachment takes away.floating point0
MaxDamageglobal rulesThe ceiling one application of damage is held to once armor and distance have been taken into account.integer1000
MinDamageglobal rulesThe smallest damage a warhead may deal to a target close to the impact.integer1
ParticleWarheadTypeThe particle system released where the warhead detonates.classnone
ProneDamageWarheadTypeThe fraction of the damage a prone infantryman takes, where one is the full amount.floating point1
RockerWarheadTypeThe blast tips the vehicles around it, with the force taken from the damage.booleanno
SparkyWarheadTypeBuildings knocked down a damage level burn with the fire set, and terrain objects struck catch fire.booleanno
SplashListglobal rulesThe animations played where something comes down in water.typelist(empty)
SpreadWarheadType, TiberiumA warhead's blast radius, or the frames a Tiberium type waits between spread passes.integerVaries by type
TiberiumOverlayType, WarheadType, random map generationMarks an overlay as Tiberium, lets a warhead set Tiberium off, or sets how much Tiberium a generated map receives.booleanVaries by type
TiberiumExplosiveNo effect in some scopesglobal rules, scenariosMakes a destroyed harvester detonate its load; the scenario flag of the same name is stored and never read.booleanVaries by type
TypeImmuneAircraftType, BuildingType, InfantryType, UnitTypeStops an object taking damage from another object of exactly its own type and house.booleanno
VeinholeWarheadTypeTurns damage from the warhead into an attack the victim blames on a veinhole monster.booleanno
VersesWarheadTypeThe percentage of a weapon's damage the warhead delivers against each armor class, in armor order.string100%,100%,100%,100%,100%
VeteranArmorglobal rulesDamage taken by an object holding the armor ability is divided by this value plus one.floating point1
WallBuildingType, OverlayType, WarheadTypeTurns a BuildingType into a wall segment, marks an OverlayType as wall, or lets a WarheadType destroy walls.booleanno
WarheadAnimType, ParticleType, VoxelAnimType, WeaponTypeThe WarheadType a weapon's shot carries, or the one an animation, particle or voxel animation delivers its own damage through.classnone
WebbyWarheadTypeThe warhead entangles the infantry it catches instead of damaging them.booleanno
WoodWarheadTypeLets the warhead damage terrain objects, and wall overlays whose armor is wood.booleanno