aorecomp

Anarchy Online classic in the browser

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


docs/research-notes/fast-attack-research/native/ledger.md (11386B)


Fast Attack147 versus Fling150: original native evidence

Read-only static scope, original anarchy-vanilla-14.9.1/kkr.dll SHA-256 a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0. Reused local/brawl-research/native/kkr.snapshot.json; no broad search or repeated packet analysis. Original addresses use base0x10000000. Generated C was used only to navigate candidate addresses. No production files or existing fixtures were edited; no game/browser/server processes were started.

kkr-evidence.json and kkr.snapshot.json retain523 original records. focused-evidence.json retains36 complete selected original records; citations.json preserves exact identities/limitations. tmp_focus.py validates the target SHA and native constant bytes. The owned REA session was closed after export. This is client evidence, not original-server execution evidence.

Registration and eligibility differences

Fast147 registers from an equipped weapon, like Fling150. In 100ad0b0 (retained query at contained address100ad390), local WeaponItem equip callbacks for slots6/8 inspect effective capabilities stat30:

Special Capability Skill key Native action source
Fast Attack 0x40000 147 Equipped weapon identity
Fling Shot 0x1000 150 Equipped weapon identity

Fast registration is 100ad4af..100ad4ce; it passes147, WeaponItem+0x90 source identity and secondary command0 to 10057370. Fling uses the parallel branch at100ad40a..100ad426. The initializer 10056cf0 has icon mappings147 ->0x14126 and150 ->0x14120. 10057370 suppresses a duplicate skill action, creates it from the icon mapping, notifies local consumers and marks it locked when the same skill is already in the shared lock vector. No Fast skill-value threshold is tested in this registration path.

10057680 dispatches147 and150 through the same weapon-source branch to N3Msg_SecondarySpecialAttack. This differs from actor-owned Brawl142/Dimach144. Fast requires no implicit item147 for its normal GUI registration. Adding such an implicit row is not necessary to enable a weapon's Fast Attack action.

100ad4e0 unequip checks the other hand's capabilities before removing shared special actions: Fast147 is removed via 100574b0(147) only when the removed weapon had0x40000 and the other hand lacks it. Fling has the parallel0x1000 test. 100574b0 removes/notifies the action entry; it does not erase the skill-lock vector. Registration and lock state remain separate across weapon swaps.

100aaf10 availability merely reads effective stat30 and returns bit18 for147, bit12 for150. It adds no Fast-specific melee/ammo-type test. Shared 10078990 validates capability then weapon range. The shared request sender checks holder slots8 then6, accepts if at least one present hand passes, applies the common target/lock/LOS checks, and serializes target plus skill147. There is no weapon-slot field in this request. The order of those eligibility checks does not prove original-server weapon-selection priority.

These observed paths contain no Fast-only attack/recharge/reload/ammo gate. That bounded statement is not proof that the original server omitted any such gate. Native animation or other callers can have additional shared state.

Exact original records:

Exact timing arithmetic and its unused return values

Original 100ab060(actor,skill) has separate Fast147 and Fling150 branches with identical arithmetic and different skill getters. Both read item AttackDelay294 in mode2 and actor skill in mode0. Original FILD instructions treat both getter results as signed32. In the signed effective getter already researched, skill mode0 includes modifiers/trickle and has no universal floor.

For finite inputs whose result fits the conversion's ordinary32-bit domain:

product = float32(signedAttackDelay294 * 15.0)
value = extended(product) - signedEffectiveSkill147_or_150
result = trunc_toward_zero(max(value, 500.0))

15.0 is the exact float32 at10170e88 (00007041);500.0 is the exact float32 at10170e90 (0000fa43). Native readbytes ev_f9c5de95a08db04cd48d40f819ca51c01518209017b2d31265866f75405b8ee0 and validated constants.json preserve them. Item AttackDelay294 is expressed in centiseconds in the existing native stat evidence;500 corresponds to5s.

Fast exact sequence:

Fling parallels this at100ab26d..100ab2a5, reading150 instead of147 and jumping to the same500 comparison. Because both inputs are integers and15 is exactly representable, ordinary supported item values give integral results in these branches; _ftol does not itself select whole seconds. Extreme out-of-range conversion or invalid getter values are not an established server policy.

Original assembly: ev_60d2cb8b3f1e0909afba79a412db9fb91ba16cf7b191cd4354bc5253090f5bca. Pseudocode: ev_ed42f004972da2d70332de3a18e9184c07950cb5ba6db6ac121200fe92096c8a.

Important coverage limit: only observed direct caller of100ab060 is 10079700, the virtual queued-special consumer. It calls100ab3e0 (attack-delay getter) at1007979a, then100ab060 at100797a6. Both EAX results are discarded; subsequent code overwrites EAX at100797b1. No lock or timer is created from those computed values in this caller. Therefore this assembly establishes client arithmetic including its5s floor, but does not establish an active native cooldown, historical server formula/floor, or integer-second conversion.

Required focused arithmetic boundaries if a fixture is added

No production or existing fixture was changed. A new standalone native fixture should execute unchanged100ab060 and stub only its actor/item getters, asserting which stat/mode is requested. These are hardcoded assembly-derived expected values, not original PE runtime observations:

AttackDelay294 Fast147 Fling150 Expected Fast result Expected Fling result
125 7 600 1868 1275
125 600 7 1275 1868
125 1374 1374 501 501
125 1375 1375 500 500
125 1376 1376 500 500
125 -7 -7 1882 1882
0 0 0 500 500
1118483 16776744 16776744 500 500

The last deliberately artificial value checks the float32 intermediate: 1118483*15 is16777245, rounded to16777244 at the FSTP; subtracting16776744 therefore reaches500. An int64-only implementation would produce501. These values isolate native algorithm structure and are not plausible item data or recommended server validation limits. A useful caller fixture would also show that10079700 ignores the timing values rather than starting a lock from them.

Shared result, lock and presentation boundaries

No147-specific result or lock path was found in the recovered functions. The existing generic request/result records are retained without re-querying them. Fast differs from Fling by skill ID, capability and icon mapping. SpecialAttackInfo still applies one payload-target HP subtraction, named-special feedback, death and supplied ammo assignment; it supplies no critical/miss field or damage RNG. CharacterAction80 only has named Brawl142/Dimach144 cases in the inspected body; it is not required to label Fast Attack via that branch.

The actual lock is shared CharacterAction170/164, keyed independently by147 or 150. The exact signed modifier382 calculation, duplicate behavior, global one-second countdown and explicit restoration are documented in local/brawl-research/native/ledger.md; Fast adds no special lock exception. Unequipping an action does not remove that vector.

Queued-special consumer10079700 is invoked with a slot. It revalidates that slot's capability/range via holder+0xc, consumes the queued skill, then prefers an implicit item under that skill if present, otherwise the slot's WeaponBase. Thus an unnecessary implicit147 row could alter the execution source even though normal registration does not need it. This function does not select a universal hand priority; its observed direct callers list is empty because it is reached through the holder vtable (known+0x64). It calls item virtual+0x30 after assigning owner identity; deeper147 animation/effect semantics are outside this pass.

The acknowledgement queue10078a40 checks lock membership before insertion, as it does for Fling. Ordering a lock notification before acknowledgement can therefore suppress this native queued-action path. This is an observed client ordering constraint, not proof of original-server packet ordering.

Existing original default binding

The complete original CCR binding record, copied without querying a new session to ccr-bindings-evidence.json, contains:

KEY_BUTTON_FASTA COMMAND_BUTTON_FASTA [ & AnyPlayMode ! TextInputMode ] = N

This establishes the default N key outside text input. It uses abbreviated FASTA, not FASTATTACK, in that command name. Original ccr.dll SHA-256 is 4c6d8dfc7eaa39044935d94e678ee4ead922decad36ed616a7843dcb51e7c55a; exact record ev_3dff589882a6c4f42e12afb434b594089dd46f9bd63d70e693e8b79b3ec4f06f. It does not establish the user's current remapped preferences or focused input state. Parent owns actual N-key validation in the WASM client.

Canonical damage/critical selection, defense checks, lock floor/rounding, authoritative hand selection, swapping/cast/recharge/reload interruptions and server LOS policy remain separate historical-rule questions. Existing server ceil-to-seconds/min1 behavior remains provisional; adopting the unused native 5s floor alone cannot turn it into a verified original-server rule.