aorecomp

Anarchy Online classic in the browser

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


docs/vehicles.md (20170B)


Vehicles in 14.9.1

The supported ground vehicle is the exact QL 15 Kodaik Turbo IX, template 117294, native item type 51022. Its owned identity remains stable when moving between ordinary inventory and HUD1 (slot 1, equipment page 101). Acquisition can use the existing test fixture grant; no vehicle provisioning interface is added. The flying endpoint is documented below; other qualities are not interpolated.

Authored requirements and effects

Resource 1000020/117294, in server/gamedata/items/items_035.yaml, has slot mask 298 equal to 2 and default slot 88 equal to 1: HUD1 only. EquipDelay 211 is 1000 centiseconds, giving a ten-second delay. Its Wear action 8 requires all of the following:

VehicleGround is a persisted trained skill. Resource 1000204/166 gives ability weights [0,20,0,20,60,0] in STR/AGI/STA/INT/SEN/PSY order. Abilities of 10 add two points, so trained 78 fails and trained 79 qualifies. Its native starting value is 5 (kkr.dll 0x100729fa, default array offset 166*4). Equip eligibility is checked before scheduling and again at completion. Existing combat policy rejects outgoing and incoming fights; the original producer of stat 410 is still unresolved. Removal does not recheck the equip skill, and a full ordinary inventory cannot lose the worn item or its effects.

The unconditional OnWear event 14 executes these functions in authored order:

Function Arguments Effect
Modify 53045 156, 150 Add 150 Run Speed.
ChangeShape 53060 99468, 0 Set Form 359 to vehicle model 99468 and rebuild appearance.
RestrictAction 53068 2, 0 Clear Fighting feature bit 2; restore it on removal.
ChangeStat 53110 360, 20 Save the original base Scale and set 20; restore it on removal.

Native removal invokes the same event with its removal flag, subtracting the speed modifier, clearing the matching shape, restoring the fighting feature, and restoring the saved scale. The ordinary radius 421 is 2; native physical extent is Scale * radius * 0.01, giving 0.4 while driving and 2 afterward. The server rejects forged attack requests while the vehicle is equipped.

The shared movement simulation also applies the authored collision CAT and ordered scale changes. Reconnect keeps live scale20 separate from the saved profile height, and removal forces the current human fatness mesh. Details and verification are in vehicle collision bodies.

Existing TemplateAction 0x35505644 action 6/7, page 101 and slot 1 applies and removes the effects for both the owner and same-playfield observers. Owner FullCharacter initialization already applies worn effects once, so it must retain raw base RunSpeed 100 and avoid another owner wear replay. Observers receive one wear effect after the corresponding actor is created. No separate model, feature or scale stat packet is combined with OnWear.

Movement and outdoor metadata

The native 14.9.1 movement getter uses RunSpeed mode 3: raw base plus modifiers, excluding ability trickle-down. With current base 100, the vehicle raises this to 250. Healthy, unencumbered running speeds are:

Movement Human Vehicle
Forward, 4 + RunSpeed * 0.005 4.5 m/s 5.25 m/s
Backward, 3 + RunSpeed * 0.0035 3.35 m/s 3.875 m/s
Walking mode 1.5 m/s 1.5 m/s

The running helpers cap their result at 15 m/s, with a final minimum of 0.1. Below 15 percent maximum HP they first replace RunSpeed with (RunSpeed + 500) * HP / (MaxHP * 0.15) - 500. Scale changes body extent; it is not a movement-speed multiplier. The server's bounded movement estimate uses these values and anchors held movement when equip/removal changes speed, so the new speed is not applied retroactively to earlier motion. Acceleration, braking, collision surfaces and encumbrance remain outside that estimate.

Outdoor metadata comes from the exact native tilemap classification. kkr.dll 0x1006e8c0 writes stat 438 from n3Playfield::IsGround or IsDungeon. The bbr.dll tilemap reader at 0x100a3dd0 classifies original resource 1000009 magic CHGA as ground, GNDA/UOHA as dungeon. The maintained playfield catalog now marks the 186 existing catalog identities whose selected-client records are CHGA. The extractor retains all 188 CHGA identities, including two absent from the maintained catalog. Terrain-height availability is not used as an outdoor heuristic.

Evidence and remaining limits

Run python3 tools/data/extract_vehicle.py to produce local/reports/vehicle-14.9.1.json. It retains the complete selected item, payload digest, skill weights and ground-record digests; review its ground identities against the outdoor entries in server/gamedata/playfields.yaml. The item payload SHA-256 is 397932a778f03656d0b3ab143fb1bd935a8fb77bbd040d8a359e0d8c7c8edd75; index SHA-256 is 46e5dc54af9358cc9bff05f4358e86af630e497bc677f361c133c88073b84d71. The Auno pre-Shadowlands 14.8.1 catalog corroborates the item labels and values. The selected 14.9.1 bytes take precedence over later descriptions or interpolated qualities.

local/vehicle-smoke/native-source-audit.json retains original bytes and 43 source procedures. Effects are in client/game/kkr.dll/lifted-0057.c, movement in lifted-0023.c, outdoor assignment in lifted-0033.c, and the tilemap reader in client/game/bbr.dll/lifted-0036.c. Addresses refer to the original DLL bases, not generated relocations. Shipped DLL SHA-256 values:

The separate Playshift action 136 requires only outdoor type 1 and Form 0; it does not include VehicleGround or combat checks. The native evaluator is verified, but the original server's indoor zoning policy is not: automatic unequip, effect suppression and full-inventory fallback remain unresolved. This implementation verifies outdoor equip/removal and same-playfield reconnect; it does not claim canonical indoor vehicle lifecycle handling. Historical source boundaries are retained in local/vehicle-smoke/source-ledger.json and indoor-followup.json.

Verification

TestGroundVehicle* checks native HUD1 decoding, the ten-second deadline, 80/81 skill boundary, inventory ownership/pages, stale/dead/loading/unready sessions, outdoor eligibility, outgoing/incoming combat, and requirement changes during the delay. It checks persistent removal after losing skill, full-inventory rejection, fighting restoration, observer effects, movement anchoring, healthy forward/backward/walking speeds, and the low-health path. The native initialization-layout expectation includes the additional base VehicleGround stat.

Two WASM clients verified native rejection at effective VehicleGround 80 and HUD1 equip at 81. The initial manual attempt exposed the missing HUD1 exception in decodeInventory1491; the public inventory regression reproduced it before the decoder fix. After ten seconds the driver and observer both had native model 99468, Features 4, Scale 20 and extent 0.4. Read-only guest-memory probes confirmed configured maximum speed 5.25 while holding forward and 3.875 while holding backward, alongside real position changes. A server restart and page reload retained the owned HUD1 item, form and single speed bonus.

Native click-pick/drop from HUD1 into ordinary inventory removed the vehicle after its delay. Both clients restored Form 0, Features 6, Scale 100 and extent 2; a held-forward probe returned 4.5 m/s. Another page reload retained the item in ordinary inventory and the human state. Health, credits and the observer's inventory remained unchanged. The isolated fixture, screenshots, packets, read-only probes and 24 checks are retained in local/vehicle-smoke/verification.json. All temporary clients and the server were closed before the full test runs.

The maintained full server suite passed in 119.538 seconds. Five race-enabled passes over the ground vehicle, shared equipment publication, whom-pah and Grid return paths passed in 96.863 seconds.

Named vehicle materials

Mesh 99458, resource 1010002, references Material #2b / light_sportscraft1b.png (30043) and Material #2a / light_sportscraft1a.png (30044). Both shipped textures are 256x256 RGB PNGs with metal, glass and engine details. The item needs no additional texture effect.

The server supplies these two mappings alongside the five human mappings in each player's initial TextureDataList. The native client retains that list across form changes. llr.dll SetTextureDataList (1003df50) only accepts the first assignment; SetCatMesh (1003dbe0) passes it into VisualCATMesh. For a supplied list, bbr.dll VisualCATMesh (10094d10) matches material names exactly through 10095b50. Unmatched rows are ignored. A human-only list therefore leaves the vehicle materials without textures. A null list would instead copy the mesh's default mappings, but would lose our explicit human skin selection. The combined list preserves both supported forms; it is a reconstruction using shipped mappings, not an original server capture.

The combined list includes five human, two Kodaik and two Yalmaha rows, using encoded count 10090, (9+1)*1009. The 14.9.1 readers in kkr.dll (1015b580, 1015b540) consume that count and fixed 32-byte material names followed by three DWORDs. The shared-protocol converter honors the count when padding names. Human NPCs retain their five-entry list.

Read-only WASM captures found the white car already using scale 0.2 and NORMALIZENORMALS=1, with no texture bound and no RTexture installed in either named material. After supplying both mappings, native CATText replacements hold the two texture objects and the car displays its shipped surface detail. The renderer and item effects require no changes. Original-byte audits, material captures and the isolated fixture are retained under local/vehicle-material-smoke/.

Two WASM clients verified the textured car after native equip and reconnect. Read-only probes resolved both named replacements to ready 256x256 textures in the driver and observer. Removing the car restored human skin and worn Metaplast chest armor; equipping that armor through the ordinary inventory UI still changed its appearance. A server restart retained both item identities, HUD1/chest placement, health, cash and the single speed bonus. The isolated run passed 23 evidence checks in local/vehicle-material-smoke/verification.json. Only expected connection-refused messages during deliberate restarts were recorded. All test clients and the temporary server were closed afterward.

The maintained full server suite passed in 91.528 seconds. Five race-enabled passes over vehicle lifecycle, material initialization, native character conversion and clothing flags passed in 96.323 seconds.

Template equipment reuse

FullCharacter uses entry flag 1 for template equipment, including worn vehicles, armor, implants, belts and NCU. Flag 2 denotes a separate live item identity; it is retained for the equipped Kinetic Axe and portable Chests, whose object updates are sent separately. Worn template effects still initialize once.

Native kkr.dll possession helper 100619d0, reached by UseItem 1002acd0, accepts template rows directly. A live-identity row instead requires the corresponding dynel, except for the explicit Chest path. FullCharacter worn initialization 1005f150 accepts either row kind and derives its effects from the template. Container movement 1005dd60 resolves destination 111 to the first free ordinary slot and calls 1002d380 to swap complete row pointers. It clears temporary flag 0x40 but preserves the item-kind flag.

A live-identity flag on a worn Kodaik therefore leaves the returned inventory row unusable when no ArmorItem dynel exists. Read-only WASM captures reproduced that state: slot 48, flag 2, no dynel, and no subsequent wear request. With template flag 1, the same native row survives removal and re-equips normally. The server's snapshot flags match the actual item representation; no new client adapter or acknowledgement behavior is needed.

Two WASM clients exercised three car removal/reuse cycles without reconnecting. Both click-pick/drop and right-click HUD1 removal worked. The native row kept its identity, count, quality and template flag. RunSpeed's modifier alternated between 0 and 150; form, scale and fighting features changed once per operation. The worn Metaplast chest retained AC 5/1, removed to zero and re-equipped to 5/1 through ordinary right-clicks. The observer had the same car and armor effects, and health and cash were unchanged. The isolated run passed 30 evidence checks with no client errors. Original-byte audits, packets, screenshots and probes are retained in local/vehicle-reuse-smoke/verification.json and its sibling evidence files. Both clients and the temporary server were closed before the full test runs.

The full maintained server suite passed in 91.652 seconds. Five race-enabled passes over snapshot item kinds and armor, belt, implant, weapon and backpack restoration passed in 95.493 seconds. Regression tests retain live flags for the actual weapon and Chest paths while rejecting live flags for template equipment.

Yalmaha flight

The exact QL 30 Yalmaha XL - 29478, template 117322, uses item type 51022, HUD1 and a ten-second equip/removal delay. Its Wear action requires outdoor stat 438 equal to 1, effective Vehicle Air 139 greater than 80, InBattle 410 zero and Form 359 zero. The persisted vehicle_air skill defaults to 5, from native kkr.dll 10072768 / 10072a05. Its ability weights are [0,20,0,20,60,0], so the fixture's trained 78/79 gives effective 80/81. Eligibility is checked at both ends of the delay; removal needs no skill.

The item authors these OnWear functions in order:

Function Arguments Effect
Modify 53045 156, 150 Add 150 Run Speed.
RestrictAction 53068 2, 0 Clear the fighting feature.
ChangeStat 53110 360, 20 Set Scale 20 and retain the original.
53138 none Enter flight; leave it on removal.
ChangeShape 53060 99470, 0 Use the sleek vehicle model.

Function 53138's handler 100c1cc0 sends movement event 27 on wear and 35 on removal. The native transition table at 10045220 enters mode 7 and restores the separately saved ground mode, respectively. SwitchToFly 10046770 disables falling, raises relative Y by 0.5 and selects orientation mode 4. LeaveFly 100468f0 enables falling, raises Y by 0.1 and restores orientation from stat 197. Removal lets native collision settle the character; the server does not teleport it directly to the ground. These ordered transitions now run in the shared server simulation. Disabling falling suppresses new falls while preserving an existing jump/fall and its gravity. See flight transitions and facing.

The initial SimpleChar movement snapshot carries current mode 7 and remembers walking 2 or running 3 in the separate DWORD. The reader 10047160 and setter 100496d5 keep these fields distinct. Mode refresh 10046f80 restores flight without raising Y; the subsequent ordinary worn-item initialization applies its one 0.5 m lift. Owner FullCharacter and observer TemplateAction still apply the authored effects once, with raw base RunSpeed 100. A native flagged position correction after initialization restores authoritative altitude, including idle actors, instead of accumulating another lift on every reconnect.

Mode 7's maximum-speed branch 10047e60 passes base 12 to 10047af0, adds 0.005 * adjustedRunSpeed, caps at 15 before encumbrance and floors at 0.1 afterward. Forward and reverse use the same configured maximum, 13.25 m/s for the healthy, unencumbered fixture. Flight's forward vector includes quaternion Y component 2*y*z - 2*x*w; reverse negates all three components. The shared server integrator uses this speed and full direction, including acceleration, collision and 3D flight orientation. Live encumbrance policy remains unresolved.

The shipped controls use plain RMB mouse movement to pitch the character in first-person or locked third-person. Free third-person and Ctrl+RMB can move only the camera. Native ccr.dll 100041f0 / 10004350 routes character mouselook to kkr.dll 10020520, 1004bd30, then 10049f10, which applies vertical mouse delta to the flight quaternion. Space remains Jump and PageUp/PageDown scroll chat. No client adapter changes are needed for flight.

Model 99470 uses mesh 42370, sleek_vehicle_cat.cir, with exact texture rows {Material #7,38586,38585,0} and {Material #8,38584,38585,0}. Both primary and secondary identities are included in the player's initial material list. The renderer displays the shipped silver/glass surfaces.

Outdoor wall crossings retain absolute flight altitude, raised if needed to clear destination terrain by 0.5 m. This is a provisional reconstruction: original server altitude policy and ceilings are not established. Authored door arrival transforms still control their own height. The item's separate Playshift action checks outdoor type and Form, as for the Kodaik; indoor suppression, automatic removal and full-inventory fallback remain unresolved.

python3 tools/data/extract_vehicle.py retains the selected flight item and Vehicle Air weights alongside the ground vehicle report. Item payload SHA-256: 78130e994ef9717d005c230375582107b15089c122db0182900153395ed3733e. Exact item, model, material, transition, speed and control evidence is in local/flying-vehicle-research/native-flight.json, server-flight-review.json and flight-specifics.json, with original DLL bytes and source addresses.

TestFlyingVehicle* checks the ten-second equip deadline, strict 80/81 skill boundary, separate ground/air skills, outdoor/combat requirements and delayed revalidation. It covers removal without skill, persisted identity and effects, fighting restriction, observer publication, mode 7 with saved mode 2/3, forward/reverse pitched prediction, terrain clearance and flight altitude at boundary arrivals. A captured native airborne CharDCMove verifies that altitude and pitch reach an observer and persist through restart. The prediction and arrival regressions failed before their respective fixes.

Two real WASM clients verified native equip at 81, denial at 80, configured speed 13.25, textured model 99470, Scale 20 and Features 4. Gradual plain-RMB pitch and forward movement raised the driver from approximately 17 m to 65 m; the observer's altitude agreed within the native 1/16 m resolution. Removal restored ordinary effects and native falling. A second isolated run started worn near the Entertainment boundary at 70 m, crossed into Omni Forest, restarted the server and returned to Entertainment. Both clients retained mode 7, saved running mode 3 and one speed bonus. Removing HUD1 after that round trip restored mode 3 and settled onto the city roof; ordinary movement still worked. Health and owned item identity/count stayed unchanged.

The manual runs passed 30 evidence checks in local/flying-vehicle-smoke/verification.json, with screenshots, native packets and read-only guest-memory probes beside it. Only expected connection refusals during the intentional restart were recorded. No native functions were called from probes and no guest memory was modified. Both clients and the temporary server were closed before the full test runs.

The full maintained server suite passed in 91.813 seconds. Five race-enabled passes over flying/ground vehicle lifecycle, movement, reconnect snapshots and materials passed in 109.844 seconds.