aorecomp

Anarchy Online classic in the browser

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


docs/protocol-13.2.md (8197B)


Recovered 13.2 protocol differences

These observations refer to the isolated client whose version.id says 13.2, with the binary hashes recorded in versions-and-patches.md. They are not a verified 13.24 specification. The 11.0 layouts remain documented in protocol.md.

Transport and N3 envelopes

The 16-byte, big-endian transport header and four-byte packet alignment remain usable. System cookie packets and heartbeat packets retain their existing shape. The observed 13.2 client uses message ID 0xdfdf, including its first cookie packet. This is an observed discriminator, not a negotiated version number or a demonstrated guarantee for every AO release.

The native client also accepted server packets with message ID 1; matching the client's 0xdfdf value in outgoing server packets was not necessary for the tested world entry, rendering, and movement.

The crucial change is the type-10 N3 envelope:

Offset 11.0 13.2
16 uint32 uncompressed length; zero means uncompressed uint32 message key
20 uint32 message key uint32 identity type
24 uint32 identity type uint32 identity instance
28 uint32 identity instance uint32 pass-on flag
32 uint32 pass-on flag subclass body
36 subclass body continued subclass body

13.2 has no per-message compression DWORD in this path. This applies to both directions. Sending the 11.0 zero field to 13.2 makes it see key zero and ignore world initialization. Conversely, treating a native 13.2 message key as an 11.0 compression length produces an invalid-zlib error.

nr.dll 13.2 N3Message_t constructor 0x10003c20 copies the body directly from packet offset 0x10. Its CreateDataBlock at 0x10004050 writes the body directly at the same offset. The common N3 prefix still contains a uint32 pass-on flag. The message-name XOR key algorithm is unchanged in the examined llr.dll functions.

SimpleCharFullUpdate

Message key 0x271b3a6b retains its byte version, flags, optional playfield, coordinates, and orientation before appearance. Appearance is now a uint32, not uint16, and its bit positions changed:

Field 11.0 bits 13.2 bits
Race 0-1 0-2
Fatness 2-3 3-4
Breed 4-6 5-7
Sex 7-8 8-9
Side 9-10 10-11
Face 11-15 12-16

Widening the old value without repacking changes the character's appearance. The tested human 0x315 becomes 0x629; the generic creature candidate 0xe5 becomes 0x1c9.

The selected 14.9.1 target uses Side in the low three bits and skin Race in bits 10-11. Do not reuse the Race/Side names in this older table for the current target; see the 14.9.1 field trace.

The compact absolute coordinate scales are unchanged: unsigned X/Z in eighths, signed Y in sixteenths. In 13.2 the reader multiplies X/Z by 0.125 at 0x1015070c, and Y by 0.0625 at 0x10150710. Nearby constants and vtable data must not be mistaken for the Y conversion.

NPCs have an additional value immediately after the name and before level. The usual form is uint16; flag 0x20000 selects a byte form. The reader stores it at object offset 0x7e, and activation applies it as stat 455. Its historical meaning and original values remain unresolved. Zero rendered the tested creatures. Players retain three uint32 fields and four uint16 fields at this point instead of the NPC-specific field.

The examined reader is kkr.dll:0x10076e90, with appearance read at 0x10077076, and the NPC branch at 0x100771d3. The existing head, named texture, length-prefixed vehicle, and two empty-list choices were sufficient for the runtime experiments; this does not prove every optional branch.

FullCharacter and playfield initialization

FullCharacter key 0x29304349 still accepts version 16, and legacy 15. There are seven encoded lists before the four stat lists, rather than six. An empty encoded list is uint32 1009. The new list is read at kkr.dll:0x10073e19 into member 0x30; helper 0x1002ddc0 verifies and decodes the (count + 1) * 1009 representation. The following stat map remains a plain count. Empty inventories and the existing level-one stats worked in the tested client.

PlayfieldAnarchy key 0x5f4b1a39 retains the version-4 base: XYZ, the 'a' six-uint32 playfield proxy, and optional database-object identity. The two world origins still follow it. The display-name length/string trailer from 11.0 is no longer read by kkr.dll:0x10138da0. The client displayed the zone name using its own data.

Movement

CharDCMove key 0x54111123 adds one byte after the uint32 action and before XYZ. This is native 13.2 transport offset 36, or offset 40 in an envelope that still includes the old compression DWORD. Zero followed by the existing XYZ/quaternion/two-float fields worked for server-driven NPC movement. Native player movement also sent zero in the examined path. The byte's remaining values and semantics are not established.

Ignoring this byte shifts every coordinate and corrupts persisted character positions. Check an actual move against decoded floats, not just whether a movement message arrived. NumPad0 toggles continuous forward movement in the tested client; tapping W stops it. This allows a sustained movement test with computer-use tools that only send brief key presses.

Teleport

n3Teleport key 0x43197d22 replaces the old uint32 zone flag after XYZ with a complete playfield proxy:

float32 X, Y, Z
byte 'a'
uint32 51100, destination, destination, 0, 40016, destination
identity 0:0
identity 40016:destination
uint32 stream length, then stream bytes

The two identities and empty stream in this tested form follow the proxy. llr.dll:n3TeleportIIR_t::ReadSubClass, 0x1003dc10, calls proxy reader 0x100453e0. Sending the old flag causes that reader to throw because its first byte is not 'a'. The retained crash log placed the throw immediately after that call. The complete proxy successfully teleported the same native process from Omni Training to Borealis and back through world reconnection.

Evidence and verification limits

Bounded Capstone disassembly, source hashes, addresses, and imported BinaryStream symbol annotations are retained in ignored local/reports/client-target-reader-disassembly.json. These observations complement the retained REA startup and patcher evidence; they are not fabricated REA evidence IDs.

The temporary network probe applied the recovered wire differences to the working 11.0 server without changing its game state or content rules. Verified results were:

The Go server now emits these layouts directly for the recovered client and normalizes incoming movement before persistence and relay. Network-boundary regression checks cover initialization, NPC fields, mixed-version movement, and the teleport proxy. No network probe is needed for normal play. The native checks were repeated directly against Go: sustained movement changed Z from 53 to 59.343258 with valid Y 14.576907, and the same process completed the Omni Training/Borealis roundtrip and daylight update. local/reports/client-target-world.png records that direct connection's rendered scene. More complex actions, inventory content, character creation, and exact original NPC stat-455 values remain unverified. The selected 13.24 hotfix build and city-scenery cutoff are still unresolved.