Effective armor snapshots
GameTest.local().stats preserves the original raw stat dictionary. The
actor's effectiveArmor array separately captures stat90..97: projectile,
melee, energy, chemical, radiation, cold, poison/disease and fire AC. Worn-item
and active-nano modifiers belong to the native modifier tree rather than the
raw dictionary. Zero raw AC is not proof that an item lost its effects.
The snapshot reads the same raw-plus-signed-modifier values exposed by KKR's
mode3 getter, client/game/kkr.dll/lifted-0033.c::sub_3606DFB0 and
client/game/kkr.dll/lifted-0034.c::sub_36075CD0. It walks the existing tree
without invoking getters that can insert absent keys. It does not change guest
registers, item state or modifier nodes, and does not infer AC from server data
or replay catalog wear effects. This field is specific to defenses; it is not
a general replacement for the native skill getters or their ability weights.
client/tests/browser_testing.c exercises all eight nonzero raw values,
positive/negative modifiers, empty trees, missing interior keys and guest-state
preservation. The new contract fails against the prior snapshot, which omitted
the field, and passes in the WASM test module. Existing ten snapshot contracts
continue to pass.
make -C client -f Makefile.wasm build/wasm/browser-testing.js
node client/build/wasm/browser-testing.js
AO_GAME_TEST=1 go test ./server -run '^TestBrowserEffectiveArmor$' -count=1 -timeout=5m -v
The browser check uses a controlled level2 character and one QL2 Leather Vest,
with raw Sense11/Agility11. Actual mouse input wears, removes and re-wears the
same physical instance. All eight native values agree with the server:
9,10,2,2,9,9,2,6 while worn and all zero after removal. Protection-form
screenshots were independently reviewed and show those same values in the
form's visual order. Page replay and a fresh server/browser load retain the
exact vest and defenses; no earned acquisition or progression is claimed.
Accepted captures: local/effective-armor/20261104-075711/, warm23.56s and
cold9.98s. The first controlled run at raw10/10 was refused locally without a
wear request. The focused boundary check
confirms the server also requires Sense11/Agility10: the table's10/9 entries
are strict thresholds, and the successful test adds one to each.
Original getter/resource evidence, source and bundle hashes, complete traces,
validation logs and a packet/state audit are retained in local/effective-armor/.
The focused armor checks pass2 roots/76 results in19.120s; maintained-package
vet, JavaScript syntax and whitespace checks pass. Twelve complete native
traces have no client errors or dropped events, and the audit verifies the
published bundle's bytes and complete client-source digest.