aorecomp

Anarchy Online classic in the browser

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


docs/medical-consumables.md (11681B)


Catalog medical consumables

The server decodes immediate resource kits from their catalog functions, requirements, quality, range and lock metadata. There are no template-ID branches for medical use. The full catalog admission test currently identifies these fourteen definitions:

Template / authored QL Item Health Nano Lock
23314 / 1 Simple First-Aid Kit 10..12 0 User First Aid 123, 40s
23316 / 200 Simple First-Aid Kit 1000 0 User First Aid 123, 40s
116629 / 1 Startup First-Aid Kit 5..7 5..7 User First Aid 123, 40s
160276 / 400 Ultra Advanced First-Aid Kit 1400 0 User First Aid 123, 40s
25812 / 1 Treatment Laboratory 30 0 Patient Treatment 124, 15s
25811 / 200 HQ Health Treatment Laboratory 1500 0 Patient Treatment 124, 15s
160277 / 400 Superb Quality Health Treatment Laboratory 5000 0 Patient Treatment 124, 15s
116628 / 1 Startup Treatment Laboratory 15 15 Patient Treatment 124, 15s
85366 / 1 Simple Nano Kit 0 10..12 User First Aid 123, 40s
85367 / 200 Sophisticated Nano Kit 0 1000 User First Aid 123, 40s
160295 / 400 Ultra Sophisticated Nano Kit 0 1500 User First Aid 123, 40s
25820 / 1 Basic Nano Recharger 0 30 Patient Time & Space 131, 20s
25821 / 200 Advanced Nano Recharger 0 2000 Patient Time & Space 131, 20s
160278 / 400 Advanced Nano Recharger 0 5000 Patient Time & Space 131, 20s

Exact qualities are supported; no new interpolation endpoints are inferred. The startup laboratory requires Treatment strictly greater than 5, while ordinary QL1 labs require greater than 7. Startup issue quantity 25 is separate from catalog capacity 200. Neither value changes during reconnect.

Shared interpretation

Equipment and kit actions share the recovered postfix boolean evaluator. Kit use additionally interprets OnTarget18, the known SelectedTarget431 mask35, patient Sitting430==2 and zero/nonzero combat410. Unknown predicates fail the whole expression, including inside OR/NOT. The server's combat producer remains the documented outgoing/incoming-attack reconstruction policy. Ordinary living, connected player targets retain the existing permission subset; the native client additionally applies its friendly/team gate. General NPC/PvP permissions remain unresolved.

Use functions must be unconditional with one tick and zero interval. Supported Hit53002 effects restore positive Health27 or Nano214 to the selected patient, with valid endpoints and no additional hit flags. The native TemplateAction runs GfxEffect53030; the server supplies the actual resource gains. StaticText 53044 is delivered privately through ChatTextIIR. SkillTime53033 determines the lock skill and raw duration; native loader1008ede0 selects user/patient from stat371. Activate10 AddSkill53028 initializes item skill-list metadata and does not buff the player's Treatment or First Aid.

Every effect is inspected before admission. Unknown functions, conditional or repeating effects, different recipients and unsupported lock skills remain unsupported. The startup First-Aid Kit116629 restores both health and nano during combat. Its ItemDelay294=2 uses the existing native20ms item-use action; this field is not a reason to reject the complete contract. See First Aid delivery.

Accepted use commits both resource values, one source charge and the proper actor's cooldown in the same SQLite transaction before success. Current values clamp independently to their maxima. Rejected uses consume nothing. Exhaustion removes the persisted item and sends native CharacterAction112 after the success ACK. TemplateAction uses the actual template, quality and source slot; it does not debit another charge. Nano and cooldown messages go only to their respective recipients, while graphics and quiet health reach ready observers. Failure of the healer's connection after commit does not suppress a healthy patient's resource and cooldown updates.

Evidence and remaining work

All 30 named medical candidates were reparsed directly from the original 14.9.1 ResourceDatabase.dat and matched the catalog's complete functions, requirements, stats, quality, native type and payload hashes. The family inventory, exclusions, five-record comparison and reused native evidence are retained under local/starter-consumable-research/. The original kkr.dll SHA-256 is a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0. The named search bounds the research; the Go admission test scans all templates.

Uniform inclusive rolls, full-resource consumption and absolute persisted lock lifetimes remain reconstruction policies. Shared actor-owned deadlines, SkillLockModifier382 and raw-duration reconstruction on login are described in skill locks. Nano Rechargers require user Treatment and Time & Space strictly greater than 7/7, 700/700 and 1500/1200 respectively. Both actors must be out of combat and the patient must sit. The patient's131 lock is distinct from Treatment124 and the user's FirstAid123. Emergency laboratories add53051; Purge kits add53177 and different lock semantics. These functions must be implemented as complete contracts before those items are admitted. Other quality families remain open.

Use from carried backpacks

Admitted medical kits use the same patient requirements, resource effects and actor-owned locks from a carried backpack. Page107 resolves the session Chest handle and exact child slot; a known handle remains usable after its window closes. Source ownership, pending equipment and trade guards remain in the shared Use dispatcher.

The handler clones the source slice and affected container map before debiting one charge. The charge, patient resources and proper actor's lock commit in one transaction. Last-charge consumption removes only that child, including the last child of an otherwise empty carried bag. GenericCmd completion, UseTemplateAction and DeleteItem retain the actual page107/packed position.

Original KKR quantity callback1005e790 resolves page107 through its Chest and debits that child's quantity. UseTemplateAction1005e980 executes action3 on the supplied actor through the template. These source-independent effect and contained-debit paths are retained in the source-bound REA evidence linked in carried nano learning, using the same original DLL hash above. They establish the native source contract; they are not an original-server packet recording or a new balance rule.

Public-handler regressions cover six medical families, self/teammate patients, partial/last charges, nonzero child slots and open/closed handles. They check resources and charge durability at the first success packet, exact source replies, authored requirement refusals, empty-bag handling and cold ownership. Injected charge, lock, health, nano and COMMIT failures preserve independent live contents and durable state with no output, followed by a one-time retry.

A controlled two-client WASM fixture reproduces the former failure2 response to a real contained First Aid right-click. The fixed path heals the owner and consumes one of two charges; a last-charge startup laboratory then restores exactly 15 health and 15 nano to a seated teammate. Both clients observe the patient's health, only the correct actors receive their locks, the laboratory row disappears, and the companion withdraws through the same bag window. Page replay and cold loading preserve resources, charges, identities and lock deadlines. This uses fixture supplies and team state, not earned progression. Artifacts are under local/backpack-medical/.

The focused Go run passes24 roots/189 results; the expanded race run passes34 roots/246 results, including ordinary medical use, contained crystals, Briefcases and stale-child clearing. Vet on the maintained packages and Node syntax checks pass. The final native fixture completes in24.51 seconds with no page errors or dropped trace events.

Verification

Public item-use tests cover all ten admitted definitions, exact qualities, strict skill thresholds, posture, incoming/outgoing combat, inclusive range, dead/loading/missing targets, unknown effects and predicates, independent resource clamps, last-charge removal, replay and concurrent use. Injected SQLite failures in the charge, cooldown and each resource leave the entire outcome unchanged. Cold reopen and failed-healer-output tests verify that the healthy patient's two resources and lock survive together. Unsupported health and dual-resource First Aid kits reject the whole action without consumption. The full Go suite, focused race tests and vet pass. Counterfactual tests fail against the preceding hardcoded handlers.

Two actual GPU/OpenGL WASM clients verified an issued Doctor laboratory. Self-use raised health and nano by exactly 15 and reduced the stack from 25 to 24; an immediate repeat during the 15-second lock consumed nothing. Standing-patient attempts also consumed nothing. After joining through the native team UI, a standing healer treated a seated teammate: both resources rose from 10 to 25, only the patient received Treatment124, and the stack fell to 23. Another use after the lock expired left 22 charges and clamped each resource to its own maximum.

For the cold WASM check, the existing patient's receipt was extended through the control panel to outlast loading both clients. Restart restored the lock only to that patient, preserved item instance120 and all 22 charges, and rejected use against the locked, seated patient without another debit. The authored 15-second deadline is checked separately by Go cold-reopen tests. A control-panel count adjustment to one then verified native and SQLite last-charge deletion while preserving all seven other starter item instances. Passive regeneration remained enabled; short read-only native traces isolate the kit's gains from regeneration ticks. Screenshots, WebSocket captures, native observations, SQLite snapshots and fixture adjustments are retained under local/starter-laboratory-smoke/. Both browser error lists were empty.

Earned recharger and death recovery

The retained level-seven Enforcer now buys Basic Nano Recharger instance284 with 250 earned credits at the original Omni medical booth. Effective Time and Space 7 rejects use without changing its 50 charges. One raw point, 5->6, costs 13 earned IP and raises the displayed skill to 8. Accepted seated self-use consumes one charge and clamps nano 26->34; an immediate native repeat receives rejection2 and retains 49. Patient lock131 is 20 seconds. Every earlier item remains owned.

After an ordinary fatal encounter and automatic saved-scanner return, the same instance restores nano 3->33 and retains 48 charges through a rejected repeat. Seven charges from the previously bought lab263, under its own124 lock and alongside normal regeneration, restore full 254 HP; its stack falls 10->3. The four laboratory stacks retain 50 total charges. These earned controls use no item, wallet, skill, enemy or resource fixtures. Native screenshots and independently decoded requests/locks are retained under local/earned-return/; see earned scanner return. Both page reconnects and fresh server/WASM recovery retain the purchased instance, 48 charges, accepted skill point and three remaining lab263 charges. Health First Aid admission and incoming-combat healing delivery remain open.