aorecomp

Anarchy Online classic in the browser

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


docs/research-notes/actor-speed-research/native/README.md (8557B)


SimpleCharFullUpdate RunSpeed, original 14.9.1

The receiver contract is answered. The field after the optional HeadMesh is raw RunSpeed stat 156, with an unsigned-byte form and a signed-short form selected by message flag 0x2000. It is not a scaled movement velocity. The shipped client does not implement a SimpleChar payload writer, so the historical server's choice of form and out-of-range policy remain unknown.

Identity and evidence boundary

Original target: anarchy-vanilla-14.9.1/kkr.dll, SHA-256 a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0. Original image base is 0x10000000; maintained KKR lift/data base is 0x36000000. Subtract 0x26000000 from maintained instruction addresses. Message is SimpleCharFullUpdateIIR_t, key 0x271b3a6b.

This pass reused complete REA records from matching original-target bundles. retained-evidence.json contains the complete selected records, including provider, profile, limitations and original identity; provenance.json maps them to their prior bundles. No binary was opened, exported or executed, and no REA session was created. No production sources, DB, runtime or commit was changed. The earlier automatic approval rejection of a fresh binary open was respected; no retry or substitute binary analysis was attempted.

The generated source/data checks are supporting source observations, not new REA results. source-data-audit.json retains the relevant rebased vtable and import words; source-instruction-audit.json retains instruction comments, source paths and source SHA-256 values. They do not establish runtime behavior or an independently recovered original server.

Reader and encoding

Original reader 10082da0, maintained sub_36082DA0 in client/game/kkr.dll/lifted-0038.c:6358, reads version byte 0x30 and flags at message +0x24. REA ev_9ba1ee861536b7169d3adbd6fb561ea6e850f0c230ea1bbb9d80c38d02a5dc59 contains the complete reader. Independent retained batch ev_8687fd6e603c302e4ab3fee7b405ea3e5c9a615e0f56bff18dd20ff949da8d4c also contains it.

At 10083668..1008367b, flag 0x80 optionally reads HeadMesh to +0x134. Immediately afterward, 10083681..100836a7 does:

Flags Bytes consumed Stored at message +0x190
flags & 0x2000 == 0 One byte Byte zero-extended to a 16-bit word
flags & 0x2000 != 0 Two bytes via BinaryStream::operator>>(short&) Raw 16-bit word

The narrow path uses MOVZX, not signed-byte extension. IAT 1016fae0 is ??5BinaryStream@@QAEAAV0@AAD@Z (char&); IAT 1016fac8 is ??5BinaryStream@@QAEAAV0@AAF@Z (short&). The reader loads the latter into EDI at 10082e79 / 10082ecf and subsequent restores before the speed block. Both import names and the supplying cr.dll descriptor were decoded from the maintained client/data/kkr_dll.c arrays, not guessed from variable names.

The normal network stream uses big-endian shorts. Supporting maintained CR source: exported short& reader sub_2A002400 in client/game/cr.dll/lifted-0000.c:4070 reads exactly two bytes, then swaps them when stream +0x40 differs from +0x3c; default constructor sub_2A001000 sets those to 1 and 0. CR export/name resolution is saved in cr-exports.json. No independently retained original CR hash/REA record was found or acquired in this bounded pass; this supporting byte-order check is explicitly a maintained-source observation. Big-endian also agrees with the existing message-wide BinaryStream wire convention.

After the speed field, 100836ae resumes optional identity flag 0x400, then texture flag 0x10. The speed read itself is unconditional in both player and NPC branches; its position is not the player-only post-name ability block. There is no scaling, subtraction, division, saturation or clamp in this block.

Consumer, signedness and bounds

Activation 100821d0, maintained sub_360821D0 in client/game/kkr.dll/lifted-0038.c:3209, at 1008251b..1008252c sign-extends message word +0x190 with MOVSX and invokes actor +0xe4 virtual +8 with (156, value). This precedes the NPC/player gate at 1008252f. Complete REA batch: ev_d1c6525d8047faf81030e0b0e00f69e3bec7b13e1e1c8c84779183724bffb2ba.

Therefore the exact representable semantic ranges are:

These are receiver ranges, not evidence that the original server admitted negative trained RunSpeed. A nonnegative value above 255 needs the wide form. Using one byte for 300 would transmit 44. Values above 32767 cannot be represented positively by this field; wraparound is not an extension branch. The local receive/setter chain has no extra clamp for stat 156.

The constructor 10081960 initializes word +0x190 to 10 at 10081b43, but the reader always replaces it. The current server literal 100 is thus a chosen raw stat value, not an encoding multiplier, sentinel or required default.

Raw base versus effective value

Actor stat interface +0xe4 uses vtable 1017139c; virtual +8 is 1006e030 and virtual +4 is 1006dfb0 (supporting maintained data). Complete original setter REA ev_ad3bf775fd65a45bd62c250f78a91146afe2b3f42b9640669800f035c20824f6 has an explicit case 0x9c: request movement refresh 100480e0(1), then store the unchanged value into the raw stat array at stat*4 (1006e637..1006e63d). It does not replace or subtract modifier-map entries.

Original getter 1006dfb0 mode 2 returns that raw array. Mode 3 calls 10075cd0, which obtains the mode-2 raw value, calls modifier lookup 10074a30, and adds the two. REA ev_74652ec491811d2dbb9348174f59fabc0739128af4fc0567877aee64d3b28a0e and ev_e46da2e042917a40735252de7302ae52721c024edc9a7d219a211f3f7555086d contain complete original assembly. The maintained movement reader sub_36047BE0, client/game/kkr.dll/lifted-0023.c:1387, requests (156, 3) at 10047bf6..10047bff before its low-health adjustment. Mode 3 excludes ability trickle; mode 0 takes the separate effective path.

The SCFU activation later calls nano-snapshot activator 10066dd0 with the program list at message +0x1d4. Complete REA ev_70547aafd9d27c8e0b95cec42582fd0be8b886ba4e1bfa8229e56422f39e782f shows the program effect activation. Worn initialization 1005f150 invokes item virtual +0x74 for eligible worn rows; complete REA ev_2f66eca0926b9507b6a9bc79113271eb694bd9260f2b79cc46fa35a57f2923c9. Additive effects are tracked separately (10074730, complete REA ev_b2a9656c468675646d49b31ff6317ecdfd16fc3991e0dc6484322a01038bea1c).

Receiver-compatible reconstruction must send the trained/raw RunSpeed in SCFU when equipment/nanos are applied afterward. Sending a value already including those modifiers and replaying them adds them twice. This conclusion is derived from the observed raw-store/modifier-add composition, not a capture of the historical server's exact snapshot sequence. The server's independent NPC chase-speed policy is outside this wire-field conclusion.

Writer and remaining gap

Constructor 10081960 installs message vtable 101719c4 at 10081af7. Supporting maintained data gives slot +0x18 = reader 10082da0 and slot +0x1c = payload writer 1010def0, using the established message slot contract in local/reports/combat-client-protocol-vtables.json. Writer 1010def0 is only RET 4 in maintained client/game/kkr.dll/lifted-0079.c:6391; complete original REA ev_8acd9bc8d18ea4085537a6e01c235369cd4396bb768446d181e203c5de98ed1e also decompiles it as an empty one-argument routine. Slot +0x14 100dbdc0 is a separate false-return stub and must not be mistaken for the writer.

There is consequently no recovered shipped-client writer deciding 0x2000, and no evidence of original server-side rounding, scaling, clamping, overflow rejection or preferred use of wide values below 256. A shortest-form serializer (byte for 0..255, otherwise signed-short plus 0x2000) follows the proven reader, but its selection policy is a reconstruction inference. No original runtime capture or original server implementation was used.

Checklist: reader, field order, flag, width, signedness, scaling, receiver bounds and raw/effective distinction answered; shipped-client writer answered as empty; historical server writer policy unresolved. Validation is static evidence/source consistency only, with no game/runtime tests in this pass.