aorecomp

Anarchy Online classic in the browser

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


docs/research-notes/starter-weapon-research/findings.md (6960B)


Starter weapon ammunition contract (original 14.9.1)

Scope and artifacts

Static inspection of original anarchy-vanilla-14.9.1/kkr.dll, SHA-256 a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0. Ghidra 12.1.2 / REA bridge 12.1.4. No original server execution or packet capture. Full 38-record REA bundle: native-evidence.json; reusable static snapshot: kkr-analysis.rea.json. Native target was closed after export.

Findings

1. Native ammunition state and defaults: partially answered

Derived implementation advice: model unlimited ammunition with signed Energy -1. A capacity-based server classification such as finite Clip > 0, excluding UINT_MAX, is coherent, but was not recovered as one native predicate here. Neither AmmoType != 10 nor CanNoAmmo was found as an additional condition in the inspected empty/reload/special predicates. Absent catalog values must remain distinguishable from explicit zero.

Still unknown: the original server's initialization of finite loaded rounds; full generic classification of all malformed/omitted combinations; an authoritative gameplay role for Can 30 bit 10. This was a bounded search, not a proof that the bit is unused everywhere.

2. Solar weapons and Fling Shot: client contract answered

Catalog source: server/gamedata/items/items_037.yaml:7757 onward.

Template Name Can 30 AmmoType 420 Clip 212 Energy 26
121567 Solar-Powered Pistol 1 10 -1 omitted
121568 Solar-Powered Rifle 16385 10 -1 omitted
121569 Solar-Powered Assault Rifle 6145 10 -1 omitted
121570 Solar Trader Shotgun 4097 10 -1 -1
121571 Solar Powered Submachinegun 2049 10 -1 omitted

All five carry Flags 0 HasEnergy 0x400000. None has Can bit 10. Thus requiring that Can bit would incorrectly reject canonical solar guns. Catalog descriptions of pistol/rifle/SMG explicitly say no ammunition.

3. Reload source matching: answered

Observed, high confidence: 1007bba0 requires target WeaponItem, no current reload, source AmmoType 420 == target AmmoType 420, source ItemType 76 == 0, and loaded Energy 26 != Clip 212. It returns 2 on admission. It does not check Class 88 == 9, CanNoAmmo, positive Clip, or AmmoType != 10. Evidence ev_0d2782a858cfd4154cbc4afa1c326e412b9d31f32457fde3bae5dc6c1dc99ad5.

Observed: automatic inventory ammunition search 100ae410 likewise checks source type 51005, matching 420, and source ItemType 76 == 0. It searches inventory starting at slot 48. Evidence ev_7573076e03db2d7e870437118e512531dfb1f396431da3520a699e8ee8af6cc1.

Catalog Bullets 21605 has ItemType 0, Class 9 and AmmoType 2: server/gamedata/items/items_000.yaml:46. Class 9 is a data observation, not the native admission test. Loaded/full behavior and result routing already documented in docs/ranged-weapons.md and local/ranged-research/reload-findings.md.

Practical boundary

The direct native evidence supports unlimited solar firing and solar shotgun Fling, using Energy -1, and supports reload type matching by 76/420. The server may validate positive finite capacities and sane source ammo definitions, but those extra safeguards should be described as reconstruction policy. Do not invent omitted source AmmoType -1, make Class 9 mandatory, or require CanNoAmmo based on this evidence.