Warheads and damage
Gathers the objects one blast reaches and turns the warhead's figures into the strength each of them loses.
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.
Warheads in brief
Section titled “Warheads in brief”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.
[MyShellWH] ; a WarheadType registered in [Warheads]Verses=100%,80%,60%,40%,20% ; against none, wood, light, heavy and concrete armorSpread=5 ; how slowly the damage thins with distanceProneDamage=50% ; what reaches an infantryman lying downAnimList=MYBANG16,MYBANG24 ; example AnimTypesVerses 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.
What a blast reaches
Section titled “What a blast reaches”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 nine cells
Section titled “The nine cells”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.
The airborne sweep
Section titled “The airborne sweep”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.
Which candidates are damaged
Section titled “Which candidates are damaged”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
IonStormWarheadnames; - 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 warhead is not the one
What the target loses
Section titled “What the target loses”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.
- A prone soldier. An infantryman lying down keeps only the warhead’s
ProneDamagefraction of the figure, and never less than one point. - A web. A
Webby=yeswarhead sets the figure to nothing for any infantryman that is not web-immune, and entangles it instead. - 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
1until an armor crate changes it. - The veteran bonus. An object holding the
STRONGERability divides again byVeteranArmorplus one. - 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.
- Type immunity.
TypeImmune=yesends the sequence outright when the attacker is the same type and belongs to the same house. - Object immunity.
Immune=yesends it as well, and so does a target already at zero strength. - The armor table. The figure is multiplied by the warhead’s
Versesentry for the target’sArmor=class and truncated to a whole number. - Distance. The result is divided by the number of distance steps between the blast and the target, as the next section derives.
- The floor. Inside four distance steps, the result is raised to
MinDamage. - The ceiling. The result is capped at
MaxDamage, once per object rather than once per blast. - 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.
How distance thins the damage
Section titled “How distance thins the damage”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 to | 6 × Spread − 1 |
| Halved from | 6 × Spread |
| Down to a sixteenth from | 48 × Spread |
MinDamage floor applies inside | 12 × 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.
Healing
Section titled “Healing”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=yesand 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.
What one blast does besides damage
Section titled “What one blast does besides damage”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.
Rocker=yestips the vehicles in the seven-by-seven block of cells around the blast.- A
ChainReaction=yesoverlay 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 aTiberium=yeswarhead, and several of the blasts the engine raises for itself ask for no chain reaction at all. - A wall overlay in that cell is reduced by the figure, for a
Wall=yeswarhead or aWood=yesone standing over a wood-armored wall. - A bridge span at that cell is rolled for against
BridgeStrength, withDestroyableBridges=yesand aWall=yeswarhead. - An
Explodes=yesoverlay in that cell is cleared and goes off forAmmoCrateDamage. - The ground is cratered on a
Deformroll, made only aboveDeformThreshhold. - A destroyable cliff at that cell is rolled for against
CollapseChance. - The warhead’s
Particlesystem releases one particle. - A
Wall=yesorFire=yeswarhead 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.
The wide-area blast
Section titled “The wide-area blast”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.
Related settings
46 of 46
| Key | Description | Value | When omitted |
|---|---|---|---|
AmmoCrateDamageglobal rules | Raw damage of the blast an exploding overlay leaves behind when it is set off. | integer | 100 |
AnimListWarheadType | The impact animations of the warhead, chosen by the damage the blast carries. | list of AnimTypes | none |
ArmorNo effect in some scopes14 applicable types | An object type's armor class, or on a country or difficulty setting the divisor of the damage its objects take. | ArmorType | Varies by type |
AtomDamageNo effectglobal rules | Raw damage of a wide-area nuclear blast that nothing in play reaches. | integer | 1000 |
BridgeStrengthglobal rules | How hard a bridge is to bring down, and the damage a demolition charge does to one. | integer | 1000 |
BrightWeaponType, WarheadType | Lights the ground around an explosion with a brief flash. | boolean | no |
ChainReactionOverlayType | Whether damage to the overlay's cell can set off the Tiberium standing there. | boolean | no |
CollapseChanceglobal rules | Percent chance that a destroyable cliff comes down when something reaches its cell. | integer | 100 |
ConventionalWarheadType | A blast landing on water plays a splash from the shared list instead of the warhead's own animations. | boolean | no |
DamageAnimType, ParticleType, VoxelAnimType, WeaponType | A weapon's damage per shot, or the damage an animation, particle or voxel animation delivers through its own warhead. | floating point | Varies by type |
DeformWarheadType | The chance, in percentage points per point of damage, that a blast lowers the ground under it. | floating point | 0 |
DeformThreshholdWarheadType | Damage at or below this figure never craters the ground. | integer | 0 |
DestroyableBridgesscenarios | Whether a wall-destroying blast can bring a bridge span down. | boolean | Unchanged |
EMEffectWarheadType | Makes the warhead's detonation create an EM pulse instead of applying blast damage. | boolean | no |
ExpSpreadglobal rules | Divisor that turns an exploding object's collateral damage into the radius of its death blast. | floating point | .5 |
Explodes5 applicable types | Blasts the surroundings when an object of this type is destroyed, or detonates an overlay when any explosion reaches its cell. | boolean | no |
FireWarheadType | The blast cracks the ice it lands on, and the attack cursor stops offering destroyable cliffs. | boolean | no |
HarvesterUnitglobal rules | UnitTypes the engine treats as a house's harvesters when it counts or replaces them. | typelist | none |
ImmuneNo effect in some scopes12 applicable types | Exempts the type from every damage path that is not applied as forced. | boolean | Varies by type |
Inertscenarios | Strips all damage out of the scenario's weapons. | boolean | Unchanged |
InfDeathWarheadType | The death sequence an infantryman killed by the warhead performs. | integer | 0 |
InvisibleInGameBuildingType | Whether the structure is drawn at all, offered to the player, or plotted on the radar. | boolean | no |
IonImmuneTeamType | Exempts the team's members from ion storm lightning damage and from being aimed at. | boolean | no |
IonStormWarheadglobal rules | Selects the WarheadType every ion storm lightning bolt detonates with. | class | none |
IsVeinholeMonsterOverlayType | Lets an explosion collect the veinhole monster standing under the overlay. | boolean | no |
JellyfishUnitType | Replaces a vehicle's whole firing behavior with an automatic sting on everything in the cells around it. | boolean | no |
JumpJetInfantryType | Marks the InfantryType as a jumpjet, so it routes, is targeted and dies as an air unit. | boolean | no |
LimpetFactorWarheadType | The percentage of a vehicle's speed a limpet attachment takes away. | floating point | 0 |
MaxDamageglobal rules | The ceiling one application of damage is held to once armor and distance have been taken into account. | integer | 1000 |
MinDamageglobal rules | The smallest damage a warhead may deal to a target close to the impact. | integer | 1 |
ParticleWarheadType | The particle system released where the warhead detonates. | class | none |
ProneDamageWarheadType | The fraction of the damage a prone infantryman takes, where one is the full amount. | floating point | 1 |
RockerWarheadType | The blast tips the vehicles around it, with the force taken from the damage. | boolean | no |
SparkyWarheadType | Buildings knocked down a damage level burn with the fire set, and terrain objects struck catch fire. | boolean | no |
SplashListglobal rules | The animations played where something comes down in water. | typelist | (empty) |
SpreadWarheadType, Tiberium | A warhead's blast radius, or the frames a Tiberium type waits between spread passes. | integer | Varies by type |
TiberiumOverlayType, WarheadType, random map generation | Marks an overlay as Tiberium, lets a warhead set Tiberium off, or sets how much Tiberium a generated map receives. | boolean | Varies by type |
TiberiumExplosiveNo effect in some scopesglobal rules, scenarios | Makes a destroyed harvester detonate its load; the scenario flag of the same name is stored and never read. | boolean | Varies by type |
TypeImmuneAircraftType, BuildingType, InfantryType, UnitType | Stops an object taking damage from another object of exactly its own type and house. | boolean | no |
VeinholeWarheadType | Turns damage from the warhead into an attack the victim blames on a veinhole monster. | boolean | no |
VersesWarheadType | The percentage of a weapon's damage the warhead delivers against each armor class, in armor order. | string | 100%,100%,100%,100%,100% |
VeteranArmorglobal rules | Damage taken by an object holding the armor ability is divided by this value plus one. | floating point | 1 |
WallBuildingType, OverlayType, WarheadType | Turns a BuildingType into a wall segment, marks an OverlayType as wall, or lets a WarheadType destroy walls. | boolean | no |
WarheadAnimType, ParticleType, VoxelAnimType, WeaponType | The WarheadType a weapon's shot carries, or the one an animation, particle or voxel animation delivers its own damage through. | class | none |
WebbyWarheadType | The warhead entangles the infantry it catches instead of damaging them. | boolean | no |
WoodWarheadType | Lets the warhead damage terrain objects, and wall overlays whose armor is wood. | boolean | no |
No keys match the current filters.