|Values:||Floating point values: Any decimal number (clearer range should be added in Template:Values).
(in practice, CellSpreads over 11 generate Internal Errors)
CellSpread defines the blast radius of a warhead. Without CellSpread, a warhead only affects the cell it impacts on. With CellSpread, the damage extends beyond the current cell (it spreads), to the distance set through CellSpread.
As the damage progresses outwards from the point of impact,
For a quick, simple understanding of CellSpread, simply view it as follows: The damage will extend beyond the impact cell for as many cells as CellSpread is set to. e.g. if you set CellSpread to 3, the warhead will damage the current cell, and 3 cells further into all directions. A circle around the impact cell with a radius of 3, for a diameter of 6.
The image to the right reflects which cells are affected by which CellSpread under this simple model of CellSpread.
In reality, the game's parsing of CellSpread is performed slightly differently:
- If the warhead was detonated at least 1 lepton above the cell surface, air units get affected:
- The game divides the map area into a 20x20 grid at map load, and each unit using the Fly, Jumpjet or Rocket s is tracked all through its lifetime to know which "sector" of the grid it's in.
- When it's time to deliver damage, the game consults the grid to find such units within range (the exact rules for what counts as "within range" in this case are still being determined, but this appears to use the rough cell-based distance model rather than the precise lepton based one).
- For each found unit, the unit and its distance to the epicenter are added to the list of potential damage recipients.
- The game adds 0.99 to the CellSpread and drops the fractional part (in other words, it gets rounded to the next-highest integer, e.g. CellSpread=3.25 is turned into 3.25 + 0.99 = 4.24 = 4).
- It then finds all cells associated with that value in the CellSpread lookup table.
- For each cell in that range:
- The cell's contained Overlay is checked.
- If it has and either the overlay doesn't contain or the warhead also contains , the tiberium is reduced. The exact details of this process are still being worked out.
- If the cell's Overlay has
- If the warhead has , it destroys the wall.
- Otherwise, if the warhead has or the warhead has and the overlay has , the wall is damaged.
- If the cell did contain Overlay but no longer does, all objects and AI teams targeting that overlay are instructed to lose the target.
- All non-airborne objects in the cell, together with their 3D distance in leptons from the detonation point, are added to the list of potential damage recipients.
- The cell's contained Overlay is checked.
- For each object on that list:
- if it's a BuildingType with , go to the next item.
- if it's an AircraftType that's in the air right now ("in the air" is defined as a moving V3 Rocket, moving Dred missile, or an object that's > 208 leptons above ground), its calculated distance from the det. point is halved.
- If the final distance is less or equal to exact CellSpread * 256, the object gets damaged. (256 is the number of leptons per cell, and this calculation uses the original, set CellSpread, not the rounded value.)
- Special effects such as Rocker, IonCannonWarhead bridge demolition, etc. are applied.
- If the impact cell contains an OverlayType with Explodes. , special effects happen. See
The practical difference to the traditional view of CellSpread is mostly the handling of "diagonal" damage. As visible in the image in the section above, the traditional model assumes the corner cells to belong to the next-higher cell spread, when, in reality, the map's cells are irrelevant in the distance calculation. That means that damage does indeed spread in a perfect sphere radius, making working with it a lot easier.
In addition, as visible in the visual representation, since the damage spreads in leptons from the point of impact, rather than in cells from the cell of impact, the cells in the outer-most ring of a given damage area are not affected completely when using integer values; e.g. a CellSpread of 1 does not actually damage the entirety of the first cell next to the target, but only half of it. In order to damage the entire next cell, one would have to choose a value of roughly 1.5.
Furthermore, since InfantryTypes can stand in various places inside a cell, if they are hit by CellSpread-warheads, the point from which the game calculates the distance to determine whether an object is affected by the CellSpread is not necessarily the center of the impacted cell, potentially changing the affected parts of the outer ring again.
The distance itself is calculated in all three dimensions, meaning a flying unit can be affected by CellSpread in the same way all other units can. Note that the flying units within the affected cells can be damaged at higher altitudes than one would expect, but that doesn't mean the flyers in the neighbouring cells are affected.
- Due to the fact that CellSpread works based on a lookup table, its number of possible values is severely restricted:
- CellSpread=11 is buggy, it does not extend outwards properly, and it affects one cell twice.
- Everything above CellSpread=11 leads to Internal Errors.
- CellSpread is not working on warheads of particles. A particle only ever damages the current cell it resides on.
CellSpread Internal Affected Cells Table
Purely for reference, here's the table used for CellSpread.
Ares replaces the lookup table and makes it possible to use larger values for CellSpread. All area of effect weapon features Ares added (like AttachEffects on Warheads, EMP, IronCurtain on Weapons) have been updated to support this as well.