aorecomp

Anarchy Online classic in the browser

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


docs/combat-fist-selection.md (6817B)


Fist selection: evidence and unresolved rules

Target: the shipped 14.9.1 client. The server still uses fixed QL 1 fist damage endpoints and the sourced player attack-rating multiplier. The fist QL selection TODO remains open: the available evidence does not establish its complete historical rule.

Period observations

Tiran's May 10, 2002 post tentatively describes fist QL as half Martial Arts and gives 1000 MA -> QL 500. It identifies database records at QL 1, 100 and 500. It does not report odd-skill measurements or establish which records the server pairs. The catalog values are recorded in combat rules; their existence does not prove a three-point runtime curve or a breakpoint at 200 MA.

Xtremtech's July 2002 guide describes skill-dependent fist damage and recommends Rustot's skill emulator for predictions. A bounded search did not recover a verified period emulator artifact or its source. Later Nillan and AOSkills versions do not establish what the contemporary tool calculated.

Still unresolved are effective versus base MA selection, the role of Add All Offense, odd-skill rounding, behavior at MA 0/1, endpoint pairing and behavior above MA 1000. A database endpoint at QL 500 alone does not prove a cap.

The source and artifact-search ledgers are retained in local/fist-selection-smoke/sources/. They distinguish cached/indexed forum retrieval from direct source retrieval and keep the failed artifact search bounded. Later profession-specific MA/Shade curves are outside this evidence.

Native initial weapon binding

The original kkr.dll SHA-256 is a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0. Addresses below use its original base 0x10000000. Generated C uses base 0x36000000.

FUN_10076740 reads each weapon-list row in this order:

Wire DWORD Stored offset Established meaning
0 +0 Low template ID
1 +4 High template ID; zero falls back to low
2 +12 Skill/map key
3 +8 Unresolved parameter

The encoded count is 1009 * (N + 1). FUN_1007b9a0 constructs the supplied template pair using actor Level stat 54 as QL and inserts the item under the skill key. FUN_1007bff0 looks up key 100 and may bind its WeaponBase to controller slot 0. If that key is absent, it returns without creating a default weapon or clearing the old slot.

The current server supplies {43712,43713,100,1} for player MA in server/world.go, followed by the Brawl and Dimach implicit rows. These are reconstruction choices, not evidence of the original server's complete list. The last field's meaning remains unresolved; calling it quality would assert a meaning the constructor does not establish. The NPC profile similarly retains its existing actor-level value in that field.

SpecialAttackWeapon (0x1d3c0f1c) uses reader FUN_10083f00 and activation FUN_10083fb0. It initializes the map only when empty, then binds key 100. For nonlocal actors it also applies the five trailing values to stats 118, 119, 120, 149 and 51. This does not establish a live server fist-QL update.

FUN_10074730 adds modifiers and FUN_10074b00 subtracts them. Both call FUN_1007bac0(statID). For a row with that skill key, it calls FUN_1000c310(row_parameter, skillID, 0). The original function is the three bytes c2 0c 00, a ret 12 no-op. This is an original client stub, not an unimplemented C adapter to replace. This trace covers modifier changes; it does not establish all base-stat update paths.

WeaponItem constructor FUN_10091560 seeds DamageType stat 436 with Melee 91. The fist records omit this field and retain that default. An explicitly invalid value would instead use the fallback in FUN_100ab7b0.

The generic item path FUN_100f1200 normalizes low-16-bit requested QL outside 1..511 to 1. Initial weapon-list construction follows FUN_100f11d0 -> FUN_100f0f50 instead. A generic loader guard therefore cannot establish the historical fist cap; requested-QL handling and actual server selection must be distinguished.

Retained evidence

local/reports/fist-replication-1491-evidence.json contains 55 records, including:

Generated source locations include client/game/kkr.dll/lifted-0035.c, sub_3607B9A0, and lifted-0070.c, sub_360F0F50/sub_360F1190. Native sessions opened for this investigation were closed before WASM testing.

WASM verification

local/fist-selection-smoke/ retains the fixture, heap probe, screenshots, verification.json and tmp_verify.py. A test-only packet overlay sets the player row's unresolved parameter to 777. Two clients observe a level-100 character and a level-1 character. The probe follows map key 100 to the actual WeaponItem, checks vtable 0x36172ac0, and verifies that its WeaponBase matches the holder's bound slot 0. It reads dense native stats through the getter layout in generated lifted-0000.c, sub_36003000.

Both clients report the following constructed item values:

Actor level Item QL 701 / 54 Low / high 702 / 703 Min / max / critical 286 / 285 / 284
100 100 / 100 43712 / 43713 15 / 60 / 102
1 1 / 1 43712 / 43713 3 / 5 / 3

Raising effective Martial Arts from 200 to 800 through the profile editor, without changing level 100, reconnects the character and produces the same native QL 100 item in both clients. The Stats window shows level 100 and AR 800. These observations verify initial construction for the current supplied pair; they do not establish the canonical server's skill selector or pairing. In particular, the current native representation at higher levels differs from the server's fixed QL 1 damage policy.

There were no page errors, console errors or adapter failures. The driver closed both browser contexts and its server before regression testing. Existing target-protocol, NPC-profile and NPC-respawn tests pass; the production change only renames the unresolved parameter and preserves the wire values.