aorecomp

Anarchy Online classic in the browser

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


docs/ammunition-stock.md (6442B)


Ordinary ammunition supply

Basic weapon templates and the original Budget Ammunition Shop offer a bounded four-package subset. Purchases use the existing package price, stack delivery, inventory capacity and atomic ownership transaction. Reload uses the existing ammo-type check and transfers rounds from the named inventory stack into the equipped finite weapon. There is no ammo-vendor-specific Go branch.

Original item contracts

All four complete 14.9.1 records are fixed QL1, native type51005, with Can30=517 (including Stackable512) and package212=100. Price74 is the whole package's base value. No function section appears on these definitions.

Template Name AmmoType420 Package Base price74
21605 Bullets 2 100 25
21609 Energy Weapon Ammo 1 100 50
21613 Shotgun Shells 4 100 80
21601 Flamethrower Ammunition 3 100 80

The original item payload hashes are:

Fresh parsing by original resource key (1000020, template) exactly matches the maintained catalog, including all sections and their offsets. The original index SHA-256 is 46e5dc54af9358cc9bff05f4358e86af630e497bc677f361c133c88073b84d71. Flamethrower ammunition retains its additional original stat-modifier sections; it is not an equipable weapon or an alternative energy-ammunition type.

Stock policy and evidence boundary

Budget Ammunition Shop25885 explicitly describes selling budget ammunition. Its sole authored placement,3221226898, is in Clan Registration1426. The template itself has no faction Use criterion. Its raw category descriptors do not establish an exact list of item IDs. Binding the four ordinary packages is a bounded reconstruction of that stated category.

Ordinary finite-weapon progression also needs a reachable supplier outside registration. Basic weapon templates99478/99505/99572 therefore receive the same explicit subset as provisional reconstruction policy. The original records establish their identity, placement, faction criteria and prices; their empty descriptions and opaque WLWL/WLLL descriptors do not prove ammo membership. This change does not claim a recovered historical generator.

Vendor template Original Use criterion Buy modifier427 Authored placements
99478 OT Basic Weapons Omni 100 Omni basic room1183
99505 Clan Basic Weapons Clan 105 Clan basic room1180
99572 Basic Weapons None 105 Neutral basic room1186; Parnassos500; Newland Desert565
25885 Budget Ammunition Shop None 100 Clan Registration1426

The template binding includes the two outdoor Basic Weapons placements. Advanced/superior, Engineer vendors and category-overlap vendors retain their unresolved stock. Their categories and names are not aliases for this subset. Exact original booth membership, ordering, refresh and additional ammunition remain open. No QL generation is inferred from descriptors for these fixed-QL packages.

Verification

server/shop_ammunition_test.go exercises production vendors through ordinary shop handlers. It checks all six placements, original faction access and exact prices, four 100-round packages alongside an existing partial stack, stable first-free identities, native grant quantities, repeated Accept and cold load. Purchased energy, shell and flamethrower ammunition cannot reload a bullet pistol; its purchased bullet stack fills the magazine once and retains the remaining rounds after restart. Failed/ignored second-package writes and a deferred failed COMMIT retain the complete basket for one successful retry. The complete shop/reload/ranged race run passed 93 top-level tests and 285 results, including the supported-stock and medical-terminal boundaries.

The existing shop package tests cover funds, capacity, cancellation, partial packages and lost completion. Existing ranged tests cover firing, depletion, reload deadlines, repeated requests, wrong sources, empty stacks and transaction rollback.

Ordinary native progression

An GPU WASM run used the existing level-4 Enforcer and its normally looted QL3 Rusty Flechette instance 163. Rejected wear retained both that pistol and its QL5 spare. Spending 207 earned IP through the native skills window raised raw Pistol from 5 to 12 and Fling Shot from 5 to 7; the same QL3 pistol then equipped.

The character walked through Backyard 11 and Omni1 Entertainment to the original OT Basic Weapons terminal 3221554335 in basic room 1183. Its catalog displayed the four packages. A basket containing two bullet packages and one energy package quoted 100 credits. Decline retained all 28 prior items and 241 credits; reopening and accepting delivered three separate 100-round instances 164..166, retained every prior item and left 141 credits.

Picking up energy ammunition and using it on the pistol displayed the native Ammo mismatch rejection and emitted no reload request. Correct bullets sent GenericCmd 5 with native source (104,66) and worn target (101,6). Native stat 26 and SQLite both became 20; source 164 retained 80 rounds. Page reconnect restored the real identities, quantities and worn weapon.

Back in training, eight authoritative projectile results dealt 14, 12, 8, 13, 28, 10, 5 and 10 damage to a full-health level-1 Leet. Each result decremented the magazine once, ending at 12; the final transaction recorded HP 0 and owner 5's corpse rights. This grey kill awarded no XP. Page reconnect and a normal server restart preserved all 31 owned instances, the same worn QL3 pistol, 12 loaded rounds, bullet stacks of 80/100, energy 100, 141 credits and the trained skills. No gameplay fixtures or character/cash/item edits were used. No native page errors occurred. Owned test browsers were closed; the sole LAN preview keeps the default HTTPS 8443 and game ports.

Original raw resources, vendor placements and opaque descriptors are retained under local/ammunition-stock/audit-2026/. Runtime evidence and checks live alongside that audit; fixtures and ordinary earned gameplay are kept explicit.