aorecomp

Anarchy Online classic in the browser

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


docs/shop-stock-expansion.md (12528B)


Expanded vendor and terminal stock

The November 6 expansion supplies 361 catalogs with 24,713 rows and 3,521 distinct item template IDs. All 345 actual shop templates used by 792 original machine placements have stock. The other three placements use the original noninteractive Dependency Item 41325 and remain noninteractive. All 190 early-route A5 terminals now have catalogs; none reports the unavailable-stock fallback.

182 maintained NPC definitions select a catalog through shop_template in their zone YAML. This replaces the five-entry Go binding map. The selection includes all identified weapon, armor, pharmacy, implant, clothing, container, food and tools merchants, bartenders, Bronto stalls and general merchants. Named specialty merchants include Tsunayoshi Smith, Thin Bernice, Zoftig Blimp, Eddie, Stolt Jensenberg and Zibell the Wanderer. Numeric human codes are bound only where the maintained population already identifies that particular group as a merchant. Dungeon enemies such as Smuggler Suppliers and combat/quest actors such as Supply Masters Eel and Smug are not vending NPCs merely because of their names.

Storage

Stock and shop selection are maintained game data, not runtime category guesses. There is no random refresh or stock depletion. NPCs share the existing shop catalog, purchase, sale, cancellation and atomic inventory persistence paths. Original price modifiers and faction/profession/level/entitlement requirements remain in effect. Smith and Bernice, for example, require level 50; Zoftig's original shop requires more than 1,000 credits. The original Notum Wars shop entitlement gates are unchanged.

Sources and inference

The user explicitly authorized broad best-effort stock rather than canonical 14.9.1 membership. Source catalogs are evidence of plausible merchandise, not proof of what every original server sold.

  1. CellAO, commit ca77f375a7dabe3be769da94e6c2a3d093344c2c: CellAO/Libraries/Source/CellAO.Database/SqlTables/shopinventorytemplates.sql and vendortemplate.sql. Category membership supplies profession nanos, clusters, medical supplies, tools, attacks, containers and books. Older CellAO common-nano membership takes precedence over AORebirth's later additions. Stock SQL SHA-256: 3e3c54b20960b0ad1e7dfbc4f5bf5c0b2fbc8e1b36826724a8ad75aff2ec408a.
  2. AORebirth, commit 6ec06bbd45e72496923275dcc8fd4e25fecace73: AORebirth/Libraries/Source/AORebirth.Database/SqlTables/ stock/vendor SQL. Captured rows add armor, weapons, implants, tradeskills, clothing, food, drinks, vehicles, furniture and other missing departments. SQL comments name the capture and terminal; short hashes in our catalog comments identify the imported category. Stock SQL SHA-256: 06aecbda18889a2b7fc39eab0674c33278a971f7b3711ab07e53d83b9865b3a0.
  3. AORebirth AORebirth/GameData/PlayfieldContent/127/Npcs.json: the six Subway vendors supply exact later-capture stock rows at matching original posts. The appearance/stock provider is Tests/Fixtures/Gameplay/Playfields/CapturedSubwayVendorContentProvider.cs. These reinforce the Tailor, Weaponsdealer, Armorer, Pharmacist, Tools Merchant and Container Supplier bindings; later-only items are excluded.
  4. Named vendor themes are reconstructed from original item names and the AO-Universe guides for Smith, Eddie, Bernice, Zoftig, and the Trader shop. Smith carries original Meibutsu/Schiacciamento/Black Staff records through QL135; Bernice ordinary tank armor; Zoftig hats, sunglasses and skinchips; Eddie food, equipment, backpacks and his original special items. Stolt and Zibell use inferred general equipment assortments.

Every imported item ID must exist in the original item YAML. Intermediate QLs require an explicit low/high pair of the same inventory type with increasing original quality. Conflicting source pairs cannot redefine an existing family; only exact endpoints survive such conflicts. Fixed captured QLs are retained; broad source intervals contribute their low, middle and high grades. The weapon assortments also use plausible basic QL5/25/50, advanced QL60/90/120 and superior QL125/150/200 selections within captured families' original bounds. Training shops add equipment through QL10. Equivalent faction/category shops fill gaps.

Modern shop IDs are not blindly trusted: AORebirth reuses several original Miiir clothing template IDs for ICC profession nanos. Those are explicitly mapped back to the original clothing departments. Keeper/ Shade content absent from the original database is not imported. Three captured stackable items with zero authored package size (151365, 159676, 206733) are omitted rather than sold as zero-count inventory. Narrow departments naturally have fewer distinct goods, such as organization forms and armor construction materials.

Examples of current catalog sizes: neutral basic weapons 136, basic armor 108, basic medical 42, containers 18, Smith 65, Zoftig 19, Bernice 21, OT Food 15, basic Nanotechnician crystals 74, basic faded clusters 255 and Miiir attendants 293. The largest combined cluster catalog has 765 rows.

Local research and the one-off data assembly script are retained under local/shop-stock-research/20261106/. The checked-in YAML is the maintained output; no external checkout is required at server startup.

Verification and limits

Data checks cover every original shop placement, merchant binding usability, stock row uniqueness, original record kinds and supported quality intervals. Focused shop regressions cover the existing starter purchases, native catalog encoding, access restrictions, forged references, prices, stacks, failed transactions and cold reload. New representative transactions purchase a backpack from the Subway Container Supplier, a Meibutsu weapon from Smith and a hat from Zoftig, verifying original type, payment and durable ownership. The portable container purchase uses the existing full backpack delivery packet.

The early terminal availability regression opens all 190 catalogs without rendering them. Python regeneration checks preserve NPC shop bindings. Browser verification is deliberately limited to two representative shops:

The focused shop/quality Go suite, go vet ./server/... and all five Python NPC-assignment tests passed. Test-owned browsers and servers were closed. No all-vendor visual sweep or earned-level replay was performed.

This expands sale selection, not every item's gameplay implementation. Many specialized nano effects, equipment behaviors and tradeskill recipes remain outside the implemented alpha paths. Importing their original definitions does not claim that all can yet be used successfully. Historical stock rotation, rarity and exact per-NPC sale membership remain uncertain. The existing temporary pickup-box visual while an NPC catalog is open also remains unchanged.

Read-only acquisition browsing and provisional restocking

The admin item catalog shows family-level acquisition sources and filters for items sold in shops, items not sold in shops, items available as loot, and items without a known source. Loot filtering includes items also sold by vendors. Opening a template shows offered QLs, shop restrictions, monster drop chances and supported spawn levels, recipes, mission rewards/objectives, starting items and world pickups. Location links open the map at seller entrances or monster spawn positions; indoor sellers resolve to outdoor shop entrances. Shop links show the embedded stock pool and its locations. These are read-only views: stock and merchant bindings are still maintained in embedded YAML and require a rebuild. An absent mapping is not proof that an item is impossible to obtain, and a family source does not establish availability at every quality level.

The November 8 acquisition audit found 3,363 families with shop sources and six with configured NPC drops, using the catalog's reviewed family grouping:

Item Implemented drop sources Chance per row
Monster Parts Admitted biological creatures, including Leets 50%
Robot Junk Admitted Androids 50%
Rustic Shirt Five admitted training human groups 50%
Uniform Shirt Fresh Clan Functionary 50%
Worn Metaplast Armor Gloves The three training bosses 50%
Rusty OT M-10 Flechette Pistol The three training bosses 25%

These are provisional configured probabilities, not recovered historical rates. The subsequent loot expansion raises configured loot coverage to thirteen families, including six previously unsourced gem/jewelry families and shop-sold Low-Tech gloves. The audit below describes the pre-expansion snapshot. The catalog now also lists distinct per-roll chances and whether they involve inference; the detail page separates source evidence from inferred assignments.

The catalog's Loot: N counts NPC groups, not percentage chance; the item detail page gives chances and QL ranges. Shop and loot coverage overlap. Of 82,264 catalog family keys, 78,859 have no indexed acquisition source; this includes internal/NPC equipment and unreviewed definitions, not just missing player loot. Future placement work should first identify usable early-game items and verify their effects, then assign appropriate vendors or creature/boss pools with explicit QL ranges and probabilities. The unknown-source filter alone does not justify adding every record to the economy.

Original item icons are read directly from resource type 1010008 in the shipped archive. The catalog, template and instance pages, inventory/equipment, bank, reclaim, containers, recipes and shop stock share the same icon rendering. Their original green transparency key is converted to alpha. Missing original icons have a placeholder.

Stock selection is shared per shop instance in 30-minute UTC periods. Supplies, fixed-QL goods and equipment at QL10 or lower stay available. Higher-QL weapon and armor families have a 75% inclusion chance per authored row and vary by up to 10% QL, bounded by their supported original family. Identical results are collapsed; a specialty shop never becomes empty. This is a provisional gameplay policy, not recovered historical restock behavior. Each open trade retains its stock snapshot, so a period boundary cannot change its rows, prices or delivery. The admin pool lists possible stock, not a guarantee of what is currently on sale.

Verification for these views and restocking: focused shop, source, icon, catalog and starting-inventory Go tests passed, along with the map JavaScript tests and go vet ./server/.... A small admin browser check covered catalog filtering, item and shop maps, original icons, monster drops and an existing item instance. Test-owned browsers and temporary servers were closed afterward.