aorecomp

Anarchy Online classic in the browser

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


docs/research-notes/ac-nano-research/native/README.md (9624B)


AC nano native consumer audit

This is a read-only audit of retained 14.9.1 evidence and maintained lifted C. No fresh binary session/export, native call injection, game heap write, browser or test server was used. No tracked file was changed by this scope. The original KKR identity bound by the retained ledgers is anarchy-vanilla-14.9.1/kkr.dll, SHA-256 a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0. Original 0x10000000 addresses map to maintained 0x36000000 addresses by adding 0x26000000. This audit adds no new REA Evidence ID or original-server evidence.

Questions and conclusions

Ordinary Modify applies AC: answered, static original evidence

Modify53045 dispatches through 100bd4d0 to 100bd600; the latter dynamically requires a SimpleChar, reads argument key0 as stat and key39 as signed amount, then calls 10074730(stat, amount) when effect flags bit1 is clear and 10074b00(stat, amount, 0) for removal. There is no AC exclusion or alternative AC dispatch in this handler. Consequently a complete unconditional one-shot Modify contract for stat90..97 uses the same native timed-effect application, replacement, cancellation and expiry machinery as ordinary skill buffs.

Evidence: local/reports/combat-client-decompiles-21.json, ev_27c953512839b1cff0ac854ff041eb3e0813c2df061a8858060432f10da08405, plus maintained client/game/kkr.dll/lifted-0056.c:sub_360BD4D0 and sub_360BD600, and lifted-0034.c:sub_36074730/sub_36074B00. The local gate 100be8e0 -> 100bfb40 admits Modify; it rejects Hit53002. Gate evidence is retained in local/reports/combat-client-decompiles-19.json, ev_f28cc89d25d840908ea753e766d4e2d1a718ef5138b04f190e82062755593b1d. Do not infer an unsupported companion Hit outcome from a supported Modify.

Add/remove operate on the additive map, leaving the raw stat foundation unchanged. 10075ca0 computes base/trickle through 10075c60, then adds the modifier value through 10074a30. This getter does not have an AC-specific amount scale. Exact original assembly IDs retained in docs/research-notes/signed-stat-research/ledger.md are:

The existing signed-stat fixture executes these lifted bodies, but its recorded 15 assertions concern ability/skill inputs, not a full AC nano lifetime. Native WASM casting remains necessary to verify the new admission end to end.

Equipment OE must not scale nano AC: answered, bounded caller audit

10062f80 visits clothing slots16..31; 10063130 selects each worn item's event14 effects and only adjusts Modify functions whose stat is in the 100734e0 table. AC90..97 are in that table. It removes the old adjusted item amount and adds the new adjusted item amount. This is not a blanket multiplier over the actor's final modifier map. Nano effects are not scanned in this path. Thus native total AC is effective equipment AC plus the full nano AC amount. Removal must preserve whichever independent contribution remains.

Retained original dossiers in local/armor-oe-research/native-evidence.json:

native-audit.md and native-table.json in that directory preserve the exact table initialization and caller limits. A nano that also changes a requirement skill can independently restore equipment effectiveness; complete mixed contracts must include both the skill effect and AC effect exactly once.

Snapshot/inspection double counting: answered for existing packet paths

Current owner FullCharacter supplies trained/base foundations and restores worn effects; world-ready then replays active nanos. It does not transmit final AC as another raw AC foundation. Current player compact SimpleChar fields likewise do not transmit AC90..97. Its activation100821d0 has a modifier-assignment call at100829aa for Scale360, not an all-stat modifier-map reset. No AC reset call or AC90..97 stat assignment occurs in that reviewed activation body.

InfoPacket's mandatory payload has current/max HP, regeneration and identity metadata; no AC fields. Remote apply1005b1a0 clears modifier1 only after writing maximum HP. TeamMemberInfo carries resource fields only and activation10084740 clears modifiers1 and221. Neither packet absorbs or clears AC contributions. Ordinary stat/resource refresh is therefore unnecessary for a pure AC buff; sending its final AC as raw base while retaining native Modify would count it twice. Existing health absorption accounting should remain unchanged for an AC-only program. A complete mixed max-health/AC program still needs the existing max-health path for its health effect, without adding AC snapshot accounting.

InfoPacket source: docs/character-info.md, local/reference-research/wire.md and client/game/kkr.dll/lifted-0028.c:sub_3605B1A0. Serializer/decoder IDs: ev_9757bf4c1ea87a6c956385944b865747d7fc39852948c4e924483be99a0e916a, ev_3cedbe5b069de93a1e1edc950983ea6dc092c5addeb822813d7fa2534a84dd7c. Delivery/cache evidence includes ev_fc823b8931bd96ad507647cc2bdf315574d4eb30eb9b2f10e47bc2acbc3476cf and assembly ev_13f8d0ea148b7b93dae51450a703f4501f5e38126b623ccedb656595bd735ced. Team fields/calls are documented in docs/team-resources.md; reviewed current server producers are server/world.go, server/team_resources.go and server/character_info.go. These are bounded packet-path findings, not a claim that arbitrary unknown extension packets cannot overwrite AC.

Damage consumer: selection answered; original amount policy unresolved

Weapon 100ab7b0 reads DamageType436, accepts90..97 and168, and otherwise returns ProjectileAC90. Constructor100abb20 defaults omitted type to Melee91. local/reports/combat-client-decompiles-1.json, ev_54c8e5911c3ccf91ab6ce87b5b2df8506f06ab9850e3ae78da5b0cb38fc13d7c, contains the type selector. Maintained body is client/game/kkr.dll/lifted-0051.c:sub_360AB7B0.

Current server normal damage reads only target.equipmentBonus(damageType); this is the missing downstream consumer for an otherwise ordinary AC modifier. The focused reusable change is to include target.nanoBonus(damageType) in that selected stat's sum before the existing AC reduction. It must not alter weapon DamageType selection, equipment OE, hit chance, separate XP/threat or periodic/direct nano damage rules. All ordinary/special consumers that call the shared weapon-damage function should inherit it.

The native client receives weapon outcomes; these routines do not prove AC/10, critical ordering, armor against direct/periodic nanos, or a negative-total AC floor. AC/10 and minimum-damage bounds remain period-source reconstruction in docs/armor.md. For reviewed positive AC buffs, summation is nonnegative; do not claim a newly chosen negative-AC clamp as native evidence or broaden admission to negative AC merely because the modifier handler is signed.

Complete-contract implementation boundary

Use existing whole-program admission and activeNano lifecycle. Admit only catalog-reviewed positive AC functions with supported companions, selectors, requirements, flags, defaults and complete bytes. Do not grant a supported AC subset of a reflect/shield/absorb/conditional/periodic/transfer contract. This scope did not perform that independent catalog census; its precise program list belongs to the catalog audit. No spell-ID branch, persisted AC balance, OE multiplier for nanos, new AC packet, or separate cancellation mechanism is needed for the ordinary contract.

Verify all eight stat types, armor plus nano, independent removal, replacement strains, expiry/death, restart/replay and failed transactions through the shared consumer. Native checks should observe both owner's and observer's raw/stat-map sum, then inspection/team refresh and reconnect: AC must remain single-applied. Keep mixed HP programs on the separately verified HP lifecycle and do not use this evidence to declare the outstanding absolute-HP animation issue resolved.

Retained source identities for this audit

SHA-256 values observed without modifying these files:

File SHA-256
client/game/kkr.dll/lifted-0056.c 3e14446e562f46db41e4b8cc115487bdc016f4f4d84c1f65b1b6a077aee076eb
client/game/kkr.dll/lifted-0034.c b1bfedd42a59d1468ab3adc8cfb392db6785be1c39523ca060072188dd773326
client/game/kkr.dll/lifted-0029.c ecbbc0cbce5bd133989920d1f989f3558c3852b087da8182f8ac2584e576204b
client/game/kkr.dll/lifted-0028.c 8bc0be69d96ba55b07b4c591fae06598ea6ac89bbe438c52e5f57cd153be3f74
client/game/kkr.dll/lifted-0051.c 68c9c7efc5f2040e26980e5f7e6651cbee4fd86a324cf3563045b1c3aa427212
local/reports/combat-client-decompiles-21.json 90727bfd125fe95da4dc828709e6629b13a33af45a5eb508b4783a221cbd4ded
local/armor-oe-research/native-evidence.json 0b041f9204713040083edacbeccc034f742db868c3983da18e7c754a76563d55

The compact activation source was also reviewed at client/game/kkr.dll/lifted-0038.c:sub_360821D0; its exact current hash is recorded in source-hashes.txt alongside the files above.