aorecomp

Anarchy Online classic in the browser

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


docs/pet-owner-protocol.md (3566B)


Original pet owner-list protocol

This document covers the original transport prerequisite. The server now admits one owned summon, all-pets follow/wait and combat retreat; broader commands and lifecycle fidelity remain separate work.

Original client evidence

Original kkr.dll SHA256 is a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0. The retained native analysis is in local/pet-research/ and local/pet-owner-protocol/native/kkr-evidence.json.

AddPet 194e4f76 and RemovePet 58742a0f use the owner's character identity as their envelope and one eight-byte pet identity as their body. Activation updates the owner's identity set and stat458 NPCNumPets. Duplicate additions do not increase its size. These messages do not update stat251 PetCounter, whose packed nibbles are independently consulted by summon requirements.

PetCommand 6b333303 reads a command, argument, encoded identity list, boolean and bounded string. Native /pet report with no name filter emits body words 14, 0, 1009, 0, 0: the owner set is implicit, and no explicit pet identity is present. This establishes the request, not a server report response. The same native input captures /pet follow as 1, 0, 1009, 0, 0; the owned server implementation is documented in pet follow. It captures /pet wait as 4, 0, 1009, 0, 0, now admitted by the same owned command handler. Original /pet behind captures 2, 0, 1009, 0, 0; its admitted combat stop and owner-follow transition are documented in pet retreat. Original /pet terminate captures 10, 0, 1009, 0, 0; the owned dismissal implementation retires only that owner's set. Original /pet attack captures 7, 0, 1009, 0, 0; its opponent comes from separate target selection. See starter pet combat.

Owner membership replays after CharacterReady and the actor's equipment/nano effects. A two-owned-pet reload regression shows that early bootstrap AddPet alone leaves the replaced remote actor's stat458 unknown, even after twelve seconds. Replaying the original membership after readiness restores both clients' counts. The server publishes stat251 separately; original AddPet derives stat458 from the native owner set. See the wait/reload regression.

The NPC full-update reader at 10082da0 reads four compact fields after its flags. Activation at 100821d0 publishes these as stats455,466,512,388. The first three are byte/short fields, not a 32-bit owner identity. A later emulator's ownership aliases do not establish an original wire field. Exact summon template/profile, type and lifecycle contracts remain unresolved.

Focused native regression

TestBrowserPetOwnerProtocol creates two controlled players and an ordinary NPC rendered with candidate body96195. Test-only endpoints deliver original AddPet/RemovePet and a separate stat251 update. No server ownership state is created; this is not evidence of a working summon or earned progression.

Both WASM clients observe owner stat458 become1, stay1 after a duplicate, then become0 after removal. The observer's own list is unchanged. Stat251 remains0 until the explicit counter update and remains1 after removal. Real keyboard input emits the exact report request. The clients report no runtime errors, and the server retains empty physical inventories without allocating items. The passing run and screenshots are retained in local/pet-owner-protocol/20261103-204010/.