Economy

Loot Codex

Sixteen rarities, from Worn to Ancient. A name is never decorative here — it is derived from exactly two things: how many bonuses the item rolled, and whether it came out refined. The colour its name is drawn in comes from the same number.

The sixteen rarities

Quality isn’t a separate roll layered on top of an item — it is the number of bonuses that item successfully rolled, paired with whether it came out refined. Nine base rarities interleave with seven refined ones, and QualityIndex(nBonus, bRefined) turns that pair into an index 0–15.

A refined tier carries the same bonus count as the base tier below it, but every one of those bonuses lands at a higher magnitude. Runed isn’t a third bonus on top of Enchanted — it is the same two bonuses, each hitting harder.

IndexRarityBonusesKindMagnitudeName colourNWN quality
0Worn0base#9b9b9bPoor
1Common1base#ffffffBelow average
2Marked1refined+1#8fa383Below average
3Enchanted2base#33cc33Average
4Runed2refined+1#1fb0a4Average
5Crafted3base#0066ffAbove average
6Storied3refined+2#8a5fd6Above average
7Rare4base#66ffccGood
8Exalted4refined+2#ffc64dGood
9Heroic5base#ebff5bVery good
10Mythic5refined+3#ff8f3dVery good
11Legendary6base#ff3300Excellent
12Hallowed6refined+3#ff9db8Excellent
13Relic7base#cc0000Masterwork
14Elder7refined+4#7b3fa8Masterwork
15Ancient8+cap#ff00ffGod-like

How much a refined tier actually adds

RefineBoost() runs a half-step curve across the bonus counts — +1, +1, +2, +2, +3, +3, +4 for 1 through 7 bonuses. So Marked adds +1 magnitude to its single bonus, while Elder adds +4 to each of its seven. The boost is set once per item before any property is rolled and applied to every one of them.

Worn and Ancient have no partner

Worn has no bonuses to refine and Ancient is the ceiling, so neither gets a refined tier. That is why the ladder is 16 rather than 18, and why a Worn or Ancient store stocks only its own rarity.

The nine level bands

Rarity is what an item ended up being. The band is what it was allowed to reach. Monster hit dice convert to an internal iRange of 1–9 via ADDRange(), and each band caps its bonuses at iRange − 1 — except band 9, which is uncapped.

iRangeMonster levelBonus capRarity pair at the cap
1L1-40Worn
2L5-91Common Marked
3L10-142Enchanted Runed
4L15-193Crafted Storied
5L20-244Rare Exalted
6L25-295Heroic Mythic
7L30-346Legendary Hallowed
8L35-397Relic Elder
9L40+8+Ancient

Band 9 is the only uncapped one

Every other iRange stops at exactly iRange − 1 bonuses. At iRange 9 the cap lifts entirely, so an L40+ drop keeps rolling every remaining property — Ancient means 8 bonuses or more.

Shops are fixed, drops are a spread

Store contents

4 base : 1 refined

A tier store runs four stocking passes of its own rarity and one of its refined partner, so a Rare store is mostly Rare with a scarce shelf of Exalted. Tiers 1 and 9 have no partner and skip the second pass. Shop fills never roll variance.

Who sees what

Your tier and below

A character browses their own level band and every band beneath it - an L22 character (tier 5) sees Worn through Rare stock, nothing higher.

Restock

84 hours

3.5 in-game days, shared across all nine tier stores at one shopkeeper - each tier re-rolls lazily on its next browse.

A real kill, by contrast, is not exact — it lands somewhere in a spread of neighbouring bands, and rolls its own 40% refine chance rather than inheriting the shop’s fixed one.

What produces the numbers, in order

  1. BandADDRange() converts hit dice into iRange 1–9 using fixed five-level buckets.
  2. Luck — a flat 5% roll bumps iRange up one before anything else. Bosses always get this bump and skip the variance step entirely.
  3. Variance — an ordinary monster drop shifts by −2 / −1 / 0 / +1 / +2 at 10% / 20% / 40% / 20% / 10%, floored at band 1. This is what spreads a band’s drops across its neighbours. Bosses and shop fills skip it.
  4. Refine — a 40% roll (REFINE_CHANCE) decides whether this drop lands on the refined half of its rarity pair. Stores don’t roll: each store carries a fixed REFINED flag, which is why a Marked store stocks only Marked. The magnitude boost is keyed to the band’s cap, not the count actually achieved, so it is known before any property is rolled.
  5. CapQualRangeCheck() stops granting bonuses once the count reaches iRange − 1.
  6. Name — the final bonus count and the refine flag go into QualityIndex(), and that index picks both the rarity word and the colour the item’s name is drawn in.

Higher bands make rare properties likelier, not just more numerous

The per-property roll bonus (lMod) ramps linearly from 0 at iRange 1 to +34 at iRange 9. A higher band doesn't just allow more bonus slots - it makes the genuinely rare properties (on-hit effects, keen, vampiric regeneration) far likelier to actually land in each of those slots.

Where a boss's ceiling actually comes from

Every drop in Beleghost, boss or trash, is priced purely off the dying creature's own Hit Dice - not the area it died in. A boss's raw ChallengeRating raises its loot ceiling only if it also raises total class levels/HD, which is exactly why this project's boss-building convention always ties CR to real levels rather than a cosmetic label.

Source: sd_lootsystem.nss and sd_lootsys_tools.nss.