aorecomp

Anarchy Online classic in the browser

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


docs/nano-buffs.md (23226B)


Temporary nano research for 14.9.1

Ordinary ability, health, skill and passive regeneration buffs share one timed-effect path. Complete-contract checks admit 470 original programs and 468 original crystals, including the AggDef self buffs. Learning and casting remain separate operations; arbitrary nano functions are not enabled by this family.

Complete contract admission

Programs require native header51051, ItemType0, audited Can0/8 and the raw Flags0 values 0x80010000, 0x10000, 0x10002, 0x14000 or 0x14002. The additional 0x1c000 class requires self-only effects and uses the existing NCU-exemption and local-cancellation rules for bit0x8000. All carry BuffNano0x10000. These are exact audited values, not a claim that arbitrary other flag bits are harmless. Duration, NCU, strain, cost, range, attack and recharge must resolve to positive finite values, including original constructor defaults for omitted fields. Authored zero values remain zero. Each OnUse0 effect is an unconditional numeric Modify53045 or Skill53012 with an implemented consumer, or a checked HeadText53057 presentation companion. Effects require consistent self or supplied-target selectors and tick1/interval0. A complete program must contain a numeric effect. Positive MaxHealth1, ability16..21, trained skills100..168, HealDelta343 and NanoDelta364 modifiers qualify alongside the separately audited armor and combat consumers. Signed AggDef51 reaches shared player weapon timing. Signed SkillLockModifier382 also has a verified consumer, but no original nano uses it; its synthetic lifecycle fixtures remain separate from content.

The checker validates keyed attack-weight dictionaries4/4 and preserves recognized zero-default getter lists6/27, plus action3 criteria22/36. Native weights need not sum to100; the AggDef programs use Level54 weighted1000. Unknown metadata, unsupported effects, other events, conditions or repetition reject the whole program. An ordinary crystal requires header51005, one audited Flags0 value (0x80400203, 0x00400203, 0x88400203 or 0x08400203), Can30=0x29, Count26=1 and exactly one unconditional OnUse LearnNano53019, target2, for an admitted program. Only its original authored quality is accepted; bulk TESTITEM uploads reject.

Casting and crystal use evaluate the complete authored postfix expression through the shared native requirement evaluator. Biological Metamorphosis128, Matter Metamorphosis127, Psychological Modification129 and Matter Creation130 use their actual trained values and ability weights. Real Profession60 and VisualProfession368 criteria are distinct IDs; both currently read the saved profession because false-profession effects are not implemented. Unsupported predicates fail closed, including inside OR expressions.

The catalog audit covers all 4,366 decoded nanos. The health-buff records and earlier 29-program boundary are retained in local/maximum-resource-nano-research/catalog/. The expanded skill audit re-parses 778 selected records from the original ResourceDatabase, retaining full fields and hashes in local/skill-nano-research/defaults-audit/. The subsequent Can/flag audit re-verifies 781 records under local/nano-contract-research/catalog/. Raw flags identify this bounded content class; they are not reinterpreted as evidence of historical death or offline-clock rules.

Passive regeneration programs

Program Crystal/QL Modifier Strain NCU Duration
Nano Restoration27118 27253/10 364 +2 97 4 20min
Regeneration27144 27280/14 343 +3 111 5 20min
Continuous Reconstruction28651 28764/146 343 +14 203 45 60min
Hearty Constitution28663 28776/76 343 +8 203 24 30min
Bot Reproduction29200 29202/37 364 +6 201 12 30min
Soothing Calm30095 30140/90 364 +12 201 28 45min

These modify the shared regeneration calculation; they are not independent periodic Hit functions. Generic Regeneration stacks with the Doctor203 line, while the two Doctor programs replace each other. Nano Restoration97 stacks with Bureaucrat201; the two Bureaucrat programs replace each other. Refresh retains one contribution and NCU allocation. Equipment and different strains add their deltas once. Cancellation, expiry and the current ordinary-buff death policy remove each contribution through65.

Six further delta programs combine MaxHealth1 with343 and use the same complete timed-effect path. Improve Health and the Soldier startup Body Boost also qualify; see health buffs for all eight additions and their resource accounting. Blood Circle27803 and the special Iron Circle42052 contract remain unavailable. No partial effect is granted.

Additional ability programs

The same complete-contract check also covers the five remaining +6 Augments, Enhanced Senses, Feline Grace and Prodigious Strength:

Program Crystal/QL Effect Caster requirement
Augment Agility26355 26482/4 Agility +6 MM/BM
Augment Intelligence26356 26483/4 Intelligence +6 MM/BM
Augment Psychic26357 26484/4 Psychic +6 MM/BM
Augment Sense26358 26485/4 Sense +6 MM/BM
Augment Stamina26359 26486/4 Stamina +6 MM/BM
Enhanced Senses25988 26207/27 Sense +15 BM/PM, real Agent5
Feline Grace25989 26206/53 Agility +25 BM/PM, real Agent5
Prodigious Strength29652 29814/136 Strength +40 BM/MM, visual Enforcer9

Authored effect

Original resource 1040005:27169, Strength Boost, has Modify 53045 with arguments {16,12}: one +12 Strength modifier. Raw duration stat 8 is 120000 centiseconds (20 minutes), NCU cost 54 is 3, nano cost 407 is 45, execution 294 is 220 centiseconds, recharge 210 is 60, and range 287 is 12 metres. The existing selected-client cost arithmetic would truncate 45 to 44; historical server debit policy remains subject to the limits documented in nano damage.

Crystal 1000020:27305 has QL 7, while the program has QL 3. Both require Biological Metamorphosis 128 at least 35 and Matter Metamorphosis 127 at least 41. Stat 122 is Sensory Improvement and is not required. The original registration strings at 10038a90, 10038a5e and 10038b58, respectively, establish those skill names independently of later database labels.

The same original-record audit covers the complete basic ability family:

Program Program ID Crystal ID Ability stat Strain Crystal QL
Agility Boost 26342 26469 17 29 7
Intelligence Boost 27086 27217 19 30 7
Psychic Boost 27134 27270 21 31 7
Sense Boost 27154 27290 20 32 7
Stamina Boost 27168 27304 18 33 7
Strength Boost 27169 27305 16 34 7
Augment Strength 26360 26487 16 34 4

Each Boost has program QL 3, one +12 modifier, 3 NCU and the same requirements, timing, range and nano cost as Strength Boost. Augment Strength has program QL 2 and the lower requirements and costs below. Crystal upload reads the verified LearnNano function, authored quality and MM/BM requirements from its own record. A single catalog-based requirement check serves upload and cast.

Native delivery

The inspected target is original kkr.dll, SHA-256 a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0. Addresses below use its 10000000 base. These are static native contracts, not a captured historical server exchange.

CharacterAction 5e477770, action 177, uses the recipient as envelope actor and DWORD fields {177,53019,programID,casterID,durationCs}. Receiver 1006fa30 -> 10066010 adds the active record, executes its modifiers and increments used NCU180 unless flag0x8000 exempts it. It applies to owner and observer representations; only the local recipient receives the effect icon. Do not also send an ApplySpells modifier stream for the same effect. Ordinary cast admission 18 and completion 107 remain separate from this active-effect delivery.

Action 65 removes a present record, its modifiers and NCU together through 10064ee0. The native cancellation sender 100232a0 emits {65,0,0,53019,programID} and refuses hostile programs. Countdown reaching zero alone does not establish automatic stat removal in the inspected paths; the server needs an authoritative expiration operation.

Native same-strain replacement compares NCU cost through 10066c80 and 10066d40. Strength Boost and Augment Strength 26360 share strain 75 equal to 34 and cost 3 and 2 NCU. Reapplying Strength Boost removes its previous contribution before adding it again. Stat 413 is an effect resource in this path, not stacking priority.

The active-program snapshot belongs to SimpleCharFullUpdate 271b3a6b, reader 10082da0, rather than FullCharacter 29304349. It contains an encoded count and five DWORDs per record: program identity, start time and two duration fields. Snapshot activation applies effects and NCU. The server leaves this list empty and replays action 177 after FullCharacter for the owner, and after spawn/equipment for observers. Two actual WASM clients restored one contribution on recipient and observer reconnects. Do not also populate the snapshot list without changing that replay path.

Server lifecycle

The supported programs read their modifier, strain, NCU cost, duration, range, cast time, recharge and complete action3 requirements from the original catalog. Augment Strength gives +6 Strength, costs 2 NCU, has 120000 centiseconds duration, 25 authored nano cost, 200 execution, 50 recharge and 15 metre range. Its MM/BM thresholds are 25/22. The selected-client arithmetic debits 24 nano; Each Boost debits 44. They affect effective abilities and skill trickle-down without editing trained base values.

Admission reserves nano once. Completion atomically retires that reservation, saves recharge and the recipient's active record, then sends 107 and 177. A failed outcome cancels and refunds through the existing reservation path. The stronger same-strain record wins by NCU cost. An equal-strength refresh replaces its source and deadline, retaining one modifier and one NCU charge. A weaker program is rejected before charging; a stronger effect arriving mid-cast causes completion to abort and refund.

Cancellation validates the current recipient session, owned character and exact program identity. Cancellation and expiration commit removal before sending 65. Failed removal keeps the contribution and NCU until a retry can commit. Active timers use in-memory deadlines and the existing periodic player checkpoint; timer-only saves do not rewrite unchanged character data. The saved remaining duration resumes on login. Ordinary observer updates do not add duplicate stat snapshots or modifier streams.

The same character-owned persistence now supports NPC active effects. Ice Flechette's hostile initiative child uses NPC checkpoints, observer replay and explicit expiry/death removal; see initiative debuffs.

Derived resources

The native stat getters read cached maximum HP 1 and maximum nano 221. Modify 53045 for an ability does not mark them for recomputation: Stamina and Psychic dirty flag 0x80 recomputes regeneration, while flag 0x40 is the separate maximum-resource path for direct Body Development/Nano Pool changes. Original functions 10074730, 10074b00, 100714a0 and 10075910 establish that distinction. Send the changed resource foundation after 177 or 65 using the existing equipment resource-maximum path; do not add another modifier.

FullCharacter activation 1007eea0 calls 10072180 -> 10075910 before a subsequent 177 replay. That can overwrite already serialized buffed maxima with pre-buff values. The owner therefore receives explicit foundations after replay. Observer SimpleChar uses its serialized maximum and does not enter the local recomputation path. Existing observed native attack-rating updates need no additional stat 22 packet.

Additions do not grant current HP or nano. Removal clamps current resources to the resulting maxima, committing the clamp with effect removal before any 65, maximum correction or current-resource packet. This follows the server's equipment-removal policy; the exact historical server clamp policy is not established by these client paths. A maximum-HP change anchors a moving recipient's prior segment before the wounded-speed calculation changes.

Complete 38-record native evidence and the finding ledger are retained under local/ability-buff-research/. This is static evidence, with runtime agreement checked separately in the published WASM client.

Reconstruction policies and remaining checks

On normal session departure, remaining duration is checkpointed and paused. Login resumes it; zoning and overlapping replacement sessions retain the current deadline. This is an explicit provisional policy: neither wall-clock expiry nor paused offline time is established by the retained static evidence. The WebSocket reconnect grace period still counts as a live server session. A crash can recover the last periodic checkpoint, while an orderly shutdown saves current remaining time. Add, replacement and removal are immediate durable changes.

The current friendly path accepts self or connected, ready, living same-side players in the same playfield and authored centre-to-centre 3D range. It rechecks target validity, range and NCU at completion. Same-side eligibility and the native completion's stronger-program check have native evidence; cross-side fight-mode/team exceptions and historical server completion gates remain unresolved. The selected programs have no verified general dungeon line-of-sight implementation.

NCU admission uses available capacity after subtracting the replaced strain. The client paths inspected do not establish the original server's full-cost versus replacement-delta capacity rule. The family permits natural exact-fit and overflow tests: Augment Strength 2 + Agility 3 + Intelligence 3 fits 8 NCU; upgrading Strength would require 9 and is rejected without debit. Refreshing a present 3-NCU program at 8 NCU retains one contribution. A 2-NCU memory raises capacity to 10, allowing a previously rejected third 3-NCU program. Stat 464 duration scaling remains open.

Death and resurrection

Lethal player damage removes the supported ability buffs. Health zero, the pending cast's refunded reservation, the resulting nano clamp, removed active records and reclaim availability commit in one SQLite transaction. Failed statements, ignored required updates or a failed COMMIT publish none of that outcome. Nonlethal damage retains effects and keeps health on its ordinary checkpoint cadence.

The native death presentation does not clear active nanos. In original kkr.dll, action 99 enters 10070327; the death visual 10085d60 clears the casting queue at controller offset 18, while active programs remain at offset 14. Resurrection activation 10080e20 supplies health/nano and calls 10053230 without purging that active list. Explicit action 65 is therefore required for each removed program.

The server sends the lethal result, StopFight to drain queued weapon damage, death presentation, the removals, corrected resource maxima and final resource values. Both owner and observers receive removal. Native active membership checks prevent duplicate subtraction. Resurrection and reconnect replay no removed program. The complete 96-record evidence export and limitations are in docs/research-notes/nano-death-research/wire.md and its adjacent evidence file.

Removal of these ordinary ability and regeneration programs is a selected server policy, not a historical server capture. The client determines the removal protocol but does not establish which other programs survive death. Death-persistent exceptions, resurrection shock and the exact historical resource reset remain open; do not extend this policy to additional nano families without research.

Two hardware Chromium WASM clients verified Psychic Boost, Stamina Boost and Augment Strength occupying 8 NCU before a Leet's lethal hit. Both received one removal per effect and a final quiet HP zero. The owner lost all three icons; health maximum fell from 100 to 91 and nano clamped from 662 to 656. Native automatic resurrection returned the player to the starter area with 1 health and 1 nano, followed by ordinary recovery. Reconnecting restored no effects, while the item remained in reclaim. Screenshots, native probes, reassembled wire verification and fixture cleanup are retained under local/nano-death-smoke/. Test characters and items were removed without changing unrelated database rows; the published WASM bundle was unchanged.

Verification

Focused Go regressions cover self/other casts, exact range, MM/BM thresholds, missing resources, invalid recipients, base-stat preservation and trickle-down, refresh/upgrade/downgrade, stronger effects arriving mid-cast, owned/foreign cancellation, duplicate removal, exact-deadline expiration, statement and COMMIT failure, refund, removal retry, checkpoint cadence, offline duration and repeated ready messages.

Two hardware Chromium clients using the published WASM verified +6/2 NCU, +12/3 NCU, replacement, refresh, weaker rejection, recipient-only allocation, native icon cancellation and recipient/observer reconnect replay. Native record durations truncate 120000 to 119999 through their float conversion; the server expiration deadline uses the authored 120000 centiseconds.

Full selected records, original skill resources, native registration bytes, complete REA records and the finding ledgers are retained under local/nano-buff-research/. Native test probes, screenshots and wire captures are under local/nano-buff-smoke/. Owned native analysis sessions were closed.

The final native run restored a real cast after server restart with its saved remaining duration, about 15 minutes 39 seconds, rather than refreshing it to 20 minutes. The recipient canceled that other player's contribution through the ordinary effect icon. A separate, explicitly seeded 90-second replay fixture then expired: the server sent one 65 to each observer and removed its SQLite row; both native representations lost the modifier and NCU, and the owner's icon disappeared. This verifies shortened replay expiration, not a 20-minute manual wait. The authored 20-minute boundary is covered in Go.

Ability-family verification

Seven actual crystal uploads produced the seven native program entries and consumed each source once. Two hardware WASM clients verified the natural NCU boundary cases above, all six +12 effects, and the 2-NCU memory expansion. The combined Stamina/Psychic/Intelligence case reached maximum HP 46 and nano 629. Those maxima, current resources and one copy of every contribution survived owner and late-observer reconnects.

With current resources filled through the ordinary control editor, removing Intelligence clamped nano 629 to 626, removing Stamina clamped HP 46 to 37, and removing Psychic clamped nano 626 to 620. SQLite and native owner values agreed after each removal; observer HP agreed as well. Non-team observers do not receive another player's private nano-resource state.

Additional Go tests cover every family independently, upload thresholds and qualities, exact/overflow NCU, memory expansion, refresh/replacement at capacity, capacity becoming unavailable during a cast, failed clamp writes, expiration clamps, startup restoration and the wounded movement-speed boundary.

The final two-client check cast Stamina on a recipient with 4 HP while they moved toward the caster. Maximum HP changed from 37 to 46, current HP stayed 4, and the owner/observer final positions agreed within native coordinate rounding. A preceding moving-away case crossed the completion range and aborted with a refund. The full Go suite, focused race checks and vet passed. Test fixtures were removed with unrelated rows verified unchanged, and the published WASM bundle remained unchanged.

Complete ordinary-buff verification

The independent catalog audit admits exactly21 programs and21 crystals. Public upload/cast/cancel tests exercise every one, including original crystal qualities, exact nano debit, NCU, complete modifiers and cold recovery. Additional cases cover strict skill equality/below/above, real/visual profession gates, unsupported metadata/effects, conditions, repetition and partial contracts. All six delta programs have exact authored-deadline and lethal-combat coverage. Failed expiry persistence retains its effect until a durable retry, then sends one removal. Shared strain tests cover equipment stacking, refresh, capacity, upgrade and weaker rejection.

The full Go suite passed in563.553 seconds, with gamedata in7.710 seconds; focused race checks passed in115.872 seconds and vet was clean. The surgery feature correction additionally passed focused checks in24.742 seconds and race checks in94.531 seconds. Logs are in local/regeneration-nano-checks/.

Two actual Chromium WASM clients used GPU/OpenGL4.5 hardware rendering. Native crystal use learned all six delta programs and consumed each source once. Regeneration, Nano Restoration, Hearty Constitution and Bot Reproduction stacked with the worn implants at45/47 NCU, HealDelta22 and NanoDelta13. An over-capacity Soothing Calm upgrade failed without debit. Canceling Hearty freed24 NCU, allowing Calm to replace Bot:37/47 NCU, HealDelta14/NanoDelta19. Both weaker-line attempts failed. Refresh, recipient/observer reload and an actual server restart retained one contribution per program. Cold replay used saved remaining durations, not fresh authored durations.

Complete world-stream parsing verifies four recovery windows:23HP/14nano, 15HP/20nano before and after restart, and26HP/6nano with Continuous Reconstruction alone. Each number is the gain on an eligible recovery check; health and nano have independent intervals. Final native cancellation restored only the installed gear's11/5 deltas and zero used NCU in both clients. Enhanced Senses rejected the Doctor's crystal use without consuming it. No browser exceptions or adapter failures occurred. Screenshots, native heap snapshots, SQLite snapshots and parsed actions are retained in local/regeneration-nano-smoke/verification.json and adjacent files.

The high skills, worn QL300 NCU ear and QL1 recovery implants were explicit GM fixtures. The ordinary acquisition gates for that equipment were bypassed; all crystal learning, casting and cancellation used the native UI. Resources were reset once through the control editor to keep recovery below the caps. The surgery window was shortened separately to verify Features22 reverting to6 while preserving casting; see surgery access. Nano durations and recharge deadlines were not shortened. Original20-60 minute expiry boundaries were tested in Go, rather than waiting them out manually. Cleanup removed only the two owned characters and five remaining items, with all unrelated table hashes unchanged and SQLite FK/integrity checks passing.