commit 6c57cd885d4acdc3a9c278aaf5452d8e701ac849
parent fd5d2319215b766d9112783095539ce810dcfe8f
Author: anon <anon@example.com>
Date: Thu, 22 Oct 2026 12:54:59 +0000
Correct fist selection and native weapon list evidence
Diffstat:
9 files changed, 172 insertions(+), 24 deletions(-)
diff --git a/TODO.md b/TODO.md
@@ -95,6 +95,8 @@ bonus milestones use AC; broader skill and resource modifiers remain future work
The supported axe and fixed-QL fists use the period attack-rating multiplier;
fractional endpoint rounding remains provisional. See
[attack-rating damage](docs/combat-attack-rating.md) for sources and checks.
+The unresolved fist curve, native weapon-list fields and original refresh stub
+are recorded in [fist selection research](docs/combat-fist-selection.md).
## Additional weapon actions
diff --git a/docs/combat-client-protocol.md b/docs/combat-client-protocol.md
@@ -133,16 +133,19 @@ which can differ from object-field order.
| SpecialAttackInfo / `0x754f1115` | i32 slot `+28`, i32 damage `+2c`, i32 ammo `+30`, target identity `+20`, i32 special StatEnum `+34`, i32 death reason `+38` | `0x100b2c00` / `0x100b2cb0`. Emits named-special feedback, subtracts damage from target health, processes death, updates the selected slot's ammo. |
| NanoAttack / `0x4727213e` | i32 signed health change `+24`, i32 damage type `+20` | `0x100b1590` / `0x100b1600`. Adds signed change to envelope actor's health; displays its absolute magnitude through nano-hit feedback. Unlike HealthDamage, it carries no absolute health. |
| Reload / `0x26515e61` | identity `+20`, identity `+28`, i32 `+30`, i32 `+34`, u32 boolean `+38` | `0x10080bf0` / `0x10080ca0` -> `0x1007bca0`. Exact wire widths; weapon/ammo/timer interpretation traced in the state-machine investigation. |
-| SpecialAttackWeapon / `0x1d3c0f1c` | encoded weapon list, five i32 values `+24..+34` | Reader `0x10083f00`. Activation `0x10083fb0` rebuilds available weapon state and applies stats 118,119,120,149,51 (initiatives and Agg/Def). List layout described below. |
+| SpecialAttackWeapon / `0x1d3c0f1c` | encoded weapon list, five i32 values `+24..+34` | Reader `0x10083f00`. Activation `0x10083fb0` initializes an empty weapon map and applies stats 118,119,120,149,51 (initiatives and Agg/Def) for a nonlocal actor. List layout described below. |
| Skill / `0x3e205660` | i32 count, then count pairs `(i32 stat, i32 value)` | `0x10083d30` -> `0x10008c90`; activation `0x10083d80` assigns each stat. This is not evidence that a plain stat assignment starts a skill-lock countdown. |
| Action / `0x2049527c` | i32 version **1**, i32 action `+20`, identity argument `+24` | Reader `0x100aea40`; activation `0x100aeaa0` dispatches to the actor/item action handler. Receiver rejects another version. Individual action contracts remain partial. |
| Resurrect / `0x445f2a0b` | two i32 values `+20,+24` | Reader `0x100b08d0`; activation `0x10080e20` assigns these to stats 27 and 214, then calls `0x10053230`. The server handles native action-152 return and one saved scanner; insurance fees, reclaim and historical resource amounts remain unresolved. See [player resurrection](player-resurrection.md). |
`SpecialAttackWeapon` uses `0x100767d0`: an encoded count of
`1009 * (count + 1)`, then four i32 values per entry. The reader stores these
-at object offsets `0,4,12,8`, respectively. Weapon-building code consumes the
-endpoint templates, QL, and slot fields; use the state-machine evidence before
-assigning those semantic names to every serialized position.
+at object offsets `0,4,12,8`, respectively: low template, high template,
+skill/map key, and an unresolved parameter. `0x1007b9a0` constructs the initial
+item with actor Level 54 rather than the final row word. Key 100 may bind that
+item to weapon-controller slot 0; it is not the controller slot number itself.
+See [fist selection research](combat-fist-selection.md) for the constructor,
+modifier-refresh stub and evidence boundaries.
The result field is not an independently rolled client attack outcome.
`0x1007a660` queues damage and result; `0x100ab5a0` consumes that queue when
diff --git a/docs/combat-client-reconstruction.md b/docs/combat-client-reconstruction.md
@@ -78,7 +78,7 @@ unknowns for each area:
| QL 1 fist damage endpoints | Shipped item record | Base 3..5, scaled by effective MA; distribution and always-hit policy are local |
| Player attack-rating damage | Period AR/400 rule and native skill selection | Axe/fist normal endpoints and minimum floor scale; fractional truncation is provisional; [damage notes](combat-attack-rating.md) |
| Player max/current health and nano | Native formula, breed/title resources, browser 37/37 | Derived from editable abilities and base Body Development/Nano Pool; Soldier profession |
-| Martial Arts selecting fist QL | Period observation; exact native selector not found | Fixed QL 1, not a recovered MA-to-QL selection rule |
+| Martial Arts selecting fist QL | Tentative period MA/2 report; server pairing/caps unresolved | Server damage remains QL 1; native initial item uses actor level and the supplied pair; [selection research](combat-fist-selection.md) |
| NPC health, damage and weapons | Level-1 Leet weapon data verified; binding and actor stats provisional | Exact-level Leet profile with replicated bite weapon; other NPCs retain prototype values |
| Metaplast chest armor (QL 1/200) and boots (QL 1) | Shipped wear effects and native packets, owner/observer WASM checks | Persistent equip/unequip, appearance and AC modifiers; [armor notes](armor.md) |
| Armor damage reduction and damage-type selection | Period AC/10 observations and shipped damage types | Normal hits respect the weapon minimum; fractional integer ordering is provisional; [armor notes](armor.md) |
diff --git a/docs/combat-client-stats.md b/docs/combat-client-stats.md
@@ -113,6 +113,10 @@ QL. This is not a recovered rule for selecting fist QL from Martial Arts.
511. It loads resource type 1000020 endpoints, copies a single endpoint when
both identities match, and otherwise invokes `100f00a0`. That routine checks
endpoint QLs and list compatibility before interpolating supported fields.
+This generic loading path does not establish a fist-QL cap. The initial
+weapon-list path uses `100f11d0 -> 100f0f50`, constructs a WeaponItem with
+actor Level 54, and invokes interpolation separately. Its final row parameter
+is not established as QL. See [fist selection research](combat-fist-selection.md).
`100eff20` performs the scalar operation:
```
@@ -163,6 +167,9 @@ stat IDs 90 through 97 and 168; other values fall back to 90. This selects a
type. It does not show how much armor subtracts or which order reflect,
absorb, shields and added damage take. Result presentation and queued damage
application are covered in the [protocol report](combat-client-protocol.md).
+WeaponItem constructor `10091560` initializes stat 436 to Melee 91 before
+loading the template. The fist records omit this stat and retain that default;
+omission is different from an explicitly invalid value.
## Weapon and nano timing
diff --git a/docs/combat-fist-selection.md b/docs/combat-fist-selection.md
@@ -0,0 +1,125 @@
+# 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](https://forums-archive.anarchy-online.com/showthread.php?24406-What-weapon-stats-are-my-Fists=)
+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](combat-rules.md); their existence does not prove
+a three-point runtime curve or a breakpoint at 200 MA.
+
+[Xtremtech's July 2002 guide](https://forums-archive.anarchy-online.com/showthread.php?37266-How-to-Choose-A-Weapon-Guide-for-the-MP=)
+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 players in
+`server/target_protocol.go`. This is a reconstruction choice, not evidence of
+the original server's pair. Its last field is named `weaponParameter` because
+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:
+
+- Row reader: `ev_a48ef3e338128ba1669c4ba0a32d29f19d1f7a435f19e6fae6695b67eb119c07`.
+- Initial construction: `ev_cb799d5c9845ff00a3d1767a459e642a9f2c0ca5ae12549c0b86d95a8aac641c`.
+- Missing key 100: `ev_994ae863096a844230cfa0ec9a718abe94b07577a5b630afd99f6ab74e8867ed`.
+- Original no-op bytes: `ev_bd70c1bde83980b53ec1dd5a6d0f17b0f15eafdedd33c73c82939877145c07b0`.
+- WeaponItem Melee default: `ev_22c4d9e1204c0520babb75ac7506c37c72eb3da6ae0dabe55aa79d091544f546`.
+- Separate weapon construction route: `ev_09e5e98a7b06f366c0beae69d8159a13647b33c81de111c618315fca48a9101e`.
+
+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.
diff --git a/docs/combat-npc-balance.md b/docs/combat-npc-balance.md
@@ -83,14 +83,16 @@ historically verified.
The replacement lifecycle and its timing limits are described in
[creature respawn](npc-respawn.md).
-The native `SimpleCharFullUpdate` includes the selected weapon endpoints and
-QL in its initial weapon list. `SpecialAttackWeapon` (`0x1d3c0f1c`) follows the
+The native `SimpleCharFullUpdate` includes the selected weapon endpoints in
+its initial weapon list. `SpecialAttackWeapon` (`0x1d3c0f1c`) follows the
spawn, carrying the same list and the five initiative/AggDef values. Native
`sub_36083F00` reads the list and stats; `sub_36083FB0` applies them to an NPC.
Its holder keeps an already populated initial list, so sending only the later
update would retain fists. `sub_3607B9A0` binds the NPC weapon into combat slot
-0 using the actor's level. The four list fields are low template, high template,
-holder slot 100, and QL. Ordinary player fists retain their existing list.
+0 using the actor's level as item QL. The four list fields are low template,
+high template, skill/map key 100, and an unresolved parameter. The server
+currently also writes actor level into that final field; it is not established
+as QL. Ordinary player fists retain their existing list.
`server/npc_combat_test.go` checks native initialization and restart, initial
weapon selection, the first and subsequent deadlines, normal damage bounds,
@@ -98,7 +100,9 @@ slot-0 hit packets and identical results for two observers. Separate cases
retain prototype behavior for another species, level 7 and extended level 300.
Published WASM checks with an attacker and an independent observer confirmed
-template 120910/120910, QL 1 and holder slot 100 in both native heaps. A real
+template 120910/120910, skill/map key 100 and final row parameter 1 in both
+native heaps. Those row reads did not independently establish constructed item
+QL; the constructor uses the actor's level. A real
100-HP fight recorded 26 bites spanning damage 4..8, with 3.5..3.75-second
intervals under the world tick. Both clients displayed matching damage and the
fallen Leet, then reconnected after a server restart with the profile still
diff --git a/docs/combat-rules.md b/docs/combat-rules.md
@@ -74,14 +74,17 @@ AttackRange 287, InitiativeType 440. Each record selects Physical Prowess
Initiative 120, 100% Martial Arts 100 for attack, and 100% Evade Close Combat
155 for defense.
-The QL 100 endpoint matters: interpolating directly between QL 1 and QL 500
-does not reproduce the three-point database curve. The
+These are three distinct records, not proof of a runtime three-point curve.
+The
[May 2002 player investigation](https://forums-archive.anarchy-online.com/showthread.php?24406-What-weapon-stats-are-my-Fists=)
-reports fist QL equal to half MA skill and identifies these three endpoints.
-The exact selection and odd-skill rounding have not been recovered from the
-client. No literal 43712/43713/144745 selector was found in the lifted client;
-the client receives QL and endpoint IDs from the server. Do not apply later
-profession-specific MA/Shade templates to this target.
+tentatively reports fist QL equal to half MA skill and identifies the three
+records. It does not establish how those records are paired, odd-skill
+rounding, minimum handling or a high-skill cap. The exact server selection has
+not been recovered. The native initial weapon list supplies endpoint IDs and
+a skill key, but constructs its item using actor level; its final row word is
+not established as QL. See [fist selection research](combat-fist-selection.md)
+for the evidence and remaining gaps. Do not apply later profession-specific
+MA/Shade templates to this target.
## Exact client timing calculations
diff --git a/docs/protocol.md b/docs/protocol.md
@@ -635,11 +635,14 @@ Only flag `0x4000` changes the second field to a byte deficit. Reader
`0x10082da0` and initialization `0x10082ad0` establish those semantics.
Flag `0x100` supplies weapon templates after the final encoded list, following
the three byte-counted appearance groups. A single template list is uint32
-2018 followed by low template ID, high template ID, slot and quality.
+2018 followed by low template ID, high template ID, skill/map key and an
+unresolved parameter.
`0x10076740` reads those four fields, `0x100767d0` reads the encoded list, and
-`0x1007b9a0` installs template slot 100 into weapon-controller slot 0.
-The extracted `Martial Arts Item` templates are IDs 43712/43713; quality 1
-provides the basic unarmed presentation without an inventory item.
+`0x1007b9a0` constructs with actor Level 54 and installs map key 100 into
+weapon-controller slot 0. The current server supplies `Martial Arts Item`
+templates 43712/43713 and parameter 1 for player presentation without an
+inventory item. That parameter is not established as QL; the canonical
+server's fist selection remains unresolved. See [fist selection](combat-fist-selection.md).
NPC SCFU also needs flag `0x2` to set stat 194 (`InPlay`) in initialization
`0x10082ad0`. Tab selection through `N3Msg_GetCloseTarget` at `0x10026320`
diff --git a/server/target_protocol.go b/server/target_protocol.go
@@ -61,7 +61,7 @@ func targetPacket(packet []byte) []byte {
packet = append(packet[:len(packet)-4], 0, 0, 0)
packet = append(packet, tail...)
// Supply the initial weapon before the native holder binds slot 0.
- weaponLow, weaponHigh, weaponQuality := uint32(43712), uint32(43713), uint32(1)
+ weaponLow, weaponHigh, weaponParameter := uint32(43712), uint32(43713), uint32(1)
if flags&1 != 0 {
// Tab targeting requires NPC stat 194 (InPlay), supplied by flag bit 1.
flags |= 2
@@ -72,11 +72,12 @@ func targetPacket(packet []byte) []byte {
monsterOffset++
}
if profile := gamedata.NPCCombatProfiles[binary.BigEndian.Uint32(packet[monsterOffset:])][level]; profile != nil {
- weaponLow, weaponHigh, weaponQuality = profile.Weapon, profile.Weapon, uint32(level)
+ weaponLow, weaponHigh, weaponParameter = profile.Weapon, profile.Weapon, uint32(level)
}
}
binary.BigEndian.PutUint32(packet[37:41], flags|0x100)
- for _, value := range []uint32{2018, weaponLow, weaponHigh, 100, weaponQuality} {
+ // Initial QL comes from actor stat 54; the final row parameter is unresolved.
+ for _, value := range []uint32{2018, weaponLow, weaponHigh, 100, weaponParameter} {
packet = binary.BigEndian.AppendUint32(packet, value)
}
case 0x29304349: