aorecomp

Anarchy Online classic in the browser

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


commit 4cb635327de979d133d9337a7412634744e45816
parent 901d8affc3d95e68bfa42e3bc5e776597b723a88
Author: anon <anon@example.com>
Date:   Sat, 24 Oct 2026 15:50:48 +0000

Establish Brawl content and native result contracts

Diffstat:
MTODO.md | 7+++++++
Mclient/tests/fling_result.c | 37++++++++++++++++++++++++-------------
Adocs/brawl.md | 131+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 162 insertions(+), 13 deletions(-)

diff --git a/TODO.md b/TODO.md @@ -199,6 +199,13 @@ Normal-hit additions and weapon-range modifiers are described in magazine after the correct delay and the total round count is conserved. - [ ] Implement one melee special. Check: a suitable weapon/character can use the action once, with native feedback and an enforced skill lock. + Brawl's original content, capability gates, request/result and lock contracts + are recorded in [Brawl research](docs/brawl.md). Its own skill-to-QL selector + and stun outcome rules remain unproven; do not reuse MA's tentative selector + or the wielded weapon's normal damage as if either were established for Brawl. + Native/WASM testing also confirms Brawl needs its implicit item row to create + the actor-owned action: setting Brawling or equipping an axe leaves B rejected + before any request. Include registration when implementing the full outcome. - [ ] Implement one ranged special. Check: its damage, ammunition use and lock match the chosen action; repeated requests cannot bypass the lock. Native Fling Shot requests, result feedback and persistent shared locks now diff --git a/client/tests/fling_result.c b/client/tests/fling_result.c @@ -4,6 +4,7 @@ void sub_360B2CB0(void); static unsigned lookups, names, feedbacks, reads, writes, deaths, ammo_updates; static uint32_t missing_actor, feedback_category, death_reason; +static uint32_t special_skill, weapon_slot; static int32_t ammunition; static void actor_lookup(void) @@ -19,7 +20,7 @@ static void actor_lookup(void) static void special_name(void) { - assert(MEM32(g_esp + 4) == 150); + assert(MEM32(g_esp + 4) == special_skill); names++; g_eax = 0x50000800; g_esp += 4; @@ -72,7 +73,7 @@ static void target_death(void) static void weapon_ammunition(void) { - assert(g_ecx == 0x50003000 && MEM32(g_esp + 4) == 6); + assert(g_ecx == 0x50003000 && MEM32(g_esp + 4) == weapon_slot); assert((int32_t)MEM32(g_esp + 8) == ammunition); assert(MEM32(0x50002300) == 87 && writes == 1); assert(deaths == (death_reason != 0)); @@ -104,15 +105,23 @@ int main(void) unsigned attacker_local, target_local, missing; uint32_t feedback, death; int32_t ammo; + uint32_t skill, slot; } cases[] = { - {1, 0, 0, 50, 0, 3}, - {0, 1, 0, 48, 0, 3}, - {0, 0, 0, 49, 0, 3}, - {1, 0, 0, 50, 7, 3}, - {1, 0, 0, 50, 0, 0}, - {1, 0, 0, 50, 0, -1}, - {1, 0, 1, 50, 0, 3}, - {1, 0, 2, 50, 0, 3} + {1, 0, 0, 50, 0, 3, 150, 6}, + {0, 1, 0, 48, 0, 3, 150, 6}, + {0, 0, 0, 49, 0, 3, 150, 6}, + {1, 0, 0, 50, 7, 3, 150, 6}, + {1, 0, 0, 50, 0, 0, 150, 6}, + {1, 0, 0, 50, 0, -1, 150, 6}, + {1, 0, 1, 50, 0, 3, 150, 6}, + {1, 0, 2, 50, 0, 3, 150, 6}, + {1, 0, 0, 50, 0, -1, 142, 0}, + {0, 1, 0, 48, 0, -1, 142, 0}, + {0, 0, 0, 49, 0, -1, 142, 0}, + {1, 0, 0, 50, 4, -1, 142, 6}, + {1, 0, 0, 50, 0, -1, 142, 8}, + {1, 0, 1, 50, 0, -1, 142, 0}, + {1, 0, 2, 50, 0, -1, 142, 0} }; for (unsigned i = 0; i < sizeof(cases) / sizeof(cases[0]); i++) { lookups = names = feedbacks = reads = writes = deaths = ammo_updates = 0; @@ -120,13 +129,15 @@ int main(void) feedback_category = cases[i].feedback; death_reason = cases[i].death; ammunition = cases[i].ammo; + special_skill = cases[i].skill; + weapon_slot = cases[i].slot; MEM32(0x50000004) = MEM32(0x50000020) = 50000; MEM32(0x50000008) = 1; MEM32(0x50000024) = 2; - MEM32(0x50000028) = 6; + MEM32(0x50000028) = weapon_slot; MEM32(0x5000002c) = 13; MEM32(0x50000030) = ammunition; - MEM32(0x50000034) = 150; + MEM32(0x50000034) = special_skill; MEM32(0x50000038) = death_reason; MEM8(0x50001128) = cases[i].attacker_local; MEM8(0x50002128) = cases[i].target_local; @@ -152,5 +163,5 @@ int main(void) assert(deaths == (death_reason != 0) && ammo_updates == 1); } } - puts("native Fling result: target damage, named feedback, ammunition and death routing passed"); + puts("native Fling/Brawl result: target damage, named feedback, slot/ammunition and death routing passed"); } diff --git a/docs/brawl.md b/docs/brawl.md @@ -0,0 +1,131 @@ +# Brawl: original content and native contracts + +Brawl is not yet implemented by the server. This investigation establishes the +shipped content and client contracts without substituting a wielded weapon's +normal damage or Martial Arts skill-to-QL rule for Brawl's own calculation. + +## Authored content + +The 14.9.1 catalog contains two records named Brawl Item: + +| ID | QL | Minimum | Maximum | Critical bonus | +| --- | --- | --- | --- | --- | +| 70292 | 1 | 1 | 2 | 3 | +| 70293 | 500 | 100 | 500 | 500 | + +Both use100% Brawling142 for attack and100% Evade Close155 for defense. +AttackDelay294 is10 centiseconds, RechargeDelay210 is1500 and range287 is3. +DamageType436 is omitted, retaining WeaponItem's Melee91 default. These fields +do not establish a server's hit roll, critical probability or skill-to-QL rule. + +Their Use action excludes the Ranged bit of WieldedWeapons274. OnUse contains +HeadText53057 `Brawl` and CastChance53089 targeting14/program125772, with chance +arguments10 atQL1 and20 atQL500. This is OnUse, not an OnHit function. The data +does not by itself prove how the original server interpolates or rolls a chance. + +Stunned by Brawl125772 lasts300 centiseconds and runs RestrictAction53068 with +mask6. It has NCU cost100 and no authored strain75; treating it as an ordinary +friendly buff would assert unsupported admission/replacement rules. The same +stun is referenced by Pure Carbon Fragment, so its effect is reusable content. + +Fist records43712/43713, Kinetic Axe209283 and Briefcase205736 advertise Brawl +through item capability30 bit25. The Flechette Pistol123742 does not. The full +catalog search found only the two named Brawl endpoints; searching attack142 +also finds Bow Special Attack records and cannot identify Brawl by itself. + +Eight original payloads, offsets, hashes and the bounded catalog scans are +retained under `local/brawl-research/content/`. This is original resource +evidence, not a later website dump. + +## Native request, result and timing + +Original KKR SHA256 is +`a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0`. +The native ledger and exact citations are under `local/brawl-research/native/`. + +- Sender1002c090 sends CharSecSpecAttackIIR `0x51492120`: payload target identity + followed by signed skill142. It checks target, locks, weapon availability, + range and line of sight. Client eligibility does not replace server checks. +- Weapon availability10078990 reaches100aaf10, whose Brawl branch tests + capability30 bit25. With neither equipped weapon slot present, the sender + bypasses that weapon flag requirement. An implicit item can supply Use criteria. +- Request activation1007da30/10078a40 queues a special-action notification. + This is distinct from applying damage; the exact Brawl animation remains open. +- SpecialAttackInfo `0x754f1115` reads slot, damage, ammunition, target identity, + skill and death reason. Activation100b2cb0 emits named feedback, subtracts HP + from that target once, handles death and assigns ammunition to the given slot + when an actual inventory item exists. There is no critical or miss field. +- CharacterAction80 with identity B type142 displays separate Brawl feedback; + it does not apply damage or a cooldown. +- CharacterAction170 starts a shared skill lock. Native10073ae0 ignores an + existing lock and adjusts raw seconds by effective SkillLockModifier382. + Its signed multiply, float32 .01 and final truncation differ from exact + integer percentages: raw15/modifier+20 produces17, while modifier-20 gives12. + This is a client countdown rule, not proof of original server eligibility. + +The implicit item map is keyed by skill. Initial construction1007b9a0 uses actor +Level54 as the supplied pair's QL. It does not derive QL from Brawling. The +modifier-refresh call reaches the original ret12 stub1000c310; this is not an +unimplemented WASM adapter to replace. Recharge helper100ab060 reads implicit +item142's RechargeDelay when present, otherwise the wielded weapon's field. +Its fallback cannot establish a fixed authoritative Brawl cooldown. + +## Native action registration + +The B key first reaches10057630 through1002c7d0. It searches the actor's local +action list for the command. A missing entry produces `Action not available.` +and returns before the special sender. This message therefore cannot establish +failure of a later skill, weapon, range or cooldown check. + +Implicit item insertion10078920 registers an actor-owned action through10057370. +For Brawl142, Riposte143 and Dimach144, dispatch10057680 requires that actor-owned +source. Equipped-weapon registration100ad0b0 adds Fast Attack147 and several +ranged specials, but omits Brawl142 and Dimach144. The initializer supplies a +Brawl icon mapping without creating its action. Merely setting Brawling or +equipping a Brawl-capable weapon does not invoke the shown registration path. + +The current server supplies only implicit Martial Arts100. Brawl implementation +must also supply the appropriate implicit item row so the native client creates +its action. Adding that row alone would expose a request without implementing +its authoritative outcome. Exact source records and heap layout are retained in +`local/brawl-research/native/action-availability.md`. + +## Evidence limits and implementation work + +[Tiran's May2002 post](https://forums-archive.anarchy-online.com/showthread.php?24406-What-weapon-stats-are-my-Fists=) +tentatively gives MA/2 for fists and separately mentions Brawl Item. It does +not give Brawl skill/2. The existing bounded Rustot emulator search recovered +no verified period artifact. Current Auno70293 has matching headline values but +also lists later revisions; it is not substituted for the shipped payload. + +Before implementing Brawl outcomes, establish or explicitly bound the +skill-to-QL selector, effective/base skill input, odd and endpoint rounding, +attack-rating/AC/critical arithmetic and cooldown rules. Stun handling also +needs authoritative chance, target, resistance/NCU, interruption, overlap, +expiry/death/respawn and persistence behavior. Preserve the existing atomic +special damage/lock/corpse transaction when adding these effects. Keep these +gaps separate from the proven request and result contracts. + +## Verification + +`client/tests/fling_result.c` exercises the unchanged lifted result activation +for Fling150 and Brawl142. Brawl cases cover owner, target and observer feedback, +fist slot0, equipped slots6/8, no-ammo sentinel-1, death routing and either missing +actor. All15 cases pass in Linux and WASM with identical output. The fixture +tests result activation and dispatch boundaries; it does not roll Brawl damage +or prove the server's choice of a result slot. Build/run logs are retained in +`local/brawl-research/`. + +A headed Chromium run with the GPU tested the actual WASM client against +the shared HTTPS preview. With a selected Leet, raw Brawling600 and the Kinetic +Axe equipped in slot6, B reached the focused canvas but produced the missing +action message and no special request. A read-only native heap probe found +weapon-owned Fast Attack147 and no Brawl142 entry, confirming the earlier gate. +The same message occurred unarmed. All17348 captured world packets contained +zero outbound CharSecSpecAttackIIR requests; no browser errors occurred. + +The three test items remained present and were returned to inventory before +cleanup. The owned browser was closed, only its character/items were removed, +SQLite integrity passed and all unrelated rows remained unchanged by cleanup. +The single shared preview was restored on its default ports. Wire data, +screenshots, probes and verification are in `local/brawl-input-smoke/`.