diff --git a/BUILD.md b/BUILD.md index 15776e1..bc28371 100644 --- a/BUILD.md +++ b/BUILD.md @@ -32,6 +32,8 @@ C:\Games\RynthSuite\\ ← each plugin as a managed assembly + its depend | Loader/Shim change, clients running | `scripts\Publish-EngineCoreClr.ps1` — the in-use copies are renamed aside; new launches get the new ones | | Installer | `installer\Build-Installer.ps1` (release plugins stay NativeAOT: the new engine loads them) | | Hot-reload test on a local server | `scripts\Test-ClrWorld.ps1 -Reloads 3` (see its header) | +| Every offline test (RynthCore, RynthSuite, RynthServers) | `scripts\Run-AllTests.ps1` (`-Only ` for one); `installer\Publish-Update.ps1` runs it and won't publish if one fails | +| RynthAi in game (buffing, a kill, looting, missile crafting) | `scripts\Run-GameTest.ps1` (logs a test character in, runs RynthSuite's `GameTests\RynthSelfTest.af`, prints PASS / FAIL / SKIP; see its header) | | Why didn't a generation unload? | `tools\AlcRoots ` (build it: `dotnet build tools\AlcRoots -c Release`) | `-NativeAot` on `Deploy-RynthCore.ps1` and `Build-Installer.ps1` builds the old NativeAOT engine, diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..a562d9f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,24 @@ +# Contributing to RynthCore + +RynthCore is the hook layer: it injects into the client, reads the game, runs plugins and hosts their windows. Features belong to plugins (RynthSuite), and features for one game server belong to that server's plugin. + +## What goes here + +- Hooks into the client and readers of game state (objects, inventory, vitals, positions, chat, spells). +- The plugin API (`src/RynthCore.PluginSdk`) and its versions: a new capability is a generic function every plugin can use. +- The window host: the ImGui shell, panels and pop-outs, themes, fonts, the sections rail. +- Services every plugin can use: settings files, status export, logging, hotkeys, the launcher and updater. + +## What doesn't + +- A feature of one plugin, including its screens: plugins draw their own windows with the engine's ImGui. +- Anything for one game server: that server's plugin in RynthSuite. + +When a plugin needs something the engine can't do yet, add the generic hook here and build the feature in the plugin. + +## Pull requests + +- One purpose per pull request; a change that spans RynthCore and RynthSuite comes as a pull request to each, the hook first. +- Plugin API numbers and versions are assigned when a change is merged. +- Add or update the offline checks under `tools/` where they exist. +- Say in the description what you tested in game and on which server. diff --git a/Changelog/2026-10-16-sk-tonight-port-2026.10.5.71.md b/Changelog/2026-10-16-sk-tonight-port-2026.10.5.71.md deleted file mode 100644 index e305dfa..0000000 --- a/Changelog/2026-10-16-sk-tonight-port-2026.10.5.71.md +++ /dev/null @@ -1,17 +0,0 @@ -# 2026.10.5.71 - SK port: Display chrome + Vaulted Dungeons Options gate - -Previous release: 2026.10.5.70. - -## Summary - -Standing `sk` branch now carries tonight's local engine work for upstream release prep: - -- **Settings > Display**: Borderless Windowed, Remember Open Windows and Positions, Save Layout Now (`AcWindowChrome`, EngineSettings, PanelStateStore). -- **Settings > Navigation > Vaulted Dungeons**: Options checkbox (default off) that gates the Mini Remote ILT "Vaulted Dungeons" tab (paired with RynthSuite `sk` Ai/ILT). -- Chat type **0x1C** recognized for ILT channel lines (ChatData). -- Loot picker filter and related FaceKit / Mini Remote face polish from 2026.10.5.65–.70. - -## Deploy note - -Live clients load CoreCLR from `C:\Games\RynthCore\Runtime\`. Publish with -`scripts\Publish-EngineCoreClr.ps1 -MsBuildArgs @('-p:Version=2026.10.5.71')`. diff --git a/Changelog/2026-10-18-bar-declutter.md b/Changelog/2026-10-18-bar-declutter.md new file mode 100644 index 0000000..673d532 --- /dev/null +++ b/Changelog/2026-10-18-bar-declutter.md @@ -0,0 +1,60 @@ +# Bar declutter: Item Count and Skills off the bar, Inventory buttons, Skills under Oracle + +Branch `feature/bar-declutter`, from `status-export`. Not deployed, not released. The idea and the first +version are Silentkelpie's (rynth PR 6, "inventory bar declutter ... Skills under Oracle"); this takes the +parts the owner approved and changes what the owner decided differently. + +## Bar + +- Item Count no longer has a bar icon. It opens from Inventory's Count button, `/rc itemcount`, and the + Character menu. +- Mini Remote keeps its bar icon (Silentkelpie removed it; it stays). Inventory gets a Remote button too, as + an addition. +- Skills leaves the bar only while RynthOracle provides the Skills / Attributes / Progress tabs. The icon + shows whenever it does not: no Oracle window registered, or an Oracle that has never sent + `/rc oracle-skills` (an older Oracle). Nobody loses the way in. + +## Skills under Oracle + +- `/rc oracle-skills `: Oracle says which Skills body to embed in its window + (`OracleSkillsEmbed`; the contract is unchanged from the PR). Any valid form also tells the engine that + Oracle has the tabs. An Oracle that wants the Skills icon hidden before the player first opens the tab can + send `/rc oracle-skills off` once at startup. +- `/rc skills`, `/rc progression` and the Character menu's Skills line go to Oracle (`/ro skills`, + `/ro progress`, `/ro attrs`) when its tabs are there, else open the standalone Skills panel as before. + `/rc skills hide` closes Oracle only while it shows a Skills tab; `/rc skills toggle` closes it when it + already shows Skills. +- Fixed from the PR: the embed re-ran `SkillsFace.OnShown()` every two seconds and nothing ever called + `OnHidden`, so the Progression subscription stayed on after Oracle left the tab. Now the face is shown + once when the embed first draws and hidden once when it stops (`ShownLatch`): `/rc oracle-skills off`, + Oracle's window closed or removed, the Oracle plugin unloaded, engine reload / shutdown, or no draw for + a second (idle sweep). `OnShown` / `OnHidden` themselves are idempotent, so subscribing twice never + registers twice. + +## Inventory + +- Modern header and Classic title bar get Mini Remote, RynthSort (`/rsort`), Item Count and Global Inventory + (`/ginv`) buttons. The Character menu gets a Global Inventory line. +- The PR's four text buttons were about 190 px wide: at the retail width (300, scale 1) they pushed the + title to nothing and put Vault (Aelrynth) at about x=-44, off the panel. `UI/InventoryTitleLayout.cs` + now lays the bar out: the size / tools / Modern toggles stay at the right, Vault next to them is always + there, and the four buttons take the richest style that leaves the title 56 units: text (480 wide and + up), icons (360, or retail without Vault), or one "..." menu (retail with Vault). The title is cut with + an ellipsis to the room it has. The Modern header does the same with icons / menu / nothing and drops the + item count text last. +- Settings > Inventory Management > Floating HUDs tooltip says the floating pack count HUD is not the Item + Count panel. + +## Not taken from the PR + +The in-world hot-reload hold, the chat combat filters (already merged), the Enlightenment calculator UI, his +changelog files and version bumps. + +## Files + +- ImGui/Panels/ShownLatch.cs, OracleSkillsEmbed.cs, SkillsRouting.cs (new), SkillsFace.cs, + ScriptWindowFace.cs, InventoryFace.cs, InventoryFace.Classic.cs, RynthAiFace.cs +- ImGui/ImGuiBar.cs, ImGui/ImGuiPanelHost.cs (one idle-sweep line) +- UI/InventoryTitleLayout.cs (new), UI/ScriptWindows/ScriptWindowRegistry.cs, UI/Data/SettingsData.cs +- Compatibility/RynthCoreChatCommands.cs +- Tests: `tools/BarDeclutterTests` (lifecycle balance, TabsAvailable rule, title layout grid) diff --git a/Changelog/2026-10-18-chat-link-probe-2026.10.18.25.md b/Changelog/2026-10-18-chat-link-probe-2026.10.18.25.md new file mode 100644 index 0000000..9f54e9d --- /dev/null +++ b/Changelog/2026-10-18-chat-link-probe-2026.10.18.25.md @@ -0,0 +1,36 @@ +# 2026.10.18.25: /rc chatlinkprobe (toward coordinate links in AC's own chat) (2026-10-18) + +**Kind:** Diagnostic (Engine). Previous: 2026.10.18.24 (test installer), 2026.10.18.15 (last engine hot build). + +## Why + +Coordinates are links in RynthChat (2026.10.17.2), but not in AC's own chat window. ub-IT and VirindiTank +do it through Decal, which wraps coordinates in AC's clickable-name markup and catches the click with its +`ChatNameClicked` hook. RynthCore must do this without Decal, and no public source names the acclient +function that handles a click on a chat link. This probe finds that function by watching the client. + +## What + +`/rc chatlinkprobe [seconds|off]` (default 60 s, at most 600). While it runs: + +- **Coordinates in AC's chat window become AC links.** Each pair is printed as + `42.1N, 33.6E<\Tell>`, using the same link id as GoArrow and + UtilityBelt. The rewrite happens only in what AC prints, through the engine's own chat hook (held + lines, and lines printed at once on AC's main thread). Plugins and RynthChat still get each line as + the server sent it. AC's own markup (players' names) is never rewritten. +- **Every message to `gmMainChatUI::ListenToElementMessage` is logged** (up to 400 per run): its + first 12 dwords, and any text they point at. + +Nothing changes while the probe is off. + +## How to use it + +1. `/rc chatlinkprobe 120` +2. Have coordinates appear in AC's chat, for example `/tell 42.1N 33.6E`. +3. Click the coordinates in AC's chat window, then click a player's name. +4. Send the RynthCore log. The click's message tells the next build which call to hook so a click goes + to RynthNav (arrow, or with Ctrl held a walk), with no Decal. + +## Checks + +Engine builds; ChatHoldTests, ChatCoordTests 49/49, ChatTellTests and ChatFilterTests pass. diff --git a/Changelog/2026-10-18-display-chrome.md b/Changelog/2026-10-18-display-chrome.md new file mode 100644 index 0000000..8a7261b --- /dev/null +++ b/Changelog/2026-10-18-display-chrome.md @@ -0,0 +1,43 @@ +# Settings > Display: Borderless Windowed, remembered windows, Save Layout Now + +Branch `feature/display-chrome`, from `status-export`. Not deployed. From SilentKelpie's +RynthCore PR 6 (the Display chrome piece only), with the changes below. + +## What changed + +- `UI/AcWindowChrome.cs` (Win32) and `UI/AcWindowChromePolicy.cs` (the decisions, pure and tested). +- Settings > Display: + - **Borderless Windowed** (`BorderlessWindowed`, default off): hides the Asheron's Call title bar and + borders while staying windowed. + - **Remember Open Windows and Positions** (`RememberWindowLayout`, default on, as panels have always + been): off stops `panel_state.txt` being overwritten and stops panels reopening from the last session. + - **Remember Game Window Position** (`RememberAcWindowPosition`, default off, new): saves the game + window's position and size and puts it back after login. + - **Save Layout Now**: writes open panels, the window position (if remembered), the Vision HUD and + `imgui.ini` now. + +## How it differs from the PR + +- Chrome is only given back to a window this setting stripped. That is recorded on the window itself + (an HWND property holding the style from before), so it survives an engine hot reload and ends with + the process. With the setting off and no marker nothing is touched: exclusive fullscreen and external + borderless tools are left alone. +- The window rect is kept per client (`ac_window..txt`), written only when it + changed (checked every 10 s, written by the background writer). Until a character is known nothing is + restored or saved; after 90 s without one the shared `ac_window.txt` is used. +- Nothing changes the window inside the render callback. EndScene only reads; style changes and the + move/resize are posted to the game window's own WndProc (`Win32Backend.PostToGameThread`, as pop-out + windows are created). Settings toggles go the same way. Without the ImGui backend (no WndProc + subclass) the feature stays inactive. +- An off-screen saved rect, a rect under 160x120 or a minimised/maximised/fullscreen-looking window is + ignored. `PanelStateStore.Flush` no longer claims to be a no-op when remembering is off (it is an + explicit save). +- Not taken: Vaulted gate, chat 0x1C, hot-reload hold, bar declutter. + +## Tests + +`tools/EngineSettingsTests`: defaults and engine.json round trip for the three settings, the +borderless decisions (setting off with no marker changes nothing; our marker restores; on strips once), +off-screen / size limits, per-client file names, the rect file. + +Not yet tested in game (windowed vs fullscreen, hot reload). diff --git a/Changelog/2026-10-18-engine-review-fixes.md b/Changelog/2026-10-18-engine-review-fixes.md new file mode 100644 index 0000000..f0fb3e2 --- /dev/null +++ b/Changelog/2026-10-18-engine-review-fixes.md @@ -0,0 +1,53 @@ +# Engine review fixes (crash log size, dump safety, transition gate valve, AutoId) + +RynthCore.SehTrampoline.dll native version 8 (previous: 7). Branch `fix/engine-review`, from +`integration/pr-fixes-2026-10-18`. Not deployed. + +## native-crash.log no longer grows without bound + +- Decal's handled null-ref AV (about once a minute, one address) was written on every hit: the 30 s + "relog" applied to noise too. About 1,440 entries a day, 5-6 KB each. Now a noise address repeats only + at powers of two (about 11 entries a day for that address). The 30 s relog and the always-write for + a non-AV code stay for genuine (AC-class) addresses, capped at `CLF_MAX_RELOGS` (16) per address. + What a cap skips is still in the flush ring, so a fatal hit is recovered at exit. +- A total byte budget per process (`CLF_MAX_LOG_BYTES`, 3 MB, counted from the file's size at install): + past it ordinary entries stop after one marker line. Fatal entries (last chance, crash-exit flush) + get 256 KB more. +- `native-crash.log` is one file for every client, so `LogPaths.RotateAtStartup` (per-PID) never + covered it. `LogPaths.RotateNativeCrashLogAtStartup` moves one over 1 MB to `native-crash.log.old` + on the first engine generation, before the native side opens it. +- Tests: `native/SehTrampoline/tests/Run-CrashLogFilterTests.ps1`. + +## Full-memory OUT OF MEMORY dump: disk check and a cap across clients + +`DumpBudget` (pure, tested): the volume must keep 2 GB free after the dump, and the full dumps already +in the folder (any client) are capped at 4 files / 14 GB. The check and an empty placeholder file are +made under one machine-wide mutex, so clients that hit the box together cannot all pass first. A refusal +prunes older dumps once and asks again, else writes the small dump. The small dump (also the hang dump) +needs 200 MB free. + +## Crash dump on TerminateProcess / NtTerminateProcess is back (bounded) + +7cbf69e removed the managed dump on a crash exit and relied on CoreCLR's `createdump`. Checked offline +with a small CoreCLR host: `createdump` does run for a native AV that unwinds through a managed frame +and for one that reaches the CLR's unhandled-exception filter. It does not run when AC's own handler +catches a native AV and answers with TerminateProcess (no CLR frame, no CLR filter), and nothing else +wrote a dump there. `ProcessExitHooks.DumpCrashOnce` writes one small dump on that path: after the +native log flush, on its own thread with a 20 s wait, once per process, not when `clr__*.dmp` +exists, newest 5 kept. + +## World-transition gate: safety valve and a setting + +A gate held continuously for 120 s (`WorldTransitionState.MaxHoldMs`) opens by itself: logged once +(`[Lifecycle] world-transition gate OPENED by its safety valve`), counted in the heartbeat as +`gateov=N`, closed again when the raw transition ends. engine.json `TransitionGate` (default true; +only a hand-set false is written) turns the gate off; it is read at client start. + +## AutoId + +- `AutoIdDrain`: when the 512-per-tick evaluation budget runs out with items left, the evaluated ones + move to the back, so the next tick starts where this one stopped. +- Identify data kept since a client release is dropped on re-create when the release was + `ReleasedObjectRetention.StaleAfterMs` (2 min) or more ago (the client sends no updates for a released + object). A short absence still keeps its data. The no-re-appraisal window after a release is + therefore effectively 2 min rather than 10 for data freshness; tune the constant if that is too eager. diff --git a/Changelog/2026-10-18-enl-calculator.md b/Changelog/2026-10-18-enl-calculator.md new file mode 100644 index 0000000..f25cc7f --- /dev/null +++ b/Changelog/2026-10-18-enl-calculator.md @@ -0,0 +1,65 @@ +# Skills > Progression: Enlightenment calculator + +Branch `feature/enl-calculator`, from `integration/pr-fixes-2026-10-18`. Not deployed, not released. +The idea and the first version are Silentkelpie's (rynth PR 6, "Skills Progression: Enl calculator UI"); +this takes only the calculator UI and its data, checked against the producer, with its failure modes +tightened. + +## What it shows + +On the Enlightenment section of the Progression tab, under the plan totals, an **Enl calculator** +collapsible (open by default), drawn from what RynthILT's `AppendEnlCalculatorJson` sends: + +- **Per-level table**: Enl, Item, Qty, Lum for each step of the plan. Green while the simulated stock still + covers that step, amber after. The first 12 steps show; "Show all N steps" lists up to 100 in a table + that scrolls on its own, so a long plan never stretches the panel. +- **Still need / have**: luminance and each material. +- **Sigil craft chain (301-325)**: the eight chain rows (craft rows tagged), with RynthILT's note. +- Two lines under "Coins per token": the e-coins needed, and the luminance to buy them. + +## Not changed + +- Which luminance figure the Augmentation rows and the planners use. RynthILT's calculator simulates with + its **banked** luminance (`Bank.Luminance`), not the character's; the footnote says "banked luminance" + because that is what the numbers are (the PR's own text said "character", which the producer does not do). +- Nothing else of the PR's commit: hot reload hold, bar declutter, Oracle embed, chat filters and the + changelog / version files are handled elsewhere. The "Plan to level" label and the "Totals to plan:" + heading from the PR are left as they were. + +## Absence and bad data + +- An older RynthILT / RynthAi, or a server without ILT, sends none of the fields: the arrays are empty, the + strings empty, and the section and the two e-coin lines are not drawn. +- The row arrays are read by tolerant converters (`UI/Data/EnlRowConverters.cs`). `null`, a non-array, a row + that is not an object, a missing or mistyped field, unknown extra fields: that row (or just that field) + falls back to its default and the rest of the snapshot parses. Before, any such `JsonException` would have + turned the whole Progression snapshot into "unavailable" and hidden the Augmentation planner too. Rows + are capped at 200 per array on parse; the table draws at most 100 level rows and 16 material / chain rows. +- `ProgressionSource.ParseJson` is the one parse (the poll uses it). + +## Width + +The tables are 16 less than the panel, with the label column stretching and the number columns fixed +(scaled down below the retail width of 300). Cell text wraps inside the cell instead of running off the +panel; the notes wrap at the panel's own wrap position, like the rest of the section. + +## Lifecycle + +No new subscription: the calculator draws the Progression snapshot the Skills face already subscribes to in +`ProgressionShown` / `ProgressionHidden`, so the `ShownLatch` show / hide balance of the embedded Skills face +is unchanged. Row text (level, count, chain numbers, the "(craft)" label) is formatted once per snapshot, +and the Show all button label only when its mode changes; nothing grows per frame. + +## Files + +- `UI/Data/ProgressionData.cs` (Enl calculator fields on `EnlPlanner`, `EnlLevelRow`, `EnlMaterialRow`, + `EnlChainRow`, `EnlCalculatorView` limits, `ProgressionSource.ParseJson`) +- `UI/Data/EnlRowConverters.cs` (new) +- `ImGui/Panels/SkillsFace.Progression.cs` +- Tests: `tools/EnlCalculatorTests` (new; the sample JSON follows `AppendEnlCalculatorJson`'s shape) + +## Not verified + +No live client and no live RynthILT data: how the tables render (column widths, wrapping at 300, the +scrolling table) and the real numbers were not seen in game. The parse is tested against a sample built from +the producer's code, not captured output. diff --git a/Changelog/2026-10-18-reload-hold-optin.md b/Changelog/2026-10-18-reload-hold-optin.md new file mode 100644 index 0000000..0c8bbfa --- /dev/null +++ b/Changelog/2026-10-18-reload-hold-optin.md @@ -0,0 +1,54 @@ +# Opt-in: hold engine reloads while in the world + +Branch `feature/reload-hold-optin`, from `status-export`. Not deployed, not released. No native +(`Loader.c`) change, so no loader version bump. + +SilentKelpie's PR 6 (his 2026.10.16.3 / .5 "hold hot reloads while in-world") as a setting that is +**off by default**, so a reload behaves exactly as before unless the player turns it on. + +## Why + +On his machine, stacked automatic hot reloads (the loader's file watcher, engine deploys) while logged +in were crashing clients: the loader shut the engine down, then the CoreCLR re-init failed mid-flight. +His fix held every reload, forever, until logout, and even a reload asked for by hand waited. That is +too blunt as a default, so it is opt-in, bounded, and leaves hand reloads alone. + +## What + +- `engine.json` `HoldReloadInWorld` (default `false`; only a `true` is written; missing, or anything + that is not a boolean, reads as `false`). Settings > Misc: "Hold reloads while in the world", with a + tooltip, directly under "Background Identify". +- On: an automatic engine reload waits, with the game still running on the old engine, until the player + logs out or reaches character select (`ReloadInWorldGate`, polled every 2 s, "still in the world" + logged every 30 s, one chat line). It runs in `RynthCoreShutdown` before the plugin (combat) deferral, + so old and new loaders behave the same. +- **Never forever.** `engine.json` `HoldReloadInWorldMaxMinutes` (default 10, valid 1-240; out of range + is clamped, a non-number reads as 10; only a non-default value is written; Settings > Misc "Give up + holding after (min)", shown while the hold is on). At the bound the hold logs once + (`held N min, reloading anyway`) and the reload goes ahead. +- **Hand reloads are never held.** ERl, the bar RL button, `/rc rl` and the hotkey set the existing + hand-reload mark; the gate now honours it (`ShouldHold(byHand, ...)`; his version ignored `byHand`). + A hand reload that arrives while an automatic one is being held ends the hold at the next poll and also + skips the plugin deferral, like any hand reload. Switching the setting off mid-wait also releases it. +- Fails open: a throwing query, setting read or gate counts as "do not hold". +- Off: none of this runs; no wait and no new log line. + +## Left out of the PR + +- `Loader.c` ReloadWatcher poll and `RynthCoreMayHotReload` export (loader 2.2): the wait is done in the + managed `Shutdown`, which the loader already calls on its reload thread (the same place the plugin + deferral waits), so the native poll is redundant. It would also have needed its own bound in C, which + could not be built or tested here. +- `RequestManualReload` and the reroute of ERl / bar RL / `/rc rl` / hotkey: hand reloads are not held now. +- The rest of that commit (inventory bar declutter, Oracle Skills embed, ...). + +## Files + +- `src/RynthCore.Engine/ReloadInWorldGate.cs` (new), `EntryPoint.cs` +- `Plugins/EngineSettings.cs` (keys, owned-keys list), `UI/Data/SettingsData.cs` (Settings > Misc rows) +- `tools/ReloadInWorldGateTests` (new, 44 checks), `tools/EngineSettingsTests` (round trip, clamp, defaults) + +## Not verified + +No live client: the actual deferral in a running world, the chat line, and the Settings rows were not +exercised in game. diff --git a/Changelog/2026-10-18-sk-port-test-branch-2026.10.18.24.md b/Changelog/2026-10-18-sk-port-test-branch-2026.10.18.24.md deleted file mode 100644 index b0f23f5..0000000 --- a/Changelog/2026-10-18-sk-port-test-branch-2026.10.18.24.md +++ /dev/null @@ -1,34 +0,0 @@ -# sk: port of the SK test branch (RynthCore 2026.10.18.24) (2026-10-18) - -Previous `sk` push: 2026-10-16 (2026.10.15.8 hot push and the Display chrome port). - -One squashed commit puts everything on SK's test branch (`test/hotbuild-2026-10-16`, as merged onto -aelrynth `main` 2026.10.17.1) onto the standing `sk` branch, so it reaches rynth in PR #6 like the -rest of SK's work. It matches the 2026.10.18.24 test installer. - -## How it was merged - -- `sk` was first synced onto aelrynth `main` (2026.10.17.1; nothing dropped). -- The test branch was squash-merged on top. Where both changed the same lines, the test branch won - (its code is what testers ran). Changes only `sk` had were kept. -- The places where both sides had added the same feature in different spots were cut down to the - test branch's single copy: - - Settings > Display's Borderless Windowed and Remember Window Layout settings; - - the inventory title bar buttons, which are now the Vault button with a "more" menu; - - the first-login launcher test. -- The engine and every tool test build. - -## What it brings (details in each Changelog file) - -- **Inventory:** the Aelrynth Vault in the Classic and Modern looks (2026.10.18.14, .15). -- **Loot:** the "Add to loot profile" attribute checklist for all gear, pet essences and cantrip - tiers (2026.10.18.10). -- **Graphics:** low-memory safeguard (2026.10.18.11), the graphics settings panel and per-account - graphics (2026.10.18.1, .3). -- **Window placement:** borderless, multi-client and placement fixes (2026.10.17.x). -- **Chat:** coordinate links and the arrow; retail chat filters. -- **Launcher:** DXVK toggle, server list scrolling, prefs swap, updater when ahead of the feed. -- **Installer:** experimental plugins without their own `` get the release calver (no - more 1.0.0), plus the test installers' release notes. -- **Earlier fork work** the test branch carried since the 2026-10-04 SK merge, as listed under - `Changelog/`. diff --git a/Changelog/2026-10-18-vaulted-dungeons-setting.md b/Changelog/2026-10-18-vaulted-dungeons-setting.md new file mode 100644 index 0000000..e104fb5 --- /dev/null +++ b/Changelog/2026-10-18-vaulted-dungeons-setting.md @@ -0,0 +1,38 @@ +# Settings > Navigation: Vaulted Dungeons master switch + +Branch `feature/vaulted-setting`, from `integration/pr-fixes-2026-10-18`. Not deployed, not released. +Pairs with RynthSuite `feature/vaulted-dungeons` (the keeper itself). + +From SilentKelpie's RynthCore PR 6 (commit 3), the Vaulted Dungeons row only. The Display chrome and +the chat 0x1C part of that commit are already merged. + +## What + +- Settings > Navigation, section "Infinite Leaftide": **Vaulted Dungeons**, off by default. It is the + master switch of RynthILT's Vaulted Dungeons keeper (Infinite Leaftide / ACECustom only): off, the + keeper does nothing (no recalls, no `/rc quit`, no Mini Remote tab, a saved On or Auto Start ignored); + turning it off while it runs stops it at once. +- The setting is **RynthAi's** (`EnableVaultedDungeons` in the RynthAi profile, per character). The + engine keeps no copy: `RynthAiSettings.EnableVaultedDungeons` in `UI/Data/SettingsData.cs` is only + the mirror of RynthAi's settings payload, like every other row. RynthILT reads the switch from RynthAi + (`RynthAi.Hub` `VaultedDungeonsEnabled`), so there is exactly one source of truth. +- The mirror is nullable, as the Nav panel's switches are: a RynthAi that predates the setting omits it, + the row stays hidden, and a save sends `null`, which RynthAi leaves alone (his version used a plain + `bool`, which would have written `false` over the switch). + +## Left out of the PR + +- The rest of that commit (already merged, or separate decisions): Variable Power and Hitting the + Environment rows, the changelog notes, the installer version files. + +## Files + +- `src/RynthCore.Engine/UI/Data/SettingsData.cs` +- `tools/VaultedSettingTests` (new, 22 checks): the mirror's JSON (absent, false, true, case), the + Navigation row (one, a checkbox, hidden until RynthAi sends the value, reads Off by default, edits + only that property, tooltip). It loads the built engine assembly and reaches the internal types by + reflection (`SettingsData.cs` has no standalone compile seam). + +## Not verified + +No live client: the row in the Settings window, and the keeper's reaction to the switch (RynthSuite side). diff --git a/Changelog/2026-10-19-automated-system-text-in-system-tab-2026.10.18.30.md b/Changelog/2026-10-19-automated-system-text-in-system-tab-2026.10.18.30.md new file mode 100644 index 0000000..027b3ed --- /dev/null +++ b/Changelog/2026-10-19-automated-system-text-in-system-tab-2026.10.18.30.md @@ -0,0 +1,44 @@ +# Engine 2026.10.18.30: automated system text shows in the System tab only (2026-10-19) + +Previous release: 2026.10.18.29 (incoming chat queue for 25,000-line quest replies). Goes with +RynthChat 0.3.4. + +## Why + +RynthChat's All tab filled up with system text nobody typed or asked for: the server's login +messages, the `/myquests` and `/qb list` replies the plugins request on their own (thousands of +lines on an Infinite Leaftide character), and the login probes' replies. RynthChat records every +line, including the ones a plugin hides from the retail chat, so those showed under All too. + +## Changed + +- **Automated system text shows in System only.** A line RynthChat marks automated (`"auto"`) + and that no rule or standard filter placed is routed to the System tab and left out of All and + its own channel tab. RynthChat marks: + - `/myquests` and `/qb list` lines, whoever sent the command; + - the login burst: system text from entering the world until 30 s after login completes + (welcome, MOTD, house and allegiance notices, the plugins' login probes); admin tells + never count; + - any line a plugin ate. +- **The engine reports eaten lines to RynthChat.** After every plugin has seen a line, the chat + dispatch calls RynthChat's new `RynthChatNoteEaten` when a plugin ate it (one lookup per batch). + With an older RynthChat, the export is missing and nothing happens. +- **Setting:** Chat filters > Standard filters > "Automated system text shows in System only". + It is on by default, saved as `automatedToSystem` in `rynthchat_settings.json`; files without + it load as on. Changing it re-routes the kept lines. +- The rule editor's test box names the step "Automated" when it applies. + +## Tests + +- `tools/ChatHistoryBench` (22/22): 8 new checks. + - An automated line shows in System only, from any channel. + - An unmarked line still shows under All. + - With the setting off, automated lines show under All. + - A rule that moves the line still decides first. + - RynthChat's classifier and buffer: login-burst, admin-tell and eaten-line handling. + - The bench also gets the standard-filter stub it lacked, so it builds again. +- The checks caught a crash before release. The new RynthChat regex read a timeout field that is + declared further down the file, so it was still zero at startup and RynthChat failed to start. + It is fixed in RynthChat 0.3.4. +- ChatFilterTests 1329/1329, ChatHoldTests 46/46, ChatTellTests 59/59; ChatDiscordTests and + ChatCoordTests pass. diff --git a/Changelog/2026-10-19-incoming-chat-queue-25000-lines-2026.10.18.29.md b/Changelog/2026-10-19-incoming-chat-queue-25000-lines-2026.10.18.29.md new file mode 100644 index 0000000..9f25f60 --- /dev/null +++ b/Changelog/2026-10-19-incoming-chat-queue-25000-lines-2026.10.18.29.md @@ -0,0 +1,20 @@ +# Engine 2026.10.18.29: incoming chat queue sized for 25,000-line quest replies (2026-10-19) + +Previous release: 2026.10.18.25 (chat link probe). + +## Why + +On ACECustom, `/myquests` and `/qb list` print one chat line per quest flag. Infinite Leaftide +characters hold more than 15,000 flags, and the lists should cope with at least 25,000. The +plugins' incoming-chat queue (`PluginManager.MaxPendingIncomingChats`) held 4,096 lines and +dropped the oldest past that. A slow plugin pump during a 25,000-line burst would have lost the +head of the reply. + +## Changed + +- `MaxPendingIncomingChats` is 65,536. A queued line is a short string, so a full queue costs a + few MB. Drops are still counted and logged at most every 10 s ("incoming chat line(s) dropped + before plugins heard them"). + +Goes with RynthILT 0.2.22, RynthOracle 0.6.1 and RynthAi 0.5.91 (RynthSuite changelog +`2026-10-19-quest-lists-25000-flags-...`). diff --git a/Changelog/2026-10-19-items-prismatic-damage-type-2026.10.19.3.md b/Changelog/2026-10-19-items-prismatic-damage-type-2026.10.19.3.md new file mode 100644 index 0000000..902519d --- /dev/null +++ b/Changelog/2026-10-19-items-prismatic-damage-type-2026.10.19.3.md @@ -0,0 +1,13 @@ +# Engine 2026.10.19.3: Items panel Prismatic damage type (2026-10-19) + +Previous release: 2026.10.19.2 (the merged test branch over rynth's 2026.10.19.1). Goes with +RynthAi 0.5.93, which treats Prismatic as universal damage. + +## Changed + +- **Prismatic damage type.** Missile weapons and ammo on the Items panel can be set to + "Prismatic", universal damage. RynthAi resolves it per target to the weakest element, or the + Monsters rule's damage type. Other kinds keep the eight elements. + - It works in both the ImGui and Avalonia faces. + - The list is `ItemsCommands.MissileElements`, chosen by `ItemsCommands.ElementsFor(kind)`. +- **Its colour** is a light rose (`DamageTypeColors.Prismatic`). diff --git a/Changelog/2026-10-19-merge-rynth-main-2026.10.19.1-into-test.md b/Changelog/2026-10-19-merge-rynth-main-2026.10.19.1-into-test.md new file mode 100644 index 0000000..5495773 --- /dev/null +++ b/Changelog/2026-10-19-merge-rynth-main-2026.10.19.1-into-test.md @@ -0,0 +1,61 @@ +# Merge rynth main (2026.10.18.1 and 2026.10.19.1 snapshots) into the test branch (2026-10-19) + +Brings rynth's two newest release snapshots (aelrynth main `605ec6f` and `44074df`) into +`test/hotbuild-2026-10-16`, by way of `test/hotbuild-2026-10-16-on-aelrynth`. The owner asked for a +careful merge, keeping both sides' changes. The plain merge had 38 conflicting files (139 sections). + +## How it was merged + +- **Files rynth built on our published `sk` code (85% or more of it adopted).** These were merged + against `upstream/sk` as the base, so his edits land on top of ours. Eight files. +- **Every other file.** Resolved section by section against the true merge base. + +## Taken from rynth + +- **Plugin contract v87/v88.** `GetWieldedItems` (EquipmentTracker); managed plugins find their + shared dependencies in `Runtime\PluginShared`. +- **Settings and Skills.** + - `SkillsRouting`: the Skills bar icon shows only while Oracle can't host the Skills tabs. + - The Oracle Skills embed lifecycle (`OracleSkillsEmbed.Bind`, `NoteDrawn` and `Sweep`). + - The hardened Enl calculator data (lenient row converters, preformatted row text) and its + drawing ("Show all", narrow-panel scaling). +- **Chat.** `ChatRetailVerdict`, `SharedFileWatch` for the settings file, and his coordinate-link + helpers in `ChatCoords`. The standard filters "Damage you deal / take" keep their original meaning. +- **Inventory.** Rynth's header layout for the related-panel buttons: icons, or a "more" menu when + short. The Vault is never dropped. This applies to both looks. +- **Reload hold.** `HoldReloadInWorld` (opt-in, default off) and `HoldReloadInWorldMaxMinutes`, + his reworked `ReloadInWorldGate`, and its tests. +- **Display.** `RememberAcWindowPosition`: game-window placement split from panel layout, opt-in. + It is shown in Settings > Display as "Remember Game Window Position". +- **Release pipeline.** `Publish-Update.ps1` builds the plugins managed by default (collectible, so + a reload frees them), collects `PluginShared`, and passes `-PluginSharedDir` and `-RynthAiDll` + to the installer. + +## Kept from the test branch + +- **`AcWindowChrome`.** + - Ours is kept: Fills Monitor, Reset Window Borders, Save Window Position, a separate borderless + rect, and the Graphics profiles. + - Its placement save and restore now follow `RememberAcWindowPosition`. + - Rynth's threading rework (window changes posted to the game WndProc, `AcWindowChromePolicy`) + is not ported yet. Follow-up. +- **`BorderlessFillMonitor`.** Added back to rynth's `EngineSettings`. +- **The loader gate.** `RynthCoreMayHotReload` and `RequestManualReload` are kept, now under + `HoldReloadInWorld` in place of the removed `AllowInWorldAutoHotReload`. With the hold on, the + loader waits in the world for every reload, a hand reload too (a mid-session CoreCLR re-init can + still crash). With it off (the default), reloads go ahead mid-session, as upstream does. +- **ImGui bar.** Sense stays under RynthNav and Item Count / Mini Remote under Inventory. Skills + uses rynth's conditional icon. The ILT bar section stays removed. +- **Installer.** Our full-installer `Build-Installer.ps1`, with rynth's managed-RynthAi and + `PluginShared` staging ported into it. Our optional Decal bridge, versioned installer copy, the + `RynthLevistras` server plugin, and server plugins in the zip. +- **Automated chat to System.** `AutomatedToSystem`; the Enl calculator's "How to get" column and + vendor-rate editors; the Augmentations STILL NEEDED row. +- **Items.** Weapon damage-type tints are combined with rynth's move up / down buttons. + +## Tests + +- **All 59 `tools/*Tests` and benches pass.** +- **`PluginManifestTests`.** Our "v86 slot last" opening was dropped; rynth's slot counts include + his v87 slot. +- **`EngineSettingsTests`.** No longer prints the removed `AllowInWorldAutoHotReload`. diff --git a/Changelog/2026-10-19-rynthai-classic-look.md b/Changelog/2026-10-19-rynthai-classic-look.md new file mode 100644 index 0000000..0d6df3e --- /dev/null +++ b/Changelog/2026-10-19-rynthai-classic-look.md @@ -0,0 +1,56 @@ +# RynthAi dashboard: the Classic (retail) look + +Branch `feature/rynthai-classic`, from `status-export`. Pairs with RynthSuite +`feature/rynthai-classic-settings` (four VTank options on the settings bridge). + +Tom 2026-10-19: players asked for a VTank-style panel next to the dashboard; implement the +AC-style design as an option. Design: the RynthAi Classic canvas (claude.ai artifact +2VCb8Lk7vGjBfoX73PJKVL, "Classic" page). Our own layout and wording; the retail pictures are +the player's own `client_portal.dat`, read at runtime (RetailSprites), so nothing ships. + +## What + +- **A second look for the dashboard.** `RynthAiDashboardState.Classic` (line 14 of + rynthai_avalonia.cache, "classic|modern"; line 15 the open tab). Switched by the new Scroll + chip on the Modern title row, the Modern button on the Classic title bar, Settings > Display + > RynthAi Dashboard Look, and `/rc dashboard classic|modern|tab `. Modern stays the + default. The dashboard's size is kept and put back when switching back. +- **One retail window, eight tabs** (`ImGui/Panels/Classic/`): + - **Main**: every setting of VTank's options page (ranges, autostack/autocram, peace + mode and rebuff when idle, navigation/looting first, rare corpses only, fellowship, + dispel items/self, M. charges when off, pets), Stop/Start, Rebuff all/Cancel, the + settings profile, the five systems with a live line, and the recharge meters (retail + vitals bars) with the heal / restam / get-mana trigger to drag and the top-off mark. + - **Monsters**: the monster rules (Damage panel's source), weapon/damage/priority, + debuffs and spell shapes as gems, Add target, Remove. + - **Gear**: the Items lists (weapons with element, consumables with kind), add the + selected item, clean missing, shield and mana tapping. + - **Buffs**: buff profile, buffing on/off, every spell on you with its icon and time left. + - **Route**: route file, route type, the points with your distance to each, add/remove, + the overlay switches. + - **Loot**: looting on/off, the profile in use, the edited profile's rules (on/off, + move, copy, delete, add, save, reload). + - **Meta**: meta on/off, file, state, the rules grouped by state. + - **Tuning**: every Settings row, a tab at a time or searched; toggles, numbers, choices + and headers drawn retail, the special rows with the Settings panel's drawing. + Deep editing (loot conditions, meta rules, Damage-panel extras) opens the existing panel. +- **Settings**: four VTank options on the bridge (`UseDispelItems`, `AutoFellowMgmt`, + `MChargesWhenOff`, `CustomPetRange`), nullable like EnableVaultedDungeons: hidden (dimmed + on the Main tab) until a RynthAi that sends them. +- Minimized (the dashboard's shared flag) shows the title bar over the systems, Stop/Start + and the three vitals meters. + +## Tested + +Local ACE test client (Buffi, +Buffi @ ACEmulator) on a test runtime: every tab drawn with +the retail art, the window kept on the screen when a tab is taller, settings both ways +(RynthAi `/mt opt set usedispelitems true` showed on the Main tab; the profile on disk +followed). + +## Files + +- `src/RynthCore.Engine/ImGui/Panels/Classic/*` (new) +- `src/RynthCore.Engine/ImGui/Panels/RynthAiFace.cs` (switch, Scroll chip) +- `src/RynthCore.Engine/UI/RynthAiDashboardState.cs` (Classic, ClassicTab) +- `src/RynthCore.Engine/UI/Data/SettingsData.cs` (Dashboard Look row, the four options) +- `src/RynthCore.Engine/Compatibility/RynthCoreChatCommands.cs` (`/rc dashboard`) diff --git a/Changelog/2026-10-19-sk-chat-settings.md b/Changelog/2026-10-19-sk-chat-settings.md new file mode 100644 index 0000000..879f30d --- /dev/null +++ b/Changelog/2026-10-19-sk-chat-settings.md @@ -0,0 +1,56 @@ +# Silentkelpie PR 6, commit 7: engine settings, chat, Modern vault, launcher picker + +Branch `feature/sk2-chat`, from `integration/pr-fixes-2026-10-18`. Not deployed, not released. + +From SilentKelpie's RynthCore PR 6 (commit 7, "port SK test branch (2026.10.18.24) onto sk"). That commit +is a squash against his base, so it was taken piece by piece and adapted; none of its hunks that roll back +our newer code were taken (plugin API comments, display chrome, DatFileShareHooks, InventoryTitleLayout, +bar restructure, Skills embed, updater floor, installer / launcher DXVK). + +## What + +- **engine.json saves only the keys this client changed.** Every client kept the whole settings in memory + and wrote them all back, so a client that never touched a setting put its stale value over another + client's change (a Display option set in one client came back in all of them). `Save(key)` records the + key and `EngineSettingsFile.Merge` takes only those from the engine; every other key keeps what the file + holds. A changed key back at its default is still left out (removed); a missing file still gets the whole + settings. Redone against our key set (TransitionGate, HoldReloadInWorld(+MaxMinutes), + RememberAcWindowPosition, AutoIdMode, ...); his BorderlessFillMonitor key is not here. +- **Map coordinates in chat are underlined links** (hover: hand and tooltip). Click points RynthNav's arrow + there, Ctrl+click walks there; a drag still selects and copies, right-click keeps the line menu. +- **Lines a chat filter hides stay out of AC's own chat window too.** The engine runs RynthChat's Hide rules + and ticked standard filters on a held line before its verdict (`ChatModel.ShouldHideInRetail`, + `ChatRetailVerdict`); a moved or copied line still prints in AC. Option under Standard filters, on by + default (`hideInRetail`). The plugin pump's incoming chat queue holds 4096 lines (was 256) and logs drops. +- **RynthChat re-reads `rynthchat_settings.json` when another client saved it** (`SharedFileWatch`, every + 2 s): rules, standard filters, tabs and display options follow, this client's own saves are skipped, its + selected tab is kept. +- **Modern Inventory has the Aelrynth Vault**: a chest button beside the Classic button, the vault in place + of the grid, caption, Refresh, right-click Withdraw. The header positions are now `InventoryHeaderLayout`; + the Vault takes its room first and is never dropped. +- **Launcher**: a Known server picker in the Server Profile dialog (17 servers) and the Launcher tab scroll + fix (the profile cards no longer push Updates and Launch Targets out of reach). + +## Left out + +- The low-memory safeguard (turn Adaptive degrade on after an early address-space shortage): it is a part + of his graphics profile code (AcGraphics, AcGraphicsPrefs, graphics.json, the launcher writing the + profile into UserPreferences.ini), which is not taken. +- In his chat/PluginManager hunks: the EngineStatusMetrics call, the MemoryUse.Mark removal, "v85" -> + "v81" comment edits and the ServerPlugins wording (rollbacks). +- His Classic title-bar "more" menu, and the DXVK toggle in the launcher. + +## Files + +- `src/RynthCore.Engine/Plugins/EngineSettings.cs`, `EngineSettingsFile.cs` +- `src/RynthCore.Engine/ImGui/Panels/ChatFace.cs`, `ChatFiltersFace.cs`, `InventoryFace.cs`, `InventoryFace.Classic.cs` +- `src/RynthCore.Engine/UI/Data/ChatCoords.cs`, `ChatData.cs`, `ChatSettingsDto.cs`, `ChatRetailVerdict.cs` (new), `SharedFileWatch.cs` (new) +- `src/RynthCore.Engine/UI/InventoryTitleLayout.cs`, `Plugins/PluginManager.cs` +- `src/RynthCore.App/KnownServerCatalog.cs` (new), `src/RynthCore.App.Avalonia/` (ServerProfileDialog, MainWindow, csproj) +- Tests: `tools/EngineSettingsTests`, `ChatCoordTests`, `ChatFilterTests`, `BarDeclutterTests`, `LauncherSettingsTests` + +## Not verified + +No live client: the underlined links and clicks, the retail-chat hide and the 4096 queue under a real burst, +the settings re-read between two running clients, the Modern vault button and grid (needs an Aelrynth +character), the launcher dialog and scroll. diff --git a/Changelog/2026-10-19-sk-loot-combat.md b/Changelog/2026-10-19-sk-loot-combat.md new file mode 100644 index 0000000..861d458 --- /dev/null +++ b/Changelog/2026-10-19-sk-loot-combat.md @@ -0,0 +1,53 @@ +# Add-to-loot attribute checklist, Variable Power, Hitting the Environment and Kite rows + +Branch `feature/sk2-loot-combat`, from `integration/pr-fixes-2026-10-18`. Not deployed, not released. +Pairs with RynthSuite `feature/sk2-loot-combat` (RynthAi's side of all of it). + +From SilentKelpie's RynthCore PR 6 (commit 7, and the Settings rows of commit 6), adapted. + +## What + +- **Add to loot profile, attribute checklist** (`ImGui/Panels/LootAddDialog.cs`, `UI/Data/LootEditData.cs`). + The popup lists every attribute the item has, grouped (Item, Weapon / Armor, Ratings, Spells, Pet + essence, T11, Requirements). Tick a row to require it, pick `>=`, `=`, `<=` (spells: or better / + exact / any tier) and type a value. The popup is wider with the list. "Items like this" pre-ticks what + it always required. + - Wire: the ask carries `Choices` (one per row the player changed, null until then) and the draft + carries `AttributesSupported` and `Attributes`. These are the DTO mirrors of RynthSuite's + `LootEditWire`. + - **Fallback:** a RynthAi without the checklist never sets `AttributesSupported`, so the popup keeps + its single "Include T11 attributes" box and nothing else changes. An older engine against the new + RynthAi never sends `Choices`, and RynthAi then builds exactly what it built before. +- **Settings > Melee Combat:** "Variable Power (monster rules)" (Variable Min % / Max %), "Hitting the + Environment" (Missile Response, Hits to trip, Window, Move closer by, Closest, Skip target) and + "Pull Away (Kite)" (Pull Distance, Tag Before Fleeing). **Settings > Spell Combat:** "Hitting the + Environment" (Magic Response). +- **Damage panel, a monster's detail:** a "Power" combo (Default, High, Reckless, Variable, + Reckless + Variable) and a "Kite" combo (Default, Off, PullAway). A new rule copied from the DEFAULT line + follows it; one copied from a name rule keeps that rule's choices. + +## Defaults + +Nothing changes until a player turns it on: every response is Off, every rule's Power and Kite are +Default (Default Power is the global Power settings, Default Kite on the DEFAULT line is Off). + +## Compatibility + +- The new RynthAi settings are **nullable mirrors** in `RynthAiSettings`, like the Vaulted Dungeons + switch: a RynthAi that predates them omits them, the rows (and their section headers) stay hidden, + and a save sends `null`, which RynthAi leaves alone. His version used plain ints and a bool, which + would have written the engine's defaults over a RynthAi that did not have them. +- `Combo` rows gained an optional `when:` like the other kinds (needed to hide Missile / Magic Response). +- An older RynthAi ignores the Rule's new `AttackPower` and `Kite` fields. + +## Not taken + +The rest of that commit: the ring run-away and its engine side are decided separately; the chat, display +and EngineSettings pieces are on other branches. + +## Tests + +- `tools/CombatSettingsTests` (new): the mirrors, the rows' visibility and ranges, the schema defaults, + the Power / Kite spellings and the rule's change detection. +- `tools/LootAddWireTests` (new): the popup's DTOs against what RynthAi's `LootEditWire` writes and + reads, and the older-RynthAi fallback. diff --git a/Changelog/2026-10-19-skills-aug-still-needed-sigil-how-to-get-2026.10.18.31.md b/Changelog/2026-10-19-skills-aug-still-needed-sigil-how-to-get-2026.10.18.31.md new file mode 100644 index 0000000..b76155e --- /dev/null +++ b/Changelog/2026-10-19-skills-aug-still-needed-sigil-how-to-get-2026.10.18.31.md @@ -0,0 +1,20 @@ +# Engine 2026.10.18.31: Skills panel shows luminance still needed and how to get chain items (2026-10-19) + +Previous release: 2026.10.18.30 (automated system text in the System tab). Goes with RynthILT 0.2.23. + +## Changed (Skills panel, Progression tab) + +- **Augmentations:** + - A STILL NEEDED row under TOTALS: the luminance still needed after banked and character + luminance, and the e-coins short. It is green when nothing is left. + - The line under the table that shows the subtraction. +- **Enlightenment, "Still need / have" and "Sigil craft chain":** + - A "How to get" column (dim, wrapped) with RynthILT's recipe or vendor trade for each row. + - With an older RynthILT, the chain keeps its "craft" marker and the materials table keeps three columns. +- **Vendor rates** under the chain: Extracts per Ascension Coin, and the Trophy trade (extracts + and Trophies). They are sent as `prog extractsperasc` / `trophyextracts` / `trophycount` and + shown only when RynthILT reports them. +- `ProgressionData`: + - `AugPlanner`: `stillLum`, `stillCoins`, `stillLine`. + - `EnlPlanner`: `extractsPerAsc`, `trophyExtracts`, `trophyCount` (-1 when absent). + - `EnlMaterialRow` and `EnlChainRow`: `how`. diff --git a/Changelog/2026-10-23-chat-filter-slow-rules-retry-2026.10.20.11.md b/Changelog/2026-10-23-chat-filter-slow-rules-retry-2026.10.20.11.md new file mode 100644 index 0000000..f614967 --- /dev/null +++ b/Changelog/2026-10-23-chat-filter-slow-rules-retry-2026.10.20.11.md @@ -0,0 +1,30 @@ +# Engine 2026.10.20.11: chat filter rules no longer switch off for good on long sessions + +## Fixed + +- Silentkelpie, about 48 hours into one session: the chat filter had "stopped working". Its rules + were being switched off one by one: "ChatModel: rule "^\[RynthNet] Silentstorm connected\.$" is + too slow (a match took over 15 ms) and is skipped until edited." That pattern takes + microseconds. The 15 ms regex timeout is wall-clock time, so a pause of the whole thread during + an easy match (a garbage collection, other processes scheduled in on a machine running several + clients) threw it, and the rule stayed off until someone edited it. Over days, rule after rule + went off. (The skip was never saved, so a restart brought them back, which is why it only + showed on long sessions.) + +## Changed + +- A rule match (and the "colour the match" scan) that times out is run once more before the rule + is judged slow: a pause doesn't repeat, a slow pattern does. +- A rule judged slow is skipped for 10 minutes and then tried again on its own; each further + strike doubles the wait (20, 40 minutes ...), at most 4 hours. Editing the pattern still clears + it at once. The log says when it is skipped (and for how long) and when it is tried again. +- The filter editor's status and test box say so ("skipped for a while ... tried again on its own"). +- Unchanged: the per-pass budget for genuinely slow rules (100 ms per 500 kept lines), which + already caps one reading at 30 ms so a single pause can't condemn a rule there. + +## Tests + +- tools/ChatFilterTests: "slow rules: a second chance, and tried again later" (the strike waits; + an easy rule matches; a pattern that always times out fails twice; the router skips a slow rule + and tries it again after its wait, then waits 20 minutes after a second strike; an edit clears + it; an easy rule hides its line again once tried again). 1484/1484 checks passed. diff --git a/Changelog/2026-10-24-chat-command-replies-in-typed-tab-2026.10.20.14.md b/Changelog/2026-10-24-chat-command-replies-in-typed-tab-2026.10.20.14.md new file mode 100644 index 0000000..37e5b73 --- /dev/null +++ b/Changelog/2026-10-24-chat-command-replies-in-typed-tab-2026.10.20.14.md @@ -0,0 +1,49 @@ +# Engine 2026.10.20.14: a command's reply shows in the RynthChat tab you typed it in + +Previous release: 2026.10.20.13. + +## Fixed + +- Silentkelpie: `/fship` and other server commands typed in RynthChat's box "don't show up" + in RynthChat. AC's own chat showed them. Nothing was lost or filtered: + - The server's reply to a command is system text (ACE's `ChatMessageType.Broadcast`, type 0), + so RynthChat files it under System, which shows only in the All and System tabs. The + seven `[FSHIP]: use /fship ...` lines were in All the whole time. + - The window was on another tab. + + How this was checked, so the same report can be ruled out quickly next time: + - This PC's rules and standard filters run through the engine's real router leave the + `[FSHIP]` lines in All and System. + - RynthChat's chat log showed all seven lines arriving at 09:42:53. + - No plugin eats them. + +## Changed + +- **A command's reply follows you** (`UI/Data/ChatReplyTab.cs`). When you send a slash or + `@` command from RynthChat's box, the tab you're on is marked for 5 s. The System lines (the + server's replies) and Rynth lines (plugin replies) that arrive in that time also show in + that tab, as well as in All and System. The mark is kept on the line itself + (`ChatLine.ReplyTab`, checked in `ChatModel.LineInTab`), so a re-route pass after a rule edit + keeps it. A rule that hides the line still hides it everywhere. +- Not for chat: `/say`, `/tell`, `/reply`, `/retell`, `/f`, `/a`, emotes and the channel + commands already land in Chat or a channel tab. Not for commands typed in All, which shows + everything. Not for automated lines (a plugin's own polls, the login burst). Not for other + channels, so combat in those seconds stays where it was. + +## Tests + +- `tools/ChatFilterTests`: "command replies: shown in the tab the command was typed in" covers: + - which commands count (`/fship`, `/bank d p 10k`, `@help` do; `/tell`, `/f`, `/a`, plain + text and a lone `/` don't); + - System and Rynth replies follow to the tab, and combat lines don't; + - automated lines aren't copied, and the 5 s window ends; + - typing in All or System marks nothing extra; + - a `/tell` marks nothing. + 1665/1665 checks passed. +- The engine and `tools/ChatHistoryBench` build with no new warnings. + +## Install + +Not hot deployed. Every engine hot reload since at least 2026-10-21 closes the running clients +(see the 2026.10.20.13 notes), so this needs the clients closed first, then +`scripts\Publish-EngineCoreClr.ps1 -EngineOnly -MsBuildArgs '-p:Version=2026.10.20.14' -AllowBehind`. diff --git a/Changelog/2026-10-24-chat-history-automated-budget-2026.10.20.18.md b/Changelog/2026-10-24-chat-history-automated-budget-2026.10.20.18.md new file mode 100644 index 0000000..0ec5599 --- /dev/null +++ b/Changelog/2026-10-24-chat-history-automated-budget-2026.10.20.18.md @@ -0,0 +1,25 @@ +# RynthChat: /myquests replies no longer wipe the chat history (2026.10.20.18) + +## Symptom +Every so often the chat looked reset: older lines under All vanished at once +(noticed around banking, but unrelated to it). + +## Cause +RynthAi's Meta Manager polls `/myquests` about every ten minutes. On a +well-played character the reply is about 2,200 lines (Silentkelpie's flight +dump of 21:51:29 shows bursts at 21:40:41 and 21:50:49). Those lines are +marked automated and shown only in the System tab, but they counted against +the same 2,000-line "Chat history" as everything else, so each reply pushed +every line under All out of the history. + +## Fix +- `ChatHistory.Keep` / `Merge(..., extra)`: automated lines (ChatLine.Automated: + /myquests and /qb replies, the login burst, lines a plugin ate) are kept on + their own budget of the same length; ordinary lines keep the full setting. + Order is kept. Worst case memory is twice the setting (about 3.6 MB at 2,000). +- `ChatSource`: the merge and the trim use it. +- `ChatFace.DropGone`: removes any shown line the source no longer keeps (from + the middle as well as the top), keeping the view in place while scrolled up. + +RynthChat's own ring (the plugin) still holds the newest lines of both kinds; +the engine reads it ten times a second, so it only matters on a bind or reload. diff --git a/Changelog/2026-10-24-chat-scroll-follow-and-keep-place-2026.10.20.18.md b/Changelog/2026-10-24-chat-scroll-follow-and-keep-place-2026.10.20.18.md new file mode 100644 index 0000000..a1e13c4 --- /dev/null +++ b/Changelog/2026-10-24-chat-scroll-follow-and-keep-place-2026.10.20.18.md @@ -0,0 +1,31 @@ +# RynthChat: following the newest line and keeping your place when scrolled up + +Reported: the chat "auto-scrolled to the top" instead of following the bottom, and a manual +scroll didn't keep its place: it skipped back to the top or the bottom. + +Seen live (2026-10-24): following stopped by itself as soon as the mouse rested over the chat, +without any wheel or click, and from then on the view crept up as a full buffer dropped its +oldest lines, until it sat at the top showing ten-minute-old lines. + +## Cause + +`ChatFace.DrawLines` decided "the player scrolled" from any change of the list's scroll between +frames, and also only moved the view itself when lines dropped off the top. Any scroll change +the player didn't make (a hover or focus change, a re-measure, ImGui clamping the scroll to new +content) therefore turned following off, or moved the view the player was reading. + +## Fix + +- Only the player moves the list: the wheel over it, a press on its scrollbar (held until the + button comes up), or a drag-select past its edges. Only those turn following off (wheel up, or + leaving the bottom) or back on (back at the bottom). +- Following: the view is put at the bottom every frame unless the player is scrolling. +- Not following: the view is put back where the player left it every frame, moved only by how + much the lines above it changed (dropped from a full buffer, re-measured after a resize or a + rule change), so nothing else can move it. +- Kept: the place is kept across a route rebuild (another client's settings, a rule edit) by + the line at the top of the view. + +## Files + +- `src/RynthCore.Engine/ImGui/Panels/ChatFace.cs` diff --git a/Changelog/2026-10-24-chat-settings-safe-saves-per-character-layout-2026.10.20.13.md b/Changelog/2026-10-24-chat-settings-safe-saves-per-character-layout-2026.10.20.13.md new file mode 100644 index 0000000..76d262d --- /dev/null +++ b/Changelog/2026-10-24-chat-settings-safe-saves-per-character-layout-2026.10.20.13.md @@ -0,0 +1,88 @@ +# Engine 2026.10.20.13: chat filters stop getting lost; each character keeps its own window layout + +Previous release: 2026.10.20.12, this change's first hot deploy, which was missing a log line. +Before that: 2026.10.20.11. + +## Fixed + +- Silentkelpie, running five clients: RynthChat "keeps losing" its filters, they "stop working", + and the chat window resets. The RynthChat plugin wasn't the cause. Every client on the machine + shares two files, and each wrote its whole state over the other clients': + - **Chat rules and standard filters** (`%AppData%\RynthCore\rynthchat_settings.json`). A client + re-read the file only while its chat window was open. A client with chat closed kept old rules + in memory and wrote them back at its next save, even from a tab click. Every other client then + reloaded that old copy, and each standard filter the file didn't list went off. On 2026-10-24 + between 08:43 and 08:46 one client saved 15 times and the four others reloaded every one. + - **Window positions** (`%LocalAppData%\RynthCore\panel_state.txt`, one `panel.Chat` row for + every client). A client read it at start and on an engine reload, then rewrote all of it on any + window move, open or close. So a client's chat window came back wherever the client that saved + last had its own, or closed. The file was also rewritten in place, so a client dying mid-write + could leave it cut off. + +## Changed + +- **Chat settings are checked all the time.** The engine's UI step (`UiDataHub`) now checks the + shared file every step, throttled to a timestamp check every 2 s, whether or not the chat window + is open. Before, only the chat window's data source did, while it was subscribed. +- **A save merges instead of overwriting** (`UI/Data/ChatSettingsMerge.cs`). When another client + changed the file since this client's base (what its settings in memory came from), each + top-level setting is decided on its own: + - a setting this client changed is saved from this client; + - a setting this client left alone keeps the file's value; + - a setting only the other client wrote is kept. + The client then picks up the merged result itself. A file that can't be read, or a merge that + doesn't load back, leaves the save as it was. The rule list and the standard filters are each + one setting, so if two clients edit rules at the same moment, the later save's list still wins. + The base is taken when the save is asked for, not when it is written, so a reload in between + can't make older settings look current. A merged result is applied only if no newer save has + been asked for since. +- **A tab click no longer saves.** The selected tab is this client's own; it is written with the + client's next real change and ignored by the others, as before. +- **Window layout is per character** (`UI/PanelStatePath.cs`, `UI/PanelStateStore.cs`). + `panel_state...txt` comes from this process's launch context + (`ServerName`, `TargetCharacter`). A character's first run starts from the shared + `panel_state.txt`, and its saves then go to its own file. A client started outside the launcher + still uses the shared file. Saves are written to a temp file and swapped in. +- **The log says which layout file is in use**, at the first save. In 2026.10.20.12 this line was + written at load, which runs during engine start before the log is up, so it never appeared; + 2026.10.20.13 moves it to the first save. + +## Tests + +- `tools/ChatFilterTests`: "settings merge: a save never undoes another client's rules" covers: + - a stale client changing only its font and tab keeps the other client's new rule and preset change; + - a client editing rules keeps its edit, and the other client's font stays; + - a setting only the other client wrote is kept, and one this client removed stays removed; + - no base, no file, a broken file, or nobody else saving all leave this client's text as is. + 1648/1648 checks passed. +- `tools/PanelStateTests` (new): file names from the server and character, with unsafe and + non-ASCII characters as `_`, long names cut, and case not making a second file. The shared name + is used when the character is unknown. The launch context is read, including broken, missing + and non-string values. 16/16 checks passed. +- The engine builds (`-c Release -p:EngineHost=coreclr`) with no new warnings. + +## Install + +Hot deployed with `scripts\Publish-EngineCoreClr.ps1 -EngineOnly -MsBuildArgs +'-p:Version=2026.10.20.13' -AllowBehind`. `-AllowBehind` is needed because this checkout has no +`status-export` branch for the script's safety check; it holds everything the live +2026.10.20.11 engine was built from. + +**Hot reload closed every running client, both times.** On each deploy, each client loaded the +new engine generation, logged `[loader] Hooks: 2 patch(es) applied in one freeze`, and its +process ended within a second: +- the .12 deploy: the five clients that were running (Silentkelpie's at 09:07:51, after waiting + for its fight to end); +- the .13 deploy: the five clients relaunched at 09:07. + +This is not from this change. Every hot reload in the logs since at least 2026-10-21 ends the +same way, including the 2026.10.20.11 deploy at 13:59 on 2026-10-23. The five clients started +fresh at 09:12 run 2026.10.20.13. Until the hot reload is fixed, deploy the engine with the +clients closed. + +After the 2026.10.20.12 deploy, four characters made their own layout files within two minutes, +each started from the shared layout: +`panel_state.aelrynth.sk.txt`, `panel_state.infiniteleaftide.silentstorm.txt`, +`panel_state.infiniteleaftide.silent_pack.txt` and +`panel_state.infiniteleaftide.slient_hoooooooe.txt`. Silentkelpie makes its own at its first +window save. The shared `panel_state.txt` is no longer written by launcher-started clients. diff --git a/Changelog/2026-10-24-inventory-filter-like-this.md b/Changelog/2026-10-24-inventory-filter-like-this.md new file mode 100644 index 0000000..4225510 --- /dev/null +++ b/Changelog/2026-10-24-inventory-filter-like-this.md @@ -0,0 +1,48 @@ +# Inventory: filter like this, and find like this in Global Inventory + +Two new lines in the Inventory panel's right-click menu, under "Add to loot profile...": + +- **Filter inventory like this...** opens the Add to loot profile popup in a filter mode: the + same Match choice (default "Items like this") and the same attribute checklist, but no + profile, action or name. **Filter** asks RynthAi to judge every item you carry and wear with + that rule (its looter's own evaluator), and the list shows only the matches. + - A bar under the tools row names the filter (hover: its conditions), offers + **Identify N** when some items can't be judged until identified, and clears it (X). + - The panel asks RynthAi again every 2 s while it shows (find_refresh), so new loot and + finished identifies show up; RynthAi only answers when the result changed. + - Clearing filters, closing the Classic tools row or hiding the panel clears it. In Classic + the bar is in the tools row, which opens when the filter is applied. +- **Find like this in Global Inventory...** (enabled when RynthInventory is loaded) uses the + same popup; **Search** sends the rule to RynthInventory as `/ginv like `, which opens + Global Inventory filtered to every character's matching items. + +Needs the matching RynthSuite (RynthAi item_find / find_refresh / find_close, RynthInventory +0.1.5). An older RynthAi gets a "too old" note in the popup. + +## Files + +- `ImGui/Panels/LootAddDialog.cs`: `LootAddMode` (AddRule, FilterInventory, FilterGlobal), + FilterBody, item_find and its answer (TakeFind), `NextSeq`. +- `ImGui/Panels/InventoryFace.LikeFilter.cs` (new): the filter state, refreshes and the bar. +- `ImGui/Panels/InventoryFace.cs`, `InventoryFace.Classic.cs`: menu lines, the list filter, the bar. +- `UI/Data/LootEditData.cs`: request Find / Scope / Candidates, draft Find, `LootEditItemFindDto`, + state ItemFind (mirrors LootSdk LootEditWire). + +## Follow-up: checklist filters and spell lists + +- **The Inventory panel's filter button** (the list-check icon in the tools row) now opens the + same checklist popup with no item: every attribute a loot rule can test, unticked, with a + value to fill in (named values such as material, skill, slayer, class pick from a list). + Filter judges your items the same way as "Filter inventory like this". The old rule list + editor no longer hides items (its saved rules are left in the settings file). +- **Global Inventory** gets the same checklist ("Attribute filter +" next to the search box): + one group open at a time, a ticked row shows its comparison and value; the search filters + every character's saved items as you tick. +- **Spell lists** in every checklist (Add to loot profile, both filters, Global Inventory): + - Add spell: Creature, Life or Item, a family from the spell table (buffs only: no debuffs, + war or void), a level I to VIII; "or better" by default (exact / any tier in its row). + Levels VII and VIII have their own names ("Might of the Lugians", "Incantation of Strength + Self"), so the rule lists the family's spells by name; Self and Other both count. + - Add cantrip: Minor, Major, Epic, Legendary or Paragon and a cantrip name. + - Cantrip "or better" and the tier counts now include Paragon ("Paragon" or "Paragon's"). +- Named values on an item's rows (material, wield skill...) can be changed from a list. diff --git a/Changelog/2026-10-25-inventory-add-to-damage-weapons-2026.10.20.19.md b/Changelog/2026-10-25-inventory-add-to-damage-weapons-2026.10.20.19.md new file mode 100644 index 0000000..bd4c71d --- /dev/null +++ b/Changelog/2026-10-25-inventory-add-to-damage-weapons-2026.10.20.19.md @@ -0,0 +1,14 @@ +# Inventory right-click: Add to Damage panel weapons (2026.10.20.19) + +Right-click a weapon, wand or shield in the Inventory panel and choose +**Add to Damage panel weapons**. It joins RynthAi's weapons list (Items), which is +what the Damage panel offers per monster and what combat may use. A shield goes in +as an off-hand item. RynthAi says in chat whether it was added or is already +listed (and refuses anything that is not a weapon, wand or shield). + +- RynthAi: `RynthPluginAddWeaponById(uint id)`; `LegacyWeaponsUi.AddWeapon(id)` is + the old Add Selected logic without needing the item selected first (Add Selected + now calls it). Saves the settings. +- Engine: `ItemsCommands.AddWeapon(id)` (refreshes the Items and Damage views); + the menu entry shows for items whose type is melee, missile or caster, or that + go in the shield slot. With a RynthAi that lacks the export, the click is logged. diff --git a/Changelog/2026-10-26-plugin-windows-keep-their-spot-per-character-api-91.md b/Changelog/2026-10-26-plugin-windows-keep-their-spot-per-character-api-91.md new file mode 100644 index 0000000..e4edf1b --- /dev/null +++ b/Changelog/2026-10-26-plugin-windows-keep-their-spot-per-character-api-91.md @@ -0,0 +1,23 @@ +# Plugin windows keep their spot per character (plugin API v91) + +Floating windows that plugins draw themselves (the Item HUD, the Mini Remote, the +Nav HUD, RynthAi's legacy settings windows, ub-Rythai's windows, RynthILT's pages, +the server packs' server window) kept their spot and size only in imgui.ini. Every +running client shares that one file and rewrites all of it, so a window moved or +resized in one client came back where another client's next save had it. + +The engine now keeps those spots per character, the way its own panels already +were: `%LocalAppData%\RynthCore\window_state...txt`, one line +per window (`=x,y,width,height`). A window is saved when the player lets go +of the mouse after moving or resizing it; moves the code makes are not saved. + +- Engine: `UI/WindowPlacementStore.cs`; API v91 `GetWindowPlacement` / + `SetWindowPlacement` (`Plugins/WindowPlacementApi.cs`). SDK: + `RynthCoreHost.HasWindowPlacements`, `TryGetWindowPlacement`, `SetWindowPlacement`. +- Plugins: one shared control, `RynthSuite/Plugins/Shared/SavedWindow.cs` (linked + source). The plugin sets `SavedWindow.Host` at start; each window calls `Apply()` + right before `ImGui.Begin` and `Track()` inside it. +- RynthAi: the Item HUD and Mini Remote placement fields added to huds.json on + 2026-10-26 are gone (the shared control replaces them); place those two windows + once more after updating. +- On an engine older than v91 the windows behave as before (imgui.ini). diff --git a/Changelog/2026-11-07-bar-menu.md b/Changelog/2026-11-07-bar-menu.md new file mode 100644 index 0000000..7fc6211 --- /dev/null +++ b/Changelog/2026-11-07-bar-menu.md @@ -0,0 +1,46 @@ +# Bar icon dropdown: plugin API v95 + +Branch `pr/bar-menu`, from `pr/web-panel` (web panel, v94). Not deployed. The API number 95 is provisional, as +94 is (unmerged upstream branches also use these numbers; whichever merges second renumbers). The manifest is parsed here; the bar draws it (below). + +## What changed + +- A plugin window in the sections manifest (`windows`, with `"bar": true`) may declare `"barMenu"`: up to 6 items of + `{ "id", "tooltip", "icon", "command" }`. `SectionManifest.cs` parses it into `SectionWindowDecl.BarMenu` + (`SectionBarMenuItem` records; `Menu` is the never-null view). +- Validation, with the window always kept: the id is a short lower-case word and unique in the menu, the tooltip is + non-empty and capped at 48 characters, the command is a single `/...` chat command (the same rule as a contribution's), + the icon is one Phosphor glyph or empty (an icon that is not a glyph is kept as an empty icon, and the bar draws the tooltip's first letter). An item with a bad id, tooltip or command is dropped; items past + `MaxBarMenuItems` (6) are ignored; a `barMenu` that is not an array is ignored. +- `PluginContractVersion.Current` and the SDK's `RynthCoreSdkApiVersion` (`RynthCore.PluginSdk.targets`) go to 95. + No function table change. Engines before v95 ignore the key, so a plugin can declare it unconditionally. + +## Tests + +`tools/SectionsTests`: + +- `ManifestBarMenu`: valid items in order with exact fields, rejected commands (no slash, a line break, over-long), + empty id, duplicate id, empty tooltip, empty icon kept, 20 items capped to 6, a non-array `barMenu`, no key, and the + 48-character tooltip cap. +- `BarMenuHoverTiming`: the 0.15 s open delay, a quick sweep never opening, the 0.30 s close delay covering the gap + from icon to dropdown, switching to another icon at once, no reopen while still hovering after a click, and a + clock jump or a gap over 0.5 s resetting. +- `BarMenuReload`: a change to only `barMenu` leaves the panel signature alone (no re-registration) and changes the + menu signature (so the bar rebuilds). + +`tools/PluginManifestTests` pins the SDK and engine numbers together, and that `PluginContractVersion.BarMenu` is at or +below `Current`. + +Not yet tested in game. + +## The dropdown + +- Hovering a plugin window's bar icon for 0.15 s drops a column of icon buttons flush below it (flush above when it would + cross the bottom of the screen; clamped sideways). It stays while the mouse is over the icon or the column, and for + 0.30 s after it leaves both. Another icon's dropdown replaces it at once. Clicking an item runs its command as a player + chat command (the hotkey path) and closes the dropdown. The icon's own click still toggles the window. +- A plugin reload that changes only `barMenu` reaches the bar: `PluginWindows.Sync` refreshes the hosted declaration + (`WindowPlan.MenuSignature`) without re-registering the panel, and bumps the version so the bar rebuilds its buttons. +- The dropdown is brought to the display front every frame (cimgui `igBringWindowToDisplayFront`, no focus change), so a + panel focused since does not cover it; without those exports it keeps its normal order and logs once. +- Timing is `ImGui/BarMenuHover.cs` (pure; `SectionsTests` `BarMenuHoverTiming`). Drawing is in-game only. diff --git a/Changelog/2026-11-07-web-panel.md b/Changelog/2026-11-07-web-panel.md new file mode 100644 index 0000000..8f1ba86 --- /dev/null +++ b/Changelog/2026-11-07-web-panel.md @@ -0,0 +1,44 @@ +# In-game web panel: plugin API v94 + +Branch `pr/web-panel`, from upstream `main` c68204f (release 2026.11.8.1). Not deployed. The API number 94 +follows upstream's v93 (GetMonsterHealth) and is provisional (unmerged upstream branches also use 94; whichever +merges second renumbers). CoreCLR engine only. + +## What changed + +- Four new function slots at the end of the plugin API table (`WebPanelOpenFn`, `WebPanelNavigateFn`, + `WebPanelCloseFn`, `WebPanelGetStateFn`), and SDK wrappers on `RynthCoreHost`: `HasWebPanel`, + `OpenWebPanel(WebPanelOptions)`, `NavigateWebPanel`, `CloseWebPanel`, `GetWebPanelState`. Types are in + `RynthCore.PluginSdk/WebPanelTypes.cs`. No call blocks its caller. +- `WebPanel/WebPanelHost.cs` (engine): one WebView2 panel over the game window, on its own STA thread, with an + unowned popup window, a caption bar with a close box, a remembered size and place, and Escape / Alt+F4 / `X` to close. +- Navigation allowlist (`WebPanelUrlPolicy`): https only, default port, no user info, exact host or `*.suffix` + (`*.x.com` does not match `x.com`: list both). Off-list navigations, pop-ups and custom-scheme launches never + load in the panel; an absolute http(s) URL goes to the system browser, anything else is dropped. +- Per-world, per-key WebView2 profile (`WebPanelProfile`): the plugin's key is lower-cased and hashed, and the world is added. +- `/rc webpanel [status|close]`: a redacted one-line report, and a close. +- `engine.json` `"WebPanel": false`: kill switch. `OpenWebPanel` then answers `Unavailable`. +- `RynthCore.PluginSdk.targets` already raised a shared-SDK release build's `RynthPluginMinEngineApi` below 88 to the + SDK's API; that is now 94 for every such plugin. Plugins that must run on older cores declare 88 or higher. +- `tools\WebPanelHarness`: an offline 32-bit harness for the host (see the doc). +- Docs: `docs/WEB_PANEL.md` is the plugin contract. + +## How it behaves + +- The panel is designed never to take focus from another program; confirm in game. It takes the foreground (and + page focus) only if the foreground window already belongs to the game, and it hides while another program is in front. +- Logs and chat never carry a URL's query, fragment or user info (the launch code rides in the query). +- Failures: the panel fails only when the WebView2 browser process or the main renderer exits, or the renderer is + reported unresponsive 3 times in 30 s. Other process failures are logged. `RuntimeMissing` / `CreateFailed` fall back to + the system browser when the plugin asked for it (the default). Page permission `ClipboardRead` is allowed only + for allowlisted origins; the rest are denied. +- The NativeAOT engine flavour has no web panel: the slots stay zero and `HasWebPanel` is false. + +## Tests + +`tools/WebPanelTests`: URL allowlist and redaction, window visibility and layout, profile folder, the ABI glue. +`tools/WebPanelHarness`: the host in a collectible load context against real WebView2 (needs a desktop, the +WebView2 runtime and the x86 .NET 10 runtime; not part of `Run-AllTests.ps1`). Checks that need another program in +the foreground report UNVERIFIED and are owner in-game checks. + +Not yet tested in game. \ No newline at end of file diff --git a/Changelog/2026-11-11-dungeon-map-visited-per-floor.md b/Changelog/2026-11-11-dungeon-map-visited-per-floor.md new file mode 100644 index 0000000..9b73a9d --- /dev/null +++ b/Changelog/2026-11-11-dungeon-map-visited-per-floor.md @@ -0,0 +1,7 @@ +# 2026-11-11 — Dungeon Map: each shown floor draws its own walked cells + +The Dungeon Map drew the walked (visited) cells for the player's floor only, and RynthAi's snapshot +painted them by x/y, so the cells walked on other floors showed up too. RynthAi now paints the floor you +stand on, separately for each floor (RynthSuite 2026-11-11-dungeon-trail-stays-on-its-floor). The map draws +each shown floor's own walked cells: the player's floor in full, the other shown floors dimmed as their walls +are. Floors that aren't shown draw none. diff --git a/Changelog/2026-11-11-settings-regroup.md b/Changelog/2026-11-11-settings-regroup.md new file mode 100644 index 0000000..ddebac1 --- /dev/null +++ b/Changelog/2026-11-11-settings-regroup.md @@ -0,0 +1,58 @@ +# Settings panel regrouped: 14 tabs in three groups, 10 settings get rows + +Branch `feature/settings-regroup`, from `rc/2026.11.next` f219759. Not deployed. RynthSuite's chat text and tooltips that +name a tab are on `feature/settings-regroup-text` (from `rc/2026.11.next` a91104fe). The phone app's own copy of the +groups is on RynthRemote's `feature/settings-regroup`. No plugin API change; any RynthAi works with it. + +## What changed + +- The tabs, in three sidebar groups: + - **RynthCore · this PC:** Interface (Display + UI), Game Client (new), Hotkeys. + - **RynthAi · saved in the profile:** General (was Misc), Recharge, Combat (was Melee Combat), Spell Combat, Ranges, + Navigation, Buffing, Looting, Inventory (new), Vendoring. + - **Support:** Diagnostics. +- What moved where: + - **Interface:** the theme and the dashboard look (Look), text size, the RynthCore toolbar, the four "Hide retail" + switches, your vitals plate and Show Target Stamina / Mana, the RynthDefective windows in the retail toolbar's + place, and window layout. + - **Game Client:** Borderless Windowed and Remember Game Window Position (Game Window); the FPS limit, the video + patch and Background Identify (Performance); Close Client on Server Disconnect and the reload hold (Disconnects + And Updates); the server picker (Server, from Diagnostics). + - **Hotkeys:** Insert Key Releases the UI (from Display). + - **General:** login and VTank switches (Starting Up), Peace Mode When Idle and Weapons Back After Heals (Between + Fights), Escape Acid and Lava and the macro stops (Safety Stops, from Misc and Recharge), Recall On Death (from + Recharge), fellowship management (from Spell Combat), Vaulted Dungeons (Server Features, from Navigation). + - **Combat:** targeting (from Ranges) and the blacklist (from Misc) under Targeting; line of sight and the missile + arcs (from Misc); both environment responses together (Magic Response from Spell Combat); missile ammo crafting + (the old Crafting tab). + - **Buffing:** Buff Spell Interval (from Spell Combat), Use Buff Items (from Recharge). + - **Inventory:** packs (Autostack, Autocram, Tidy, Floating HUDs), aetheria, salvage and its timers (from Looting), + Give Interval (from Misc), Item Info (from Display). +- Follow-up (`feature/settings-hunt-df-rows`, on `rc/2026.11.next` 1d6345a): **Hunt On Login** under General > Starting + Up (one or the other with Patrol On Login: ticking one clears the other, as RynthAi keeps them), and the **Dirty + Fighting rotation** under Combat > Attack Power & Height with its **Effect order** and **Then attack** (RynthAi's + DfHeightRotation, DfHeightOrder, DfDefaultHeight; also its own Dirty Fighting window). Hidden until RynthAi sends them. +- Taken out: Misc's duplicate Auto Cram (Inventory > Packs > Enable Autocram is the same switch) and Recharge's three + "Helper Settings — NOT WIRED YET" sliders (they do nothing; their values stay in the payload). +- New rows for settings RynthAi already had and sends (each hidden until RynthAi sends the value, so an older RynthAi + shows nothing and a save leaves them alone): + - Combat > Targeting: **Cast Settle (ms)**. + - Combat > Weapon Swaps: **Weakness Swap Min Gain %**, **No Swap Under Target Health %**, **Wait After Target + Switch (ms)**, **Prefer Dual Wield**, **Off-hand Default** (Auto, Shield, Weapon, None). + - Buffing: **Idle Margin (minutes)** (with Rebuff When Idle on), **Skip buffs this character can't use**. + - Looting: **Loot Mode** (RynthAi's loot messages already pointed here), **Chest relock wait (s)** (also on the + Item Tool), and the **Loot By Name** section (Names, Radius; 399b519 rebuilt, never shipped before). +- Pins: My settings drawer pins are "Tab/Section/Label" keys. A pin saved under the old layout is found again by its + label on the tabs its old tab's rows went to, and the file is rewritten with the new keys when it loads + (`QuickSettings.MigrateKey`). Misc's Auto Cram pin goes to Enable Autocram. An engine older than this one won't + draw the rewritten pins (they stay in the file). +- `/rc settings ` and a plugin's link accept the old names too (`SettingsSchema.FindTab`: Display and UI open + Interface, Misc opens General, Melee Combat and Crafting open Combat). `/rc diagnostics` and `/rc serverpick` + open Game Client, where the server picker is now. +- Text that names a tab follows: chat replies, tooltips, the video patch banner and the comments. + +## Tests + +- `tools/SettingsLayoutTests` (new): the tab order and groups; every one of the 301 pin keys of the old layout + (`OldPinKeys.txt`, dumped from f219759) leads to its row; the old tab names; where the moved rows are. +- `tools/CombatSettingsTests` and `tools/VaultedSettingTests` follow the rows to Combat and General. diff --git a/Changelog/2026-11-12-progress-tab-ilt-sections-only-on-ilt.md b/Changelog/2026-11-12-progress-tab-ilt-sections-only-on-ilt.md new file mode 100644 index 0000000..d68ff9e --- /dev/null +++ b/Changelog/2026-11-12-progress-tab-ilt-sections-only-on-ilt.md @@ -0,0 +1,6 @@ +# 2026-11-12 — Progress tab: the ILT sections only on Infinite Leaftide + +The Skills panel's Progress body (Oracle's Progress tab) still shows on every server. Off Infinite Leaftide +it shows only the retail attribute XP planner, without the infinite-attributes raiser, the augmentation and +enlightenment planners, or the "need RynthILT's ILT features" note. On Leaftide (IltInfo.IsIlt, or RynthILT's +progression snapshot) nothing changes. diff --git a/Changelog/2026-11-15-item-tool-give-amount-and-every.md b/Changelog/2026-11-15-item-tool-give-amount-and-every.md new file mode 100644 index 0000000..27e435f --- /dev/null +++ b/Changelog/2026-11-15-item-tool-give-amount-and-every.md @@ -0,0 +1,14 @@ +# 2026-11-15 — Item Tool: Quick give's Amount and Every fields + +Silentkelpie: "on item tool add in a option to give x number of a item and a timer of how often every x +seconds." + +- Item Tool > Quick give has two fields, side by side under the item and target picks: + - **Amount (0 = all)**: how many a round gives. + - **Every (s, 0 = once)**: the seconds between rounds; the give goes on until Stop. +- A value goes to RynthAi on Enter or a +/- click ("giveamount N", "giveevery N"). The field keeps the + sent value until RynthAi's data shows it back. +- With a RynthAi older than this, the fields are hidden and the description is the old one. +- ItemToolData reads RynthAi's new keys: amount, everySec, amountMax, everyMax, rounds, units, nextInSec. + +The giving itself is RynthAi's: RynthSuite/Changelog/2026-11-15-quick-give-amount-and-every.md. diff --git a/Changelog/2026-11-22-inventory-add-to-trade-shop.md b/Changelog/2026-11-22-inventory-add-to-trade-shop.md new file mode 100644 index 0000000..8191118 --- /dev/null +++ b/Changelog/2026-11-22-inventory-add-to-trade-shop.md @@ -0,0 +1,5 @@ +# Inventory — Add to Trade Shop (multi-select) + +Right-click a picked item (or a Ctrl/Shift multi-selection) → **Add to Trade Shop** / **Add N to Trade Shop**. + +Runs `/ra tradeshop addids …` and opens the Trade Shop window so prices can be edited. diff --git a/Changelog/2026-11-22-inventory-trade-shop-storefront.md b/Changelog/2026-11-22-inventory-trade-shop-storefront.md new file mode 100644 index 0000000..1edac8a --- /dev/null +++ b/Changelog/2026-11-22-inventory-trade-shop-storefront.md @@ -0,0 +1,8 @@ +# Inventory — Trade Shop Storefront button + +## What changed + +- Modern Inventory header always reserves a Storefront icon (left of Classic / Vault) that runs `/ra tradeshop ui`. +- Classic title bar places the same Storefront control next to Vault when there is room. +- Header declutter math reserves Trade Shop like Vault so related-panel icons / the “more” menu share what is left. +- BarDeclutterTests cover Shop geometry on Modern and Classic layouts. diff --git a/Changelog/2026-11-22-settings-game-client-vtank-import.md b/Changelog/2026-11-22-settings-game-client-vtank-import.md new file mode 100644 index 0000000..601887a --- /dev/null +++ b/Changelog/2026-11-22-settings-game-client-vtank-import.md @@ -0,0 +1,12 @@ +# Settings > Game Client: VirindiTank import (2026.11.22.42) + +Previous engine tip: 2026.11.22.40. + +## Change + +Game Client gains a **VirindiTank** section with **Import…**. It runs `/ra vtimport` through +RynthAi (confirm first). Available on every server — the import UI is no longer only on the ILT +Hub / Mini Remote Gear tab. + +RynthAi copies VirindiTank loot, nav maps and metas into LootProfiles / NavProfiles / MetaFiles and +merges MyMonsters from text `.usd` (see RynthSuite changelog for 0.5.100). diff --git a/Changelog/2026-11-22-sk-backlog-test-merge.md b/Changelog/2026-11-22-sk-backlog-test-merge.md new file mode 100644 index 0000000..5ac5d21 --- /dev/null +++ b/Changelog/2026-11-22-sk-backlog-test-merge.md @@ -0,0 +1,16 @@ +# SK backlog → aelrynth main (2026.11.22.48) + +Squash of `test/main-merge-2026-10-25` through stamp **2026.11.22.48** onto rynth main 2026.11.19.1. + +## Included (high level) + +- Trade Shop Storefront + inventory multi-add +- Loot Editor checklist / named pickers / Raw editor +- Inventory filter/checklist, imbue/slayer tooltips, Item Tool Amount/Every +- Chat command-reply routing, filter persistence, `/command` → `@command` +- Per-character window placements (plugin/pop-out) +- `/rc switchchar` and related window/radar command fixes +- Dungeon Map floor walked cells; ILT-gated Progress; RynthNav custom portals +- Tests and release stamps through 2026.11.22.48 + +Standing PR only — rynth cherry-picks / snapshots; not a merge of `sk` into main. diff --git a/README.md b/README.md index 198e226..6bf1617 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ For full deploy details, the Inno Setup installer, and gotchas, see [`BUILD.md`] - `docs/ACCLIENT_HOOK_INVENTORY.md` — hook target inventory against the user's live `acclient.exe` - `docs/PLUGIN_HOOK_MATRIX.md` — clean-room hook surface matrix - `docs/LEGAL_COMPATIBILITY.md` — project policy on Decal/VTank compatibility +- `installer/HEADLESS-README.md` — players' guide to the experimental Headless mode (installed as `Headless\README.md`) - `docs/archive/` — archived plans and one-off utilities ## Repository notes diff --git a/RynthCore.sln b/RynthCore.sln index e450961..2fb4d0c 100644 --- a/RynthCore.sln +++ b/RynthCore.sln @@ -31,6 +31,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RynthCore.HookResolver.UI", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RynthCore.DecalBridge", "src\RynthCore.DecalBridge\RynthCore.DecalBridge.csproj", "{44C8CF3A-3011-4C80-BDEE-1414B3D6CFAE}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RynthCore.Headless", "src\RynthCore.Headless\RynthCore.Headless.csproj", "{88A03697-4463-4F1B-90DC-8FFAAD37912D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RynthCore.Headless.Cli", "src\RynthCore.Headless.Cli\RynthCore.Headless.Cli.csproj", "{2E2B5C60-7B36-4974-B379-B4FD982F59A3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RynthCore.Geometry", "src\RynthCore.Geometry\RynthCore.Geometry.csproj", "{982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x86 = Debug|x86 @@ -185,18 +191,57 @@ Global {44C8CF3A-3011-4C80-BDEE-1414B3D6CFAE}.Release|Any CPU.Build.0 = Release|Any CPU {44C8CF3A-3011-4C80-BDEE-1414B3D6CFAE}.Release|x64.ActiveCfg = Release|Any CPU {44C8CF3A-3011-4C80-BDEE-1414B3D6CFAE}.Release|x64.Build.0 = Release|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Debug|x86.ActiveCfg = Debug|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Debug|x86.Build.0 = Debug|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Debug|x64.ActiveCfg = Debug|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Debug|x64.Build.0 = Debug|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Release|x86.ActiveCfg = Release|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Release|x86.Build.0 = Release|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Release|Any CPU.Build.0 = Release|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Release|x64.ActiveCfg = Release|Any CPU + {88A03697-4463-4F1B-90DC-8FFAAD37912D}.Release|x64.Build.0 = Release|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Debug|x86.ActiveCfg = Debug|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Debug|x86.Build.0 = Debug|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Debug|x64.ActiveCfg = Debug|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Debug|x64.Build.0 = Debug|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Release|x86.ActiveCfg = Release|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Release|x86.Build.0 = Release|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Release|Any CPU.Build.0 = Release|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Release|x64.ActiveCfg = Release|Any CPU + {2E2B5C60-7B36-4974-B379-B4FD982F59A3}.Release|x64.Build.0 = Release|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Debug|x86.ActiveCfg = Debug|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Debug|x86.Build.0 = Debug|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Debug|x64.ActiveCfg = Debug|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Debug|x64.Build.0 = Debug|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Release|x86.ActiveCfg = Release|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Release|x86.Build.0 = Release|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Release|Any CPU.Build.0 = Release|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Release|x64.ActiveCfg = Release|Any CPU + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {D1E2F3A4-5678-4ABC-8DEF-1234567890AB} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} {2B283E05-12BB-45F9-B8E5-8F53C1FAB737} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} {BB0C5CB5-6C75-4C17-9348-5CA0C481B65C} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} {A72E31D3-5D91-4C39-A30C-A96A492BBE82} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} - {D1E2F3A4-5678-4ABC-8DEF-1234567890AB} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} {C1A2B3D4-0007-0007-0007-000000000007} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} {C1A2B3D4-0008-0008-0008-000000000008} = {52D7C9F1-3A4E-4B11-9C2D-7E1A8C3F4D89} {C1A2B3D4-0009-0009-0009-000000000009} = {52D7C9F1-3A4E-4B11-9C2D-7E1A8C3F4D89} {44C8CF3A-3011-4C80-BDEE-1414B3D6CFAE} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + {88A03697-4463-4F1B-90DC-8FFAAD37912D} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + {2E2B5C60-7B36-4974-B379-B4FD982F59A3} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} + {982C1BFD-DF0B-4E5F-868D-361DFA0B21CC} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B} EndGlobalSection EndGlobal diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md index 64e5ea8..91ad778 100644 --- a/THIRD-PARTY-NOTICES.md +++ b/THIRD-PARTY-NOTICES.md @@ -33,6 +33,19 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` +## Barlow Semi Condensed + +- What: the Barlow Semi Condensed font, SemiBold and Bold (`BarlowSemiCondensed-SemiBold.ttf`, `BarlowSemiCondensed-Bold.ttf`), the narrow label face of the instrument dashboard (plugin windows get it through GetUiFont, Narrow*). +- Where: `src/RynthCore.Engine/Assets/Fonts/`, embedded in `RynthCore.Engine.dll` as resources. +- Source: https://github.com/google/fonts/tree/main/ofl/barlowsemicondensed (The Barlow Project Authors, https://github.com/jpt/barlow) +- Licence: SIL Open Font License 1.1, in full in `src/RynthCore.Engine/Assets/Fonts/Barlow.LICENSE`. The fonts are bundled unmodified; the licence allows bundling them with software, not selling them alone. + +``` +Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +``` + ## Chorizite DatReaderWriter (format reference for the dat readers) - What: the layout of Asheron's Call .dat files (header, block chains, the directory B-tree) and of the Texture and Palette files, used as the reference when RynthCore's own dat reader and icon decoder were written (2026-10-05). The code is RynthCore's own (MIT); this notice is kept because the library was the format reference. @@ -63,3 +76,40 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` + +## Microsoft WebView2 SDK (the in-game web panel) + +- What: `Microsoft.Web.WebView2.Core.dll` (the managed WebView2 Core wrapper) and the x86 `WebView2Loader.dll`, which the engine uses to host the in-game web panel on the CoreCLR build. They find and drive the Evergreen WebView2 Runtime already installed on the machine; the runtime itself is not shipped. +- Where: shipped in `Runtime\` of every CoreCLR install, referenced from `src/RynthCore.Engine/RynthCore.Engine.csproj` (NuGet `Microsoft.Web.WebView2` 1.0.2903.40). The package's WinForms and WPF assemblies are not used or shipped. +- Source: https://www.nuget.org/packages/Microsoft.Web.WebView2 +- Licence: Microsoft's BSD-style licence, reproduced below from the package's own LICENSE.txt. + +``` +Copyright (C) Microsoft Corporation. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * The name of Microsoft Corporation, or the names of its contributors +may not be used to endorse or promote products derived from this +software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +``` diff --git a/docs/STATUS_AGENT.md b/docs/STATUS_AGENT.md index cb7f552..28431a1 100644 --- a/docs/STATUS_AGENT.md +++ b/docs/STATUS_AGENT.md @@ -7,9 +7,11 @@ into the PC. It is built in two deliberately separated halves: -1. **Engine status export** — opt-in, **default OFF**. When enabled, the engine - writes a small **local** JSON file per client. It never opens a network - connection. +1. **Status export** — opt-in, **default OFF**. The private **RynthRemote** + plugin (loaded only by you) writes a small **local** JSON file per client; + the engine itself writes none. A headless character (`rynth-headless`, see + [HEADLESS.md](HEADLESS.md)) writes the same files from its own process. + Neither opens a network connection for this. 2. **`RynthCore.StatusAgent.exe`** — a separate, optional program that runs **on your own PC**, reads those local files, and forwards a rolled-up payload to **an endpoint you configure**. It is not injected into the game, not in the @@ -23,11 +25,12 @@ This feature is designed so that distributing RynthCore to other people changes nothing for them unless they explicitly turn it on, and even then nothing leaves their machine: -- **Default off.** With `EnableStatusExport` absent or `false`, the engine writes - no status file and behaves exactly as before. -- **No telemetry from the game.** `acclient.exe` / the engine never opens a - socket for this feature. The most it ever does is write a local file under - `C:\Games\RynthCore\Logs\status\`, right next to the logs it already writes. +- **Default off.** Without the RynthRemote plugin loaded, no game client writes a + status file and everything behaves exactly as before. (Headless characters + write theirs by default, see below.) +- **No telemetry from the game.** `acclient.exe` / the engine / the plugin never + open a socket for this feature. The most they do is write a local file under + `C:\Games\RynthCore\Logs\status\`, right next to the logs already written. - **The network half runs on the operator's PC, by the operator.** Only `RynthCore.StatusAgent.exe` makes outbound requests, only to the URL **you** put in **your** config, and only while you choose to run it. With no URL set it @@ -41,25 +44,33 @@ agent — there is no path by which your build reaches into their PC. ## Turning it on (operator setup) -### 1. Enable the engine status export +### 1. Load the RynthRemote plugin -Add to **your** `%APPDATA%\RynthCore\engine.json`: - -```json -{ - "EnableStatusExport": true -} -``` - -(Or set the env var `RYNTHCORE_STATUS_EXPORT=1` before launching AC for a -one-session test without editing the file.) Picked up on next client launch. - -The engine then writes, once per second, per running client: +(The engine's own `EnableStatusExport` switch is gone; the files come from the +plugin now.) Add the RynthRemote plugin to the launcher's plugin list. It then +writes, once per second, per running client (plus `.inventory`, `.settings` and +`.character` files next to it), and drains the phone's commands from +`Logs\status\commands\RynthCore..*.cmd.json`: ``` C:\Games\RynthCore\Logs\status\RynthCore..status.json ``` +**Headless characters.** `rynth-headless` writes the same four files and drains +the same command files for each character it hosts. One process hosts several +characters, so `` is a per-character **client id** (odd, above a billion, +never a real process id), and the status carries `"headless": true`, +`"hostPid"` and `"hostProcess": "rynth-headless"`. The agent checks that the +host process is up and named rynth-headless, where for a retail client it checks +that `` is an `acclient`. Its status folder is the run config's +`statusDir` (the launcher's `HeadlessStatusDir`); by default it is +`C:\Games\RynthCore\Logs\status\`, the agent's default `StatusDirectory`, so +both kinds show together. `"statusDir": ""` turns its status files off. Unlike a +game client, a headless character writes them without RynthRemote; they stay +local files like the others. A headless character has no window, so screen streaming, clicks, +`closeClient`, travel and raise are not available for it. Movement, assess and +every RynthAi command work as they do on a retail client. + ### 2. Build and run the agent ```powershell diff --git a/installer/Build-Installer.ps1 b/installer/Build-Installer.ps1 index 259fa2f..8d0ca13 100644 --- a/installer/Build-Installer.ps1 +++ b/installer/Build-Installer.ps1 @@ -84,6 +84,9 @@ param( # Explicit path to the RynthSuite repo root. When omitted, defaults to the # sibling directory of RynthCore (i.e. ..\RynthSuite relative to this repo). [string]$RynthSuiteRoot = "", + # Explicit path to the RynthServers repo root (rynth's server plugins: RynthILT and one per + # server). When omitted, defaults to the sibling directory ..\RynthServers. + [string]$RynthServersRoot = "", # Version string injected into the installer (yyyy.m.d.n). When omitted, # the version defined in RynthCore.iss is used as-is. [string]$Version = "", @@ -102,7 +105,13 @@ param( # Makes the bridge mandatory: no Decal means a failed build rather than a skipped bridge. [switch]$IncludeDecalBridge, # Decal's install folder, when not the default C:\Program Files (x86)\Decal 3.0. - [string]$DecalDir = "" + [string]$DecalDir = "", + # Managed (collectible) plugins, built by Publish-Update.ps1 (engine API 88): the folder of the + # plugins' common dependencies, staged into Runtime\PluginShared, and the managed RynthAi DLL, + # used instead of the NativeAOT RynthAi build. NativeAOT plugins can never be unloaded, so each + # reload kept a copy of every one (220-450 MB of address space per reload, 2026-10-19). + [string]$PluginSharedDir = "", + [string]$RynthAiDll = "" ) $ErrorActionPreference = "Stop" @@ -189,6 +198,10 @@ $ProjectsRoot = Split-Path $RepoRoot -Parent # e.g. C:\Projects if (-not $RynthSuiteRoot) { $RynthSuiteRoot = "$ProjectsRoot\RynthSuite" } +# RynthServers root (server plugins since 2026-10-21): explicit param, else the sibling convention. +if (-not $RynthServersRoot) { + $RynthServersRoot = "$ProjectsRoot\RynthServers" +} # ── Source state (release builds) ─────────────────────────────────────────── # A deployment package must map to exact commits. Tracked changes outside @@ -240,6 +253,8 @@ $ExperimentalPlugins = @('RynthChat', 'RynthJuice', 'RynthNav', 'RynthTracker', $ExperimentalProjectDirs = @{ 'UbRythai' = "$RynthSuiteRoot\Plugins\ub-Rythai\RynthCore.Plugin.UbRythai" } function Get-ExperimentalDir([string]$Name) { if ($ExperimentalProjectDirs.ContainsKey($Name)) { return $ExperimentalProjectDirs[$Name] } + # RynthILT and the per-server plugins live in RynthServers (rynth, 2026-10-21). + if ($Name -eq 'RynthILT' -or $ServerPlugins -contains $Name) { return "$RynthServersRoot\Plugins\RynthCore.Plugin.$Name" } return "$RynthSuiteRoot\Plugins\RynthCore.Plugin.$Name" } function Get-ExperimentalProject([string]$Name) { "$(Get-ExperimentalDir $Name)\RynthCore.Plugin.$Name.csproj" } @@ -251,7 +266,11 @@ function Get-ExperimentalPublish([string]$Name) { "$(Get-ExperimentalDir $Name)\ # RynthSuite companion plugins (installer components, on in a Full install). Same layout as the # experimental ones: \\RynthCore.Plugin..dll, from Plugins\RynthCore.Plugin.\. # They carry no of their own, so they get the release calver (-p:Version) like the engine. -$SuitePlugins = @('RynthOracle', 'RynthILT', 'RynthInventory', 'RynthSort') +# Server plugins (RynthServers): installed with the suite and registered with the launcher; RynthCore +# loads only the one for the server you connect to (PluginManifestGate), so each one's features show +# only on its own server. RynthILT is the Infinite Leaftide one. +$ServerPlugins = @('RynthAChard', 'RynthAelrynth', 'RynthColdeve', 'RynthConquest', 'RynthDerptide', 'RynthDreamWeave', 'RynthEversong', 'RynthFrostACE', 'RynthFrostcull', 'RynthLeafDawn', 'RynthLeafdawning', 'RynthLevistras', 'RynthPortalStorm', 'RynthReefcull', 'RynthSundering', 'RynthThistlecrown', 'RynthThreads') +$SuitePlugins = @('RynthOracle', 'RynthILT', 'RynthInventory', 'RynthSort') + $ServerPlugins # RynthNav's starter portal list (shipped into \NavData, never overwritten). $NavPortalsTsv = "$RynthSuiteRoot\Tools\RynthNav.PortalGraph\Data\portals.tsv" @@ -295,13 +314,15 @@ if (-not $SkipBuild) { } # (Default: the CoreCLR engine and native loader are built straight into staging below.) - # ── 4. RynthAi plugin (NativeAOT; keeps its own version) ───────────────── - Write-Host "" - Write-Host "[4/7] Publishing RynthAi plugin (NativeAOT)..." -ForegroundColor Cyan - # Its plugin version is RynthAiVersionCommand.HandWrittenVersion; the DLL's ProductVersion - # takes the release calver so an installed file never reads 1.0.0. - dotnet publish $PluginProject -c $Configuration @VersionArgs - if ($LASTEXITCODE -ne 0) { throw "Plugin publish failed (exit $LASTEXITCODE)" } + # ── 4. RynthAi plugin (NativeAOT; keeps its own version; a managed RynthAi from Publish-Update replaces it) ── + if (-not $RynthAiDll) { + Write-Host "" + Write-Host "[4/7] Publishing RynthAi plugin (NativeAOT)..." -ForegroundColor Cyan + # Its plugin version is RynthAiVersionCommand.HandWrittenVersion; the DLL's ProductVersion + # takes the release calver so an installed file never reads 1.0.0. + dotnet publish $PluginProject -c $Configuration @VersionArgs + if ($LASTEXITCODE -ne 0) { throw "Plugin publish failed (exit $LASTEXITCODE)" } + } # ── 5. Loot Editor (self-contained Avalonia tool) ───────────────────────── Write-Host "" @@ -471,10 +492,18 @@ Copy-PublishTree $LootEditorPublish "$CoreStaging\Tools\LootEditor" # RynthAi plugin DLL → \RynthAi (next to its data dirs; the installer hands the # path to the launcher via HKA\Software\Rynth\PendingPluginRegistration). -$pluginDll = "$PluginPublish\RynthCore.Plugin.RynthAi.dll" +$pluginDll = if ($RynthAiDll) { $RynthAiDll } else { "$PluginPublish\RynthCore.Plugin.RynthAi.dll" } if (-not (Test-Path $pluginDll)) { throw "Plugin DLL not found at: $pluginDll" } Copy-Item $pluginDll "$SuiteStaging\RynthAi\" -Force +# The managed plugins' common dependencies (engine API 88: ManagedPlugins looks in Runtime\PluginShared). +if ($PluginSharedDir) { + if (-not (Test-Path $PluginSharedDir)) { throw "PluginShared folder not found at: $PluginSharedDir" } + New-Item -ItemType Directory -Path "$CoreStaging\Runtime\PluginShared" -Force | Out-Null + Copy-Item "$PluginSharedDir\*" "$CoreStaging\Runtime\PluginShared\" -Force + Write-Host " Runtime\PluginShared: $((Get-ChildItem "$CoreStaging\Runtime\PluginShared" -File).Count) file(s)" +} + # Monster Editor → \RynthAi\MonsterEditor (RynthAi's dashboard launches it from there) Copy-PublishTree $MonsterEditorPublish "$SuiteStaging\RynthAi\MonsterEditor" @@ -533,6 +562,17 @@ if ($SkipDecalBridge) { # release.txt — which core release this install is ($release, from -Version at the top). Set-Content -Path "$CoreStaging\release.txt" -Value @($release, $Version) -Encoding ASCII +# The PE machine field of a DLL (e_lfanew at 0x3C, then the COFF Machine at PE offset + 4). The game is +# 32-bit, so the web panel's native loader must be the x86 one (0x14C): the NuGet package also carries +# win-x64 and win-arm64 copies that would load nowhere. +function Assert-PeMachine([string]$Path, [int]$Expected) { + $bytes = [System.IO.File]::ReadAllBytes($Path) + if ($bytes.Length -lt 0x40) { throw "$Path is not a PE file (too short)" } + $pe = [System.BitConverter]::ToInt32($bytes, 0x3C) + if ($pe -lt 0 -or $pe + 6 -gt $bytes.Length) { throw "$Path is not a PE file (bad e_lfanew)" } + $machine = [System.BitConverter]::ToUInt16($bytes, $pe + 4) + if ($machine -ne $Expected) { throw ("{0}: PE machine 0x{1:X}, expected 0x{2:X}" -f $Path, $machine, $Expected) } +} # Everything a working install needs. The 2026-09-25 public installer went out # without the Loader and the SEH trampoline because nothing checked. $required = @( @@ -555,7 +595,9 @@ if (-not $NativeAot) { $required += @( "$CoreStaging\Runtime\RynthCore.Shim.dll", "$CoreStaging\Runtime\dotnet\coreclr.dll", - "$CoreStaging\Runtime\dotnet\System.Private.CoreLib.dll" + "$CoreStaging\Runtime\dotnet\System.Private.CoreLib.dll", + "$CoreStaging\Runtime\Microsoft.Web.WebView2.Core.dll", + "$CoreStaging\Runtime\WebView2Loader.dll" ) } if ($buildDecalBridge) { @@ -563,6 +605,9 @@ if ($buildDecalBridge) { } $missing = @($required | Where-Object { -not (Test-Path $_) }) if ($missing.Count -gt 0) { throw "Staging is missing required files:`n $($missing -join "`n ")" } +if (-not $NativeAot) { + Assert-PeMachine "$CoreStaging\Runtime\WebView2Loader.dll" 0x14C +} # Every assembly the launcher's deps.json lists must be staged next to it — a launcher DLL whose # deps.json doesn't match is exactly the "Could not load RynthCore.DesktopLog" failure of 2026-10-04. diff --git a/installer/HEADLESS-README.md b/installer/HEADLESS-README.md new file mode 100644 index 0000000..e8cd6dc --- /dev/null +++ b/installer/HEADLESS-README.md @@ -0,0 +1,75 @@ +# Headless mode (experimental) + +Headless runs an account with **no game window**. Instead of starting the Asheron's Call +client, the launcher starts `rynth-headless.exe`, RynthCore's own client. It logs the +character in and runs RynthAi, the way RynthAi runs inside the game, but nothing is drawn +on screen. Use it for a bot character you don't need to watch. + +It is experimental: it may stop, get stuck or do something the game client wouldn't. Try it +on a character you can afford to lose time with, and check on it. + +## What it can and can't do + +- **ACE servers only.** The launcher refuses to start a Headless account on a GDLE server. +- **No game window and no in-game screens.** There is no RynthCore bar, no RynthAi window + and no chat window. You give RynthAi its orders with commands (see below). +- **Which plugins run:** only 64-bit plugins. By default that is the RynthAi that comes with + RynthCore (in `Headless\plugins\RynthAi` in the RynthCore folder). The plugins in the + launcher's Plugins tab, Decal and Decal plugins (VTank, UtilityBelt and the rest) do not + run in a headless client. +- **It walks on the game's own maps** (it reads your AC client's files), but it can't jump + or swim. +- **One character per account.** As in the game, an account can have only one character in + the world. Don't start the same account in a game client as well: the server drops one. +- **64-bit Windows only.** + +## Setting it up + +1. Install or update RynthCore as usual. The headless client comes with it. +2. In the launcher, set the account's injection method to **Headless (experimental)**. +3. Pick the character the same way as for any account. With none set, the first character + on the account logs in. +4. Click the account's **OnLogin** button and add the commands RynthAi should get once the + character is in the world, for example `/ra start` to start the macro. RynthAi uses the + profiles, metas and loot profiles in its headless folder (below), not the ones your game + clients use, so copy the ones you want there first. +5. Launch the account as usual. + +## Where its files are + +- **RynthAi's files for headless characters:** `%LOCALAPPDATA%\RynthCore\headless\RynthAi\` + (settings and loot profiles, metas, navs). Copy profiles from `C:\Games\RynthSuite\RynthAi\` + into the same subfolders to use them headless. +- **Log:** `%LOCALAPPDATA%\RynthCore\headless\headless-.log`, one per account (what + the character and its plugins did, and what the server refused). RynthAi's own logs are + in `RynthAi\Logs` there. +- **Status files** (for status tools that read them): `C:\Games\RynthCore\Logs\status\`. + +## Seeing it and stopping it + +- The account shows in the launcher like any running client. +- **The Headless window** (the **Headless clients** button under Live Sessions, or **Runtime > + Headless client > Show headless clients**) shows what each headless character is doing: + - a list with a coloured dot for each character: green botting, blue idle, red dead, grey not + in the world, amber not answering (no news for 10 seconds; it leaves the list after 30); + - for the one you pick: health, stamina and mana, what RynthAi is doing and its target, where + the character is (map coordinates outdoors), XP per hour and this session, kills, deaths, + vitae, burden and how long it has run; + - its last 30 chat lines (combat damage lines left out) and the last 50 lines of its log, + updated every second; + - a command box for `/ra`, `/rnav`, `/mt` and `/rn` commands (for example `/ra pause`): it + says when the character took the command and shows the chat line it answered with; + - **Start macro / Stop macro**, **Log out** (that character's headless client logs out and + closes) and **Open log folder**. +- To stop a headless client, use **Runtime > Headless client > Log out headless clients**. It + asks every headless client to log its character out and close (it is closed after 20 seconds + if it doesn't). With AutoLaunch on, uncheck the account first, or the launcher starts it again. + +## Settings (Runtime tab, Headless client) + +- **rynth-headless.exe:** leave it empty to use the one that comes with RynthCore. +- **Headless plugins:** leave it empty to use the RynthAi that comes with RynthCore. To list + your own, give one 64-bit plugin DLL per line; never the ones from the Plugins tab, which + are 32-bit and can't load in it. + +To go back, set the account's injection method to **RynthCore** again. diff --git a/installer/Publish-Update.ps1 b/installer/Publish-Update.ps1 index 31e3783..b877130 100644 --- a/installer/Publish-Update.ps1 +++ b/installer/Publish-Update.ps1 @@ -6,8 +6,12 @@ .DESCRIPTION One command per release: 1. Refuses if the signing key isn't set up or isn't trusted by the launcher being shipped, - if either repo has uncommitted changes, or if -Version isn't newer than the live feed. - 2. Builds the installer (Build-Installer.ps1 -Version; it includes the Decal bridge, so the + if either repo has uncommitted changes, or if -Version isn't newer than the live feed; + with -SkipNavData, also if the last published RynthNav map can't be found or isn't on + the server as signed (a feed without it gives new RynthNav players no map). + 2. Runs every offline test program in RynthCore, RynthSuite and RynthServers + (scripts\Run-AllTests.ps1) and stops if any fails: nothing is built or uploaded. + Then builds the installer (Build-Installer.ps1 -Version; it includes the Decal bridge, so the build machine needs Decal installed) and the RynthSuite plugins into installer\Releases\\ — never into the live C:\Games folders. 3. Writes the manifest (sizes + SHA-256 of every file), signs it with the DPAPI key @@ -33,17 +37,29 @@ param( [string]$Notes = "", [switch]$DryRun, # build + sign + verify, upload nothing [switch]$AllowDirty, # publish with uncommitted changes (don't) + # Publish without running the test programs first (step 2). For an emergency hotfix only; the + # release log says the tests were skipped. + [switch]$SkipTests, [string]$SshHost = "aelrynth-vps", [string]$RemoteDir = "/var/www/site/downloads/rynth", [string]$BaseUrl = "https://aelrynth.com/downloads/rynth", [string]$KeyDir = (Join-Path $env:USERPROFILE ".rynthcore-update-signing"), [string]$RynthSuiteRoot = "", + # The server plugins' repository (2026-10-21), beside RynthSuite (it compiles RynthSuite's shared + # contracts and the same RynthCore SDK, so their shared DLLs match). Defaults to ..\RynthServers. + [string]$RynthServersRoot = "", [string]$TrustFile = "", # defaults to the launcher's UpdateTrust.cs; override for tests # RynthNav's data shipped to launchers as the signed "navdata" archive: tiles (nav_XXXX.tile), # portals.tsv and locations.json from this folder. Only re-uploaded when the set changes # (its id is a hash of every file); otherwise the live feed's entry is carried over. [string]$NavDataDir = "C:\Games\RynthCore\NavData", - [switch]$SkipNavData, # leave navdata out of this feed (launchers then keep what they have) + # Build and upload no new RynthNav archive: the feed carries the last published navdata entry + # instead (see "RynthNav's map with -SkipNavData" below). It never ships a feed without the map. + [switch]$SkipNavData, + # With -SkipNavData: an earlier update.json (signed) or update.payload.json whose navdata entry to + # carry, for when neither the live feed nor any kept release manifest has one. + [string]$NavDataFrom = "", + [switch]$NativeAotPlugins, # the old NativeAOT plugin builds (each reload keeps a copy of every one) # The World Map's optional sizes (RynthNav.Baker --map-world): worldmap-hd.rmap, worldmap-ultra.rmap and worldmap-p32.rmap from this # folder are offered by the launcher as separate downloads ("mappacks" in the feed). Each is uploaded once under # mappacks// and kept by later releases. Without this folder the live feed's packs are @@ -55,6 +71,11 @@ $ErrorActionPreference = "Stop" $ScriptDir = $PSScriptRoot $RepoRoot = Split-Path $ScriptDir -Parent if (-not $RynthSuiteRoot) { $RynthSuiteRoot = Join-Path (Split-Path $RepoRoot -Parent) "RynthSuite" } +if (-not $RynthServersRoot) { $RynthServersRoot = Join-Path (Split-Path $RynthSuiteRoot -Parent) "RynthServers" } +if (-not (Test-Path (Join-Path $RynthServersRoot "Plugins"))) { throw "No RynthServers checkout at $RynthServersRoot (pass -RynthServersRoot)." } +if ((Resolve-Path (Split-Path $RynthServersRoot -Parent)).Path -ne (Resolve-Path (Split-Path $RynthSuiteRoot -Parent)).Path) { + throw "RynthServers ($RynthServersRoot) must sit beside RynthSuite ($RynthSuiteRoot): it builds against that RynthSuite and RynthCore." +} if (-not $TrustFile) { $TrustFile = Join-Path $RepoRoot "src\RynthCore.App.Avalonia\UpdateTrust.cs" } function Step($m) { Write-Host ""; Write-Host "== $m" -ForegroundColor Cyan } @@ -104,11 +125,28 @@ try { Write-Host " signing key is trusted by the launcher ($($trusted.Count) keys)" if (-not $AllowDirty) { - foreach ($repo in $RepoRoot, $RynthSuiteRoot) { + foreach ($repo in $RepoRoot, $RynthSuiteRoot, $RynthServersRoot) { $dirty = git -C $repo status --porcelain --untracked-files=no if ($dirty) { throw "$repo has uncommitted changes — release from committed code (or pass -AllowDirty):`n$dirty" } } - Write-Host " RynthCore $(git -C $RepoRoot rev-parse --short HEAD), RynthSuite $(git -C $RynthSuiteRoot rev-parse --short HEAD)" + Write-Host " RynthCore $(git -C $RepoRoot rev-parse --short HEAD), RynthSuite $(git -C $RynthSuiteRoot rev-parse --short HEAD), RynthServers $(git -C $RynthServersRoot rev-parse --short HEAD)" +} + +# The plugins build against the RynthCore beside RynthSuite (its SDK and build targets), not +# necessarily this checkout. Those targets must derive minEngineApi for release builds +# (RynthPluginSharedSdk, see the plugin build below): with older ones every managed plugin's +# manifest would keep its csproj's stale minimum (66), and launchers would offer it to cores that +# can't even load managed plugins. +$managedPluginApi = 0 +if (-not $NativeAotPlugins) { + $sdkTargets = Join-Path (Split-Path $RynthSuiteRoot -Parent) "RynthCore\src\RynthCore.PluginSdk\build\RynthCore.PluginSdk.targets" + $targetsText = if (Test-Path $sdkTargets) { Get-Content $sdkTargets -Raw } else { "" } + $floor = [regex]::Match($targetsText, '(\d+)') + if (-not $floor.Success -or $targetsText -notmatch "'\`$\(RynthPluginSharedSdk\)' == 'true'") { + throw "The plugins' SDK build targets ($sdkTargets) don't derive minEngineApi for release builds (RynthPluginSharedSdk). Update the RynthCore checkout beside RynthSuite to one with this script's SDK." + } + $managedPluginApi = [int]$floor.Groups[1].Value + Write-Host " plugin SDK targets: minEngineApi derived per plugin (managed plugins need API $managedPluginApi+)" } $liveManifest = $null @@ -122,13 +160,207 @@ try { Write-Host " no live feed yet — this is the first release" } +# ── RynthNav's map with -SkipNavData ───────────────────────────────────────── +# -SkipNavData means "build and upload no new archive", never "ship without the map": the feed +# carries the last published "navdata" entry, the way map packs are carried. It used to drop the +# entry, so every feed from 2026.10.18.1 on had none and a player who added RynthNav got no tiles, +# route graph or World Map (structural audit 2026-10-21, #6). The entry comes from, in order: +# -NavDataFrom, the live feed, then each earlier release's own signed manifest +# (releases//update.json, kept from 2026.10.19.1 on; releases.json names them, newest first). +# The first one found is used once its archive is checked on the server (size and SHA-256, the +# same ssh + sha256sum check as the uploads); a missing or changed archive, or no entry anywhere, +# stops the release here, before anything is built. + +# A manifest's navdata object as the feed writes it (ConvertFrom-Json: whole numbers forced back to +# integers, see the [long] note at the navdata step), or $null when it isn't a usable entry. The +# URL must be inside the feed folder, as the launcher requires (RynthUpdater.CheckUrl). +function ConvertTo-NavDataEntry($nd) { + if (-not $nd) { return $null } + try { + $e = [ordered]@{ + id = ([string]$nd.id).ToLowerInvariant() + release = [long]$nd.release + url = [string]$nd.url + size = [long]$nd.size + sha256 = ([string]$nd.sha256).ToLowerInvariant() + files = [long]$nd.files + bytes = [long]$nd.bytes + } + } catch { return $null } + if ($e.id -notmatch '^[0-9a-f]{16,64}$' -or $e.sha256 -notmatch '^[0-9a-f]{64}$' -or $e.size -le 0 -or $e.files -le 0 -or + -not $e.url.StartsWith("$BaseUrl/", [StringComparison]::Ordinal) -or $e.url.Contains("..")) { return $null } + return $e +} + +# The manifest in a signed update.json (only when a key the launcher trusts signed it) or in a plain +# update.payload.json (a local release folder's); $null when it can't be read. +function Read-ManifestFile([string]$path) { + try { + $doc = Get-Content $path -Raw | ConvertFrom-Json + if ($doc.payload -and $doc.signatures) { + if (-not (Test-Envelope $path $trusted)) { Write-Warning "$path is not signed by a key the launcher trusts - ignored."; return $null } + return [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($doc.payload)) | ConvertFrom-Json + } + return $doc + } catch { Write-Warning "Can't read ${path}: $($_.Exception.Message)"; return $null } +} + +# @{ Entry; From } for the last published navdata entry (see above), or $null. +function Find-PublishedNavData { + if ($NavDataFrom) { + if (-not (Test-Path $NavDataFrom)) { throw "-NavDataFrom: no file at $NavDataFrom" } + $m = Read-ManifestFile $NavDataFrom + $e = if ($m) { ConvertTo-NavDataEntry $m.navdata } else { $null } + if ($null -eq $e) { throw "-NavDataFrom: $NavDataFrom has no usable navdata entry (or isn't signed by a trusted key)." } + return @{ Entry = $e; From = $NavDataFrom } + } + if ($liveManifest) { + $e = ConvertTo-NavDataEntry $liveManifest.navdata + if ($null -ne $e) { return @{ Entry = $e; From = "the live feed (release $($liveManifest.release))" } } + } + $history = @() + try { $history = @((Invoke-RestMethod "$BaseUrl/releases.json" -TimeoutSec 20).releases) } + catch { Write-Warning "releases.json: $($_.Exception.Message)" } + $looked = 0 + foreach ($h in $history) { + $v = ([string]$h.version).Split('.') + if ($v.Count -ne 4 -or ($v | Where-Object { $_ -notmatch '^\d+$' })) { continue } + $n = [int]$v[0] * 1000000 + [int]$v[1] * 10000 + [int]$v[2] * 100 + [int]$v[3] + if ($n -ge $release -or $n -lt 2026101901) { continue } # 2026101901: the first release whose manifest is kept + if (++$looked -gt 20) { break } + $tmp = New-TemporaryFile + try { + try { Invoke-WebRequest "$BaseUrl/releases/$n/update.json" -OutFile $tmp -UseBasicParsing -TimeoutSec 20 | Out-Null } + catch { continue } + $m = Read-ManifestFile $tmp + if ($m -and [long]$m.release -eq $n) { + $e = ConvertTo-NavDataEntry $m.navdata + if ($null -ne $e) { return @{ Entry = $e; From = "release $n's signed manifest" } } + } + } finally { Remove-Item $tmp -ErrorAction SilentlyContinue } + } + return $null +} + +# The archive an entry names must be on the server exactly as signed: the launcher refuses a download +# whose size or SHA-256 differs, so a feed pointing at a gone or changed file gives players no map. +function Assert-RemoteNavData($e, [string]$from) { + $relPath = $e.url.Substring($BaseUrl.Length + 1) + if ($relPath -notmatch '^[A-Za-z0-9._/-]+$') { throw "RynthNav's map entry from $from has an unexpected URL: $($e.url)" } + $remoteFile = "$RemoteDir/$relPath" + $out = @(ssh $SshHost "stat -c %s '$remoteFile' && sha256sum '$remoteFile'") + if ($LASTEXITCODE -ne 0 -or $out.Count -lt 2) { + throw "RynthNav's map from $from ($remoteFile) is not on the server (or ssh failed) - not publishing a feed without the map. " + + "Leave out -SkipNavData and pass -NavDataDir a complete, finished NavData folder to publish a new archive." + } + $size = [long]("$($out[0])".Trim()) + $sum = ("$($out[1])".Trim() -split '\s+')[0].ToLowerInvariant() + if ($size -ne $e.size -or $sum -ne $e.sha256) { + throw "RynthNav's map on the server ($remoteFile) is not the one $from signed (size $size vs $($e.size), sha256 $sum vs $($e.sha256)) - not publishing." + } + Write-Host (" RynthNav map: release {0}'s archive ({1:N0} MB, id {2}) is on the server as signed; from {3}" -f $e.release, ($e.size / 1MB), $e.id, $from) +} + +if ($NavDataFrom -and -not $SkipNavData) { throw "-NavDataFrom goes with -SkipNavData (without it the archive is built from -NavDataDir)." } +$carriedNavData = $null +if ($SkipNavData) { + $found = Find-PublishedNavData + if (-not $found) { + throw "-SkipNavData, but neither the live feed nor any kept release manifest has RynthNav's map (navdata), and a feed without it " + + "gives players who add RynthNav no tiles, route graph or World Map - not publishing. Either leave out -SkipNavData and pass " + + "-NavDataDir a complete, finished NavData folder (not one being re-baked) to publish a new archive, or pass -NavDataFrom an " + + "earlier update.json / update.payload.json that has the entry." + } + Assert-RemoteNavData $found.Entry $found.From + $carriedNavData = $found.Entry +} + # ── 2. Build ───────────────────────────────────────────────────────────────── $rel = Join-Path $ScriptDir "Releases\$release" if (Test-Path $rel) { Remove-Item $rel -Recurse -Force } New-Item -ItemType Directory -Force "$rel\plugins", "$rel\build" | Out-Null +# Every offline test program in the three repos, before anything is built (2026-10-22: tests only ran +# when someone remembered to). One failure stops the release; the logs stay in Releases\\tests. +if ($SkipTests) { + Step "Tests SKIPPED (-SkipTests)" + Write-Warning "Publishing $Version without running the tests." +} else { + Step "Running the tests (scripts\Run-AllTests.ps1)" + & (Join-Path $RepoRoot "scripts\Run-AllTests.ps1") -RynthCoreRoot $RepoRoot -RynthSuiteRoot $RynthSuiteRoot ` + -RynthServersRoot $RynthServersRoot -LogDir "$rel\tests" + if ($LASTEXITCODE -ne 0) { + throw "Tests failed (summary above, logs in $rel\tests) - not publishing. Fix them, or pass -SkipTests for an emergency hotfix." + } +} + +# Plugins: built MANAGED by default (collectible: a reload frees them; NativeAOT plugins can never be +# unloaded, so every reload kept a copy of each one - 220-450 MB of address space per reload, +# 2026-10-19). Each managed plugin still ships as one DLL in the feed: their common dependencies +# (RynthCore.PluginSdk, PluginCore, ImGui.NET, MoonSharp, ...) go into the installer's +# Runtime\PluginShared, where the engine (API 88) finds them. -NativeAotPlugins: the old builds. +# minEngineApi: -p:RynthPluginSharedSdk=true tells the SDK's build targets that these plugins bind +# the PluginShared SDK, which reaches players only with this release's core. Each plugin's manifest +# then says its own declared minimum when that is 88 or more (a checked claim), else this SDK's API +# (_RynthPluginEffectiveMinEngineApi in RynthCore.PluginSdk.targets explains why). The feed copies +# each plugin's minEngineApi from the manifest embedded in its DLL (below), which is also what the +# engine checks at load and what the launcher's EngineBlocker holds updates by. This used to force +# -p:RynthPluginMinEngineApi=88 on every plugin, a constant that offered plugins calling v89 SDK +# members to API-88 cores (structural audit 2026-10-21, F5 / #7). +$suitePlugins = "RynthChat", "RynthTracker", "RynthNav", "RynthVision", "RynthLua", "RynthOracle", "RynthInventory", "RynthSort", "RynthNet", "RynthDefective" +# Server plugins (the RynthServers repository since 2026-10-21; ServerPack is SilentKelpie's): one per +# game server, each loaded by the engine only for its own server. They go in the feed only, so the +# launcher offers each one on its Server plugins tab for the player to install; not in +# RynthSuite-Plugins.zip or the installer. RynthILT and RynthThreads were in the zip until 2026-10-21. +$serverPlugins = "RynthAChard", "RynthAelrynth", "RynthColdeve", "RynthConquest", "RynthDerptide", "RynthDreamWeave", "RynthEversong", + "RynthFrostACE", "RynthFrostcull", "RynthILT", "RynthLeafDawn", "RynthLeafdawning", "RynthLevistras", "RynthPortalStorm", + "RynthReefcull", "RynthSundering", "RynthThistlecrown", "RynthThreads" +$managedArgs = if ($NativeAotPlugins) { @() } else { + @("-p:PublishAot=false", "-p:NativeLib=", "-p:SelfContained=false", "-p:RuntimeIdentifier=win-x86", + "-p:GenerateRuntimeConfigurationFiles=false", "-p:RynthPluginSharedSdk=true") +} +function Build-Plugin([string]$name, [string]$label, [string]$root = $RynthSuiteRoot, [string[]]$extra = @()) { + Step "Building $name$label" + $proj = Join-Path $root "Plugins\RynthCore.Plugin.$name\RynthCore.Plugin.$name.csproj" + if (-not (Test-Path $proj)) { throw "No project for $name at $proj" } + # PublishDir overrides the projects' own (RynthNav/RynthVision publish into the live C:\Games folders). + dotnet publish $proj -c Release "-p:Version=$Version" "-p:PublishDir=$rel\build\$name\" @managedArgs @extra -v q -nologo + if ($LASTEXITCODE -ne 0) { throw "dotnet publish failed for $name" } +} +foreach ($name in @("RynthAi") + $suitePlugins) { Build-Plugin $name "" } +# Against this release's RynthSuite, whatever RynthServers' own Directory.Build.props would pick. +$suiteRootArg = "-p:RynthSuiteRoot=$((Resolve-Path $RynthSuiteRoot).Path.TrimEnd('\'))\" +foreach ($name in $serverPlugins) { Build-Plugin $name " (server plugin, feed only)" $RynthServersRoot @($suiteRootArg) } + +$sharedDir = "" +if (-not $NativeAotPlugins) { + # Every plugin's dependencies, once each; the same name must be the same file in every plugin + # (they all build from this commit), else the release stops. + $sharedDir = "$rel\build\PluginShared" + New-Item -ItemType Directory -Force $sharedDir | Out-Null + $seen = @{} + foreach ($name in @("RynthAi") + $suitePlugins + $serverPlugins) { + foreach ($f in Get-ChildItem "$rel\build\$name\*.dll") { + if ($f.Name -like "RynthCore.Plugin.*.dll") { continue } + $hash = (Get-FileHash $f.FullName -Algorithm SHA256).Hash + if ($seen.ContainsKey($f.Name)) { + if ($seen[$f.Name] -ne $hash) { throw "PluginShared: $($f.Name) differs between plugins ($name) - not publishing." } + continue + } + $seen[$f.Name] = $hash + Copy-Item $f.FullName "$sharedDir\" + } + } + Write-Host " PluginShared: $($seen.Count) file(s): $(($seen.Keys | Sort-Object) -join ', ')" +} + Step "Building the installer ($Version)" -& (Join-Path $ScriptDir "Build-Installer.ps1") -Version $Version -RynthSuiteRoot $RynthSuiteRoot +$installerArgs = @{ Version = $Version; RynthSuiteRoot = $RynthSuiteRoot } +if (-not $NativeAotPlugins) { + $installerArgs.PluginSharedDir = $sharedDir + $installerArgs.RynthAiDll = "$rel\build\RynthAi\RynthCore.Plugin.RynthAi.dll" +} +& (Join-Path $ScriptDir "Build-Installer.ps1") @installerArgs if (-not $?) { throw "Build-Installer.ps1 failed" } # The Decal bridge (experimental, opt-in per account) is only in installers built where Decal is # installed; a launcher updating through this feed without it can't run "Decal + RynthCore" accounts. @@ -140,37 +372,17 @@ if (Test-Path $bridgeStaged) { } # The versioned installer is the primary artifact (the RynthCore-Setup.exe copy is best effort). Copy-Item (Join-Path $ScriptDir "Output\RynthCore-Setup-$Version.exe") "$rel\RynthCore-Setup.exe" -# Build-Installer.ps1 stages RynthSuite files under staging\suite\ (RynthAi -> staging\suite\RynthAi\). -Copy-Item (Join-Path $ScriptDir "staging\suite\RynthAi\RynthCore.Plugin.RynthAi.dll") "$rel\plugins\" - -$suitePlugins = "RynthChat", "RynthTracker", "RynthNav", "RynthVision", "RynthLua", "RynthOracle", "RynthInventory", "RynthSort", "RynthILT", "RynthThreads", "RynthNet" -# One plugin per server (Plugins\Shared\ServerPack). RynthCore loads only the one whose manifest -# hosts claim the client's connect host, so installing all of them costs disk, not memory. -$serverPlugins = "RynthAChard", "RynthAelrynth", "RynthColdeve", "RynthConquest", "RynthDerptide", "RynthDreamWeave", - "RynthEversong", "RynthFrostACE", "RynthFrostcull", "RynthLeafDawn", "RynthLeafdawning", "RynthLevistras", - "RynthPortalStorm", "RynthReefcull", "RynthSundering", "RynthThistlecrown" +# RynthAi: the managed build when plugins are managed, else the NativeAOT one Build-Installer.ps1 +# staged under staging\suite\RynthAi\. +$rynthAiFeed = if ($NativeAotPlugins) { Join-Path $ScriptDir "staging\suite\RynthAi\RynthCore.Plugin.RynthAi.dll" } + else { "$rel\build\RynthAi\RynthCore.Plugin.RynthAi.dll" } +Copy-Item $rynthAiFeed "$rel\plugins\" +foreach ($name in $suitePlugins + $serverPlugins) { + Copy-Item "$rel\build\$name\RynthCore.Plugin.$name.dll" "$rel\plugins\" +} +# Server plugins also go in RynthSuite-Plugins.zip: RynthCore loads only the one whose manifest hosts +# claim the client's connect host, so installing all of them costs disk, not memory. $suitePlugins += $serverPlugins -foreach ($name in $suitePlugins) { - Step "Building $name" - $proj = Join-Path $RynthSuiteRoot "Plugins\RynthCore.Plugin.$name\RynthCore.Plugin.$name.csproj" - # PublishDir overrides the projects' own (RynthNav/RynthVision publish into the live C:\Games folders). - dotnet publish $proj -c Release "-p:Version=$Version" "-p:PublishDir=$rel\build\$name\" -v q -nologo - if ($LASTEXITCODE -ne 0) { throw "dotnet publish failed for $name" } - Copy-Item "$rel\build\$name\RynthCore.Plugin.$name.dll" "$rel\plugins\" -} - -# Server plugins (Plugins\Shared\ServerPack; SilentKelpie's): one per game server, each loaded by the -# engine only for its own server. They go in the feed only, so the launcher offers each one under -# Available plugins for the player to install; not in RynthSuite-Plugins.zip or the installer. -$serverPlugins = "RynthAChard", "RynthAelrynth", "RynthColdeve", "RynthConquest", "RynthDerptide", "RynthDreamWeave", "RynthEversong", - "RynthFrostACE", "RynthFrostcull", "RynthLeafDawn", "RynthLeafdawning", "RynthPortalStorm", "RynthReefcull", "RynthSundering", "RynthThistlecrown" -foreach ($name in $serverPlugins) { - Step "Building $name (server plugin, feed only)" - $proj = Join-Path $RynthSuiteRoot "Plugins\RynthCore.Plugin.$name\RynthCore.Plugin.$name.csproj" - dotnet publish $proj -c Release "-p:Version=$Version" "-p:PublishDir=$rel\build\$name\" -v q -nologo - if ($LASTEXITCODE -ne 0) { throw "dotnet publish failed for $name" } - Copy-Item "$rel\build\$name\RynthCore.Plugin.$name.dll" "$rel\plugins\" -} Step "Packing RynthSuite-Plugins.zip" $zipRoot = "$rel\build\zip" @@ -209,14 +421,14 @@ Extract this zip into C:\Games - it creates: C:\Games\RynthSuite\RynthOracle\ RynthOracle plugin (quests, character, titles; based on Oracle of Dereth by Advis Eveldan) C:\Games\RynthSuite\RynthInventory\ RynthInventory plugin (search every character's items) C:\Games\RynthSuite\RynthSort\ RynthSort plugin (keeps your packs sorted; replaces the RynthSort Lua script) - C:\Games\RynthSuite\RynthILT\ RynthILT plugin (Infinite Leaftide only: the ILT Hub, Guardian, bounties, progression, ILT settings, /fship fellowship commands) - C:\Games\RynthSuite\RynthThreads\ RynthThreads plugin (DreamWeave only: Fragment Press results, what each component brings) C:\Games\RynthSuite\RynthNet\ RynthNet plugin (links your clients on this PC: /ub bc, shared vitals, the Characters panel) - C:\Games\RynthSuite\Rynth\ One server plugin per server (RynthColdeve, RynthAelrynth, - RynthPortalStorm, ...): the server's facts, rules and commands. - RynthCore loads only the one for the server you connect to. + C:\Games\RynthSuite\RynthDefective\ RynthDefective plugin (a shortcut bar, AC's panel buttons and the Selection, in place of the retail toolbar) C:\Games\RynthCore\NavData\ RynthNav's portals and Atlas +Plugins for one game server (RynthILT for Infinite Leaftide, RynthThreads for +DreamWeave, and one per server) are not in this zip: install yours from the +launcher's Server plugins tab. + Then, in the RynthCore launcher's Plugins tab, add the full path of each plugin DLL you want. Install RynthCore first (RynthCore-Setup.exe), which also installs RynthAi and the Loot Editor. After that the launcher keeps @@ -230,13 +442,14 @@ Compress-Archive -Path "$zipRoot\*" -DestinationPath "$rel\RynthSuite-Plugins.zi # RynthNav's data for the launchers (RynthUpdater.NavData.cs): one archive, flat, only the file # names RynthNav reads. Its id is a hash over every file's name and SHA-256, so an unchanged # set reuses the live entry (and the archive already on the server) instead of re-uploading. -$navData = $null +# -SkipNavData: the entry found and checked in step 1 (never none). +$navData = $carriedNavData $navZip = $null if (-not $SkipNavData) { Step "RynthNav data (tiles, route graph, portals, Atlas, Town Network, World Map) from $NavDataDir" $navFiles = @(Get-ChildItem $NavDataDir -File | Where-Object { $_.Name -match '^(nav_[0-9A-Fa-f]{4}\.tile|portals\.tsv|locations\.json|navgraph\.bin|townnet\.json|worldmap\.rmap|worldmap\.vec)$' } | Sort-Object Name) $tileCount = @($navFiles | Where-Object { $_.Extension -eq ".tile" }).Count - if ($tileCount -eq 0) { throw "$NavDataDir has no tiles. Pass -NavDataDir, or -SkipNavData to publish without them." } + if ($tileCount -eq 0) { throw "$NavDataDir has no tiles. Pass -NavDataDir, or -SkipNavData to carry the last published map." } # The long-range route graph (RynthNav.Baker --graph) must come from these very tiles: the # plugin ignores a graph whose tiles don't match (long gotos then walk the straight line). # The World Map's picture (RynthNav.Baker --map --map-tiles from the dats; the terrain doesn't change between releases). @@ -268,6 +481,7 @@ if (-not $SkipNavData) { bytes = [long]$navData.bytes } Write-Host " unchanged ($($navFiles.Count) files, id $navId): the live archive from release $($navData.release) stays" + Assert-RemoteNavData $navData "the live feed" } else { $navZip = "$rel\RynthNav-NavData.zip" Add-Type -AssemblyName System.IO.Compression, System.IO.Compression.FileSystem @@ -339,14 +553,15 @@ $pluginDescriptions = @{ RynthChat = "A chat window that sorts messages into tabs." RynthTracker = "Kills, experience and luminance per hour for each session." RynthNav = "Walks you to coordinates and towns, with route planning and the Atlas. Downloads its map (about 540 MB)." - RynthVision = "Shows unclimbable slopes, impassable water and your radar range in the world." + RynthVision = "Shows unclimbable slopes, impassable water and your radar range in the world, and lights dark dungeons." RynthLua = "Lua scripting for metas and your own scripts." - RynthOracle = "Quests, character, titles and leaderboards." + RynthOracle = "Quests, character and titles." RynthInventory = "Search every character's items." RynthSort = "Keeps your packs sorted: new loot goes to the pack its rule names." RynthILT = "Infinite Leaftide only: the ILT Hub (the Mini Remote's banking, gear, charms and games tabs), the Guardian, bounty tracking, progression planning, ILT settings and the /fship fellowship commands." RynthThreads = "DreamWeave only: records Fragment Press results and works out what each component brings." RynthNet = "Links your characters on this PC: broadcast commands (/ub bc), shared vitals and the Characters panel." + RynthDefective = "A shortcut bar with AC's own keys, buttons for AC's panels and the Selection, in place of the retail toolbar." # Server plugins: only the one for the server you connect to loads. RynthAChard = "AChard's server plugin: server facts, PvP rules and commands. Loads only on AChard." RynthAelrynth = "Aelrynth's server plugin: server facts, mods and commands. Loads only on Aelrynth." @@ -389,8 +604,12 @@ $plugins = foreach ($dll in Get-ChildItem "$rel\plugins\*.dll" | Sort-Object Nam if ($pm) { if ($pm.name -ne $pluginName) { throw "$($dll.Name): its manifest says '$($pm.name)', the feed would say '$pluginName'." } if ($pm.version -and $pm.version -ne $Version) { throw "$($dll.Name): its manifest is version $($pm.version), not $Version (stale build?)." } + # The plugin's own minimum, as its build wrote it into the DLL (see the plugin build above). $min = [int]$pm.minEngineApi if ($min -gt $engineApi) { throw "$($dll.Name) needs engine API $min but this release's engine is $engineApi - it would never load." } + if ($managedPluginApi -gt 0 -and $min -lt $managedPluginApi) { + throw "$($dll.Name): its manifest says engine API $min, but a managed plugin needs $managedPluginApi just to load - launchers would offer it to cores that can't run it (stale SDK targets beside RynthSuite?)." + } if ($min -gt 0) { $entry.minEngineApi = $min } Write-Host " $pluginName $($pm.version): engine API $min+" } else { @@ -418,7 +637,9 @@ $manifest = [ordered]@{ } plugins = @($plugins) } -if ($navData) { $manifest.navdata = $navData } +# Every feed carries RynthNav's map (built above, unchanged from the live feed, or carried by -SkipNavData). +if (-not $navData) { throw "No RynthNav map (navdata) for this feed - not publishing a feed without it." } +$manifest.navdata = $navData if ($mapPacks.Count -gt 0) { $manifest.mappacks = @($mapPacks) } Set-Content "$rel\update.payload.json" ($manifest | ConvertTo-Json -Depth 5) -Encoding utf8NoBOM & (Join-Path $ScriptDir "Sign-Update.ps1") -PayloadPath "$rel\update.payload.json" -OutPath "$rel\update.json" -KeyDir $KeyDir @@ -448,6 +669,10 @@ scp -q "$rel\RynthCore-Setup.exe" "${SshHost}:$remoteRel/RynthCore-Setup.exe" if ($LASTEXITCODE -ne 0) { throw "scp of the installer failed" } scp -q (Get-ChildItem "$rel\plugins\*.dll").FullName "${SshHost}:$remoteRel/plugins/" if ($LASTEXITCODE -ne 0) { throw "scp of the plugins failed" } +# The release's own signed manifest stays beside its files: the launcher's Roll back +# (RynthUpdater.Rollback.cs) verifies it to go back to this release later. +scp -q "$rel\update.json" "${SshHost}:$remoteRel/update.json" +if ($LASTEXITCODE -ne 0) { throw "scp of the release's update.json failed" } $navSum = "" if ($navZip) { scp -q $navZip "${SshHost}:$remoteRel/RynthNav-NavData.zip" @@ -472,8 +697,9 @@ foreach ($up in $mapPackUploads) { Write-Host " $($up.Remote): uploaded and hash-checked" } -$remoteSums = ssh $SshHost "cd '$remoteRel' && sha256sum RynthCore-Setup.exe plugins/*.dll$navSum" -$expect = @{ "RynthCore-Setup.exe" = $manifest.core.sha256 } +$remoteSums = ssh $SshHost "cd '$remoteRel' && sha256sum RynthCore-Setup.exe update.json plugins/*.dll$navSum" +$expect = @{ "RynthCore-Setup.exe" = $manifest.core.sha256 + "update.json" = (Get-FileHash "$rel\update.json" -Algorithm SHA256).Hash.ToLowerInvariant() } if ($navZip) { $expect["RynthNav-NavData.zip"] = $navData.sha256 } foreach ($pl in $plugins) { $expect["plugins/$($pl.file)"] = $pl.sha256 } foreach ($line in $remoteSums) { @@ -481,6 +707,9 @@ foreach ($line in $remoteSums) { if ($expect[$name.TrimStart('*')] -ne $sum) { throw "Hash mismatch on the server for $name — feed NOT published" } } Write-Host " $($expect.Count) files uploaded and hash-checked" +# A carried RynthNav archive (not uploaded by this release) is checked once more just before the +# feed that points at it goes live. +if (-not $navZip) { Assert-RemoteNavData $navData "this feed" } Step "Replacing the website downloads" scp -q "$rel\RynthCore-Setup.exe" "${SshHost}:$RemoteDir/.RynthCore-Setup.exe.new" diff --git a/installer/RynthCore.iss b/installer/RynthCore.iss index e98fe40..393ffa8 100644 --- a/installer/RynthCore.iss +++ b/installer/RynthCore.iss @@ -68,6 +68,24 @@ Name: "suite\rynthoracle"; Description: "RynthOracle - quests, quest timers, Name: "suite\rynthilt"; Description: "RynthILT - Infinite Leaftide features (hub, progression, banking, bounties)"; Types: full Name: "suite\rynthinventory"; Description: "RynthInventory - inventory, item counts and global manage"; Types: full Name: "suite\rynthsort"; Description: "RynthSort - inventory sorting"; Types: full +; Server plugins (RynthServers): RynthCore loads only the one for the server you connect to. +Name: "suite\rynthachard"; Description: "RynthAChard - server plugin for AChard (loads only on that server)"; Types: full +Name: "suite\rynthaelrynth"; Description: "RynthAelrynth - server plugin for Aelrynth (loads only on that server)"; Types: full +Name: "suite\rynthcoldeve"; Description: "RynthColdeve - server plugin for Coldeve (loads only on that server)"; Types: full +Name: "suite\rynthconquest"; Description: "RynthConquest - server plugin for Conquest (loads only on that server)"; Types: full +Name: "suite\rynthderptide"; Description: "RynthDerptide - server plugin for Derptide (loads only on that server)"; Types: full +Name: "suite\rynthdreamweave"; Description: "RynthDreamWeave - server plugin for DreamWeave (loads only on that server)"; Types: full +Name: "suite\ryntheversong"; Description: "RynthEversong - server plugin for Eversong (loads only on that server)"; Types: full +Name: "suite\rynthfrostace"; Description: "RynthFrostACE - server plugin for FrostACE (loads only on that server)"; Types: full +Name: "suite\rynthfrostcull"; Description: "RynthFrostcull - server plugin for Frostcull (loads only on that server)"; Types: full +Name: "suite\rynthleafdawn"; Description: "RynthLeafDawn - server plugin for LeafDawn (loads only on that server)"; Types: full +Name: "suite\rynthleafdawning"; Description: "RynthLeafdawning - server plugin for Leafdawning (loads only on that server)"; Types: full +Name: "suite\rynthlevistras"; Description: "RynthLevistras - server plugin for Levistras (loads only on that server)"; Types: full +Name: "suite\rynthportalstorm"; Description: "RynthPortalStorm - server plugin for PortalStorm (loads only on that server)"; Types: full +Name: "suite\rynthreefcull"; Description: "RynthReefcull - server plugin for Reefcull (loads only on that server)"; Types: full +Name: "suite\rynthsundering"; Description: "RynthSundering - server plugin for Sundering (loads only on that server)"; Types: full +Name: "suite\rynththistlecrown"; Description: "RynthThistlecrown - server plugin for Thistlecrown (loads only on that server)"; Types: full +Name: "suite\rynththreads"; Description: "RynthThreads - server plugin for DreamWeave's Threads (loads only on that server)"; Types: full ; Experimental plugins: unchecked by default in every install type (ticking one switches to Custom). Name: "experimental"; Description: "RynthSuite: Experimental plugins (work in progress)" Name: "experimental\rynthchat"; Description: "RynthChat - replacement chat window (classifies and owns game chat)" @@ -120,6 +138,23 @@ Source: "staging\suite\RynthOracle\RynthCore.Plugin.RynthOracle.dll"; Dest Source: "staging\suite\RynthILT\RynthCore.Plugin.RynthILT.dll"; DestDir: "{code:GetSuiteDir}\RynthILT"; Components: suite\rynthilt; Flags: ignoreversion overwritereadonly Source: "staging\suite\RynthInventory\RynthCore.Plugin.RynthInventory.dll"; DestDir: "{code:GetSuiteDir}\RynthInventory"; Components: suite\rynthinventory; Flags: ignoreversion overwritereadonly Source: "staging\suite\RynthSort\RynthCore.Plugin.RynthSort.dll"; DestDir: "{code:GetSuiteDir}\RynthSort"; Components: suite\rynthsort; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthAChard\RynthCore.Plugin.RynthAChard.dll"; DestDir: "{code:GetSuiteDir}\RynthAChard"; Components: suite\rynthachard; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthAelrynth\RynthCore.Plugin.RynthAelrynth.dll"; DestDir: "{code:GetSuiteDir}\RynthAelrynth"; Components: suite\rynthaelrynth; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthColdeve\RynthCore.Plugin.RynthColdeve.dll"; DestDir: "{code:GetSuiteDir}\RynthColdeve"; Components: suite\rynthcoldeve; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthConquest\RynthCore.Plugin.RynthConquest.dll"; DestDir: "{code:GetSuiteDir}\RynthConquest"; Components: suite\rynthconquest; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthDerptide\RynthCore.Plugin.RynthDerptide.dll"; DestDir: "{code:GetSuiteDir}\RynthDerptide"; Components: suite\rynthderptide; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthDreamWeave\RynthCore.Plugin.RynthDreamWeave.dll"; DestDir: "{code:GetSuiteDir}\RynthDreamWeave"; Components: suite\rynthdreamweave; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthEversong\RynthCore.Plugin.RynthEversong.dll"; DestDir: "{code:GetSuiteDir}\RynthEversong"; Components: suite\ryntheversong; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthFrostACE\RynthCore.Plugin.RynthFrostACE.dll"; DestDir: "{code:GetSuiteDir}\RynthFrostACE"; Components: suite\rynthfrostace; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthFrostcull\RynthCore.Plugin.RynthFrostcull.dll"; DestDir: "{code:GetSuiteDir}\RynthFrostcull"; Components: suite\rynthfrostcull; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthLeafDawn\RynthCore.Plugin.RynthLeafDawn.dll"; DestDir: "{code:GetSuiteDir}\RynthLeafDawn"; Components: suite\rynthleafdawn; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthLeafdawning\RynthCore.Plugin.RynthLeafdawning.dll"; DestDir: "{code:GetSuiteDir}\RynthLeafdawning"; Components: suite\rynthleafdawning; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthLevistras\RynthCore.Plugin.RynthLevistras.dll"; DestDir: "{code:GetSuiteDir}\RynthLevistras"; Components: suite\rynthlevistras; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthPortalStorm\RynthCore.Plugin.RynthPortalStorm.dll"; DestDir: "{code:GetSuiteDir}\RynthPortalStorm"; Components: suite\rynthportalstorm; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthReefcull\RynthCore.Plugin.RynthReefcull.dll"; DestDir: "{code:GetSuiteDir}\RynthReefcull"; Components: suite\rynthreefcull; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthSundering\RynthCore.Plugin.RynthSundering.dll"; DestDir: "{code:GetSuiteDir}\RynthSundering"; Components: suite\rynthsundering; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthThistlecrown\RynthCore.Plugin.RynthThistlecrown.dll"; DestDir: "{code:GetSuiteDir}\RynthThistlecrown"; Components: suite\rynththistlecrown; Flags: ignoreversion overwritereadonly +Source: "staging\suite\RynthThreads\RynthCore.Plugin.RynthThreads.dll"; DestDir: "{code:GetSuiteDir}\RynthThreads"; Components: suite\rynththreads; Flags: ignoreversion overwritereadonly ; Experimental plugins: each in its own \\ folder (the layout the launcher already uses). Source: "staging\suite\RynthChat\RynthCore.Plugin.RynthChat.dll"; DestDir: "{code:GetSuiteDir}\RynthChat"; Components: experimental\rynthchat; Flags: ignoreversion overwritereadonly @@ -307,7 +342,7 @@ end; // Number of entries in SuitePluginName; keep in sync with the [Components]/[Files] suite rows. const - SuitePluginCount = 4; + SuitePluginCount = 21; // Companion plugin names; component "suite\" installs \\RynthCore.Plugin..dll. function SuitePluginName(Index: Integer): string; @@ -317,6 +352,23 @@ begin 1: Result := 'RynthILT'; 2: Result := 'RynthInventory'; 3: Result := 'RynthSort'; + 4: Result := 'RynthAChard'; + 5: Result := 'RynthAelrynth'; + 6: Result := 'RynthColdeve'; + 7: Result := 'RynthConquest'; + 8: Result := 'RynthDerptide'; + 9: Result := 'RynthDreamWeave'; + 10: Result := 'RynthEversong'; + 11: Result := 'RynthFrostACE'; + 12: Result := 'RynthFrostcull'; + 13: Result := 'RynthLeafDawn'; + 14: Result := 'RynthLeafdawning'; + 15: Result := 'RynthLevistras'; + 16: Result := 'RynthPortalStorm'; + 17: Result := 'RynthReefcull'; + 18: Result := 'RynthSundering'; + 19: Result := 'RynthThistlecrown'; + 20: Result := 'RynthThreads'; else Result := ''; end; diff --git a/installer/previous-release/last-built-version.txt b/installer/previous-release/last-built-version.txt index 774ca37..692225b 100644 --- a/installer/previous-release/last-built-version.txt +++ b/installer/previous-release/last-built-version.txt @@ -1 +1 @@ -2026.10.18.24 +2026.11.22.48 \ No newline at end of file diff --git a/installer/previous-release/previous-version.txt b/installer/previous-release/previous-version.txt index b47594e..d13755e 100644 --- a/installer/previous-release/previous-version.txt +++ b/installer/previous-release/previous-version.txt @@ -1 +1 @@ -2026.10.18.15 +2026.11.22.47 \ No newline at end of file diff --git a/last-built-version.txt b/last-built-version.txt new file mode 100644 index 0000000..fb633a7 --- /dev/null +++ b/last-built-version.txt @@ -0,0 +1 @@ +2026.10.20.14 diff --git a/native/Loader/Hooks.c b/native/Loader/Hooks.c index 2f0afce..cc18194 100644 --- a/native/Loader/Hooks.c +++ b/native/Loader/Hooks.c @@ -29,6 +29,9 @@ // init export returns (HooksFlush; on a first launch AC's main thread is still suspended // then), on every reload, and ~20 ms after the last change otherwise (a background // flusher). A hook's slot is set at once; its patch follows within that window. +// Each freeze runs with the process in HIGH priority class (BoostForFreeze): on a busy +// machine the freeze otherwise waited seconds on low-priority threads, with AC's main +// thread suspended all that time (2026-11-01). // ============================================================================ #include "Loader.h" @@ -84,6 +87,8 @@ static HANDLE g_dirtyEvent; static volatile DWORD g_lastChange; static void FlushLocked(const char* why); +static DWORD BoostForFreeze(void); +static void RestoreAfterFreeze(DWORD cls); static DWORD WINAPI Flusher(LPVOID unused) { @@ -143,7 +148,9 @@ static void SetPatched(int i, int patched) { HookEntry* e = &g_hooks[i]; if (e->patched == patched) return; + DWORD cls = BoostForFreeze(); // each call is a freeze of its own int st = patched ? p_enable(e->target) : p_disable(e->target); + RestoreAfterFreeze(cls); if (st == MH_OK) e->patched = patched; else LoaderLog("ERR", "Hooks: MinHook %s %p failed: %d", patched ? "enable" : "disable", e->target, st); } @@ -162,6 +169,30 @@ static void Want(int i, int patched) SetEvent(g_dirtyEvent); } +// Raises the process to HIGH_PRIORITY_CLASS for one MinHook freeze; returns the class to put +// back (0 = left as it was). MinHook's freeze suspends the process's threads one by one and reads +// each one's context (GetThreadContext), and that read waits until the suspended thread itself +// gets a CPU to run the kernel's get-context APC. A LOWEST or BELOW_NORMAL thread (AC's d3d9 +// workers, the engine's heartbeat) on a machine saturated by normal-priority work (every client +// hot reloading at once) waits seconds for that, while the threads already suspended, AC's main +// thread first among them, stay frozen: the 4-7 s "applied in one freeze" lines and main-thread +// hangs of the 2026-10-31/11-01 reloads. In HIGH class a LOWEST thread is at 11, above every +// normal process, so the reads come back at once (tools\LoaderFreezeBench measures both). Every +// other thread is suspended for most of the window, so the boost doesn't let this process take +// CPU from the other clients beyond the freeze itself. +static DWORD BoostForFreeze(void) +{ + HANDLE self = GetCurrentProcess(); + DWORD cls = GetPriorityClass(self); + if (cls == 0 || cls == HIGH_PRIORITY_CLASS || cls == REALTIME_PRIORITY_CLASS) return 0; + return SetPriorityClass(self, HIGH_PRIORITY_CLASS) ? cls : 0; +} + +static void RestoreAfterFreeze(DWORD cls) +{ + if (cls != 0) SetPriorityClass(GetCurrentProcess(), cls); +} + // Applies every pending patch/unpatch in one MinHook freeze. (Caller holds g_lock.) static void FlushLocked(const char* why) { @@ -176,7 +207,9 @@ static void FlushLocked(const char* why) } if (n == 0) return; DWORD t0 = GetTickCount(); + DWORD cls = BoostForFreeze(); int st = p_applyQueued(); + RestoreAfterFreeze(cls); if (st == MH_OK) { for (int k = 0; k < n; k++) g_hooks[queued[k]].patched = g_hooks[queued[k]].want; LoaderLog("INF", "Hooks: %d patch(es) applied in one freeze (%lu ms, %s).", n, GetTickCount() - t0, why); diff --git a/native/SehTrampoline/CrashLogFilter.h b/native/SehTrampoline/CrashLogFilter.h index 03014f0..2a4cfff 100644 --- a/native/SehTrampoline/CrashLogFilter.h +++ b/native/SehTrampoline/CrashLogFilter.h @@ -17,10 +17,20 @@ * heap corruption. * - Each faulting address has a slot with its hit count and the time it was last * written. The first sighting is written. A repeat is written again (with its count) - * when the count is a power of two, when 30 s have passed since that address was - * last written, or when the code is not an AV. So a contained AV that later recurs - * as the fatal one is not swallowed as "seen before": a fatal fault is usually a - * terminate from some handler, and then no last-chance filter ever runs. + * when the count is a power of two (any class), or, for an AC-class address only, + * when 30 s have passed since it was last written, or when the code is not an AV. + * So a contained AV that later recurs as the fatal one is not swallowed as "seen + * before": a fatal fault is usually a terminate from some handler, and then no + * last-chance filter ever runs. + * Review fix (2026-10-18): the 30 s relog used to apply to noise too, so Decal's + * handled null-ref AV (about once a minute, one address) was written on EVERY hit: + * ~1,440 entries (~5-6 KB each with the stack sweep) per day per client. Noise now + * repeats only at powers of two (about 11 entries a day for that address), and the + * 30 s / non-AV relogs are capped per address (CLF_MAX_RELOGS); what a cap or the + * dedupe skips is still in the flush ring, so a fatal hit is recovered at exit. + * - A total byte budget (CLF_MAX_LOG_BYTES, counted from the file's size at install plus + * what this process writes): past it ordinary entries are dropped after ONE marker + * line; fatal entries (last-chance, crash-exit flush) get CLF_LOG_RESERVE_BYTES more. * - Noise is classified, written once per address like the rest, and never charged to * the AC limit: * .NET Framework (Decal plugins): faulting module clr.dll, mscorwks.dll, mscorlib; @@ -50,6 +60,9 @@ #define CLF_MAX_LAST_CHANCE 8 #define CLF_ADDR_SLOTS 128 #define CLF_RELOG_MS 30000u +#define CLF_MAX_RELOGS 16 /* non-power-of-two rewrites per address */ +#define CLF_MAX_LOG_BYTES (3u * 1024u * 1024u) /* ordinary entries stop here */ +#define CLF_LOG_RESERVE_BYTES (256u * 1024u) /* extra room for fatal entries */ #define CLF_CODE_ACCESS_VIOLATION 0xC0000005u #define CLF_CODE_FAIL_FAST 0xC0000602u @@ -80,6 +93,7 @@ typedef struct { unsigned int lastWriteMs; unsigned char cls; /* clf_class */ unsigned char used; + unsigned char relogs; /* writes that were not first / power-of-two (time, non-AV) */ } clf_slot; typedef struct { @@ -90,6 +104,10 @@ typedef struct { unsigned int otherRepeats; /* other repeats not written */ unsigned int overCap; /* not written: limit reached */ unsigned int untracked; /* AC addresses written but not tracked (table full of AC) */ + unsigned int relogCapped; /* relogs skipped: the address used its CLF_MAX_RELOGS */ + unsigned int logBytes; /* bytes in the log file: size at install + written since */ + unsigned int byteDenied; /* entries dropped by the byte budget */ + unsigned char capMarked; /* the budget marker line has been written */ } clf_state; static int clf_is_logged_code(unsigned int code) @@ -152,10 +170,22 @@ static clf_decision clf_repeat(clf_state* s, clf_slot* slot, unsigned int code, { slot->hits++; if (hits) *hits = slot->hits; - if (clf_is_pow2(slot->hits) || nowMs - slot->lastWriteMs >= CLF_RELOG_MS || code != CLF_CODE_ACCESS_VIOLATION) { + if (clf_is_pow2(slot->hits)) { slot->lastWriteMs = nowMs; return CLF_LOG_REPEAT; } + /* The 30 s relog is for genuine (AC-class) faults only: noise at one address (Decal's + * handled null-ref, about once a minute) would otherwise be written on every hit. A + * non-AV code is always written, within the per-address cap. */ + if ((slot->cls == CLF_CLASS_AC && nowMs - slot->lastWriteMs >= CLF_RELOG_MS) + || code != CLF_CODE_ACCESS_VIOLATION) { + if (slot->relogs < CLF_MAX_RELOGS) { + slot->relogs++; + slot->lastWriteMs = nowMs; + return CLF_LOG_REPEAT; + } + s->relogCapped++; + } if (slot->cls != CLF_CLASS_AC) s->noiseRepeats++; else s->otherRepeats++; return CLF_SKIP_REPEAT; } @@ -189,6 +219,7 @@ static clf_decision clf_new(clf_state* s, unsigned int code, unsigned int addr, slot->hits = 1; slot->lastWriteMs = nowMs; slot->cls = (unsigned char)cls; + slot->relogs = 0; slot->used = 1; } else { s->untracked++; @@ -266,6 +297,26 @@ static int clf_ring_take(clf_ring* g, clf_rec* out, unsigned int* older) return n; } +typedef enum { + CLF_BYTES_OK = 0, /* write the entry */ + CLF_BYTES_MARK, /* over the budget: write the one marker line, then no entry */ + CLF_BYTES_DENY, /* over the budget: write nothing */ +} clf_bytes; + +/* + * The byte budget, asked before each entry. fatal: a last-chance / crash-exit entry, + * which may use CLF_LOG_RESERVE_BYTES beyond CLF_MAX_LOG_BYTES. The caller adds what it + * writes to s->logBytes (the marker included). + */ +static clf_bytes clf_bytes_gate(clf_state* s, int fatal) +{ + unsigned int limit = CLF_MAX_LOG_BYTES + (fatal ? CLF_LOG_RESERVE_BYTES : 0u); + if (s->logBytes < limit) return CLF_BYTES_OK; + s->byteDenied++; + if (!fatal && !s->capMarked) { s->capMarked = 1; return CLF_BYTES_MARK; } + return CLF_BYTES_DENY; +} + /* The last-chance (unhandled) filter. Any code: whatever reaches it is fatal. */ static clf_decision clf_last_chance(clf_state* s) { diff --git a/native/SehTrampoline/DumpArgs.h b/native/SehTrampoline/DumpArgs.h new file mode 100644 index 0000000..1c35ed6 --- /dev/null +++ b/native/SehTrampoline/DumpArgs.h @@ -0,0 +1,35 @@ +/* + * DumpArgs.h - the command line of RC_DumpProcess (SehTrampoline.c): " ", the + * path being the rest of the line (spaces kept, trailing spaces and a closing quote dropped). + * The engine writes it (src\RynthCore.Engine\HangDumpCommand.cs). Pure: tests\DumpArgsTests.c. + */ +#pragma once +#include + +/* 1 when `cmd` holds a pid above 0 and a non-empty path that fits `cap` characters (with its 0). */ +static int ParseDumpArgs(const wchar_t* cmd, unsigned long* pid, wchar_t* path, int cap) +{ + unsigned long p = 0; + int n = 0; + if (!cmd || !pid || !path || cap < 2) return 0; + path[0] = 0; + while (*cmd == L' ' || *cmd == L'\t') cmd++; + if (*cmd < L'0' || *cmd > L'9') return 0; + while (*cmd >= L'0' && *cmd <= L'9') { + unsigned long d = (unsigned long)(*cmd - L'0'); + if (p > (4294967295UL - d) / 10) return 0; /* would overflow */ + p = p * 10 + d; + cmd++; + } + if (*cmd != L' ' && *cmd != L'\t') return 0; + while (*cmd == L' ' || *cmd == L'\t') cmd++; + if (*cmd == L'"') cmd++; + while (*cmd && *cmd != L'"') { + if (n >= cap - 1) return 0; /* too long: refuse rather than cut the name */ + path[n++] = *cmd++; + } + while (n > 0 && (path[n - 1] == L' ' || path[n - 1] == L'\t')) n--; + path[n] = 0; + *pid = p; + return p != 0 && n > 0; +} diff --git a/native/SehTrampoline/SehTrampoline.c b/native/SehTrampoline/SehTrampoline.c index 03656a9..3ea92d3 100644 --- a/native/SehTrampoline/SehTrampoline.c +++ b/native/SehTrampoline/SehTrampoline.c @@ -27,7 +27,11 @@ #include /* File version of this native module (bump with every behavioural change). */ -#define RC_SEH_TRAMPOLINE_VERSION 7 /* v7: stack sweeps bounded by this thread's stack (TEB), never +#define RC_SEH_TRAMPOLINE_VERSION 9 /* v9: RC_DumpProcess, the hang dump written from rundll32 (out of + the client's process); + v8: noise repeats only at powers of two, capped relogs per address, + a total byte budget for native-crash.log (CrashLogFilter.h); + v7: stack sweeps bounded by this thread's stack (TEB), never reading at or past StackBase; v6: AwfulWaffle's crash logger (per-address dedupe, pid/date, flush ring, RC_FlushCrashLog, module cache) merged with v3-v5; @@ -546,7 +550,21 @@ static clf_class cl_first_frame_class(unsigned int esp) static void cl_write(const char* p, DWORD n) { DWORD wr; - if (g_logHandle != INVALID_HANDLE_VALUE) WriteFile(g_logHandle, p, n, &wr, NULL); + if (g_logHandle != INVALID_HANDLE_VALUE && WriteFile(g_logHandle, p, n, &wr, NULL)) + g_filter.logBytes += wr; /* under g_logOwner, like every writer */ +} + +/* The byte budget (CrashLogFilter.h). Under the lock, before an entry. Returns 1 when the + * entry may be written. The first refusal of an ordinary entry writes one marker line. */ +static int cl_budget(int fatal) +{ + clf_bytes b = clf_bytes_gate(&g_filter, fatal); + if (b == CLF_BYTES_MARK) { + const char* m = "\r\n==== NATIVE CRASH LOGGER: log size budget reached, further ordinary entries are dropped " + "(fatal entries still get a reserve; restart the client or trim the file to resume) ====\r\n"; + cl_write(m, (DWORD)lstrlenA(m)); + } + return b == CLF_BYTES_OK; } /* Append " pid=N tid=N date=YYYY-MM-DD time=HH:MM:SS" (local time). */ @@ -569,7 +587,7 @@ static char* cl_stamp(char* p) return p; } -static void cl_write_entry(PEXCEPTION_POINTERS ep, const char* kind, unsigned int hits) +static void cl_write_entry(PEXCEPTION_POINTERS ep, const char* kind, unsigned int hits, int fatal) { char* p = g_buf; CONTEXT* c = ep->ContextRecord; @@ -577,6 +595,7 @@ static void cl_write_entry(PEXCEPTION_POINTERS ep, const char* kind, unsigned in unsigned int exAddr = (unsigned int)(UINT_PTR)ep->ExceptionRecord->ExceptionAddress; unsigned int words; if (g_logHandle == INVALID_HANDLE_VALUE) return; + if (!cl_budget(fatal)) return; p = cl_str(p, "\r\n==== NATIVE CRASH LOGGER ("); p = cl_str(p, kind); @@ -604,6 +623,10 @@ static void cl_write_entry(PEXCEPTION_POINTERS ep, const char* kind, unsigned in p = cl_u(p, g_filter.otherRepeats); p = cl_str(p, " overCap="); p = cl_u(p, g_filter.overCap); + p = cl_str(p, " relogCapped="); + p = cl_u(p, g_filter.relogCapped); + p = cl_str(p, " logBytes="); + p = cl_u(p, g_filter.logBytes); p = cl_str(p, "\r\n eip="); p = cl_sym(p, c->Eip, 1); p = cl_str(p, " esp="); p = cl_hex(p, c->Esp); p = cl_str(p, " ebp="); p = cl_hex(p, c->Ebp); @@ -670,6 +693,7 @@ static void cl_flush_locked(const char* reason, unsigned int code, unsigned int n = k; } if (n == 0 || g_logHandle == INVALID_HANDLE_VALUE) return; + if (!cl_budget(maxAgeMs == 0)) return; /* last chance / crash exit are fatal: they get the reserve */ p = g_buf; p = cl_str(p, "\r\n==== NATIVE CRASH LOGGER (flush: "); p = cl_str(p, reason); @@ -731,7 +755,7 @@ static LONG CALLBACK CrashVeh(PEXCEPTION_POINTERS ep) if (slot) { /* A repeat: decided without touching any module. */ if (clf_repeat(&g_filter, slot, code, now, &hits) == CLF_LOG_REPEAT) { - cl_write_entry(ep, slot->cls != CLF_CLASS_AC ? "first-chance, repeat, noise" : "first-chance, repeat", hits); + cl_write_entry(ep, slot->cls != CLF_CLASS_AC ? "first-chance, repeat, noise" : "first-chance, repeat", hits, 0); written = 1; } } else { @@ -742,11 +766,11 @@ static LONG CALLBACK CrashVeh(PEXCEPTION_POINTERS ep) leaf == NULL && code == CLF_CODE_ACCESS_VIOLATION ? cl_first_frame_class(ep->ContextRecord->Esp) : CLF_CLASS_AC); clf_decision d = clf_new(&g_filter, code, exAddr, cls, now); if (d == CLF_LOG_COUNTED) - cl_write_entry(ep, "first-chance", 1); + cl_write_entry(ep, "first-chance", 1, 0); else if (d == CLF_LOG_NOISE) cl_write_entry(ep, cls == CLF_CLASS_NETFX ? "first-chance, .NET Framework noise, not counted" - : "first-chance, managed (CoreCLR) noise, not counted", 1); + : "first-chance, managed (CoreCLR) noise, not counted", 1, 0); written = d == CLF_LOG_COUNTED || d == CLF_LOG_NOISE; } /* Kept for a flush (memory only): the fatal hit is often one not written here. */ @@ -766,7 +790,7 @@ static LONG WINAPI CrashLastChance(PEXCEPTION_POINTERS ep) if (cl_lock()) { cl_flush_locked("last chance", ep->ExceptionRecord->ExceptionCode, 0); if (clf_last_chance(&g_filter) == CLF_LOG_LAST_CHANCE) - cl_write_entry(ep, "LAST-CHANCE, unhandled", 1); + cl_write_entry(ep, "LAST-CHANCE, unhandled", 1, 1); cl_unlock(); } if (g_prevFilter && g_prevFilter != CrashLastChance) { @@ -830,6 +854,9 @@ RC_InstallCrashLogger(const wchar_t* logPath) FILE_ATTRIBUTE_NORMAL, NULL); if (h != INVALID_HANDLE_VALUE) { HANDLE old = g_logHandle; + DWORD size = GetFileSize(h, NULL); /* the budget counts what is already there */ + g_filter.logBytes = size == INVALID_FILE_SIZE ? 0u : (unsigned int)size; + g_filter.capMarked = 0; g_logHandle = h; if (old != INVALID_HANDLE_VALUE) { CloseHandle(old); } } @@ -949,7 +976,7 @@ static int gt_filter(PEXCEPTION_POINTERS ep, GT_FAULT* f) f->module[k] = 0; } if (InterlockedIncrement(&g_gameTickRecords) <= CL_MAX_GAMETICK) { - cl_write_entry(ep, "AV CAUGHT IN GAME TICK (Client::UseTime guard; tick dropped, client kept running)", 1); + cl_write_entry(ep, "AV CAUGHT IN GAME TICK (Client::UseTime guard; tick dropped, client kept running)", 1, 0); } cl_unlock(); if (leaf && f->module && f->module[0]) { @@ -983,3 +1010,47 @@ SEH_GameTickThiscall(void* fn, void* this_ptr, int* out_result, RC_SEH_LEAVE(); return 1; } + +/* ── Out-of-process minidump (rundll32 entry) ───────────────────────────── + * The engine's hang watchdog runs + * %windir%\SysWOW64\rundll32.exe "",RC_DumpProcess + * so the dump of a hung client is written from another process: MiniDumpWriteDump on the + * client itself suspends every other thread and then needs the process heap, which a + * suspended thread may hold (2026-10-31: a client deadlocked for good that way). dbghelp comes + * from the system folder, not AC's own 2003 copy. The process exit code says how it went: + * 0 written, 1 bad arguments, 2 OpenProcess, 3 CreateFile, 4 dbghelp, 5 MiniDumpWriteDump + * (the file is deleted). Nothing runs in the client's process. */ +#include "DumpArgs.h" + +typedef BOOL (WINAPI *Fn_MiniDumpWriteDump)(HANDLE, DWORD, HANDLE, DWORD, void*, void*, void*); + +static UINT DumpProcessCore(const wchar_t* cmd) +{ + unsigned long pid = 0; + wchar_t path[MAX_PATH]; + if (!ParseDumpArgs(cmd, &pid, path, MAX_PATH)) return 1; + + HANDLE proc = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ | PROCESS_DUP_HANDLE, FALSE, pid); + if (!proc) return 2; + HANDLE file = CreateFileW(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + if (file == INVALID_HANDLE_VALUE) { CloseHandle(proc); return 3; } + HMODULE dbghelp = LoadLibraryExW(L"dbghelp.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32); + Fn_MiniDumpWriteDump write = dbghelp ? (Fn_MiniDumpWriteDump)GetProcAddress(dbghelp, "MiniDumpWriteDump") : NULL; + UINT rc = 4; + if (write) { + /* MiniDumpNormal (every thread's stack) | WithHandleData | WithUnloadedModules | WithThreadInfo */ + rc = write(proc, pid, file, 0x00000000 | 0x00000004 | 0x00000020 | 0x00001000, NULL, NULL, NULL) ? 0 : 5; + } + CloseHandle(file); + CloseHandle(proc); + if (rc != 0) DeleteFileW(path); + return rc; +} + +__declspec(dllexport) void CALLBACK RC_DumpProcessW(HWND hwnd, HINSTANCE inst, LPWSTR cmdLine, int show) +{ + (void)hwnd; (void)inst; (void)show; + ExitProcess(DumpProcessCore(cmdLine)); +} +/* rundll32 looks the entry up by its plain name (it tries RC_DumpProcessW first). */ +#pragma comment(linker, "/EXPORT:RC_DumpProcessW=_RC_DumpProcessW@16") diff --git a/native/SehTrampoline/tests/CrashLogFilterTests.c b/native/SehTrampoline/tests/CrashLogFilterTests.c index 5c1469c..45675a8 100644 --- a/native/SehTrampoline/tests/CrashLogFilterTests.c +++ b/native/SehTrampoline/tests/CrashLogFilterTests.c @@ -222,8 +222,87 @@ static void ring_order_overflow_and_written(void) check(got == 1 && out[0].addr == 0x9999 && older == 0, "after a flush, only what came since"); } +/* Review fix: Decal's handled null-ref AV at one JIT-code address about once a minute was + * written on EVERY hit (the 30 s relog applied to noise). A day of it: 1,440 hits. */ +static void noise_once_a_minute_is_not_written_every_hit(void) +{ + static clf_state s; + unsigned int hits, i, written = 0, now = 100000u; + for (i = 0; i < 1440; i++, now += 60000u) + if (is_write(FC(&s, AV, 0x433620C8u, CLF_CLASS_NETFX, now))) written++; + /* first + powers of two 2..1024 = 1 + 10 */ + check(written == 11, "1,440 once-a-minute hits of one noise address: 11 entries, not 1,440"); + check(s.counted == 0, "and none charged to the limit"); + check(s.noiseRepeats == 1440 - 11, "skipped noise repeats are counted"); + { + static clf_state m; + written = 0; + for (i = 0; i < 1440; i++) if (is_write(FC(&m, AV, 0x70001000u, CLF_CLASS_MANAGED, 5000u + i * 60000u))) written++; + check(written == 11, "managed noise is the same"); + } +} + +/* A genuine (AC) address keeps its 30 s relog, but only CLF_MAX_RELOGS times. */ +static void ac_relog_is_capped_per_address(void) +{ + static clf_state s; + unsigned int hits, i, written = 0, now = 1000u; + check(FC(&s, AV, 0x00416C86u, CLF_CLASS_AC, now) == CLF_LOG_COUNTED, "first sighting written"); + for (i = 2; i <= 1500; i++) { + now += 31000u; + if (is_write(FC(&s, AV, 0x00416C86u, CLF_CLASS_AC, now))) written++; + } + { + unsigned int pow2 = 0, v; + for (v = 2; v <= 1500; v <<= 1) pow2++; /* 2..1024 = 10 */ + check(written == pow2 + CLF_MAX_RELOGS, "1,500 hits 31 s apart: the power-of-two ones + CLF_MAX_RELOGS time relogs"); + } + check(s.relogCapped > 0, "the skipped relogs are counted"); + check(clf_find(&s, 0x00416C86u)->relogs == CLF_MAX_RELOGS, "the slot used its relog budget"); +} + +/* A non-AV code at a known address is written, within the same per-address cap. */ +static void non_av_relog_is_capped(void) +{ + static clf_state s; + unsigned int hits, i, written = 0; + FC(&s, AV, 0x00500000u, CLF_CLASS_AC, 100); + for (i = 0; i < 200; i++) + if (is_write(FC(&s, CLF_CODE_HEAP_CORRUPTION, 0x00500000u, CLF_CLASS_AC, 200 + i))) written++; + /* hits 2..201: powers of two 2,4,..,128 = 7, plus the capped relogs */ + check(written == 7 + CLF_MAX_RELOGS, "non-AV repeats: powers of two + CLF_MAX_RELOGS, not every hit"); +} + +/* The byte budget: ordinary entries stop after one marker; fatal ones get a reserve. */ +static void byte_budget(void) +{ + static clf_state s; + int i; + check(clf_bytes_gate(&s, 0) == CLF_BYTES_OK, "an empty log accepts an entry"); + s.logBytes = CLF_MAX_LOG_BYTES - 1; + check(clf_bytes_gate(&s, 0) == CLF_BYTES_OK, "one byte under the budget still accepts"); + s.logBytes = CLF_MAX_LOG_BYTES; + check(clf_bytes_gate(&s, 0) == CLF_BYTES_MARK, "at the budget: the marker, once"); + for (i = 0; i < 5; i++) + check(clf_bytes_gate(&s, 0) == CLF_BYTES_DENY, "then ordinary entries are dropped"); + check(s.byteDenied == 6, "and counted"); + check(clf_bytes_gate(&s, 1) == CLF_BYTES_OK, "a fatal entry still fits in the reserve"); + s.logBytes = CLF_MAX_LOG_BYTES + CLF_LOG_RESERVE_BYTES; + check(clf_bytes_gate(&s, 1) == CLF_BYTES_DENY, "and not past the reserve"); + { + static clf_state t; /* a log that starts over the budget (shared file already big) */ + t.logBytes = CLF_MAX_LOG_BYTES + 10; + check(clf_bytes_gate(&t, 1) == CLF_BYTES_OK, "a fatal entry fits in the reserve of a log that opened over budget"); + check(clf_bytes_gate(&t, 0) == CLF_BYTES_MARK, "its first ordinary entry gets the marker"); + } +} + int main(void) { + noise_once_a_minute_is_not_written_every_hit(); + ac_relog_is_capped_per_address(); + non_av_relog_is_capped(); + byte_budget(); fatal_repeat_recovered_by_flush(5); fatal_repeat_recovered_by_flush(100); fatal_repeat_recovered_by_flush(1000); diff --git a/native/SehTrampoline/tests/DumpArgsTests.c b/native/SehTrampoline/tests/DumpArgsTests.c new file mode 100644 index 0000000..a48f9e1 --- /dev/null +++ b/native/SehTrampoline/tests/DumpArgsTests.c @@ -0,0 +1,47 @@ +/* + * DumpArgsTests.c - offline checks for DumpArgs.h (RC_DumpProcess's command line, the hang + * dump written from rundll32). Build and run with Run-DumpArgsTests.ps1 (x86 MSVC). Exit 0 = pass. + */ +#include +#include +#include +#include "../DumpArgs.h" + +static int g_checks, g_failed; + +static void check(int ok, const char* what) +{ + g_checks++; + if (ok) return; + g_failed++; + printf("[FAIL] %s\n", what); +} + +int main(void) +{ + unsigned long pid; + wchar_t path[260]; + + /* What HangDumpCommand.Arguments leaves for the entry (rundll32 passes the text after the entry name). */ + check(ParseDumpArgs(L"17132 C:\\Games\\RynthCore\\Logs\\dumps\\hang_17132_20261031_211714.dmp", &pid, path, 260) + && pid == 17132 && wcscmp(path, L"C:\\Games\\RynthCore\\Logs\\dumps\\hang_17132_20261031_211714.dmp") == 0, + "pid and path"); + check(ParseDumpArgs(L" 42 C:\\Users\\Some One's PC\\a b.dmp ", &pid, path, 260) + && pid == 42 && wcscmp(path, L"C:\\Users\\Some One's PC\\a b.dmp") == 0, + "spaces and an apostrophe in the path are kept, the ends trimmed"); + check(ParseDumpArgs(L"7 \"C:\\x y\\z.dmp\"", &pid, path, 260) && pid == 7 && wcscmp(path, L"C:\\x y\\z.dmp") == 0, + "a quoted path loses its quotes"); + check(!ParseDumpArgs(L"", &pid, path, 260), "empty refused"); + check(!ParseDumpArgs(NULL, &pid, path, 260), "null refused"); + check(!ParseDumpArgs(L"123", &pid, path, 260), "no path refused"); + check(!ParseDumpArgs(L"0 C:\\a.dmp", &pid, path, 260), "pid 0 refused"); + check(!ParseDumpArgs(L"x C:\\a.dmp", &pid, path, 260), "no pid refused"); + check(!ParseDumpArgs(L"12x C:\\a.dmp", &pid, path, 260), "a pid run into text refused"); + check(!ParseDumpArgs(L"99999999999 C:\\a.dmp", &pid, path, 260), "an overflowing pid refused"); + check(ParseDumpArgs(L"4294967295 C:\\a.dmp", &pid, path, 260) && pid == 4294967295UL, "the largest pid"); + check(!ParseDumpArgs(L"5 C:\\abcdefgh.dmp", &pid, path, 8), "a path longer than the buffer refused, not cut"); + check(ParseDumpArgs(L"5 C:\\a.dmp", &pid, path, 9) && wcscmp(path, L"C:\\a.dmp") == 0, "a path that just fits"); + + printf("%d check(s), %d failed.\n", g_checks, g_failed); + return g_failed == 0 ? 0 : 1; +} diff --git a/native/SehTrampoline/tests/Run-DumpArgsTests.ps1 b/native/SehTrampoline/tests/Run-DumpArgsTests.ps1 new file mode 100644 index 0000000..b476d3b --- /dev/null +++ b/native/SehTrampoline/tests/Run-DumpArgsTests.ps1 @@ -0,0 +1,28 @@ +# Run-DumpArgsTests.ps1 +# Builds and runs DumpArgsTests.c (x86 MSVC, the same toolchain as the DLL). +# -OutDir: where the test exe goes (default: native\SehTrampoline\tests\bin). Exit 0 = pass. + +param([string]$OutDir = (Join-Path $PSScriptRoot "bin")) + +$ErrorActionPreference = "Stop" + +$vsPath = & "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" ` + -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ` + -property installationPath 2>$null +if (-not $vsPath) { Write-Error "Visual Studio with C++ tools not found."; exit 1 } + +$vcVer = (Get-ChildItem "$vsPath\VC\Tools\MSVC" | Sort-Object Name -Descending | Select-Object -First 1).Name +$vcBase = "$vsPath\VC\Tools\MSVC\$vcVer" +$cl = "$vcBase\bin\Hostx86\x86\cl.exe" +$sdkVer = (Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\Include" | Sort-Object Name -Descending | Select-Object -First 1).Name +$sdkInc = "C:\Program Files (x86)\Windows Kits\10\Include\$sdkVer" +$sdkLib = "C:\Program Files (x86)\Windows Kits\10\Lib\$sdkVer" +$env:INCLUDE = "$vcBase\include;$sdkInc\ucrt;$sdkInc\um;$sdkInc\shared" +$env:LIB = "$vcBase\lib\x86;$sdkLib\ucrt\x86;$sdkLib\um\x86" + +New-Item -ItemType Directory -Path $OutDir -Force | Out-Null +$exe = Join-Path $OutDir "DumpArgsTests.exe" +& $cl /nologo /W4 /WX "$PSScriptRoot\DumpArgsTests.c" /Fo"$OutDir\\" /Fe"$exe" /link /MACHINE:X86 +if ($LASTEXITCODE -ne 0) { Write-Error "Compilation failed."; exit $LASTEXITCODE } +& $exe +exit $LASTEXITCODE diff --git a/runtime-patches/.gitattributes b/runtime-patches/.gitattributes new file mode 100644 index 0000000..a204813 --- /dev/null +++ b/runtime-patches/.gitattributes @@ -0,0 +1,3 @@ +# Byte for byte: a patch with CRLF line endings no longer applies. +*.patch -text +*.dll binary diff --git a/runtime-patches/coreclr-10.0.12-x86/README.md b/runtime-patches/coreclr-10.0.12-x86/README.md new file mode 100644 index 0000000..2eaf862 --- /dev/null +++ b/runtime-patches/coreclr-10.0.12-x86/README.md @@ -0,0 +1,57 @@ +# Patched CoreCLR 10.0.12 (x86) + +`coreclr.dll`, `mscordaccore.dll` (the DAC) and `mscordbi.dll` built from dotnet/runtime **v10.0.12** +with one change, `tls-no-reuse.patch`. `scripts\Publish-EngineCoreClr.ps1` lays them over the +runtime pack's own files in `Runtime\dotnet` (the installer's staging and a full local deploy). The +official ReadyToRun `System.Private.CoreLib.dll` and `clrjit.dll` stay: their source is unchanged. + +File version 10.0.1226.52301, product version `@Commit: f2f2e4642…` (the patch commit), so a crash +event or dump shows which runtime it was. + +## Why + +Clients that had hot-reloaded the engine crashed minutes later: random statics of live engine and +plugin types read null or garbage, then an access violation (.NET Runtime event 1023/1026, a 1 GB +`clr__*.dmp`). It is a CoreCLR bug, open upstream as dotnet/runtime #135441 (also #135588, +#134928; Microsoft's fix, PR #134983, was unmerged on 2026-10-23 and in no released 10.0.x; 10.0.13 +has the bug too). + +When a thread exits, `FreeLoaderAllocatorHandlesForTLSData` frees each of its collectible +thread-static handles against whichever LoaderAllocator *now* owns that TLS index. Unloading a context +only marks its indices cleared, and `GetTLSIndexForThreadStatic` hands a cleared index to the next +type that asks. So a thread that touched a thread static before a hot reload (a ThreadPool worker, +retiring ~20 s after it goes idle) frees an unrelated live slot in the new generation's handle table +when it exits, and whatever was kept alive there is collected. + +The patch: a cleared collectible index is never reused (always `g_NextTLSSlot++`). A thread's +leftover handles then only ever point at cleared indices, which `CollectibleEntries()` skips, and +they are dropped with the thread's arrays. Cost: the index space grows by the number of collectible +types with thread statics per generation (a few bytes per thread per type). + +## Tested (2026-10-23) + +- Offline repro `C:\Projects\reloadbug` (Host.dll + Victim.dll, `run.ps1`, `test-patched.ps1`): stock + 10.0.12 and 10.0.13 corrupt 16 statics per round or crash (AV); patched, 0 in 300 rounds in every + mode (dedicated thread, statics in the reused slots, ThreadPool workers retiring); the control + (thread exits before the unload) is clean on both. +- Freya (test client) on the patched runtime: 20 engine hot reloads 4 minutes apart, no crash, no + dump, each old generation unloaded (+38 MB). On the stock runtime that morning both hot reloads + crashed within 3-16 minutes. + +## Build it again + +``` +git clone --depth 1 -b v10.0.12 https://github.com/dotnet/runtime C:\Projects\rt (core.longpaths true) +git -C C:\Projects\rt am tls-no-reuse.patch +C:\Projects\rt\build.cmd -subset clr.runtime -arch x86 -c Release /p:NuGetAudit=false /p:OfficialBuildId=20261023.1 +``` + +Output: `artifacts\bin\coreclr\windows.x86.Release\` (symbols in `PDB\`; kept on Tom's PC at +`C:\Projects\runtime-symbols\coreclr-10.0.1226.52301`). `NuGetAudit=false`: two build-time tasks use a +package with advisories published after the tag; nothing of them ships. Needs ~10 GB free. + +## When to drop it + +When a 10.0.x with the upstream fix ships: move the runtime pack to it and delete this folder. +A runtime pack of another version than 10.0.12 makes `Publish-EngineCoreClr.ps1` refuse (a coreclr +must match its CoreLib): rebuild the patch for that version, or drop it. diff --git a/runtime-patches/coreclr-10.0.12-x86/coreclr.dll b/runtime-patches/coreclr-10.0.12-x86/coreclr.dll new file mode 100644 index 0000000..f2576b4 Binary files /dev/null and b/runtime-patches/coreclr-10.0.12-x86/coreclr.dll differ diff --git a/runtime-patches/coreclr-10.0.12-x86/mscordaccore.dll b/runtime-patches/coreclr-10.0.12-x86/mscordaccore.dll new file mode 100644 index 0000000..11ae9d0 Binary files /dev/null and b/runtime-patches/coreclr-10.0.12-x86/mscordaccore.dll differ diff --git a/runtime-patches/coreclr-10.0.12-x86/mscordbi.dll b/runtime-patches/coreclr-10.0.12-x86/mscordbi.dll new file mode 100644 index 0000000..0bb286a Binary files /dev/null and b/runtime-patches/coreclr-10.0.12-x86/mscordbi.dll differ diff --git a/runtime-patches/coreclr-10.0.12-x86/tls-no-reuse.patch b/runtime-patches/coreclr-10.0.12-x86/tls-no-reuse.patch new file mode 100644 index 0000000..8847dc8 --- /dev/null +++ b/runtime-patches/coreclr-10.0.12-x86/tls-no-reuse.patch @@ -0,0 +1,44 @@ +From f2f2e4642c7d86fd6cf4503762051b1ecb6f12f7 Mon Sep 17 00:00:00 2001 +From: Tom Bohar +Date: Fri, 23 Oct 2026 08:07:39 -0400 +Subject: [PATCH] Never reuse a cleared collectible thread-static TLS index + (RynthCore hot-reload statics crash, dotnet/runtime #135441) + +Co-Authored-By: Claude Opus 5.5 +--- + src/coreclr/vm/threadstatics.cpp | 19 +++++++++++++------ + 1 file changed, 13 insertions(+), 6 deletions(-) + +diff --git a/src/coreclr/vm/threadstatics.cpp b/src/coreclr/vm/threadstatics.cpp +index dcff2bc8c..1b174463e 100644 +--- a/src/coreclr/vm/threadstatics.cpp ++++ b/src/coreclr/vm/threadstatics.cpp +@@ -766,12 +766,19 @@ void GetTLSIndexForThreadStatic(MethodTable* pMT, bool gcStatic, TLSIndex* pInde + } + else + { +- if (!g_pThreadStaticCollectibleTypeIndices->FindClearedIndex(&newTLSIndex)) +- { +- uint32_t tlsRawIndex = g_NextTLSSlot; +- newTLSIndex = TLSIndex(TLSIndexType::Collectible, tlsRawIndex); +- g_NextTLSSlot += 1; +- } ++ // RynthCore patch (2026-10-23, dotnet/runtime #135441 / #134928): never reuse a cleared ++ // collectible index. A thread that outlived the old owner's unload still holds ++ // pLoaderHandles[index] (and its TLS array entry) for it. Once the index was reused, ++ // FreeLoaderAllocatorHandlesForTLSData freed that stale handle against the NEW owner's ++ // LoaderAllocator when the thread exited, unrooting whatever live object the new owner kept ++ // in that slot (random statics of live types read null or garbage, then crashed). A cleared ++ // index is skipped by CollectibleEntries(), so its stale state is simply dropped with the ++ // thread's arrays. Cost: the index space grows with every collectible type with thread ++ // statics ever loaded (a few bytes per thread per type), which is bounded for a host that ++ // unloads a context per hot reload. ++ uint32_t tlsRawIndex = g_NextTLSSlot; ++ newTLSIndex = TLSIndex(TLSIndexType::Collectible, tlsRawIndex); ++ g_NextTLSSlot += 1; + + g_pThreadStaticCollectibleTypeIndices->Set(newTLSIndex, pMT, gcStatic); + pMT->GetLoaderAllocator()->GetTLSIndexList().Append(newTLSIndex); +-- +2.54.0.windows.1 + diff --git a/scripts/Publish-EngineCoreClr.ps1 b/scripts/Publish-EngineCoreClr.ps1 index b20b93c..071b539 100644 --- a/scripts/Publish-EngineCoreClr.ps1 +++ b/scripts/Publish-EngineCoreClr.ps1 @@ -140,6 +140,34 @@ if (-not $EngineOnly) { } else { Write-Warning "createdump.exe is missing from $dotnet and no runtime pack matches coreclr $have; a CoreCLR crash will leave no dump." } } + + # Patched CoreCLR (2026-10-23, runtime-patches\coreclr-10.0.12-x86\README.md): the hot-reload + # statics crash, dotnet/runtime #135441. Its coreclr.dll, DAC and DBI go over the runtime pack's; + # the official CoreLib and JIT stay. Refused for a runtime of another version: a coreclr has to + # match its CoreLib. In use by a running client: moved aside, as the loader and shim are. + $patch = Join-Path $repo "runtime-patches\coreclr-10.0.12-x86" + if (Test-Path "$patch\coreclr.dll") { + $lib = (Get-Item "$dotnet\System.Private.CoreLib.dll").VersionInfo + $pv = (Get-Item "$patch\coreclr.dll").VersionInfo + if ($lib.FileMajorPart -ne $pv.FileMajorPart -or $lib.FileMinorPart -ne $pv.FileMinorPart -or $lib.FileBuildPart -ne $pv.FileBuildPart) { + throw "runtime-patches\coreclr-10.0.12-x86 was built for runtime $($pv.FileMajorPart).$($pv.FileMinorPart).$($pv.FileBuildPart), but $dotnet has CoreLib $($lib.FileMajorPart).$($lib.FileMinorPart).$($lib.FileBuildPart): rebuild the patch for it or remove the folder (see its README)." + } + $dacName = "mscordaccore_x86_x86_{0}.{1}.{2}.{3}.dll" -f $pv.FileMajorPart, $pv.FileMinorPart, $pv.FileBuildPart, $pv.FilePrivatePart + $copied = 0 + foreach ($pair in @(@('coreclr.dll', 'coreclr.dll'), @('mscordaccore.dll', 'mscordaccore.dll'), @('mscordbi.dll', 'mscordbi.dll'), @('mscordaccore.dll', $dacName))) { + $src = Join-Path $patch $pair[0] + $dest = Join-Path $dotnet $pair[1] + if ((Test-Path $dest) -and (Get-FileHash $dest).Hash -eq (Get-FileHash $src).Hash) { continue } + try { Copy-Item $src $dest -Force -ErrorAction Stop } + catch { + Rename-Item $dest ("{0}.old-{1:yyyyMMddHHmmss}" -f $pair[1], (Get-Date)) -ErrorAction Stop + Copy-Item $src $dest -Force -ErrorAction Stop + Write-Host "$($pair[1]) was in use: moved the old one aside; new launches get the patched one." + } + $copied++ + } + if ($copied -gt 0) { Write-Host "Patched CoreCLR $($pv.FileVersion) -> $dotnet ($copied file(s); runtime-patches\coreclr-10.0.12-x86)" } + } } # Engine + dependencies. The canonical RynthCore.Engine.dll goes last: the loader's file diff --git a/scripts/Run-AllTests.ps1 b/scripts/Run-AllTests.ps1 new file mode 100644 index 0000000..53da5b3 --- /dev/null +++ b/scripts/Run-AllTests.ps1 @@ -0,0 +1,207 @@ +#Requires -Version 7 +<# +.SYNOPSIS + Builds and runs every offline test program in RynthCore, RynthSuite and RynthServers. Exit 0 only + when every one passes. + +.DESCRIPTION + The test programs are console apps: RynthCore tools\*Tests, RynthSuite and RynthServers Tools\*Tests, + each run as `dotnet run -c Release` from its own folder (exit 0 = pass, anything else = fail), and the + loader's C tests (a Run-Tests.ps1 beside test.c, built with MSVC). None needs a game client, a server + or the network, and none writes to %APPDATA% or C:\Games (each project's header says what it reads). + + Publish-Update.ps1 runs this before it builds a release and refuses to publish when a test fails + (2026-10-22: tests only ran when someone remembered to; a release went out with Missile Crafting + broken while the tests that existed passed). + + Each test program is also checked for test groups that exist but never run (a class with a static + Register(...) that is never registered, a static RunXxx() that is never called): those fail the run. + + Every folder whose name contains "Test" is run unless $Skip below names it with a reason; skipped ones + are listed in the summary, never dropped silently. Each program's output goes to + \..log, and the summary (also \summary.txt) shows each failure's last lines. + +.EXAMPLE + .\scripts\Run-AllTests.ps1 -RynthSuiteRoot C:\Projects\rel1002\RynthSuite +.EXAMPLE + .\scripts\Run-AllTests.ps1 -Only RynthCore.RynthAiHostTests, ChatFilterTests +#> +param( + [string]$RynthCoreRoot = "", # defaults to this checkout + [string]$RynthSuiteRoot = "", # defaults to ..\RynthSuite beside RynthCore + [string]$RynthServersRoot = "", # defaults to ..\RynthServers beside RynthSuite + [string[]]$Only = @(), # folder names (or repo.name) to run; empty = all + [string]$LogDir = "", # defaults to %TEMP%\rynth-tests\