Nightmare, Hell and the Gloam Rifts

Three difficulties, monster stats refit by least squares, timed rifts on a three-part tier curve that survive restarts, a ladder, hardcore and Lantern Shards past 99.

A hero stands inside a ring of orange fire on a dark rift floor while a pillar of flame comes down from the sky
Contents
  1. Three difficulties, like Diablo II
  2. Why level is not enough
  3. Fitting an era curve
  4. Gloam Rifts
  5. The tier table
  6. Rift runs survive a restart
  7. The ladder and hardcore
  8. Past level 99: Lantern Shards
  9. Measuring what a player feels
  10. Related posts

The story ends around level 75. After that: Nightmare and Hell, timed Gloam Rifts with no top tier, a ladder, hardcore and Lantern Shards past 99. The core problem is making monsters built for one level fight well at another, solved with a least-squares fit over the game's own monster data.

Three difficulties, like Diablo II

Killing the Unmaker unlocks the next difficulty for everyone in the fight. Quests, waypoints and zone are tracked per difficulty (the inactive two parked in the endgame JSON column). Rooms filter on zoneId and difficulty; cross-difficulty party invites are refused.

Normal Nightmare Hell
Monster level the zone's level 58 + 0.4 × zone level 78 + 0.3 × zone level, capped at 99
Monster life / damage ×1 / ×1 ×1.3 / ×1.15 ×1.7 / ×1.35
Monster resistances +0 +10 +20
Your resistances +0 −40 −100
Treasure quality ×1 ×1.25 ×1.5
Rune / gem chance per kill 0.4% / 1.2% 0.8% / 1.8% 1.4% / 2.4%
  • Affine levels: a flat +30 would make Nightmare Act 1 trivial and Act 6 impossible. Nightmare Act 1 lands at ~59–64, Act 6 at ~88; Hell Act 1 at ~79–83.
  • Over-level: past 99, Hell adds life ×1.04 and damage ×1.025 per level, up to 30 levels.
  • −100% resist is straight from D2: resist gear matters again.
  • FINALE_BOSSES holds only the_unmaker. Other finales (the Ember Lord's Emberbane title) announce and grant titles but don't unlock.

Why level is not enough

Setting a monster's level and letting monsterStats scale it fails: Act 4–6 monsters at level 35 killed level-60 heroes at tier 5. Later acts ship bigger base stats because the level curve alone can't keep up with gear. An Act 6 base scaled down to 35 is still a wall; an Act 1 zombie at 70 is paper.

Fitting an era curve

shared/endgame/levelNorm.ts fits log(base) = a + b × nativeLevel by ordinary least squares, per stat, over every story monster (native level = the level of the zones it spawns in):

shared/endgame/levelNorm.tsTypeScript
const fit = (s: Stat): Fit => {
  let n = 0
  let sx = 0
  let sy = 0
  let sxx = 0
  let sxy = 0
  for (const p of pts) {
    const v = baseOf(p.m, s)
    if (v <= 0) continue
    const y = Math.log(v)
    n++
    sx += p.x
    sy += y
    sxx += p.x * p.x
    sxy += p.x * y
  }
  const den = n * sxx - sx * sx
  const b = n < 2 || den === 0 ? 0 : Math.max(0, (n * sxy - sx * sy) / den)
  return { a: n > 0 ? (sy - b * sx) / n : 0, b }
}
Stat Slope per level Act 1 zombie at level 60
Life 0.0128 ×2.05
Damage 0.0065 ×1.44
Defense 0.0280 ×4.82
Attack rating 0.0121 ×1.98

Normals are multiplied by exp(b × (level − nativeLevel)): a tank stays tanky, a swarm stays frail. Defense moves most because it grew fastest across the acts.

  • Bosses were hand-tuned per act, so they get their own fitted line and every boss sits on it: every rift guardian at a tier is the same size of fight.
  • Above 70, monsters fight at stat level 70 + 0.25 × (level − 70): a level-99 monster has level-77 stats, with the real level for XP, ilvl and hit chance. Player power flattens; this keeps monsters from running away.
  • One function, scaleMonster, serves both the server hook and the tests.

Gloam Rifts

A Rift Stone by every waypoint opens tier 1 up to your best in-time clear plus one. Tier 5+ costs a Rift Key (Nightmare/Hell bosses, rift guardians). Parties enter one instance from any town.

The Rift Stone panel: Tier 5, monster level 49 from Acts 1–4, +30% magic find, guardian drops of 2 runes, 2 gems and 2 keys, and an Open the Rift button
The Rift Stone in Hollowmere on a dev hero with ten keys. The panel shows what the tier means before you pay for it: level, acts in the pool, magic find and the guardian's pile.
  • 3–5 generated floors, 150 s each plus 90 s for the guardian (any non-finale boss)
  • 2–3 of ten modifiers: Volatile, Haunted, Frenzied (×1.3 move, ×1.25 attack speed), Shrouded (−5 light), Bountiful (+100% MF and gold, the only kind one), Ironclad (+60% life), Teeming (×1.5 density), Venomous (35% as poison), Empowered (2× champions and uniques), Vampiric (12% leech)
shared/endgame/rift.tsTypeScript
export function riftPower(tier: number): MonsterScale {
  const t = Math.max(1, tier)
  if (t <= RIFT_LEVEL_KNEE_TIER) return NO_SCALE
  const mid = Math.min(t, RIFT_RAMP.highTier) - RIFT_LEVEL_KNEE_TIER
  const high = Math.max(0, t - RIFT_RAMP.highTier)
  return {
    life: Math.pow(RIFT_RAMP.life, mid) * Math.pow(RIFT_RAMP.lifeHigh, high),
    dmg: Math.pow(RIFT_RAMP.dmg, mid) * Math.pow(RIFT_RAMP.dmgHigh, high),
    def: 1 + high * 0.02,
    res: Math.min(25, high),
  }
}
Tiers Level Extra scaling
1–10 33 + 4 per tier (T10 = 69, an Act 6 finisher) none
10–25 +1.6 per tier life ×1.02, damage ×1.035 per tier
25+ cap 99 at T29 life ×1.06, damage ×1.05, plus defense and resists

No top tier: T40 is 3.2× life and 3.5× damage; T55 is 7.7× and 7.2×.

Two charts: rift monster level rising from 33 to 99 with a knee at tier 10, and the life and damage multipliers flat to tier 10, gentle to 25, then curving up steeply
The tier curve, computed from the exported constants. Left: the level rises 4 per tier to T10, then 1.6, capped at 99. Right: life (green) and damage (orange) on top of the level, flat to T10, gentle to T25, then steep.

The pool opens by tier: T1–3 draw Acts 1–3, each three tiers add an act, all six by T10, so a tier-5 rift can't roll Act 6 monsters. Guardians hit half as hard as in the story: a gate, not a finale.

The tier table

Hero at the tier's target level in act-appropriate rares; cells are Warden / Stalker / Emberwright:

Tier (hero) Mlvl Average kill Guardian Kills you
T1 (40) 33 1.0 / 1.3 / 1.2 s 20 / 25 / 26 s 46 / 20 / 18 s
T5 (55) 49 1.5 / 1.7 / 2.4 s 35 / 37 / 63 s 36 / 12 / 9 s
T10 (72) 69 4.3 / 4.2 / 7.1 s 122 / 118 / 214 s 32 / 15 / 9 s
T15 (80) 77 5.5 / 5.1 / 9.2 s 159 / 151 / 283 s 28 / 13 / 8 s
T25 (90) 93 9.0 / 8.0 / 14.4 s 276 / 238 / 456 s 19 / 9 / 6 s
T40 (99) 99 26 / 21 / 42 s 811 / 642 / 1270 s 11 / 5 / 4 s
T55 (99) 99 71 / 55 / 111 s 1556 / 1556 / 2000 s 6 / 3 / 2 s
  • Bands are asserted, so tier 5 can't quietly turn lethal again.
  • Past 70 the test heroes wear extrapolated rares; runewords and uniques make T25+ softer.
  • The pure-fire Emberwright is slowest everywhere (fire-resistant Act 3 demons). T55 is meant to be a wall.
  • Difficulties: a level-75 Warden kills Nightmare Act 1 in 1.9 s (vs 2.7 s in Normal Acts 5–6) and takes ~25% more damage. At level 90 in Hell Act 1: 5.9 s per kill, dies to one monster in 13 s.
A rift fight on a generated floor. Rift floors reuse the Act 4–6 dungeon generator with a guaranteed way out. Captured in-engine for the trailer.

A clear pays everyone inside: XP worth 60 + 6×tier normal kills, runes, gems, a rare, gold, keys, uniques from T10 (two from T25). In time: next tier unlocked, ladder row written.

Rift runs survive a restart

Every deploy (and every bun --watch edit) restarts the one process. The in-memory registry is mirrored to a RiftRun table (key, tier, seed, modifiers, owner, party, members, deepest floor, clock, who's been paid), with per-key promise chains so a save never lands after its delete:

server/game/endgame/rifts.tsTypeScript
function write(key: string, op: () => Promise<void>): void {
  const next = (chains.get(key) ?? Promise.resolve()).then(op).catch((e: unknown) => log.error(`[rift] ${key} write failed: ${formatError(e)}`))
  chains.set(key, next)
  void next.finally(() => {
    if (chains.get(key) === next) chains.delete(key)
  })
}
  • Boot waits on riftsReady(). Floors aren't stored: rift_<act>_<tier>_<seed>_<floor> regenerates the same map.
  • Members rejoin their saved floor; the clock keeps running.
  • Rules changed since the run started (stored modifiers ≠ what the seed gives now): the run is dropped, not resumed as a different rift.
  • rewarded is persisted, so no double payouts.
  • Stranded heroes wake in town: "The rift you were in has closed. You wake in town".

The ladder and hardcore

/ladder has four boards (level/XP, best in-time tier solo and party, fastest kill of every story boss per difficulty), each with softcore/hardcore and class filters. The character sheet shows rank.

The ladder page: a Heroes board with a table of level-99 Hell heroes, their rift tier and class
The ladder on a dev database, so every name here is a test hero. Level 99 and Hell are the dev cheats at work.

Hardcore is a skull toggle with the warning beside it. Death is permanent: the hero becomes a gray-named ghost that can chat and walk town but not fight, with a ladder tombstone. Living hardcore heroes get red names and a separate account stash.

The Forge a Hero form with three class cards and a red Hardcore toggle, with the warning that a fallen hardcore hero becomes a ghost
The hardcore toggle on the new-hero form. The warning is in the same place as the button, not in a confirmation dialog afterward.

Past level 99: Lantern Shards

Level 99 is ~1.96 billion XP. Past it, XP banks into shards (one per twentieth of the 98→99 level) that buy account-wide ranks, Paragon-style. Rank r costs 1 + ⌊r/5⌋.

Lantern Per rank Max
Magic find +1% 50
Gold find +1% 50
Life +5 40
Movement speed +1% 10
All resistances +1% 15
Experience +1% 10
The Lantern Shards panel: six lanterns with rank counters and buy buttons, and the note that shards are shared by every hero on your account
The Lantern Shards panel (G). The ranks are per account, so a new alt starts with every lantern you've already lit.

Small on purpose: +50% MF already hits diminishing returns.

Measuring what a player feels

The tier curve is three lines of constants; it only means something next to "tier 5 at level 55: 1.5–2.4 s per kill, 9–36 s to die to one monster". Every formula ships with a test that prints what a player experiences and asserts a band, as in combat math.