From 08b80eed862b2548f3bcc4a1fb438c47cebb3eb6 Mon Sep 17 00:00:00 2001 From: Tom Bohar Date: Sun, 11 Oct 2026 15:00:53 -0400 Subject: [PATCH] Snapshot for release 2026.10.11.1 (internal 4eca83a) --- installer/Publish-Update.ps1 | 6 +- installer/RynthCore.iss | 85 +- native/Loader/Loader.c | 158 +- native/Loader/Loader.h | 2 +- scripts/Publish-EngineCoreClr.ps1 | 23 +- scripts/Test-ClrReload.ps1 | 5 + scripts/Test-ClrWorld.ps1 | 5 + .../DecalBridgeDialog.cs | 14 +- src/RynthCore.App.Avalonia/MainWindow.axaml | 2 + .../MainWindow.axaml.cs | 256 +++- src/RynthCore.App.Avalonia/Program.cs | 35 +- .../RynthCore.App.Avalonia.csproj | 2 + src/RynthCore.App/AppSettings.cs | 6 + src/RynthCore.App/DecalBridgeCheck.cs | 14 +- src/RynthCore.App/DecalBridgeRegistration.cs | 1157 ++++++++------ src/RynthCore.App/RealDecalCheckHost.cs | 21 + .../Compatibility/AcMouseOver.cs | 8 +- .../Compatibility/AcMouseOverRules.cs | 17 +- .../Compatibility/ChatCommandDispatcher.cs | 6 +- .../Compatibility/IltDetect.cs | 169 +++ src/RynthCore.Engine/Compatibility/IltInfo.cs | 103 ++ .../LargeAddressAlignmentPatch.cs | 143 ++ .../LargeAddressAlignmentScan.cs | 107 ++ .../Compatibility/RynthCoreChatCommands.cs | 125 +- .../Compatibility/ServerInfo.cs | 10 + src/RynthCore.Engine/EngineLifecycle.cs | 11 + src/RynthCore.Engine/EntryPoint.cs | 47 + src/RynthCore.Engine/ImGui/ImGuiBar.cs | 179 ++- .../ImGui/MonsterHud/CreatureSizes.cs | 30 + .../ImGui/MonsterHud/CreatureSizes.g.cs | 1326 +++++++++++++++++ .../ImGui/MonsterHud/MonsterHud.cs | 55 +- .../ImGui/MonsterHud/MonsterHudSettings.cs | 10 +- .../ImGui/MonsterHud/MonsterHudSettingsUi.cs | 3 + .../ImGui/Panels/BountiesFace.cs | 312 ++++ .../ImGui/Panels/ChatDiscordFace.cs | 485 ++++++ src/RynthCore.Engine/ImGui/Panels/ChatFace.cs | 23 +- .../ImGui/Panels/LootAddDialog.cs | 8 +- src/RynthCore.Engine/ImGui/Panels/P1Faces.cs | 3 + .../ImGui/Panels/ReportFace.cs | 241 +++ .../ImGui/Panels/SettingsFace.cs | 21 + src/RynthCore.Engine/ImGui/PhosphorIcons.cs | 3 +- .../Plugins/EngineSettings.cs | 131 +- src/RynthCore.Engine/ReloadCapNotice.cs | 49 + src/RynthCore.Engine/Report/ProblemReport.cs | 429 ++++++ .../Report/ProblemReportCore.cs | 462 ++++++ src/RynthCore.Engine/RynthCore.Engine.csproj | 2 + src/RynthCore.Engine/UI/Data/BountiesData.cs | 103 ++ .../UI/Data/BountiesSnapshotJson.cs | 70 + src/RynthCore.Engine/UI/Data/ChatData.cs | 52 +- .../UI/Data/Discord/ChatDiscord.cs | 664 +++++++++ .../UI/Data/Discord/ChatDiscordLogic.cs | 134 ++ .../UI/Data/Discord/ChatDiscordSettings.cs | 380 +++++ .../UI/Data/Discord/ChatSpeech.cs | 213 +++ .../UI/Data/Discord/DiscordClient.cs | 254 ++++ .../UI/Data/Discord/DiscordFormat.cs | 211 +++ .../UI/Data/Discord/DiscordRouteQueue.cs | 282 ++++ .../UI/Data/Discord/DiscordSecrets.cs | 115 ++ src/RynthCore.Engine/UI/Data/SettingsData.cs | 2 + src/RynthCore.Engine/UI/Data/UiSources.cs | 2 + src/RynthCore.Engine/UI/PanelTextScale.cs | 31 +- src/RynthCore.Injector/Program.cs | 5 +- src/RynthCore.StatusAgent/AgentLog.cs | 16 + .../AcMouseOverTests/AcMouseOverTests.csproj | 2 +- tools/AcMouseOverTests/Program.cs | 11 +- .../ChatDiscordTests/ChatDiscordTests.csproj | 31 + tools/ChatDiscordTests/Program.cs | 704 +++++++++ tools/CreatureSizes/README.md | 28 + tools/CreatureSizes/SetupDims/Program.cs | 27 + .../CreatureSizes/SetupDims/SetupDims.csproj | 18 + tools/CreatureSizes/gen_cs.py | 50 + tools/CreatureSizes/parse_world.py | 62 + .../CreatureSizesTests.csproj | 12 + tools/CreatureSizesTests/Program.cs | 31 + .../DecalBridgeCheckTests.csproj | 5 +- tools/DecalBridgeCheckTests/Program.cs | 4 +- .../RegistrationTests.cs | 399 +++++ .../EngineSettingsTests.csproj | 1 + tools/EngineSettingsTests/Program.cs | 48 + .../RynthCore.HookResolver.UI.csproj | 3 + tools/IltTests/IltTests.csproj | 24 + tools/IltTests/Program.cs | 140 ++ .../LargeAddressAlignmentTests.csproj | 25 + tools/LargeAddressAlignmentTests/Program.cs | 154 ++ tools/LoaderReloadCapTests/Run-Tests.ps1 | 30 + tools/LoaderReloadCapTests/test.c | 211 +++ tools/LoaderStagingTests/test.c | 1 + .../PanelTextScaleTests.csproj | 26 + tools/PanelTextScaleTests/Program.cs | 174 +++ .../ProblemReportTests.csproj | 32 + tools/ProblemReportTests/Program.cs | 473 ++++++ tools/ReloadCapTests/Program.cs | 84 ++ tools/ReloadCapTests/ReloadCapTests.csproj | 25 + tools/StatusAgentTests/Program.cs | 28 + tools/ui_hooks_check.py | 6 + 94 files changed, 11124 insertions(+), 588 deletions(-) create mode 100644 src/RynthCore.Engine/Compatibility/IltDetect.cs create mode 100644 src/RynthCore.Engine/Compatibility/IltInfo.cs create mode 100644 src/RynthCore.Engine/Compatibility/LargeAddressAlignmentPatch.cs create mode 100644 src/RynthCore.Engine/Compatibility/LargeAddressAlignmentScan.cs create mode 100644 src/RynthCore.Engine/ImGui/MonsterHud/CreatureSizes.cs create mode 100644 src/RynthCore.Engine/ImGui/MonsterHud/CreatureSizes.g.cs create mode 100644 src/RynthCore.Engine/ImGui/Panels/BountiesFace.cs create mode 100644 src/RynthCore.Engine/ImGui/Panels/ChatDiscordFace.cs create mode 100644 src/RynthCore.Engine/ImGui/Panels/ReportFace.cs create mode 100644 src/RynthCore.Engine/ReloadCapNotice.cs create mode 100644 src/RynthCore.Engine/Report/ProblemReport.cs create mode 100644 src/RynthCore.Engine/Report/ProblemReportCore.cs create mode 100644 src/RynthCore.Engine/UI/Data/BountiesData.cs create mode 100644 src/RynthCore.Engine/UI/Data/BountiesSnapshotJson.cs create mode 100644 src/RynthCore.Engine/UI/Data/Discord/ChatDiscord.cs create mode 100644 src/RynthCore.Engine/UI/Data/Discord/ChatDiscordLogic.cs create mode 100644 src/RynthCore.Engine/UI/Data/Discord/ChatDiscordSettings.cs create mode 100644 src/RynthCore.Engine/UI/Data/Discord/ChatSpeech.cs create mode 100644 src/RynthCore.Engine/UI/Data/Discord/DiscordClient.cs create mode 100644 src/RynthCore.Engine/UI/Data/Discord/DiscordFormat.cs create mode 100644 src/RynthCore.Engine/UI/Data/Discord/DiscordRouteQueue.cs create mode 100644 src/RynthCore.Engine/UI/Data/Discord/DiscordSecrets.cs create mode 100644 tools/ChatDiscordTests/ChatDiscordTests.csproj create mode 100644 tools/ChatDiscordTests/Program.cs create mode 100644 tools/CreatureSizes/README.md create mode 100644 tools/CreatureSizes/SetupDims/Program.cs create mode 100644 tools/CreatureSizes/SetupDims/SetupDims.csproj create mode 100644 tools/CreatureSizes/gen_cs.py create mode 100644 tools/CreatureSizes/parse_world.py create mode 100644 tools/CreatureSizesTests/CreatureSizesTests.csproj create mode 100644 tools/CreatureSizesTests/Program.cs create mode 100644 tools/DecalBridgeCheckTests/RegistrationTests.cs create mode 100644 tools/IltTests/IltTests.csproj create mode 100644 tools/IltTests/Program.cs create mode 100644 tools/LargeAddressAlignmentTests/LargeAddressAlignmentTests.csproj create mode 100644 tools/LargeAddressAlignmentTests/Program.cs create mode 100644 tools/LoaderReloadCapTests/Run-Tests.ps1 create mode 100644 tools/LoaderReloadCapTests/test.c create mode 100644 tools/PanelTextScaleTests/PanelTextScaleTests.csproj create mode 100644 tools/PanelTextScaleTests/Program.cs create mode 100644 tools/ProblemReportTests/ProblemReportTests.csproj create mode 100644 tools/ProblemReportTests/Program.cs create mode 100644 tools/ReloadCapTests/Program.cs create mode 100644 tools/ReloadCapTests/ReloadCapTests.csproj diff --git a/installer/Publish-Update.ps1 b/installer/Publish-Update.ps1 index 82803d8..e3f40c2 100644 --- a/installer/Publish-Update.ps1 +++ b/installer/Publish-Update.ps1 @@ -134,7 +134,7 @@ Write-Host " Decal bridge in the installer: $((Get-Item $bridgeStaged).VersionI Copy-Item (Join-Path $ScriptDir "Output\RynthCore-Setup.exe") "$rel\RynthCore-Setup.exe" Copy-Item (Join-Path $ScriptDir "staging\plugins\RynthAi\RynthCore.Plugin.RynthAi.dll") "$rel\plugins\" -$suitePlugins = "RynthChat", "RynthTracker", "RynthNav", "RynthVision", "RynthLua", "RynthOracle", "RynthInventory" +$suitePlugins = "RynthChat", "RynthTracker", "RynthNav", "RynthVision", "RynthLua", "RynthOracle", "RynthInventory", "RynthSort", "RynthILT" foreach ($name in $suitePlugins) { Step "Building $name" $proj = Join-Path $RynthSuiteRoot "Plugins\RynthCore.Plugin.$name\RynthCore.Plugin.$name.csproj" @@ -180,6 +180,8 @@ Extract this zip into C:\Games - it creates: C:\Games\RynthSuite\RynthLua\ RynthLua plugin (Lua scripting; was part of RynthAi) 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 Bounties window's tracker) C:\Games\RynthCore\NavData\ RynthNav's portals and Atlas Then, in the RynthCore launcher's Plugins tab, add the full path of each @@ -266,6 +268,8 @@ $pluginDescriptions = @{ RynthLua = "Lua scripting for metas and your own scripts." RynthOracle = "Quests, character, titles and leaderboards." RynthInventory = "Search every character's items." + RynthSort = "Keeps your packs sorted: new loot goes to the pack its rule names." + RynthILT = "Infinite Leaftide only: tracks your ACECustom bounties for the Bounties window." } # Plugin manifests (embedded in each DLL by the SDK's build targets): each plugin's minEngineApi # goes into its feed entry, and the core entry says its engine's API ("engineApi"), so launchers diff --git a/installer/RynthCore.iss b/installer/RynthCore.iss index 31f65c1..f46bdfa 100644 --- a/installer/RynthCore.iss +++ b/installer/RynthCore.iss @@ -81,12 +81,17 @@ Filename: "{app}\RynthCore.exe"; WorkingDir: "{app}"; Flags: nowait runasorigina [UninstallRun] ; Decal + RynthCore (experimental): remove the Decal bridge's registration, only -; what the launcher added (see docs/DECAL_BRIDGE_PLAN.md). Every release ships the bridge +; what RynthCore added (see docs/DECAL_BRIDGE_PLAN.md). Every release ships the bridge ; ({app}\DecalBridge, staged by Build-Installer.ps1), so this always runs; with nothing -; registered it changes nothing. Runs before the files are removed. It removes both entries -; the installer writes (see RegisterDecalBridge in [Code]): the per-user one, and the -; machine-wide one - directly when the uninstaller is elevated, otherwise after Windows' -; administrator prompt, which appears only when a machine-wide entry exists. +; registered it changes nothing. Runs before the files are removed. It removes: +; - our entry from any per-user (VirtualStore) copy of Decal's filter list; +; - a per-user copy an earlier RynthCore created (decal-bridge-registration.json says so), +; whatever is in it now: our entries and the HKLM filters it mirrored (HKLM keeps the +; originals). It is exported first to %APPDATA%\RynthCore\decal-backup-.reg. If the +; copy holds entries that are neither ours nor in HKLM, they belong to someone else: the +; copy stays and the uninstall log (launcher.log) says why; +; - this install's machine-wide entry - directly when the uninstaller is elevated, otherwise +; after Windows' administrator prompt, which appears only when that entry exists. Filename: "{app}\RynthCore.exe"; Parameters: "--decal-bridge-unregister"; Flags: runhidden waituntilterminated; RunOnceId: "RynthCoreDecalBridgeUnregister" [Code] @@ -104,33 +109,40 @@ begin end; (* ------------------------------------------------------------------------------------- - Decal + RynthCore (experimental): register the RynthCore Decal bridge on every install - AND every update (the launcher's updater runs this installer with /SILENT), in BOTH - places a Decal client can read its filter list from: + Decal + RynthCore (experimental), strictly opt-in (since 2026-10-10): on install and on + every update (the launcher's updater runs this installer with /SILENT), the RynthCore + Decal bridge is registered ONLY when the installing user has a Decal + RynthCore account + (%APPDATA%\RynthCore\decal-accounts.json, which the launcher deletes when no account uses + the mode). Otherwise nothing Decal-related is touched; the launcher cleans up after + itself when no account uses the mode any more. - 1. Machine-wide: HKLM\SOFTWARE\WOW6432Node\Decal\NetworkFilters\{5B3E0D57-...} - (32-bit view). An elevated AC (RynthCore or AC run as administrator), or any AC when - UAC or its registry virtualization is off, reads ONLY this key - the per-user entry - is invisible to it (a player's Decal + RynthCore client never loaded the bridge, - 2026-10-03). A non-elevated AC without a per-user copy reads it too. - 2. Per-user: this user's VirtualStore copy of that key, ONLY if the copy already exists. - A non-elevated AC is virtualized and, once a copy exists, reads nothing but the copy. - A missing copy is never created: it would hide every HKLM filter added later from - this user's non-elevated clients. + Where it goes: + 1. Machine-wide, always: HKLM\SOFTWARE\WOW6432Node\Decal\NetworkFilters\{5B3E0D57-...} + (32-bit view), Decal's own list. Every client reads it unless a per-user copy hides it. + 2. Per-user: NEVER a new per-user (VirtualStore) copy of that key. acclient.exe is a + legacy 32-bit program; when HKCU\Software\Classes\VirtualStore\MACHINE\SOFTWARE\ + WOW6432Node\Decal\NetworkFilters exists, a non-elevated AC reads nothing but that copy, + so every filter installed for all users afterwards is hidden from Decal (a player's + new plugins and UtilityBelt's newer service vanished, 2026-10). Launchers before + 2026-10-10 created such a copy; --decal-bridge-install-user now removes a copy an + earlier RynthCore created (backed up first to %APPDATA%\RynthCore\decal-backup-.reg; + kept when it holds someone else's entries), and only adds our entry to a copy that + exists anyway (Decal can make one itself). The launcher's Recovery Actions > Repair + Decal removes any such copy after a backup. - Both entries are harmless while no account uses Decal + RynthCore: every Decal client - loads the bridge, which stays idle (no hooks, no threads) unless the RynthCore loader is - in the same client. Uninstall removes both ([UninstallRun] --decal-bridge-unregister). + The machine-wide entry is harmless: Decal clients load the bridge, which stays idle (no + hooks, no threads) unless the RynthCore loader is in the same client. Uninstall removes + what RynthCore added ([UninstallRun] --decal-bridge-unregister, see above). Rights. This installer runs with the lowest privileges (PrivilegesRequired=lowest; the - updater starts it without elevation). Writing HKLM needs administrator rights, so: + updater starts it without elevation). Writing HKLM needs administrator rights, so, for a + user with a Decal + RynthCore account and only when the machine-wide entry is missing or + points at another folder: - Setup already elevated (installed "for all users", or started by an elevated launcher): written directly, no prompt. - - Not elevated: Windows' administrator prompt is shown ONCE - only when Decal is - installed, the machine-wide entry is missing or points at another folder, and this - user has a Decal + RynthCore account (decal-accounts.json). Saying no is harmless: - the launcher checks before every Decal + RynthCore launch and repairs it (writing it - directly when it runs elevated, the case that needs it). + - Not elevated: Windows' administrator prompt is shown once. Saying no is harmless for + Decal: the launcher asks again before the next Decal + RynthCore launch (interactive + launches only), and Decal + RynthCore can't be used until it is registered. The commands are RynthCore.exe's own (Program.cs): --decal-bridge-register-machine and --decal-bridge-install-user, so the installer and the launcher write identical entries. ------------------------------------------------------------------------------------- *) @@ -170,6 +182,11 @@ var Code: Integer; begin if not DecalInstalled then Exit; + if not UsesDecalBridge then + begin + Log('Decal bridge: no Decal + RynthCore account for this user - nothing registered (opt-in only).'); + Exit; + end; if not FileExists(BridgeDir + '\RynthCore.DecalBridge.dll') then Exit; Exe := ExpandConstant('{app}\RynthCore.exe'); Params := '--decal-bridge-register-machine "' + BridgeDir + '"'; @@ -182,18 +199,24 @@ begin else Log('Decal bridge: machine-wide registration exit code ' + IntToStr(Code)); end - else if UsesDecalBridge then + else begin if not ShellExec('runas', Exe, Params, ExpandConstant('{app}'), SW_HIDE, ewWaitUntilTerminated, Code) then Log('Decal bridge: elevated machine-wide registration not done (declined or failed): ' + SysErrorMessage(Code)) else Log('Decal bridge: elevated machine-wide registration exit code ' + IntToStr(Code)); - end - else - Log('Decal bridge: machine-wide entry missing; not elevated and no Decal + RynthCore account - left to the launcher.'); + end; + end; + if not MachineBridgeEntryCurrent then + begin + { No per-user fallback: Decal + RynthCore waits for the machine-wide entry (the launcher + asks again before the next interactive Decal + RynthCore launch). } + Log('Decal bridge: not registered machine-wide - per-user step skipped.'); + Exit; end; { Per-user half, as the user who started Setup (the same user unless Setup was elevated - with other credentials). } + with other credentials): removes an earlier RynthCore's per-user copy (backed up first), + adds our entry to a per-user copy that exists anyway. Never creates one. } if not ExecAsOriginalUser(Exe, '--decal-bridge-install-user "' + BridgeDir + '"', ExpandConstant('{app}'), SW_HIDE, ewWaitUntilTerminated, Code) then Log('Decal bridge: per-user step did not start: ' + SysErrorMessage(Code)); diff --git a/native/Loader/Loader.c b/native/Loader/Loader.c index 84512af..03dc645 100644 --- a/native/Loader/Loader.c +++ b/native/Loader/Loader.c @@ -13,21 +13,42 @@ // reload, so a reload gives its memory back. // // Either way the loader owns the reload event, the file watcher, the address-space -// guard and a MinHook facade (Hooks.c): every hook is installed once, through a -// permanent stub, and a reload only re-points the stub. +// guard, the reload cap (MaxHotReloads per client) and a MinHook facade (Hooks.c): +// every hook is installed once, through a permanent stub, and a reload only re-points +// the stub. For the managed engine it also sets up CoreCLR's crash dumps (Logs\dumps). // ============================================================================ #include "Loader.h" #include #include +#include #define ENGINE_DLL_NAME "RynthCore.Engine.dll" #define ENGINE_INIT_EXPORT "RynthCoreEngineInit" #define ENGINE_SHUTDOWN_EXPORT "RynthCoreShutdown" #define ENGINE_REFUSED_EXPORT "RynthCoreReloadRefused" +#define ENGINE_MAXRELOADS_EXPORT "RynthCoreMaxHotReloads" +#define ENGINE_CAPPED_EXPORT "RynthCoreReloadCapped" +#ifndef LOG_DIR // the offline tests (tools\Loader*Tests) log into their own folder #define LOG_DIR "C:\\Games\\RynthCore\\Logs" +#define LOG_PARENT "C:\\Games\\RynthCore" +#endif #define STAGING_SUBDIR ".engine_loads" +// Hot reloads one client takes before it refuses the rest (until it restarts). The engine +// says the real number (engine.json MaxHotReloads, RynthCoreMaxHotReloads export); this is +// for an engine without the export. After 4+ reloads in one process, clients died with +// CoreCLR fatal error 0x80131506 at coreclr+0x256E19 (2026-10-08..10, gens 5-6 or the 4th +// reload itself) although every generation unloaded and address space stayed flat: treated +// as a CoreCLR limit on repeated collectible loads, so the loader stops short of it. +#define DEFAULT_MAX_HOT_RELOADS 3 +// CoreCLR's own crash dump (createdump.exe, DOTNET_DbgEnableMiniDump): clr__