aorecomp

Anarchy Online classic in the browser

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


docs/research-notes/weapon-contract-research/findings.md (12497B)


Original main-hand weapon contracts

This is an independent original-data audit of server/weapon_stats.go:ownedItem.isWieldableWeapon, not a proposed admission policy. All output is local research. No tracked file, test, server, client, browser, game database, native analysis session or commit was changed.

Coverage and exact predicate census

The original RDB contains 7,695 records of native type51018. Independently scanning all 83,245 original item header/stat prefixes finds 7,380 with main-hand mask298 bit64. Their IDs exactly match current decoded YAML candidates. Every candidate's complete original payload was SHA256-verified, reparsed through tools/data/extract_items.py:parse_item and compared against every decoded YAML field. There are no Undecoded candidates. The complete original item/program identity set also matches all 87,611 YAML definitions.

At authored quality, the current predicate admits 7,379 and rejects only123868, whose authored maximum damage285 is less than minimum286. This count covers the predicate alone, not character requirements or complete combat correctness. The predicate checks type, exact quality, main-hand bit and damage ordering; it does not check OnWear, other effects or complete sections.

Masks are64 for4,741 candidates and320 for2,639. Both include the main-hand bit; 320 additionally has bit256. This audit does not enable left-hand scheduling. There are98 currently admitted records without Can bit4; that numeric fact is not an assertion that the clothing CanWear gate applies to weapons. No new weapon capability policy is inferred.

records.json preserves every complete original record, including all text, stats, section offsets, raw argument bytes, actions and functions. sources.json preserves all current YAML hashes; summary.json:coverage preserves original index SHA256 46e5dc54af9358cc9bff05f4358e86af630e497bc677f361c133c88073b84d71. summaries.json preserves every function/action and classifies gaps without dropping unsupported companions. exact-functions.json preserves every distinct complete function, and function-shapes.json retains layout/requirement groups.

OnWear modifiers and companions

There are1,612 OnWear2/14 sections. They contain:

Function Instances Exact source shape
53045 Modify 3,022 headers[0,4], argument header9, target2, tick1, interval0, exactly integer stat and integer amount
53057 HeadText 4 same headers/timing/target, string plus integer
53162 unnamed 4 same headers/timing/target, two integers

Of the3,022 scalar modifiers,2,939 are unconditional and83 have nonempty per-function requirements. All83 occur in distinct currently admitted records. There are no other scalar header, argument, target or timing deviations. No 53012 Skill function occurs on original weapon OnWear in this candidate set.

The current shared hasEquipmentStatConsumer list excludes three authored weapon modifier stats:51 on16 weapons,315 on5,277 on3. All24 are currently admitted and unconditional. Exact IDs and complete effects are in summary.json:admitted_missing_scalar_consumers, admitted-contract-gaps.json and summaries.json. Representatives are124210 (OT-WC RM72 Junior Tium,51+5), 129077 (V-three Breathing Space,315+1) and208069 (Jupiter Aegis,277+10). The other315 family IDs are129078..129081;277 also occurs on208070/208071. The51 family includes Sako Response rifles, MTI G-90A3, BBI AS-90 and Kang Tao Spitting Cobra variants. The list's absence is the precise established boundary; the parent owns independent review of actual scalar consumers.

Parent follow-up establishes an existing315 consumer in server/combat.go:weaponDamage: when DamageType168 (NanoAC), the fallback reads315, as mapped in docs/combat-equipment-modifiers.md:31. Therefore the five315 records are shared-list omissions, not missing server behavior proven by this census. Stat51 timing currently reads character.aggDef directly and does not include gear contribution;277 has no defense/hit-chance consumer in the parent's bounded review. Those distinctions do not change the original counts or justify modifying this turn's runtime gates.

The parent's additional original-record check finds zero main-hand candidates with DamageType436=168. All five315-modifying V-three-family records author Energy92. In the present one-main-hand model, an existing NanoAC315 fallback branch therefore does not prove an original reachable gameplay contribution for those five weapon contracts. Practical support remains unresolved. No315 application to direct or periodic Hit nanos follows; the existing nano-combat buff ledger leaves those paths unproved.

Applying the current strict unconditional scalar helper as a diagnostic would flag107 currently admitted definitions:83 conditional records plus24 missing list consumers. This is not a recommendation to change admission or erase conditions. Current server/equipment.go:ownedItem.equipmentBonus accumulates matching53012/53045 values without evaluating function requirements, so the 83 conditional contracts require actual lifecycle/condition semantics before their bonuses can be called faithful.

Conditional examples:

-121582 Improved Tripler: Sense20>150 before stat103+15. -122828 Chesterfield Dining Chair: Breed4>3 before Psychic21+5. -125100 Blade of Mourning: Psychic21>450 before DodgeRanged154+2. -157854 Edge of the Tarasque: Level54>99 before MeleeInitiative118+40.

The six records with non-scalar OnWear companions divide into four known native HeadText presentation contracts and two unresolved53162 contracts:

-154052 Childhood Memory,156599 A Leet Doll,202725/204396 Eleet Doll carry53057. Example154052 has string Hug me!, integer2. Retained native handler 100c14e0 is maintained as client/game/kkr.dll/lifted-0057.c:sub_360C14E0; it sends a text notification. Their presence is not evidence of an unknown scalar effect. -204706 Temporal Chalice and206016 Unhallowed Chalice each carry53162 pairs [145,3] and[146,3]. The existing retained handler classification resolves this client body through return-only1010ba00, maintained lifted-0057.c:sub_360C2AA0. A client no-op does not establish a server no-op.

All OnWear stat IDs and occurrence counts, including supported ones, are in summary.json:onwear_stat_counts. No stat or function was dropped to make a whole record appear supported.

Every section and non-OnWear event

Original section Occurrences
14/19 entries 1,569
4/4 entries 7,296
6/27 stat dictionaries 7,296
20/5 entries 7,232
22/36 action criteria 5,820
2/10 functions 6,968
2/14 functions 1,612
2/5 functions 437
2/0 functions 162

These sections are all preserved. Unlike ordinary stat gear, weapon dictionary sections and event10 cannot simply be assumed extraneous: all five solar starter guns have event10 descriptors. Rejecting every non-OnWear function would reject those original starters.

Event10 contains15,934 functions:53065x5,240,53075x3,827,53076x6,867. Every one has headers[0,4], argument header9, target1, one tick, zero interval and exactly 16 raw argument bytes. Existing retained native analysis in docs/combat-client-effect-handlers.md identifies handler100c1620 (selector0), 100c18f0 (selector1),100c19b0 (selector2), maintained in lifted-0057.c. The shared WeaponItem operation100ae2e0 (lifted-0051.c:sub_360AE2E0) stores four-word descriptors: selectors1/2 replace fields+0x1d0/+0x1cc; selector0 delegates to1009f2a0 (lifted-0048.c:sub_3609F2A0). Those storage facts do not establish every later combat consumer or make them harmless cosmetics.

Event5 has621 functions53089 and5 functions53002 across437 records.53089 has two integer arguments and targets2,3 or14. It has real conditional variants, not just an unconditional opaque callback. The existing retained local-dispatch table rejects53089 before its ordinary client execution path; that supplies no authoritative server behavior. No proc roll/trigger policy is invented here.

Concrete53002 event5 effects expose gameplay gaps independently of stat lists:

-152026 Neleb's Notum Battlerod: [214,3,3,0] target2 and[214,-3,-3,0] target3. -153981 Deimos' Bio-Enhanced Feedback Rifle: [27,5,11,0] target2. -206047 Parasitic Hecataleech: [27,2,2,0] target2. -206048 Augmented Deimos' Bio-Enhanced Feedback Rifle: [27,8,17,0] target2.

All have no function requirements, one tick, interval0 and headers[0,4]/9. These are authored resource effects. The original event trigger, probability, ordering, target assignment and atomic resource handling are separate unknowns.

Event0 contains53089x220,53057x84,53044x1,53064x10,53130x10 and53092x1. The10 paired spawn/delete contracts belong to upgradeable solar engineer pistols. Independent Use policy remains unresolved; this audit neither rejects an otherwise complete wear contract because it has Use nor silently declares those Use effects implemented.

Action8 and other actions

There are5,815 action8 entries,5 action6 entries and11 action3 entries. Exact postfix requirement expressions are retained. Current weapon equip uses action8 through requirementsMet; missing action8 succeeds in that evaluator.

Five currently admitted definitions have action8 criteria outside the present shared evaluator:164638 Andrew's Uber Test Weapon and227454/227455 Fuzzys Poke Technique variants use215 greater-than;206082/206083 Bent Incan Blood Tainter use stat10 equality. Their other skill predicates must not be accepted as a partial substitute for these unknown operands. No boolean underflow was found in the audited action8 expressions.

Other action families remain separate:156599/202725/204396 dolls and164106/ 164107 Blessed Knife of Truth contain action6; ten solar engineer pistol variants and205736 Briefcase of Holding contain action3. In particular, the knife action6 expressions include a trailing AND with only one operand; this does not license changing weapon action selection to6. Full original data, native gate evidence and any specialized behavior must be reconciled first.

All eight starters

Every starter is present, QL1 and admitted by the current predicate. Exact complete records and all functions/actions are in starters.json.

ID Name Profession action8 Extra functions
121564 Baseballbat 60=9 None
121565 Oak Bo 60=2 None
121566 Meta Shield 60=12 OnWear53045:90+10,92+10,91+10
121567 Solar-Powered Pistol None Event10:53065,53076,53075
121568 Solar-Powered Rifle 60=5 Event10:53065,53076,53075
121569 Solar-Powered Assault Rifle 60=1 Event10:53065,53076,53075
121570 Solar Trader Shotgun 60=7 Event10:53075,53065,53076
121571 Solar Powered Submachinegun 60=4 Event10:53065,53076,53075

Solar descriptor bytes are retained verbatim, including nonzero words and negative signed bit patterns; they are not replaced by zero placeholders. Meta Shield's three modifiers meet the exact current shared scalar helper. Starter admission does not establish the correct character-creation loadout.

Narrow remaining questions

  1. How should the shared list include the existing315 NanoAC fallback consumer, and how should missing gear51 timing and277 defense semantics be established? What are their OE, signed-amount and recovery contracts?
  2. When are the83 conditional OnWear predicates evaluated and invalidated? What is the exact removal/re-equip/restore behavior when a condition changes?
  3. What authoritative gameplay does53162 encode, if any? Native return-only behavior is not enough to close this question.
  4. What triggers event5, how are53089 target/chance arguments interpreted, and how do53002 resource effects compose with hits, death and persistence?
  5. Which event10 descriptor consumers are already reproduced, and which full weapon dictionary/descriptor shapes require future support? Preserve the known starter descriptors while researching this boundary.
  6. Are stat10/215 action8 requirements implementable from known character state, and what do their exact original getter modes mean?
  7. What independent Use/upgrade behavior should be supported? It remains separate from automatic wear and attack companions.

No admission rule follows solely from this census. representatives.json contains the concrete examples above and the reversed-range rejection for focused original-source review without reopening any native binary session.