aorecomp

Anarchy Online classic in the browser

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


docs/character-appearance.md (8541B)


Original player appearance

The server reads the original creator's 255 head choices and seven breed/sex templates from gamedata/player_appearances.yaml. The extractor tools/data/extract_player_appearances.py reproduces that file from the selected 14.9.1 database and SHA-checked ddr.dll and bbr.dll binaries.

Breed Native sex Heads First mesh Last mesh
Solitus 2 male 52 40681 40680
Solitus 3 female 52 40629 40628
Opifex 2 male 30 40261 40284
Opifex 3 female 31 40224 40246
Nanomage 2 male 30 40185 40206
Nanomage 3 female 30 40151 40169
Atrox 1 androgynous 30 40111 40132

ddr.dll!FUN_10030230 builds these ordered choices by looking up original head filenames, excluding specific entries and skipping absent meshes. Each choice retains its explicit mesh identity and skin race. The Solitus catalog includes three skin races. The native creator previews Atrox using sex 2, while NameScene_t's helper at 0x10038b40 sends sex 1 in its creation request. Both use the original athrox body/head resources.

The profile and SQLite record store head_mesh independently of the packed appearance's five-bit face hint. characterPacket sends that explicit mesh to local and observing clients. A default head uses the first original choice matching breed, sex and skin race. New browser visitors randomly select from the complete Solitus catalog and retain the head's matching skin race. The mapping between the original creation catalog index and the packed face hint remains unproven; the server does not truncate the full catalog into it.

Body materials and height

The original body builds are slim 0, normal 1 and heavy 2. The native client selects their corresponding CIR resources from the packed appearance. Body materials follow bbr.dll!VisualCATMesh_t::ChangeClothes: retain authored defaults, replacing a fully green material with its matching naked skin. The extractor reads the native full/partial green tables and asserts that no default body material requires a partial merge. Only Solitus male/female and Atrox default hands need replacement; the remaining defaults are retained.

The persisted height is the original gameplay percentage: 90 short, 100 normal or 110 tall. An unspecified height uses the native default of 100. ddr.dll!NameScene_t::SetState converts the selected height into those values before Client_t::CreateCharacter. Its preview uses 95/100/105; those preview values are not the saved gameplay percentages.

The observer spawn packet carries height as the uint16 after MonsterData and before the length-prefixed vehicle. kkr.dll's reader at 0x10083650 reads it into the message's scale field; activation at 0x100821d0 applies stat 360. The local full-character packet also supplies that base stat, and server physical extent uses the same base height before equipment modifiers. Vehicle scale keeps its existing separate rule. The later byte after HeadMesh is Run Speed, which still needs its own compact-field audit.

Head and height changes commit with the character profile. Control-panel edits retain them through reconnect, rezoning and restart. Failed or ignored writes and failed COMMITs leave both memory and SQLite unchanged.

Skin and clothing compositing

bbr.dll!VisualCATMesh_t::MergeSkinWithClothTextures at 10095f50 creates two format-4 textures, loads naked skin and cloth, and copies each cloth pixel except the RGB565 green key 0x07e0 onto the skin. The original RTexture_t constructor at 100eb5a0 passes that format through D3DX. Its format table maps 4 to 16-bit RGB565, and its selection callback at 1013b38c prefers that format over RGB32. The wrapper exposes the actual surface lock directly to the merge.

The previous graphics adapter advertised only RGB32 and ARGB32. D3DX therefore selected RGB32 for the merge, which still interpreted pixels as 16-bit words and failed to recognize green. The adapter now advertises and accepts RGB565, including its masks, pitch, two-byte pixels and rectangle offsets. Its existing RGBA8 renderer converts pixel storage at the surface boundary; blits into RGB565 also quantize channels. The original clothing merge remains unchanged. Microsoft's format table documents the corresponding RGB565 masks f800/07e0/001f.

Preserve authored garment colors. Original Omni-Med sleeve texture 14049 has a white cloth band and a large pure-green skin mask, so exposed forearms are expected. Leather sleeve/pants textures 9451/9453 instead contain textured green cloth and are absent from both native green-classification tables. Those green regions are intentional garment pixels.

The focused surface regression reproduces the old adapter's unsupported format and checks the merge key, pixel conversion, rectangle locks and managed texture eviction. All 113 native client test invocations pass, and the matching WASM bundle builds and publishes. Original REA records, unchanged texture PNGs, native UI/ownership assertions and visual captures are retained under local/skin-compositing/. Controlled wardrobes establish rendering and item conservation, separately from earned acquisition or encounter balance.

Two-client live and cold runs cover male/female Solitus and Atrox Omni-Med, Opifex Leather and Solitus Low-Tech. Each checks both sleeves, garment alternatives, removal/re-wear and page reconnect. All 39 controlled item instances retain their exact records, slots, quantities and qualities across cold startup; both clients have no runtime errors. Settled visual captures follow an ordinary walk and return after reconnect. Immediate spawn frames can still be translucent and must not be used to infer missing clothing or helmets. The settled Leather owner and observer both retain the helmet. The final captures are native-20261102-034608 and native-20261102-034814 under the evidence directory above.

Evidence and remaining creation work

Complete REA records and extracted resource hashes are retained under local/character-creation-research/: creation-appearance-evidence.json, creation-scale-evidence.json, creation-request-evidence.json, creation-materials-evidence.json and appearance-catalog.json. The extractor checks the source binary identities before using native tables.

This supplies appearance support for the pending browser character-creation flow. That flow still needs its selection UI, atomic new-character transaction, training-ground entry, starter grants and the clearer Create/Adopt/Log in choices. The original 14.9.1 Arrival Hall precedes final faction selection; its full flow remains part of the canonical-game target.

Verification

Automated tests check the original catalog counts and boundary meshes, all seven body templates, explicit head identity in spawn packets, local/observer height agreement, physical extent, profile edits and restart. Invalid integer ranges, failed/ignored writes, failed COMMITs and successful retries preserve the expected memory/database state. Browser launch retains its selected head and matching skin race through reopen.

Two hardware Chromium WASM clients on the GPU rendered every breed/sex template, all three builds and all three heights through live profile edits. Native memory snapshots agree between the local player and observer. Captured observer byte streams also contain every selected full head mesh, scale and resolved material ID. Additional checks cover all three Solitus skin races for both sexes. Cold server recovery retained Atrox head 40132 and height 110; movement then replicated to the observing client. No browser/worker errors were recorded in either completed run.

The same client rendered Omni, Clan and Neutral training grounds and moved away from each authored entrance without immediately zoning back. Test entry positions use the existing zoning convention of 2.5 metres along the door's forward vector and terrain height plus 0.75 metres. This is a verified usable reconstruction policy, rather than a recovered original-server spawn offset. The final creation flow still needs its original camera/Arrival Hall behavior.

Screenshots, native snapshots, SQLite snapshots, wire captures and verification reports are under local/player-appearance-smoke/. Automated logs and original training-door provenance are under local/browser-creation-research/.