Commit graph RynthCore/src/RynthCore.Engine/Plugins
Author SHA1 Message Date
Daniel Wallace
aaaa0a94b4 AutoId limit: AutoIdMode All/Limited/Off (default Limited), requester-tagged 0xC8s
A flight capture from one 26-minute session showed the client sending 3211 IdentifyObject
(0xC8) messages, most of everything it sent, because AutoId appraised every object the
client created. Bots already appraise at the point of use, so the background appraisals
are now limited.

AutoIdMode (engine.json "AutoIdMode", default Limited; /rc autoid all|limited|off, live
and saved; /rc autoid alone reports it):
  All      the old behaviour.
  Limited  only the selected target (fresh-cache skip), items in the container the
           player has open now, and items in the player's own inventory with nothing
           cached. The last two wait until the object is 2 s old and until 30 s after a
           world transition's settle window ends (death, portal, teleport, landblock jump;
           walking into the next landblock never defers). A container opened after the
           settle ended is not deferred. Creatures, ground items, other players: never.
  Off      nothing, the selected target included.
Plugins' own RequestId calls are not limited; they still merge in the RequestId slot.

The decision is AutoIdPolicy (pure). AutoIdService now keeps a pending list on its drain
timer (waits for age/defer stay, skips leave), classifies each candidate from the PWD
snapshot (container / wielder / side pack owner, and the ground container from
ViewObjectContents), takes InventoryPutObjInContainer (0x0022) moves from the server
message stream, and rescans an opened container 2.5 s after the open.

Requester tagging: a thread-local EngineSendMarker around every engine RequestId call
(AutoId by class, plugin host API, the login self-identify, the Inventory panel hover).
A queued request carries its requester in PendingIdQueue and the main-thread drain
re-enters the marker around the real send. Only a marked send registers with the
flight recorder (FlightCapture.EngineSend, its own 64-entry table so bursts never evict
other engine calls), so its 0xC8 shows as [eng:autoid-target|autoid-container|
autoid-inventory|autoid-world|plugin|self|ui]; an unmarked 0xC8 stays [cli] and counts
as AC's or Decal's.

Per-minute log line "autoid 60s: ..." (its own line, not part of "hb #"): sends by
requester, cli, total, AutoId skips by reason (mode, age, defer, fresh), pending.

EngineSettings keeps upstream's MaxHotReloads, IltServerNames/IltHosts, ReportEndpoint
and CloseOnServerDisconnect next to AutoIdMode (owned keys, load and save).

Tests: EngineRobustnessTests (decision table against an independent expected function,
spot cases, defer window from WorldTransitionState inputs, classification, marker scopes
and thread-locality, requester through PendingIdQueue, heartbeat field names against the
launcher regex), FlightRecorderTests (identify tagging, foreign count, match window, burst),
EngineSettingsTests (AutoIdMode round trip, default left out). check_offthread_mutators.py:
DrainPending allow-listed like DrainTick (it only enqueues).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 17:18:12 -07:00
Daniel Wallace
55f7497065 Engine robustness: appraisal merge, AutoId re-eligibility, freeze pause, OOM dump, crash logger, transition gate
Appraisals
- RequestId slot merges a pending request for the same object (PendingIdQueue), as the
  QueryHealth slot does.
- AutoId: per-object last-sent time kept across client releases; no re-appraisal within
  10 min while the data is cached, unless the server deleted the object (0xF747). Map
  bounded at 8192 with a prune off the create path. The sent mark is set at the real
  send in DrainRequestIds, not at queue time.
- The selected-target priority appraisal is skipped when its data is cached and fresh.

Main thread frozen
- Plugin ticks pause while AC's main thread is frozen (a main-thread message box, or no
  beat for the hang watchdog's threshold); events keep flowing. Exposed through
  GetEngineStatusJson (mainThreadFrozen, mainThreadStallMs, pluginTicksPausedMs) and the
  heartbeat (pump=paused).

Crashes
- AC's OUT OF MEMORY box: one full-memory dump to <install>\Dumps before the box shows,
  newest 3 kept.
- Native crash logger: pid, tid and date per entry; once per address; .NET Framework
  AVs never charged to the limit; last-chance handler; stack overflow and heap
  corruption codes. Build-SehTrampoline gains -NoDeploy.
- ProcessExitHooks: dead fail-fast detours removed; crash exit codes pass straight
  through TerminateProcess/NtTerminateProcess.
- CoreCLR's own crash dump is left to the loader's existing ConfigureCrashDumps
  (Loader.c, Logs\dumps\clr_*.dmp) and Publish-EngineCoreClr's createdump/DAC
  handling; this change adds no second setup.

World transitions
- AcMainThreadQueue holds queued game-mutating work while the player is dead, in portal
  space, or within 5 s after either or after a non-adjacent landblock jump. When the
  window ends, stale casts, uses, selects and appraisals are dropped and stops and
  cancels run in order. Walking across an adjacent landblock border never gates.
  State is re-sampled after AC's tick, before the post-tick drain.
- Inventory panel actions are held during a transition too.

Diagnostics
- Heartbeat valargest= (largest free VA block); free and largest logged before and after
  each plugin load and unload.
- CastSpell comments corrected to the actual main-thread paths.

Tests
- tools\EngineRobustnessTests and native\SehTrampoline\tests\CrashLogFilterTests.c.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 17:17:59 -07:00
b0f9d74b21 Snapshot for release 2026.10.12.1 (internal ef4d41d) 2026-10-12 00:33:12 -04:00
08b80eed86 Snapshot for release 2026.10.11.1 (internal 4eca83a) 2026-10-11 15:00:53 -04:00
754c13f2b8 Snapshot for release 2026.10.8.2 (internal ccc32e5) 2026-10-08 20:11:39 -04:00
650915dadc Snapshot for release 2026.10.8.1 (internal e654aa5) 2026-10-08 17:29:52 -04:00
abf9146a5b Snapshot for release 2026.10.6.1 (internal 1cbe514) 2026-10-06 08:47:11 -04:00
913a2a00b6 RynthCore as of 2026-10-05 evening (internal 0a2043e): release 2026.10.5.20 - own dat reader, plugin manifests, UI/login hooks with Loot Editor drag-and-drop, server-message stream (API v78), raise attributes and skills (API v79), nameplate sizing and overlay opacity, engine reload held while a plugin is fighting, StatusAgent character sheet, world map and travel for DrakRemote 2026-10-05 14:59:43 -04:00
c3e15480e5 RynthCore as of 2026-10-05 (internal 0d3c210): dashboard slide-outs on the left (Ranges with the selected monster, Files, Patrol), fixed draggable vital bar, click an item to add a loot rule, loot rules by WCID, chat and loot editor typing no longer leaks into the game, title-bar text size, plugin API v76 (close container), plugin exception traces, plates drawn under the game UI (in testing), launcher account passwords encrypted with Windows DPAPI (in testing), release 2026.10.5.1 2026-10-05 08:03:08 -04:00
a24ed6df7c RynthCore as of 2026-10-04 (internal 843c801): RynthNav auto-travel and the navigation map, plugin API v75 (server and titles), launcher with Available plugins, download progress and the update on the front page, opt-in usage statistics, NPC names, radar colours, title-bar text size, FPS limiter, client action unlocks, release 2026.10.4.6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:34:27 -04:00
9b5e2765b7 RynthCore as of 2026-09-27 (internal d359eee): items past the old object-id range, no idle logoff, overlay popups without the panel flash, UI hidden at character select, vendor trading (API 67), Settings rows and Vendoring tab, release 2026.9.27.2 2026-09-27 20:25:45 -04:00
f407326377 RynthCore as of 2026-09-27 (internal b778a81): version display, RynthChat Tell button, retail chat usable, release 2026.9.27.1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 00:26:16 -04:00
040b797be5 RynthCore as of 2026-09-26 (internal 5326694): panels re-bind plugin exports after RL; deploy checks launcher locks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 14:20:07 -04:00
68c301dac8 RynthCore as of 2026-09-05 (internal f9abab9)
A snapshot of the working tree for aelrynth.com/git/: the code, build files
and public docs. Internal review notes and agent instructions are left out.
MIT licensed; see LICENSE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 21:22:59 -04:00