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
- Observed, high confidence:
WeaponIteminitializer100abb20assigns AmmoType 420 to -1. It does not assign Energy 26 or Clip 212. Evidenceev_3e76de5167c9c021a2be9f0e8d9d79bdf0259dcdf823f6789f9b24bd70478bc2. - Observed, high confidence: flags-0 setter
1009f390, when its supplied mask contains HasEnergy 0x400000, initializes Energy 26 and Clip 212 to -1 only if each stat is absent. This is independent of Can 30. Evidenceev_ab61db420e3998269c8472f4e53662cf5883c1fafb1dcd32311432cefeb20e22. The full template-loading path to this hook was not traced here; do not describe a universal unconditional Energy/Clip constructor default. - Observed: underlying stat storage starts at invalid sentinel 1234567890
(0x499602d2), not zero:
10008bb0;10003000returns stored values directly;1002fe90tests presence against that sentinel. Evidence respectivelyev_a7efefb53765be1020070eee195ada4689889d7e6664480e0c4f8a17e0121ed8,ev_f0492c7608fe0b3baff957ec6f6767a0b261f9fc26bca3ad6c6e335cf4e9fbd1,ev_61884411052d9cbaeeca0e4c864bbc459d585033f4d33ac2834d3d0a35d31d6d. - Observed: ordinary
SimpleItemconstructors10092540/10092610initialize stat 209, not 420. The -1 AmmoType default above is specific toWeaponItem; this pass does not establish that absent ammo-source 420 becomes -1. Evidenceev_a6e467bf9818cd27b75de78e659611a65fc0ead54898fa5392432c87311e647a,ev_d77b0784bd9b232babab163fcb67027e276ace4331fd6d8bb2f6e69b5f18742f. - Observed: weapon empty helper
100acd20returns true exactly when signed Energy 26 < 1 and Energy != -1. Energy -1 is deliberately usable; 0 and negatives below -1 are empty. Evidenceev_b4c8077cb5133e7e128c3b80afa113b0654f12b8cb206fd11515b3b41711f12b. - Observed:
100ad980sees Energy -1 and sets Flags 0 bit 0x400. This is not Can 30 bit 0x400. Conflating them would be incorrect. Evidenceev_8f193b92b3425c1c55c0db5aa836764cb15547c9e8d92028fa35b427e8e140d3; flags getter10003090:ev_b2de96812fb3ff477b60de2158b1a99a0109a6a92530b988507d07b394abf267.
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.
- Observed, high confidence: holder special admission
10078990delegates to weapon-frame predicate and range check. Frame predicate100aaf10maps Fling stat 150 to Can 30 bit 12. It does not inspect Energy, Clip or AmmoType. Solar shotgun 4097 = 0x1001 supports Fling. Evidenceev_0da9d20eee6fc31f957f706b27e2c7937ab3eff98557ca01b3ed7113e6bd4c89,ev_73cdfe2d1ae02b912406d6a4c65ef6f813578386a281aeb1d2fb0c45238463d0. - Observed: original helper
1007c0f0(slot, ammunition)assigns supplied ammunition directly to weapon Energy 26; -1 is preserved. Evidenceev_c760df0d0b21647f69dce7428100380a3a4d57ee0975e441ef56ff4fc4df4857. - Independent existing controlled execution: unchanged lifted
100b2cb0result activation preserves ammunition 3, 0 and -1. Seelocal/fling-research/result-contract.md, its retained evidence and Linux/WASM logs; no tests were rerun in this static pass. - The SecondarySpecialAttack request has no ammunition field. The ammunition sentinel belongs to SpecialAttackInfo result. Derived: return -1 for an unlimited solar weapon; this is accepted by the client contract. No original server capture proves its exact packet.
- Existing corroboration: original solar shotgun item tip explicitly
teaches Fling;
local/fling-shot-research/period-sources.mdrecords this and period patch evidence separating later special-ammunition changes.
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.