aorecomp

Anarchy Online classic in the browser

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


docs/armor-overequipping.md (7937B)


Armor and backpack overequipping in 14.9.1

Clothing keeps its placement, appearance and contents when requirements fall. Selected equipment bonuses lose effectiveness in four 25-percent steps and recover when the effective requirements recover. The server derives the current bonuses from equipped instances and current character stats; it does not persist a second effectiveness state.

Original client evidence

The original anarchy-vanilla-14.9.1/kkr.dll has SHA-256 a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0. Independent generated-instruction/catalog audits and four original-binary REA function dossiers are retained under local/armor-oe-research/.

FUN_10062f80 scans occupied clothing slots 16 through 31, skips NPC actors and inventory entries flagged 0x40, then evaluates FUN_10090f10(6, actor). Its original dossier is ev_a64f9e1c85cca6b2dd9aef9fc66293f96fbab04052c68dbaa4db8ee2cb0ef5b7. Supported equipment uses ordinary entry flags. Item stat-0 flags such as NoDrop do not supply this slot exemption.

The criterion evaluator considers every operator-2 requirement of action 6, including level and title level, and selects the worst tier. Equality and Boolean operators do not enter that arithmetic. Effective abilities, skill trickle and unpenalized requirement bonuses participate. It uses the authored requirement value as the denominator, independently of the strict comparison used when equipping. Missing action 6 gives tier zero: Pre-Universe Storage Device's action-8 requirements do not reduce its clothing bonuses.

For each positive requirement with a lower effective value:

tier = clamp(trunc((10 - effective / requirement * 10) * 0.5), 0, 4)

The server uses the equivalent nonnegative integer expression min(4, (requirement - effective) * 5 / requirement). Original instructions retain an x87 intermediate. A host extended-precision C comparison checks all integer inputs below every denominator 1..1000, covering the supported catalog, and finds no disagreement with the integer expression. This comparison supports the arithmetic; it is not a historical server execution or an exhaustive claim for unsupported values. Criterion dossier: ev_de9f9adf75f6be9dc20699c183224a80a67c57c6a991cf1248b5b13dce6317b6.

FUN_10063130 selects event-14 Modify functions (53045) and, for each affected stat, removes the old contribution and adds the new contribution. Its dossier is ev_fb148da07aea9c6f6c835956a3f7e87083f41291c35c4298b310e01c4f470981. FUN_10062f60 computes each signed effect as:

adjusted = original - trunc_toward_zero(original * tier * 0.25)

Rounding is per effect before summation. A +90 bonus becomes 90, 68, 45, 23, 0. Two separate +1 effects still total 2 at tier 1. Removing equipment first restores its old tier to zero through FUN_100630e0, allowing ordinary OnUnWear to remove the original contribution without leaving a residual modifier.

FUN_100734e0 selects an initialized native table of 47 affected stats:

1,
90,91,92,93,94,95,96,97,
118,119,120,149,168,
205,206,207,208,216,217,219,
225,226,227,228,229,230,231,233,234,
276,277,278,279,280,281,282,
311,316,317,318,341,379,380,382,383,393

The original table initializer and PE zero-fill boundary are checked in native-table.json; predicate dossier: ev_c28c25bf855fbf502273998e990a77883b83d1ceec6e91d25d10e207adb72748. Maximum nano 221, NCU 181, run speed 156, abilities and Dust Collector's utility skills are absent. Robust Backpack's added damage and the rifle/range bonuses of Large Backpack - Ranged Weapons are present. Modified Pioneer's negative scale remains unchanged. No supported template has a negative affected bonus; the signed subtraction rule comes from the native arithmetic, not an invented catalog example.

Resources and observers

Ordinary remote SimpleChar actors skip the local stat-driven OE refresh in FUN_100714a0; FullCharacter initialization and local stat refresh apply it to the owning actor. Thus the authored inventory bonus and the owning character's effective bonus are distinct quantities. Requirement evaluation retains access to raw bonuses; none of the supported requirement stats is in the affected table, so there is no feedback loop to solve.

The owning FullCharacter packet supplies a foundation excluding its effective HP bonus. Public SimpleChar/stat corrections exclude the authored OnWear bonus instead, so remote OnWear produces the correct public total. After a team snapshot clears a remote actor's maximum modifier, the existing per-observer absorbed-bonus accounting still uses the authored contribution. Skill training that restores effectiveness and removal of reduced equipment use that same basis. See team resources for combat ordering and actor replacement rules.

Important equipment/skill changes remain immediately durable. No OE-derived cache or periodic modifier update is written to SQLite. Existing removal and resource-clamp transactions remain responsible for durable inventory/vitals.

Verification and limits

Go regressions exercise all five Dust Collector effectiveness levels through profile updates, actual incoming damage, unchanged nano/utility bonuses and database reopen. Metaplast cases cover both required abilities, two sleeve instances, recovery without re-equipping, QL100 interpolated denominators and exact QL200 threshold equalities. Other cases cover Robust's level criterion and added damage, Survival's title criterion with an excluded profession equality, Pre-Universe's missing action 6, reduced rifle/range and preserved Pioneer bonuses. Native skill training crosses the Intelligence trickle boundary at 356/357, restoring the HP bonus for the owner, current teammate and former teammate without changing raw requirement/ownership data.

The complete go test ./server/... -count=1 suite passed in 287 seconds. Focused armor, team-resource, Robust, range and backpack checks passed twice under the race detector in 183 seconds. Removal checks also passed twice under the race detector.

Two WASM clients rendered through the GPU verify Dust Collector's native HP bonuses 90/68/45/23/0 and ProjectileAC 1200/900/600/300/0, with unchanged maximum nano and utility modifiers. Both team bars use HP maxima 1201/1179/1156/1134/1111. A fresh zero-effectiveness reconnect preserves the same item and derived maximum. Native training from Intelligence 355 to 357 crosses the existing trickle boundary, restores HP 1201 for owner/teammate and leaves the accepted IP balance 78. The owning raw HP foundation remains 1111.

An 18-sample fight retains maximum HP 1179 in both clients. Native impact animations differ transiently in phase, while both clients receive seven identical hit packets; the subsequent loaded state agrees on current HP. Native pickup/return removes the overequipped bag into inventory with the same instance identity and no residual HP/AC bonus. A re-equip attempt below requirements is rejected by the native UI and retains that inventory instance. QL100 Metaplast pants confirm native AC 312/234/156/78/0 at Strength 186/185/139/92/46, restoration to 312 and removal to 0.

local/armor-oe-research/verification.json checks these captures, received packets, item identities and conservation of all 192 original records and placements. Both temporary items were deleted through native confirmation dialogs; the team dissolved and edited profiles were restored exactly. All owned browser contexts closed without page/adapter errors. The single shared LAN preview remains available on HTTPS 8443.

Historical server scheduling of resource clamps, unsupported conditional effect opcodes and feedback involving future item requirements remain separate evidence questions. The implementation covers the currently supported equipment catalog; it does not claim that every original item function is implemented.