How to read enemy numbers

Count ranges, family shares, placement rules and room modifiers: what each number on the enemy spawn pages means, and what it does not.

Three kinds of number

  1. Intensity: how many spawns a context tries to place. Each generation context draws one whole number, uniformly from its count range, every time it runs. E[count] = (lo + hi) / 2 exactly. This is the only “how many” rule the game has: there is no per-area or per-square-metre spawn rate. exact
  2. Conditional type share: what one placed spawn is. Given that a spawn is placed, the chance it is a given enemy family is that family's weight divided by the sum of the weights (the denominator is always shown). Zombie types (coated, shambler) are a further split of the Infected family only. conditional
  3. Placed and observed counts: what a generated level actually holds. The generator can place fewer spawns than it drew when eligible floor, spacing, per-area caps or tries run out. Observed counts and densities on these pages come from a small labelled sample of generated levels, never from the runtime rules. sampled

On top of the per-spawn roll: the seeded roster. One roll per family per level decides whether that level holds the family at all; a family rolled absent has none there, and a roster-only family is placed by the roster alone. It changes which family an ordinary zombie slot is, never how many enemies a level has. Sampled figures say whether they were taken before or with the roster pass. seeded per level

Terms and units

Terms and native units used on the enemy spawn pages
TermUnitDefinition
count rangespawns per run of a contextThe generator draws ONE uniform integer U{lo..hi} per run of a generation context (inclusive): the number of spawns that run tries to place. There is no per-area spawn density at runtime.
E[count]spawns per runExact expectation of the count draw, (lo + hi) / 2. Per level: Σ runs × E[count] over the contexts.
area weightrelative (no unit)Relative preference of an area in the weighted area order (Efraimidis–Spirakis keys u^(1/w)): areas with more weight tend to be visited earlier in each cap pass. Never a chance and never a count.
capspawns per areaMost spawns an area may hold after each pass (passes 1, 2, 3); platforms hold one more, closets / closed exits / storefront units at most one.
family weightrelative (no unit)Weight of an enemy family in the level pool; only meaningful against the denominator Σ weights.
shareconditional chance per placed spawnweight / denominator: the chance that the roll of ONE placed spawn draws that family (an independent per-spawn roll keyed on level seed + spawn index that REPLACES a zombie). For a family without an eligibility rule that is the share the per-spawn roll places; a restricted family places fewer (see eligibility). The seeded roster then decides per level whether the family is there at all (see seeded roster). Not a chance per area or per m².
eligibilityrule per family and levelWhere a restricted family may take a placed slot (contexts, rooms, clearance, doorways, fair passage, a per-level cap). A draw that fails it becomes the fallback family (a zombie): the other families' draws never change, and the restricted family's placed count is measured by the sampled eligibility census.
tierinteger ≥ 0 per levelThe level's explicit difficulty tier (Subway 0 = the starting level). Metadata only: nothing scales counts, damage or loot by it, and no family is enabled by it.
family statshp, m/s, m, sHealth (hp), wander / chase speed (m/s), attack range (m, centre to centre) and damage per hit (hp), swing length / impact / recovery (s), sight range and body radius (m), read from each family's exported constants.
placedspawnsWhat the generator actually placed: below the count when the eligible, spaced cells run out (Subway attempts with fewer than the accepted minimum, and Office runs outside their count range, are regenerated).
sampled densityplaced per 100 m² of eligible floor (sampled)Placed spawns divided by the eligible floor area of a small labelled seed corpus. Eligible = cells the generator's own candidate filter accepted (0.25 m² each), never map bounding boxes. A census, not a runtime rule.
density (room modifier)multiplier (1 = neutral)Local intensity of a family in a room: scales the room's area weight by the room intensity D and the family's part of the room mix. Never changes the count roll or a cap.
weight (room modifier)multiplier (1 = neutral)Conditional composition in a room: scales a family's pool weight for spawns that land in that room. Changes which family a spawn there becomes, never how many spawns the room attracts.
family spacingmetres (straight 3D line)A whole-level minimum distance between placed spawns of a family that has an eligibility rule (lane INTEG, ai/familySpacing.ts): in spawn order an eligible draw is placed only while fewer than the rule's cap are placed and it is at least that far from every placed one; otherwise it becomes the fallback family. Never touches horde members.
horde poolgroups per level × members per groupThe roaming hordes: a SEPARATE pool with its own explicit families, group count and group size ranges and budgets (members in the level, members and groups starting on one storey). Placed once at generation, after the ambient family roll; its members carry their own context tag (horde), never an ambient one; no respawn or top-up; never counted in the ambient contexts.
ambient budgetambient spawns per level / per storey runExplicit caps of the ambient pool (the contexts): the whole-level total and one storey run. The horde pool has its own budget.
seeded rosterchance per level map seed, per familyWhich special enemy families a generated level holds AT ALL. One independent roll per family per level map, a hash of the level seed (no random stream is consumed; the same seed always gives the same roster), applied once to the finished level after the per-spawn family roll. A family rolled absent has exactly none in that level: what the per-spawn roll placed becomes ordinary zombies. A family rolled present is placed by its policy (a share top-up, at least one, exactly one, or a count). Only ordinary ambient zombie slots ever change family: the enemy count, positions and indices never change, and horde members and outfit zombies are never touched. The ordinary zombie is the baseline and is never rolled; a zombie-free level gets no family.
roster-only familyweight 0 in every poolA family no per-spawn roll can draw: its weight is 0 in every level, context and horde pool (validation rejects anything else), so its conditional share is 0 everywhere. It is placed only by the seeded roster: a level whose roll includes it gets its count in place of ordinary zombies, and every other level has exactly none.
before / after the roster passtwo stages of one sampled levelSampled figures name their stage. "Before the roster pass" = the per-spawn roll, eligibility, cap and spacing alone (the generator's own output). "After" / "with the roster" = the same level with the seeded roster applied: what a level holds. Counts and positions are identical in both; only families differ.

Why the placed count can differ from the count range

The count a context draws is a target. The generator then walks the eligible areas and stops when the target is reached or when nothing more fits. Each level page lists its exact rules per context; in general:

So the count range is an upper bound per run: placed ≤ drawn. Family shares and zombie types apply to the spawns that are placed.

The seeded roster: which families a level holds at all

A family's share says how often the per-spawn roll draws it. It does not say whether a given level has any. That is the seeded roster (roster version 4), which runs once on every finished level:

How to read the roster figures:

Every family's rule and each level's chances: the seeded roster; per family: enemy families.

Room modifiers

Room key = the area's purpose id (gen/purposes.ts) when it has one, else its room type. Each field resolves: purpose entry → room-type entry → 1 (missing = neutral). The neutral value is 1×; a room or family without an entry resolves to 1×.

Room modifier fields (per room key and enemy family; neutral = 1, missing = 1)
ModifierWhat it changesHowAt 0At 2
Density (local intensity)densitylocal intensityarea weight × D, D = all.density × Σ_f p_f·w_f·d_f / Σ_f p_f·w_f (p = pool weight, w = weight modifier, d = density modifier); the room's family mix uses p_f·w_f·d_fD = 0: the room is never a candidate (no spawns there); the count roll and the other rooms are unchanged, so its spawns go elsewhere when capacity allows.The room is visited earlier in every cap pass, so it tends to fill its caps before the count runs out: more spawns there, fewer elsewhere, the same total.
Weight (conditional composition)weightconditional compositionP(family f | spawn lands in the room) = p_f·w_f·d_f / Σ_g p_g·w_g·d_gThat family never spawns in that room (its spawns there become the other families).Twice its relative odds in that room before normalisation; the room still attracts the same number of spawns.

Defined at roomIntensity in game/src/ai/spawnTables.ts:992 (repository access required).

What these pages never state, and why