aorecomp

Anarchy Online classic in the browser

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


docs/armor.md (21673B)


Metaplast armor in 14.9.1

All six Metaplast armor families support QL 1 through 200 using their reviewed catalog endpoint pairs. Their native identity type is 51022. The shared starter mission reward pool includes all six families at the mission's selected quality, alongside the Baseballbat. This pool is reconstruction policy: historical membership and probabilities remain unresolved. Gloves also occur in the provisional training-boss loot pool. Both acquisition paths use the ordinary item instance and equipment rules.

Piece Worn, QL 1 High-Quality, QL 200 Native slots Catalog shard
Helmet 85557 85556 18, head items_004.yaml
Body 85686 85685 21, chest items_005.yaml
Sleeves 85742 85741 23 and 25, arms items_005.yaml
Gloves 85596 85595 24, hands items_004.yaml
Pants 85512 85511 27, legs items_004.yaml
Boots 85638 85637 30, feet items_004.yaml

These shards are under server/gamedata/items/. Every QL 1 Wear action requires Strength 16 and Agility 17 strictly greater than 7. Every QL 200 endpoint requires Strength greater than 460 and Agility greater than 510. All twelve records have EquipDelay 211 equal to 10 centiseconds, processed on the existing 250 ms equipment tick. Stat 298 supplies the permitted armor-slot mask, starting at 16; stat 88 supplies the default position within that range. Sleeves permit both bits 7 and 9, so two separate instances can be worn together. The native inventory remains 48..77; armor slots are not shifted by the ordinary-inventory conversion. Other clothing can use exact authored qualities through the shared catalog clothing rules; their intermediate qualities remain unsupported until endpoint pairing is established.

The chest's OnWear section (type 2, subtype 14) adds 5 to AC stats 90..93 and 1 to 94..97. The boots add 1 to all eight. These are authored Modify 53045 functions, rather than raw base-stat assignments. The accompanying Texture 53039 functions use texture/category pairs 8736/1 and 9424/2. Both records have one tick, interval zero, target 2 and no effect requirements.

The native labels map these totals as follows:

Protection Stat QL 1 chest Boots Both
Projectile 90 5 1 6
Melee 91 5 1 6
Energy 92 5 1 6
Chemical 93 5 1 6
Radiation 94 1 1 2
Cold 95 1 1 2
Disease 96 1 1 2
Fire 97 1 1 2

The QL 200 chest contributes 1000 Projectile, 875 Melee, 1000 Energy, 750 Chemical and 150 each Radiation, Cold, Disease and Fire AC. Its texture is the same 8736/1 pair.

All twelve records have unconditional positive AC Modify effects. A full suit contains seven instances, including two sleeves. In stat order 90..97, its QL 1 totals are 15,15,15,15,7,7,7,7; QL 200 totals are 3500,3059,3500,2622,522,522,522,522. Removing either QL 200 sleeve leaves 3250,2841,3250,2435,485,485,485,485. Each equipped instance contributes once.

The native TemplateAction also handles the authored visual effects. Gloves, pants and sleeves use texture/category pairs 9422/0, 9425/4 and 9423/3. Helmets use Mesh 53035 functions with breed/sex conditions and mesh resources 19994, 20016, 20033, 20050, 20061, 20078 and 20095. These conditions are not AC requirements: the server sums only the unconditional Modify effects, while the client evaluates the visual functions through the native wear/removal path.

Authoritative armor reduction

The server sums the supported equipped items' unconditional OnWear Modify effects and active armor nano modifiers for the attack's AC stat. Equipment contributions come from current owned slots and their individual overequipping effectiveness; nano contributions retain their full amount. Removing either source leaves the other's contribution, including after reconnect.

Normal hits now use the weapon's DamageType 436 to select that protection. The native selection accepts stats 90..97 and NanoAC 168, with invalid values falling back to ProjectileAC; see client stat findings. The supported pieces have no NanoAC bonus.

The September 2001 Vampi weapon guide describes damage reduction of AC/10, bounded by the weapon's adjusted minimum. The July 2002 player experiments corroborate the ratio and minimum floor. These are period observations rather than a recovered server implementation. Player endpoints and the minimum floor first include attack rating. The normal-hit reduction is:

raw = uniform_integer(weapon_minimum, weapon_maximum)
damage = raw - min(raw - weapon_minimum, floor(selected_AC / 10))

Truncating AC/10 before subtraction is provisional: the sources do not settle integer ordering for fractional reductions. For example, raw 200 with 1000 AC becomes 100, while a QL 1 Leet Bite roll of 4..8 against 875 Melee AC becomes 4. Tests also record the provisional fractional case, 200 against 875 becoming 113. Damage additions, hit/critical rolls, NPC armor, absorbs, reflects and shields remain separate work. Fists still use the QL 1 3..5 base endpoints; supported weapons retain their catalog endpoints.

Native move and effect messages

Native left-click pickup/place sends ContainerAddItem 0x47537a24 from ordinary page 104 to the applicable armor slot. Removal uses page 102 and destination 111, which the server resolves to the first free ordinary slot while preserving 111 in the acknowledgement. Wrong pages, foreign owners, unsupported templates or qualities, occupied slots and insufficient abilities cannot change ownership. The entire inventory is saved before acknowledging a completed move. Failed writes and a full inventory retain the equipped item and its effects.

TemplateAction 0x35505644 executes the item's authored effects. Its payload is nine network-order uint32 values:

low_template, high_template, quality, count,
action, placement_type, placement_slot, auxiliary_type, auxiliary_instance

For these items the endpoints are identical, count is 1, placement is page 102 and the actual equipped slot, and the auxiliary identity is 0/0. Action 6 wears; action 7 removes. Live equipment sends only the changed item's action. Removing one piece therefore leaves the other piece's modifier contribution. The owner also receives the container acknowledgement; observers receive the appearance action without another player's inventory transfer.

The owner restores equipped effects while processing its FullCharacter inventory. It must not receive another wear action after that initialization: that would add the AC contribution twice. Observers, which receive only the SimpleChar spawn, receive one wear action per equipped piece after that spawn. Weapon instance restoration retains its separate existing path.

Player SimpleChar spawns also set flag bit 3. Native FUN_100821d0 assigns that bit to CanChangeClothes stat 223, and FUN_1006c8d0 passes it to n3VisualDynel_t::SetCatMesh. The resulting VisualCATMesh constructor stores it at offset 0x80; its ChangeClothes returns immediately when that field is zero. Correct item effects alone therefore cannot update a character whose spawn disabled clothing changes. This flag is enabled for human players.

This chain is retained in local/reports/armor-1491-visual-evidence.json, including ev_3b0a69b2fc083c0a402327c55b2989657a34cc90de80c8e469e5d01e58060287 for spawn activation and ev_c2f421b82b6d3873c446577a1086572fdacfcf04fb090f41afe4f56ecb5f1db6 for mesh recreation. The remaining calls are preserved in generated llr.dll/lifted-0024.c, sub_3803DBE0, and bbr.dll/lifted-0032.c, sub_25094C90 and sub_25096190.

The native registration, reader and dispatch are established by original kkr.dll FUN_10010820, FUN_100848d0, FUN_100849c0 and FUN_1005e980. The latter dispatches action 6 to the item's wear method and 7 to removal. FUN_1005e150 identifies the armor slot range 16..31. FUN_100bdbd0 applies/removes Texture effects; the existing effect findings establish additive Modify behavior. The binary's SHA-256 is a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0.

Retained REA evidence is local/reports/armor-1491-evidence.json. Relevant IDs:

Verification boundary

server/armor_test.go checks the catalog effects, delay, exact ability boundary, invalid slots/pages/qualities/identities, occupied slots, changed requirements, failed saves, full bags, two-piece removal, native payloads and restart initialization. Existing weapon and inventory bounds regressions also cover the extended equipment handler.

server/armor_damage_test.go checks controlled damage rolls for all eight protections, NanoAC and invalid-type fallback, the minimum floor, combined bonuses after removal/restart, QL 200 requirements and matching native damage packets/HP for two observers.

The two-client Chromium WASM run is retained in local/armor-smoke/ with verification.json, per-step screenshots/state and packet logs. Native pickup and placement equipped both pieces, then removed each independently. Owner and observer saw matching chest/boot appearance; the native Protection window showed 6/2 with both pieces, 5/1 with the chest alone, and eight 1s with boots alone. Both removals restored eight zeroes in the initial protocol pass. A server restart restored the same IDs 100/101 and QL 1 at slots 21/30, with 6/2 rather than doubled modifiers; the observer automatically reconnected and saw the restored armor. There were no page errors or adapter failures. The only console failures were 16 expected socket connection refusals during the intentional restart. Both browser contexts and the test server closed in the driver's finally block.

The damage comparison is retained separately in local/armor-damage-smoke/. Its verification.json and tmp_verify.py check temporary raw-roll tracing, ownership, combined AC and persisted inventory; screenshots establish native UI and combat feedback. The fixture uses the actual level-1 Leet profile and raises the owner's abilities and Body Development to equip the QL 200 chest and survive repeated encounters. Fixture-only cancellation and HP restoration separate the two fights; equipment and Q combat use native controls.

With chest and boots, five Leet bites with raw values including 4, 7 and 8 all dealt 4 damage. With both removed, six bites retained their raw 4..8 values. Owner and observer combat logs showed those results. Removing the chest left 1 AC from the boots; removing both restored zero. Re-equipping and restarting restored the same four owned items and 1001 Projectile, 876 Melee and 151 Radiation AC, also shown in the native Protection window. Both clients restored appearance with no page errors or adapter failures. There were 16 expected socket refusals during restart. Both browser contexts and the fixture server were closed before the regression builds.

The full go test ./server/... suite passes. Focused race checks for armor, combat, equipment, inventory and reclaim also pass.

Complete Metaplast endpoint checks

server/metaplast_test.go covers fourteen endpoint/slot combinations, including both arms for each sleeve endpoint, 108 rejection/interruption cases and a full QL 200 suit with independent sleeve removal. Cases check the exact strength and agility boundaries, wrong slots, identity/quality mismatch, occupied slots, foreign ownership, changed requirements, failed writes, native page validation, owner/observer messages and durable identity/AC across restart. server/equipment_test.go also checks rejected wear with all 30 ordinary slots occupied, including the first two slots and the final native slot. Its two correction swaps leave every instance in its original location and publish no equipment effects to the observer.

The normal HTTPS preview and owned WASM characters were used for the complete sets; no second fixture server was started. Artifacts are in local/metaplast-smoke/. All twelve extracted catalog payload hashes, qualities, slot masks, equip delays, requirements and unconditional AC effects were checked against the original resource database by tmp_original.py.

Native pickup/place equipped all seven QL 1 pieces, then removed every piece back to inventory with zero AC. The native Protection window showed 15 for Projectile/Melee/Energy/Chemical and 7 for the remaining types. QL 200 armor was rejected at abilities 8/8, with the native requirements reporting minimum Strength 461 and Agility 511. After the fixture met those requirements, the complete QL 200 set matched all eight totals above. Both outfits replicated appearance to an independent observer, and the complete QL 200 set restored without doubled AC after a normal-server restart.

The unsupported Basic Flowers Tech Armor Helmet 85535 exposed an additional explicit-drag failure: a same-slot corrective acknowledgement preserved the item in SQLite and the native inventory model but left its icon hidden. Two ordinary native swaps now restore the icon immediately. See inventory correction for the original native guard and the recovery policy. This is a concrete reproduction of apparent equipment disappearance; the broader equipment audit remains open.

The same run also reproduced wheel camera gestures auto-equipping a hovered inventory item. That separate input bug has a specific unchecked TODO; the remaining armor checks used the native scrollbar.

The fixed native run also checked repeated drag rejection and auto-equip rejection, followed by independent sleeve removal/re-equip. All fifteen client inventory-model entries matched SQLite exactly in identity, type, quality, template endpoints, count and slot. No page, adapter or socket errors occurred. The full Go server suite passed, as did the focused race run covering Metaplast, equipment, armor, inventory and ground/flying vehicles.

Intermediate Metaplast qualities

The six pairs listed above have matching slot masks, default positions, equip delays, wear-requirement layout, AC-effect ordering and complete visual effects. local/armor-interpolation-research/pairs.json retains the catalog audit; its input records were already verified against all twelve original database payloads in local/metaplast-smoke/tmp_original.py. Pairing is explicit for these six families and is not inferred from neighboring catalog IDs.

An owned instance still stores a catalog template and its requested quality. Either authored endpoint identifies its reviewed family. Intermediate values emit the actual low/high pair in FullCharacter, TemplateAction, container, loot and reclaim messages. At an authored endpoint the wire can use that definition alone. This adds no new database fields or development-version compatibility paths. Both deletion request paths verify the emitted endpoint pair before removing an instance.

Native kkr.dll constructor 100894c0 selects the nearer endpoint for properties that are not interpolated; an equal distance selects the second endpoint. For this 1..200 range, QL 100 selects the Worn name and QL 101 selects High-Quality. The control panel uses the same rule for names and catalog presentation. Numeric scalar helper 100eff20 adds 0.5 before truncating the scaled difference; it does not use ties-to-even rounding. Its ascending branch is:

low + trunc((quality - lowQL) * (high - low) / (highQL - lowQL) + 0.5)

The helper returns authored values directly at endpoints and has a separate branch for descending values. The server follows its operation order. Native 100effe0 interpolates action requirements. 100f00a0 handles matching effect lists and calls 100f0a00 for effect requirements. For Modify 53045, table 10175284 contains argument key 39 followed by terminator 10000: the modifier amount is interpolated, while its stat identifier remains unchanged. 100f0aa0 applies that scalar calculation to the selected argument. The 0.5 constant at 10170464 is the exact single-precision bytes 0000003f.

The retained ten-record native bundle is local/armor-interpolation-research/native-evidence.json. Relevant Evidence IDs:

Native generic loading accepts a wider quality representation; this server supports only the authored Metaplast 1..200 interval and rejects extrapolation. Other armor families and their quality ranges remain separate work. Auno's historical item pages were inaccessible during this investigation; the original catalog, native code and runtime checks provide the evidence here.

server/armor_quality_test.go checks QL 2, 50, 100, 101, 150 and 199 for every piece and both sleeve positions. Hardcoded expected AC and ability thresholds cover rounding and the name-selection boundary. It checks equip/remove, initialization, restart, both endpoint anchors, invalid qualities, unsupported armor and exact requirement rejection. server/armor_quality_persistence_test.go checks container snapshots, forged/correct deletion, real corpse pickup, reclaim, requirement changes during equip delay and failed transactions. The focused quality/lifecycle checks passed in 63.148s. The full Go suite passed (ao/server 250.820s), and focused quality/equipment race checks passed in 151.591s. The native session was exported and closed before browser testing.

The normal HTTPS preview was exercised by owned visitors 14 and 15. The native QL 100 helmet reported minimum Strength 233 and Agility 258. Separate attempts at 232/258 and 233/257 retained the item and zero AC, while 233/258 equipped it. Its native AC was [375,328,375,281,56,56,56,56] for both owner and observer; removal restored zero. The native Stats window independently showed the first three computed protections. Read-only probes combine the base stat table with the additive map at modifier helper SimpleChar + 0x154, map field +8; reading only the base table would incorrectly report zero equipment AC. The helper/map layout is established by the retained modifier analysis in local/reports/combat-client-decompiles-21.json, 100bd600, 10074730, and generated kkr.dll/lifted-0020.c, sub_3603E790.

A complete suit used Helmet 100, Pants 50, Gloves 101, Boots 150, Body 199, Sleeve 2 and Sleeve 101, including independent instances in both arms. Both clients calculated [2061,1804,2061,1545,310,310,310,310]. Replacing only the helmet with QL 101 produced [2064,1807,2064,1548,311,311,311,311], again in both views. A normal server restart restored the exact item records and locations, complete appearance, template pairs and those totals without doubled modifiers. Every piece was subsequently removed; all eight instances remained in ordinary inventory and both clients reported eight zero protections.

local/armor-quality-smoke/tmp_verify.py passed 18 native/persistence checks. It checks every instance's type, QL, low/high pair, quantity and placement, owner/observer AC, exact ability boundaries, restart snapshots and final ownership. All 148 preexisting item records and locations were unchanged. No page exception or unimplemented adapter call was recorded. Both owned browser runs closed their contexts in finally; the single normal HTTPS preview stayed available on port 8443.

The first input driver sometimes emitted no request for an automatic action following online edits or reconnects. Explicit placement worked, as did constant-stat remove/auto-wear. A retest that established tab focus, moved the pointer before clicking and allowed the world to settle completed the remaining automatic removals. Those missed gestures are not counted as successful tests; the root TODO retains a focused input audit to separate product input routing, item state and test timing. The verified final snapshots are all-ordinary-final-native.json and observer-all-ordinary-final-native.json; earlier partial-removal snapshots deliberately retain their actual nonzero AC. The verifier, verification.json, SQLite snapshots, screenshots and the empty errors.json are retained alongside the driver.