aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


docs/loot-quality-ranges.md (5373B)


Loot quality intervals

NPC loot keeps membership and quality selection separate. Each row supplies template, quality: [low, high] and its independent chance. A successful row samples uniformly and inclusively within that interval, using the existing reward roll source. [q, q] preserves a fixed QL without another random draw; an empty membership roll never samples a quality. The selected QL, physical instance, corpse placement, cash and XP commit through the existing death transaction. Failed or ignored writes and failed commit publish none of them. Reconnect and checkpoints restore the committed selection rather than reroll it.

Startup rejects zero, reversed and unsupported bounds. A range must fit the reviewed family addressed by its template; it is never clamped or extrapolated. Fixed-QL exceptions use their one authored QL. Endpoint membership remains in server/gamedata/item_families.yaml, not name matching or per-item Go branches. Shops, missions, pricing, requirements, equipment and native serialization retain the shared interpolation implementation.

Production selections currently remain deliberately small:

Admitted encounter Drop Selected QL
Level 1 Leet Monster Parts 1
Level 2 Leet Monster Parts 1..3
Level 3..5 Leet Monster Parts 2..4 through 4..6
Level 2..4 Tiny Stalker Monster Parts 1..3 through 3..5
Authored level-4 Clan training boss Metaplast gloves / Rusty pistol 4 / 4
Authored level-4 Omni training boss Metaplast gloves / Rusty pistol 3..5 / 3..5

The level-relative intervals and uniform distribution are reconstruction policy. The existing membership chances, cash and reward baselines remain provisional. This does not claim a universal original loot QL = creature level rule or scale outdoor NPCs to a visiting player's level. Broader species, useful equipment pools, mission generation and historical distributions remain open P0 work. The Omni training boss adds useful equipment intervals through these same selection and ownership rules, without new Go behavior.

Regular Monster Parts

Complete original records 1000020/42640 and 42641 have matching type 51005 headers, flags, carry capability, strings and empty effect sections. They differ only in QL stat 54 (1/400), icon stat 79 (144704/144701) and value stat 74 (100/10000). The original payload hashes match the decoded catalog. Full records, offsets, index digest and the two 126-byte payload slices are in local/loot-quality-research/monster-parts-audit.json. This admits one explicit family; it does not establish a creature distribution.

The existing native-derived rule curves value stat 74 after rounded interpolation, while choosing nonnumeric properties from the nearer endpoint. The native WASM inventory shows the low icon at QL200 and the high icon at QL201. Its information window shows intermediate and endpoint QLs, including 2, 200 and 400. The native training shop quotes 128 credits for QL200, 129 for QL201 and 500 for QL400 at the controlled fixture's literacy. Cancelling preserves the exact instance; accepting the QL200 sale removes that instance and credits 128 once. Cold recovery retains the five other selected qualities and the 128-credit balance. These GM-provisioned items verify interpolation and ownership, not an earned-income progression gate.

A November 2002 firsthand crafting guide corroborates variable-quality regular Monster Parts, without specifying drop ranges. The searchable guide text was available but a subsequent direct fetch failed. Much later player accounts disagree about fixed-level and percentage ranges; they do not establish 14.9.1 selection rules. Bounded source notes and access limitations are retained in docs/research-notes/loot-quality-research/selection-evidence.md.

The hardware WASM run also killed an unchanged full-health level-2 Tir County Leet through seven normal Winter's Bite casts. It awarded 100 XP and five credits and generated physical instance 13, a QL1 Monster Part. Native corpse pickup, page reconnect and a saved SQLite read retained that exact instance and reward accounting. The caster had controlled skills and health; this verifies the production reward path, not ordinary starting-character balance. This random sample rolled QL1; QL2/3 production selections are covered by controlled tests.

Verification

Public attack-handler tests exercise fixed, low, middle, high and empty results, all six direct killing actions, cold recovery, full inventory, repeated pickup, rejected wear, cancelled/accepted sale and SQL failure/ignored-write/deferred commit rollback and retry. Actual package-startup overlays reject zero, reversed and out-of-family intervals. Existing typed loot, armor/weapon quality, boss and sale regressions pass with explicit fixed intervals.

The focused selection passed 51 roots/261 results. The race selection passed 14 roots/34 results; go vet and the server build passed. Headed hardware WASM captures, raw inventory rows, item accounting, cold snapshots and wire evidence are retained in local/loot-quality-research/. No native adapter edit was needed.