diff --git a/Changelog/2026-10-15-loot-slayer-pet-keys.md b/Changelog/2026-10-15-loot-slayer-pet-keys.md new file mode 100644 index 0000000..650cd5b --- /dev/null +++ b/Changelog/2026-10-15-loot-slayer-pet-keys.md @@ -0,0 +1,34 @@ +# Loot editor: SlayerCreatureType and pet essence long keys + +Date: 2026-10-15 +Area: Shared/RynthCore.LootSdk (Loot Editor + in-game loot rule pickers) +Plugin: RynthCore.Plugin.RynthAi (HandWrittenVersion stays 0.5.0-legacy-ui on sk) + +## Change + +Named long keys for ACECustom / ACE appraisal properties used when looting +slayer weapons and combat pet essences: + +| Key | Name | Notes | +|---|---|---| +| 166 | SlayerCreatureType | Value picker lists creature types (Olthoi, Drudge, …) | +| 9053 | PetBondLevel | Bond on combat essences after ID | +| 9056 | PetPotencyStored | Stored potency on combat essences after ID | +| float 138 | SlayerDamageBonus | Listed; often unset on ACE appraisal — prefer 166 / LongDesc | + +Rules that already used raw key 166 continue to work; the editor now shows +"Olthoi (1)" instead of a bare number. + +## Example rules + +- Any slayer weapon: class Melee/Missile/Wand + `LongValKeyGE(166, 1)` +- Olthoi slayer: same + `LongValKeyE(166, 1)` +- Strong essence: name/WCID match + `LongValKeyGE(9053, N)` and/or `LongValKeyGE(9056, M)` + +## Local install (2026-10-15) + +- NativeAOT publish of sk RynthAi → `C:\Games\RynthSuite\RynthAi\` + (previous live DLL saved under `PreviousReleases\0.5.72-legacy-ui`) +- LootEditor publish → `C:\Games\Rynthcore\Tools\LootEditor\` + (previous files under `PreviousReleases\pre-slayer-keys-2026-10-15`) +- Reload with overlay **RL**, or restart the Loot Editor. diff --git a/Changelog/2026-10-15-loot-slayer-type-picker.md b/Changelog/2026-10-15-loot-slayer-type-picker.md new file mode 100644 index 0000000..27809e1 --- /dev/null +++ b/Changelog/2026-10-15-loot-slayer-type-picker.md @@ -0,0 +1,27 @@ +# Loot editor: pick Slayer Type by name + +Date: 2026-10-15 +Area: Shared/RynthCore.LootSdk + Loot Editor; in-game loot face (engine Picker filter) +Plugin: RynthCore.Plugin.RynthAi (HandWrittenVersion stays 0.5.0-legacy-ui on sk) + +## Change + +Make slayer loot rules easier to write without memorizing ACE ids: + +- Long key **166** shows as **Slayer Type** (was SlayerCreatureType). +- Its value picker lists creature types **A–Z** (Olthoi, Virindi, …); the .utl still stores the ACE id. +- Pet essence keys use spaced names: **Pet Bond Level** (9053), **Pet Potency Stored** (9056). +- Float **138** shows as **Slayer Damage Bonus** (still often unset on ACE — prefer 166). +- Desktop Loot Editor: type-to-jump on the value combo; tip for “any slayer” (`>= 1`). +- Engine loot face: long pickers (12+ items) get a **Type to filter…** box so Slayer Type is searchable in-game. + +## How to use + +1. Add condition **Long Value Key =** (or `>=`). +2. Key → **Slayer Type**. +3. Value → pick the creature (e.g. Olthoi), or use `>= 1` for any slayer. + +## Local install + +- RynthAi + LootEditor redeployed with the renamed vocab. +- Engine hot-patch for the filterable picker (version bump in RynthCore changelog). diff --git a/Changelog/2026-10-15-oracle-pets-tab-miniremote-pet-capture.md b/Changelog/2026-10-15-oracle-pets-tab-miniremote-pet-capture.md new file mode 100644 index 0000000..ddbbde4 --- /dev/null +++ b/Changelog/2026-10-15-oracle-pets-tab-miniremote-pet-capture.md @@ -0,0 +1,40 @@ +# Oracle Pets tab restored; Mini Remote Pet / Capture + +Date: 2026-10-15 +Plugins: RynthOracle 0.2.2, RynthILT 0.2.11, RynthAi (HandWrittenVersion stays 0.5.0-legacy-ui on sk) + +## What was wrong + +Softkelpie's RynthOracle **Pet Breeding** tab (commit 3826420) was dropped when the +breeding tracker moved into RynthILT 0.3.1. On Infinite Leaftide there was no Oracle +Pets home; breeding only lived under Mini Remote > Pets > Breeding. + +## Change + +### RynthOracle 0.2.2 + +- **Pets** tab again on Infinite Leaftide (`/ro pets`, `/ro breeding`). +- Draws RynthILT's breeding tracker through `RynthILT.Data` (same JSON as before). +- Links to Mini Remote summon roster and capture settings. +- Server identity tags Infinite Leaftide so the tab can show (world name / engine `ilt`). + +### Mini Remote (RynthAi) + +- **Pet** toggle: turns on combat auto-summon and summons the active combat essence + from the Pets roster (ticked priority). +- **Capture** toggle (ILT): turns auto siphon-lens capture on/off; lens choice stays + on Mini Remote > Pets; tooltip points at Oracle Pets for breeding. +- Character menu → **Pets** opens `/ro pets` on ILT. + +### RynthILT 0.2.11 + +- Feature catalog locations updated: breeding → RynthOracle > Pets; capture → Mini + Remote Capture. Detection / dynamic sections unchanged — ILT still owns server + pet features and only shows them when the world/profile says so. + +## How to use + +1. Mini Remote > Pets: tick the combat essence you want active. +2. Mini Remote **Pet**: summon that essence and keep auto-summon on. +3. Mini Remote **Capture** (ILT): auto-siphon with the lens chosen on the Pets roster. +4. `/ro pets` or Character menu → Pets: ILT breeding, supplies, server rules. diff --git a/Changelog/2026-10-15-vaulted-dungeons-chat-channels-0.5.73.md b/Changelog/2026-10-15-vaulted-dungeons-chat-channels-0.5.73.md new file mode 100644 index 0000000..f70e20a --- /dev/null +++ b/Changelog/2026-10-15-vaulted-dungeons-chat-channels-0.5.73.md @@ -0,0 +1,40 @@ +# Vaulted Dungeons Mini Remote tab + RynthChat ILT channels + +Date: 2026-10-15 +Plugins: +- RynthCore.Plugin.RynthAi 0.5.73-legacy-ui (previous 0.5.72-legacy-ui) +- RynthCore.Plugin.RynthILT 0.2.11 (previous 0.2.10) +- RynthCore.Plugin.RynthChat 0.3.1 (previous 0.3.0) +Engine: Settings schema adds Options > Navigation > Vaulted Dungeons (build with 2026.10.5.68) + +## Vaulted Dungeons (RynthILT) + +Port of the UtilityBelt VaultedDungeons.lua script into a Mini Remote ILT tab: + +- Keeps the character in one Vaulted Dungeon via a tied Portal Recall Gem (first recall after 1 s out, then every 5 s). +- Optional Kill Client: no "You've banked N Luminance." system kill for N minutes (Advanced, default 2) → `/rc quit`. +- Per-character settings: `%APPDATA%\RynthCore\RynthILT\\\VaultedDungeons\settings.json`. +- Advanced: Auto Start On Arrival, Disable Meta/Nav, Repeat Attacks, Set Attack Power. +- Dungeons: Tyrant's Quarry, Tusgian Barracks, Wailing Cells, Chamber of Idols, Fiun Redoubt, Tumerok Tunnels. + +Gating: + +- ILT / ACECustom worlds only (same as Gear / Games). +- Options > Navigation > Vaulted Dungeons checkbox (off by default) shows the Mini Remote tab. + +Commands: `/ilt vaulted [on|off|toggle|status]`, `/ra hub open vaulted`. + +## RynthChat channels + +ILT Trade / General (and other tagged channels) were landing on Other because ACECustom sends them as chat type 28 (0x1C) instead of 0x08/0x09. Classifier now: + +- Maps type 0x1C to Channels. +- Prefers `[Trade]` / `[General]` / `[LFG]` / … prefixes when present. +- Always buffers lines even when an earlier plugin ate them for retail (so Hide/eat still feeds RynthChat). + +## Files + +- RynthILT: Hub/IltVaultedDungeons.cs (new), IltSections, IltHubController, IltHubUi, IltFeatureCatalog, RynthILTPlugin +- RynthAi: LegacyUiSettings, LegacyDashboardRenderer, MiniRemoteHud, SectionsManifest, LocalFeatures, version +- RynthChat: ChatClassifier, ChatBuffer, RynthChatPlugin +- Engine: UI/Data/SettingsData.cs (Navigation > Vaulted Dungeons) diff --git a/Changelog/2026-10-16-hotbuild-local-ai-ilt-chat.md b/Changelog/2026-10-16-hotbuild-local-ai-ilt-chat.md new file mode 100644 index 0000000..3815e8c --- /dev/null +++ b/Changelog/2026-10-16-hotbuild-local-ai-ilt-chat.md @@ -0,0 +1,24 @@ +# Local hotbuild — RynthAi / RynthILT / RynthChat + +Date: 2026-10-16 +Plugins: +- RynthCore.Plugin.RynthAi 0.5.74-legacy-ui (previous 0.5.73-legacy-ui) +- RynthCore.Plugin.RynthILT 0.2.12 (previous 0.2.11) +- RynthCore.Plugin.RynthChat 0.3.2 (previous 0.3.1) +- RynthCore.Plugin.RynthOracle 0.2.8 (already deployed) + +## Why + +Games was running mixed sk/local hotbuilds. Local Asherons Ai/ILT do not compile cleanly against this Core API (Salvage/`PollServerState` drift), so tonight's local feature deltas were applied on the sk build tree and published from there. + +## Deployed to Games + +| Piece | Version | Notes | +|---|---|---| +| Engine | 2026.10.5.69 | local: Vaulted Options, chat 0x1C, chrome | +| RynthChat | 0.3.2 | local: ILT `[Trade]`/`[General]` → Channels | +| RynthILT | 0.2.12 | sk + Vaulted Dungeons tab / `/ilt vaulted` | +| RynthAi | 0.5.0-legacy-ui (sk) | Vaulted Options gate + moved Banking/Charms menu | +| RynthOracle | 0.2.8 | Charms + Pet Breeding (earlier tonight) | + +Reload plugins; reinject for the engine DLL. diff --git a/Changelog/2026-10-16-miniremote-options-opens-settings-0.5.75.md b/Changelog/2026-10-16-miniremote-options-opens-settings-0.5.75.md new file mode 100644 index 0000000..415c9a0 --- /dev/null +++ b/Changelog/2026-10-16-miniremote-options-opens-settings-0.5.75.md @@ -0,0 +1,11 @@ +# Mini Remote Options opens RynthAi Settings + +Date: 2026-10-16 +Plugin: RynthCore.Plugin.RynthAi 0.5.75-legacy-ui (previous 0.5.74-legacy-ui) + +## Change + +The Mini Remote **Options** button opens RynthAi Settings (`/rc ui open Settings`) instead of only the Mini Remote section popup. + +- Left-click: RynthAi Settings (Advanced Settings panel). +- Right-click: previous Mini Remote sections / layout / slot size popup. diff --git a/Changelog/2026-10-16-oracle-charms-breeding-tabs-0.2.8.md b/Changelog/2026-10-16-oracle-charms-breeding-tabs-0.2.8.md new file mode 100644 index 0000000..e58d0b5 --- /dev/null +++ b/Changelog/2026-10-16-oracle-charms-breeding-tabs-0.2.8.md @@ -0,0 +1,20 @@ +# RynthOracle 0.2.8 — Charms + Pet Breeding tabs restored on Mini Remote layout + +Date: 2026-10-16 +Plugin: RynthCore.Plugin.RynthOracle 0.2.8 (previous 0.2.7) +Related: RynthILT Hub tabs (Gear / Games / Vaulted only); RynthAi Mini Remote menu links + +## What was wrong + +A hotbuild from the sk worktree had reintroduced Mini Remote **Banking** and **Charms** ILT tabs (upstream `aelrynth/main` still had that older layout). The matching Oracle build lacked the Character-tab charms list and the **Pet Breeding** tab that local already had after the 2026-10-13 move. + +## Fix + +- Align sk Oracle with local: Character tab `DrawCharms`, ILT-only **Pet Breeding** tab, `IltServerLink` / Shared `RynthILT.Server` + Data APIs linked in the csproj. +- Mini Remote ILT tabs stay Gear / Games / Vaulted Dungeons only; Banking → `/ginv bank`, Charms → Oracle Character (unchanged local layout). + +## Verify + +1. Mini Remote on ILT: no Banking / Charms tabs; Gear / Games / (optional) Vaulted only. +2. Oracle Character: charms list with Toggle when RynthILT is loaded. +3. Oracle Pet Breeding tab on ILT; Mini Remote Character menu → Banking / Pet Breeding / Character. diff --git a/Changelog/2026-10-16-sk-tonight-port-vaulted-oracle-chat.md b/Changelog/2026-10-16-sk-tonight-port-vaulted-oracle-chat.md new file mode 100644 index 0000000..a7fc0ca --- /dev/null +++ b/Changelog/2026-10-16-sk-tonight-port-vaulted-oracle-chat.md @@ -0,0 +1,23 @@ +# SK port: Vaulted Dungeons, Mini Remote Options, Oracle, Chat + +Date: 2026-10-16 +Branch: sk (upstream standing) +HandWrittenVersion: RynthAi remains `0.5.0-legacy-ui` on upstream sk. + +## Summary + +Tonight's local Suite work ported onto standing `sk` for rynth release prep (surgical Ai/ILT wiring so sk API stays intact): + +- **Vaulted Dungeons** Mini Remote ILT tab (`IltVaultedDungeons`), gated by Options > Navigation > Vaulted Dungeons (`EnableVaultedDungeons` in LegacyUiSettings / MiniRemoteHud / LocalFeatures). +- **Mini Remote Options** left-click opens RynthAi Settings (`/rc ui open Settings`); right-click keeps the section popup. +- **RynthChat** ILT Trade/General via chat type 0x1C + tag prefixes. +- **RynthOracle** Charms / Pet Breeding tabs and shared ILT server APIs (0.2.8-era). +- Loot slayer picker / pet-key helpers where they apply on sk. + +## Enable Vaulted tab + +1. Options > Navigation > Vaulted Dungeons (on). +2. ILT / ACECustom world with RynthILT loaded. +3. Mini Remote Hub tabs should include Vaulted Dungeons. + +Commands: `/ilt vaulted [on|off|toggle|status]`, `/ra hub open vaulted`. diff --git a/Plugins/RynthCore.Plugin.RynthAi/Huds/MiniRemoteHud.cs b/Plugins/RynthCore.Plugin.RynthAi/Huds/MiniRemoteHud.cs index c4658cb..ca6170a 100644 --- a/Plugins/RynthCore.Plugin.RynthAi/Huds/MiniRemoteHud.cs +++ b/Plugins/RynthCore.Plugin.RynthAi/Huds/MiniRemoteHud.cs @@ -1,9 +1,8 @@ // MiniRemoteHud.cs — The Mini Remote (UtilityBelt-style) for RynthAi. Render thread only. // // One window with tabs: Remote (the sections below), the universal tabs Pets and Crafting (every -// world, MiniRemote/; the Quests tab moved to RynthOracle 2026-10-13), and on Infinite Leaftide -// the RynthILT plugin's ILT tabs (Banking, Gear, Charms, Games; its Character tab moved to -// RynthOracle's Character tab 2026-10-13: RynthILT.Hub GetTabs / RenderTab through IltClient; an ILT tab +// world, MiniRemote/; the Quests tab moved to RynthOracle 2026-10-13), and on Infinite Leaftide the RynthILT plugin's ILT tabs (Character, +// Banking, Gear, Charms, Games: RynthILT.Hub GetTabs / RenderTab through IltClient; an ILT tab // shows once the server reports its feature on, and never without RynthILT). The tab bar's // selection is saved (HudState.MiniRemoteTab) and "/ra hub open
" or RynthCore's // dashboard switch it (RequestTab). The Guardian and Bounties are RynthILT's RynthCore ILT @@ -12,7 +11,8 @@ // Quest Timers and Fellowship, Skills, Inventory, Item Count, Inventory HUDs: windows every server // has), then "Server: ", i.e. the installed server plugins' windows for the world you're on, // which RynthCore sends (ServerMenuModel), or a link to RynthCore's Options > Diagnostics (where a -// server is forced) when none matches. The Options button holds the Mini Remote's own settings. +// server is forced) when none matches. The Options button opens RynthAi Settings; right-click it for +// the Mini Remote's own section/layout settings. // The V/H button stacks the sections (vertical) or lays them out in three columns (horizontal). // // Remote sections (each can be hidden from the Options menu): @@ -184,8 +184,14 @@ internal sealed class MiniRemoteHud { foreach (string id in MiniRemoteTabs.Universal) _tabs.Add(new TabEntry(id, MiniRemoteTabs.Label(id), MiniRemoteTabs.Size(id), Ilt: false)); + bool vaultedOn = _hud.Dashboard.Settings.EnableVaultedDungeons; foreach (IltTabInfo t in remote.Ilt.Tabs()) - if (t.Shown) _tabs.Add(new TabEntry(t.Id, t.Label, new Vector2(t.Width, t.Height), Ilt: true)); + { + // Vaulted Dungeons: ILT-only (RynthILT TabShown) and gated by Options > Navigation. + if (!t.Shown) continue; + if (string.Equals(t.Id, "vaulted", StringComparison.OrdinalIgnoreCase) && !vaultedOn) continue; + _tabs.Add(new TabEntry(t.Id, t.Label, new Vector2(t.Width, t.Height), Ilt: true)); + } } if (_tabs.Count == 0) { @@ -319,9 +325,15 @@ internal sealed class MiniRemoteHud if (ImGui.IsItemHovered()) SafeImGui.SetTooltip(s.MiniRemoteHorizontal ? "Horizontal: sections in columns. Click to stack them." : "Vertical: sections stacked. Click to lay them out in columns."); ImGui.SameLine(); - // Opened by RenderOptions: this row sits inside the Remote tab, whose ID the popup must not get. - if (ImGui.Button("Options##mropts", new Vector2(HeaderButtonWidth, 0))) _openOptions = true; - if (ImGui.IsItemHovered()) ImGui.SetTooltip("Mini Remote settings: sections, layout, slot size.\nRight-click the remote for the Character and server windows."); + // Left-click: RynthAi Settings. Right-click: Mini Remote section/layout popup (RenderOptions). + if (ImGui.Button("Options##mropts", new Vector2(HeaderButtonWidth, 0))) + { + if (_hud.Host.HasInvokeChatParser) _hud.RunEngineCommand(MovedTabs.Settings); + else _openOptions = true; // no chat parser: fall back to the Mini Remote popup + } + if (ImGui.IsItemClicked(ImGuiMouseButton.Right)) _openOptions = true; + if (ImGui.IsItemHovered()) + SafeImGui.SetTooltip("Open RynthAi Settings (Advanced Settings).\nRight-click: Mini Remote sections, layout, slot size."); } private void RenderVertical(HudState s, MiniRemoteController? remote) @@ -874,16 +886,24 @@ internal sealed class MiniRemoteHud if (_hud.Host.HasInvokeChatParser) { // RynthOracle's commands (it toggles its own windows; without RynthOracle nothing answers "/ro"). - // The character overview and its session are RynthOracle's Character tab (2026-10-13); - // Infinite Leaftide's charms and bank stay RynthILT's tabs (the server section below). + // The character, its session and charms are RynthOracle's Character tab (2026-10-13). if (ImGui.MenuItem("Character##mrcharacter", MovedTabs.OracleCharacter)) _hud.RunEngineCommand(MovedTabs.OracleCharacter); - if (ImGui.IsItemHovered()) ImGui.SetTooltip("RynthOracle's Character tab: the character and this session."); + if (ImGui.IsItemHovered()) ImGui.SetTooltip("RynthOracle's Character tab: the character, this session and the ILT charms list."); + // Every character's bank on this server: RynthInventory's Global Inventory (ILT's /bank). + if (IltActive(_hud.Remote())) + { + if (ImGui.MenuItem("Banking##mrbanking", MovedTabs.GlobalBank)) _hud.RunEngineCommand(MovedTabs.GlobalBank); + if (ImGui.IsItemHovered()) ImGui.SetTooltip("Global Inventory > Banking: every character's bank on this server, deposits, withdrawals and transfers."); + // ILT pet breeding: RynthOracle's tab, fed by RynthILT (the Pets tab's Breeding sub-tab is the same tracker). + if (ImGui.MenuItem("Pet Breeding##mrbreeding", MovedTabs.OracleBreeding)) _hud.RunEngineCommand(MovedTabs.OracleBreeding); + if (ImGui.IsItemHovered()) ImGui.SetTooltip("RynthOracle's Pet Breeding tab: essences ready to breed, rest and charge timers, growth, boosters, supplies and this server's breeding rules."); + } if (ImGui.MenuItem("Quests##mrquests", "/ro")) _hud.RunEngineCommand("/ro"); - if (ImGui.IsItemHovered()) ImGui.SetTooltip("RynthOracle: quest timers, tracking and rewards."); + if (ImGui.IsItemHovered()) ImGui.SetTooltip("RynthOracle: quest timers, tracking, rewards and the /qb list."); if (ImGui.MenuItem("Quest Timers##mrqtimers", "/ro timers")) _hud.RunEngineCommand("/ro timers"); if (ImGui.IsItemHovered()) ImGui.SetTooltip("RynthOracle's Quest Timers window: your tracked quests and the time left on each."); if (ImGui.MenuItem("Fellowship##mrfellow", "/ro fellowship")) _hud.RunEngineCommand("/ro fellowship"); - if (ImGui.IsItemHovered()) ImGui.SetTooltip("RynthOracle's Fellowship tab: members, levels and XP sharing."); + if (ImGui.IsItemHovered()) ImGui.SetTooltip("RynthOracle's Fellowship tab: members, levels, XP sharing, and ILT's /fship buttons on Infinite Leaftide."); if (ImGui.MenuItem("Skills##mrskills", "/rc skills")) _hud.RunEngineCommand("/rc skills toggle"); if (ImGui.MenuItem("Inventory##mrinv", "/rc inventory")) _hud.RunEngineCommand("/rc inventory"); if (ImGui.MenuItem("Item Count##mritemcount", "/rc itemcount")) _hud.RunEngineCommand("/rc itemcount"); @@ -921,8 +941,8 @@ internal sealed class MiniRemoteHud // Universal tabs are under Character; RynthCore 2026.10.5.30 and older list them here too // (with the retired Quests tab, now RynthOracle's). if (tab != null && (MiniRemoteTabs.Parse(tab) != null || tab.Equals("quests", StringComparison.OrdinalIgnoreCase))) continue; - // Character (an older RynthCore still lists it) moved out: it is under Character above - // (RynthOracle's Character tab). + // Character / Charms / Banking (an older RynthCore still lists them) moved out: they are + // under Character above (RynthOracle's Character tab, Global Inventory > Banking). if (tab != null && MovedTabs.CommandFor(tab) != null) continue; bool enabled = tab == null || TabAvailable(remote, tab); if (ImGui.MenuItem(item.Label + "##mrsrv_" + g.Id, item.Command, false, enabled)) diff --git a/Plugins/RynthCore.Plugin.RynthAi/Huds/MovedTabs.cs b/Plugins/RynthCore.Plugin.RynthAi/Huds/MovedTabs.cs index aac6f91..a26e6dc 100644 --- a/Plugins/RynthCore.Plugin.RynthAi/Huds/MovedTabs.cs +++ b/Plugins/RynthCore.Plugin.RynthAi/Huds/MovedTabs.cs @@ -1,11 +1,12 @@ // MovedTabs.cs - Mini Remote tabs that moved out of the Mini Remote (2026-10-13), and where to. // -// RynthILT's Character tab left the Mini Remote: its character overview and session went to -// RynthOracle's Character tab ("/ro character"), its ILT session rates to RynthCore's Mini Remote -// "Session Stats" section (RynthILT's own "section:ilt-rates"), and the force-server override to -// RynthCore Options > Diagnostics ("/rc diagnostics"). Infinite Leaftide's own screens stay -// RynthILT's: Charms and Banking are still Mini Remote ILT tabs (SectionsManifest places them on -// the rail), drawn by RynthILT. +// RynthILT's Character, Charms and Banking tabs left the Mini Remote: +// Character, Charms -> RynthOracle's Character tab ("/ro character"): the character, its +// session and the ILT charms list (fed by "RynthILT.Data"); +// Banking -> RynthInventory's Global Inventory "Banking" tab ("/ginv bank"): every +// character's bank on this server. +// RynthCore's Mini Remote "Char" section is "Session Stats" now (RynthAi's session stats), and a +// server is forced only in RynthCore Options > Diagnostics ("/rc diagnostics"). // Old saved tab ids, links and "/ra hub open|tab " land on the new home through CommandFor. // // Pure: the host tests check the mapping offline. @@ -15,19 +16,29 @@ namespace RynthCore.Plugin.RynthAi.Huds; internal static class MovedTabs { - /// RynthOracle's Character tab (the character overview and this session). + /// RynthOracle's Character tab. public const string OracleCharacter = "/ro character"; + /// RynthOracle's Pet Breeding tab (Infinite Leaftide; the same tracker as the Pets tab's Breeding sub-tab). + public const string OracleBreeding = "/ro breeding"; + + /// RynthInventory's Global Inventory "Banking" tab. + public const string GlobalBank = "/ginv bank"; + /// RynthCore Options > Diagnostics (the server picker; RynthCore 2026.10.5.54+). public const string Diagnostics = "/rc diagnostics"; + /// RynthAi Settings (Advanced Settings panel; RynthCore SettingsFace). + public const string Settings = "/rc ui open Settings"; + /// /// The chat command that opens where tab lives now, or null when it is /// still a Mini Remote tab (or not a tab at all). Case and padding don't matter. /// public static string? CommandFor(string? tab) => (tab ?? string.Empty).Trim().ToLowerInvariant() switch { - "character" or "char" or "rates" => OracleCharacter, + "character" or "char" or "rates" or "charms" or "charm" => OracleCharacter, + "banking" or "bank" => GlobalBank, _ => null, }; @@ -35,7 +46,8 @@ internal static class MovedTabs public static string HomeOf(string command) => command switch { OracleCharacter => "RynthOracle's Character tab", - Diagnostics => "RynthCore Options > Diagnostics", + OracleBreeding => "RynthOracle's Pet Breeding tab", + GlobalBank => "Global Inventory > Banking", _ => command, }; } diff --git a/Plugins/RynthCore.Plugin.RynthAi/Huds/SectionsManifest.cs b/Plugins/RynthCore.Plugin.RynthAi/Huds/SectionsManifest.cs index 827b1ca..d4a4ed0 100644 --- a/Plugins/RynthCore.Plugin.RynthAi/Huds/SectionsManifest.cs +++ b/Plugins/RynthCore.Plugin.RynthAi/Huds/SectionsManifest.cs @@ -9,13 +9,11 @@ // same numbers, and RynthCore drops its own overview for it), Pets, Crafting, // Spells and Fellowship (the views of those core sections) // Infinite RynthILT's tabs, hosted here as they are in RynthAi's own Mini Remote (RynthILT.Hub, -// Leaftide MiniRemote/IltClient.cs): Gear, Charms and Banking in Inventory, and a Games -// section of RynthAi's own -// Quests are RynthOracle's (since 2026-10-13), and RynthILT draws its ILT session extras, /fship -// and /qb views itself (its own manifest), so neither is listed here. RynthILT's Character tab -// moved out on 2026-10-13 (MovedTabs.cs): RynthOracle's Character tab and the ILT session rates in -// Session Stats. Charms and Banking stay RynthILT's tabs (Infinite Leaftide's own screens), so the -// engine's "/rc miniremote tab charms|banking" finds them here as "section:charms|banking". +// Leaftide MiniRemote/IltClient.cs): Gear in Inventory, and a Games section of RynthAi's own +// Quests are RynthOracle's (since 2026-10-13), and RynthILT draws its ILT session extras and /fship +// views itself (its own manifest), so neither is listed here. RynthILT's Character, Charms and +// Banking tabs moved out on 2026-10-13 (MovedTabs.cs): RynthOracle's Character tab and +// RynthInventory's Global Inventory "Banking" tab. // Each view is a surface "section:" RynthCore draws through RynthPluginRenderEmbed. An ILT // view whose feature the server hasn't reported is listed but not enabled, with a note. // @@ -68,9 +66,9 @@ internal static class SectionsManifest new(StringComparer.OrdinalIgnoreCase) { ["gear"] = ("inventory", "Gear", 210, "ILT gear tools (RynthILT)."), - ["charms"] = ("inventory", "Charms", 220, "ILT charms and Guardian Hands: acquired, status, tier, toggles (RynthILT)."), - ["banking"] = ("inventory", "Banking", 230, "Your ILT bank: balances, deposits, withdrawals and transfers (RynthILT)."), ["games"] = ("games", "Games", 100, "ILT games (RynthILT)."), + ["vaulted"] = ("nav", "Vaulted Dungeons", 220, + "Keep the character in one Vaulted Dungeon (RynthILT; Options > Navigation)."), }; /// The surface name of a tab's view ("section:gear"). diff --git a/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyDashboardRenderer.cs b/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyDashboardRenderer.cs index c5db12c..6671653 100644 --- a/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyDashboardRenderer.cs +++ b/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyDashboardRenderer.cs @@ -1100,6 +1100,7 @@ internal sealed partial class LegacyDashboardRenderer CorpseApproachRangeMin = s.CorpseApproachRangeMin, // Navigation BoostNavPriority = s.BoostNavPriority, + EnableVaultedDungeons = s.EnableVaultedDungeons, FollowNavMin = s.FollowNavMin, NavRingThickness = s.NavRingThickness, NavLineThickness = s.NavLineThickness, @@ -1342,6 +1343,7 @@ internal sealed partial class LegacyDashboardRenderer s.CorpseApproachRangeMin = p.CorpseApproachRangeMin; // Navigation s.BoostNavPriority = p.BoostNavPriority; + s.EnableVaultedDungeons = p.EnableVaultedDungeons; s.FollowNavMin = p.FollowNavMin; s.NavRingThickness = p.NavRingThickness; s.NavLineThickness = p.NavLineThickness; @@ -1840,6 +1842,7 @@ internal sealed partial class LegacyDashboardRenderer dst.CorpseApproachRangeMax = NormalizeCorpseRangeYards(tmp.CorpseApproachRangeMax, 10.0); dst.CorpseApproachRangeMin = NormalizeCorpseRangeYards(tmp.CorpseApproachRangeMin, 2.0); dst.BoostNavPriority = tmp.BoostNavPriority; + dst.EnableVaultedDungeons = tmp.EnableVaultedDungeons; dst.BoostLootPriority = tmp.BoostLootPriority; dst.OpenDoors = tmp.OpenDoors; dst.OpenDoorRange = tmp.OpenDoorRange; diff --git a/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyUiSettings.cs b/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyUiSettings.cs index 0df1800..09c530d 100644 --- a/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyUiSettings.cs +++ b/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyUiSettings.cs @@ -252,6 +252,11 @@ public sealed class LegacyUiSettings public double CorpseApproachRangeMin = 2.0; public bool BoostNavPriority; + /// + /// Options > Navigation: show RynthILT's Mini Remote "Vaulted Dungeons" tab on ILT worlds. + /// Off by default; the feature still lives in RynthILT and only runs on ILT-like servers. + /// + public bool EnableVaultedDungeons; public bool BoostLootPriority; public bool OpenDoors; public float OpenDoorRange = 5.0f; @@ -1096,6 +1101,8 @@ public sealed class SettingsBridgePayload // Navigation public bool BoostNavPriority { get; set; } + /// Options > Navigation > Vaulted Dungeons (Mini Remote ILT tab gate). + public bool EnableVaultedDungeons { get; set; } public float FollowNavMin { get; set; } public float NavRingThickness { get; set; } public float NavLineThickness { get; set; } diff --git a/Plugins/RynthCore.Plugin.RynthAi/MiniRemote/PetsTab.cs b/Plugins/RynthCore.Plugin.RynthAi/MiniRemote/PetsTab.cs index 1092db3..1baedd3 100644 --- a/Plugins/RynthCore.Plugin.RynthAi/MiniRemote/PetsTab.cs +++ b/Plugins/RynthCore.Plugin.RynthAi/MiniRemote/PetsTab.cs @@ -905,6 +905,32 @@ internal sealed class PetsTab /// public bool BreedingOffered => _ctx.Ilt.IsIltWorld && !_ctx.Ilt.IsOff(RynthIltHub.FeaturePetBreeding); + /// Whether auto siphon-lens capture is on (Mini Remote Capture toggle; settings on the roster). + public bool AutoCaptureEnabled + { + get => S.AutoCaptureEnabled; + set => S.AutoCaptureEnabled = value; + } + + /// + /// Mini Remote Pet toggle on: enable combat auto-summon and summon the Pets tab's active + /// combat essence now (first ticked priority, or the highlighted row). Pump thread. + /// + public void ActivateHudPet(LegacyUiSettings settings) + { + settings.SummonPets = true; + _ctx.SaveCombatSettings?.Invoke(); + if (FindOwnPet() != null) return; // already out — leave it + SummonPet(0, PetKind.Combat); + } + + /// Mini Remote Pet toggle off: stop combat auto-summon. Pump thread. + public void DeactivateHudPet(LegacyUiSettings settings) + { + settings.SummonPets = false; + _ctx.SaveCombatSettings?.Invoke(); + } + /// /// The Pets tab: the universal roster, and on Infinite Leaftide the Roster | Breeding sub-tabs /// (Breeding is drawn by RynthILT). diff --git a/Plugins/RynthCore.Plugin.RynthAi/RynthAiPlugin.LocalFeatures.cs b/Plugins/RynthCore.Plugin.RynthAi/RynthAiPlugin.LocalFeatures.cs index 12145cd..1410b9c 100644 --- a/Plugins/RynthCore.Plugin.RynthAi/RynthAiPlugin.LocalFeatures.cs +++ b/Plugins/RynthCore.Plugin.RynthAi/RynthAiPlugin.LocalFeatures.cs @@ -472,7 +472,15 @@ public sealed partial class RynthAiPlugin { if (!_initialized || !_loginComplete) return null; var remote = _miniRemote; - IReadOnlyList iltTabs = remote != null ? remote.Ilt.Tabs() : Array.Empty(); + IReadOnlyList raw = remote != null ? remote.Ilt.Tabs() : Array.Empty(); + // Options > Navigation > Vaulted Dungeons: hide the section contribution until enabled. + bool vaultedOn = _dashboard?.Settings.EnableVaultedDungeons == true; + var iltTabs = new List(raw.Count); + foreach (IltTabInfo t in raw) + { + if (string.Equals(t.Id, "vaulted", StringComparison.OrdinalIgnoreCase) && !vaultedOn) continue; + iltTabs.Add(t); + } return Huds.SectionsManifest.Build(Huds.SectionsManifest.Views(iltTabs), Huds.SectionsManifest.OwnSections); } /// Chat Translate window in the dashboard colours (no-op while hidden). diff --git a/Plugins/RynthCore.Plugin.RynthAi/RynthAiVersionCommand.cs b/Plugins/RynthCore.Plugin.RynthAi/RynthAiVersionCommand.cs index d4a8b66..c1dd1b8 100644 --- a/Plugins/RynthCore.Plugin.RynthAi/RynthAiVersionCommand.cs +++ b/Plugins/RynthCore.Plugin.RynthAi/RynthAiVersionCommand.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Diagnostics; using System.Globalization; using System.IO; @@ -44,6 +44,7 @@ public sealed partial class RynthAiPlugin private static unsafe class PluginModule { /// RynthPluginVersion's hand-written string (it never changes between builds). + // Previous release: 0.5.0-legacy-ui (upstream standing). public const string HandWrittenVersion = "0.5.0-legacy-ui"; private const uint FromAddress = 0x4, UnchangedRefCount = 0x2; diff --git a/Plugins/RynthCore.Plugin.RynthAi/RynthCore.Plugin.RynthAi.csproj b/Plugins/RynthCore.Plugin.RynthAi/RynthCore.Plugin.RynthAi.csproj index 2eeaf02..d81a3fd 100644 --- a/Plugins/RynthCore.Plugin.RynthAi/RynthCore.Plugin.RynthAi.csproj +++ b/Plugins/RynthCore.Plugin.RynthAi/RynthCore.Plugin.RynthAi.csproj @@ -53,6 +53,8 @@ + + @@ -65,18 +67,17 @@ - - - - - - + + + + + diff --git a/Plugins/RynthCore.Plugin.RynthChat/ChatBuffer.cs b/Plugins/RynthCore.Plugin.RynthChat/ChatBuffer.cs index 7f6b492..4521a58 100644 --- a/Plugins/RynthCore.Plugin.RynthChat/ChatBuffer.cs +++ b/Plugins/RynthCore.Plugin.RynthChat/ChatBuffer.cs @@ -75,7 +75,7 @@ internal sealed class ChatBuffer if (string.IsNullOrEmpty(text)) return; string channel = ChatClassifier.IsItemInfo(text) ? ChatClassifier.Items : ChatClassifier.IsRynthOutput(text) ? ChatClassifier.Rynth - : ChatClassifier.ChannelFor(chatType); + : ChatClassifier.ChannelFor(text, chatType); string? sender = ChatClassifier.SenderFor(text, chatType); string ts = DateTime.Now.ToString("HH:mm:ss"); diff --git a/Plugins/RynthCore.Plugin.RynthChat/ChatClassifier.cs b/Plugins/RynthCore.Plugin.RynthChat/ChatClassifier.cs index 02cc6a0..b150bfc 100644 --- a/Plugins/RynthCore.Plugin.RynthChat/ChatClassifier.cs +++ b/Plugins/RynthCore.Plugin.RynthChat/ChatClassifier.cs @@ -34,17 +34,46 @@ internal static class ChatClassifier // ── Channel classification ───────────────────────────────────────────── - internal static string ChannelFor(int chatType) => (uint)chatType switch + /// + /// Channel tab for a line. Prefer the text's [General]/[Trade]/… tag when present — + /// ILT (and some ACE builds) deliver those as type 0x1C / 28 instead of 0x08/0x09, which + /// used to dump Trade/General into Other and leave the Channels tab empty. + /// + internal static string ChannelFor(string? text, int chatType) + { + if (IsChannelTagged(text)) return Channels; + return ChannelForType(chatType); + } + + /// Legacy type-only map (tests / callers without the line text). + internal static string ChannelFor(int chatType) => ChannelForType(chatType); + + internal static string ChannelForType(int chatType) => (uint)chatType switch { 0x02 or 0x03 or 0x04 or 0x0A or 0x0B or 0x0C or 0x12 or 0x13 => Chat, - 0x08 or 0x09 => Channels, + 0x08 or 0x09 or 0x1C => Channels, 0x00 or 0x05 or 0x0D or 0x14 or 0x17 or 0x18 or 0x19 or 0x1F => System, 0x06 or 0x07 or 0x11 or 0x15 or 0x16 => Combat, _ => Other, }; + /// True when the line opens with a retail/ILT channel tag ([Trade], [General], …). + internal static bool IsChannelTagged(string? text) + { + if (string.IsNullOrEmpty(text) || text[0] != '[') return false; + return text.StartsWith("[General]", StringComparison.OrdinalIgnoreCase) + || text.StartsWith("[Trade]", StringComparison.OrdinalIgnoreCase) + || text.StartsWith("[LFG]", StringComparison.OrdinalIgnoreCase) + || text.StartsWith("[Roleplay]", StringComparison.OrdinalIgnoreCase) + || text.StartsWith("[Society]", StringComparison.OrdinalIgnoreCase) + || text.StartsWith("[Celestial Hand]", StringComparison.OrdinalIgnoreCase) + || text.StartsWith("[Eldrytch Web]", StringComparison.OrdinalIgnoreCase) + || text.StartsWith("[Radiant Blood]", StringComparison.OrdinalIgnoreCase) + || text.StartsWith("[Admin]", StringComparison.OrdinalIgnoreCase); + } + internal static uint ColorFor(string channel) => channel switch { Chat => 0xFFE0E0E0, diff --git a/Plugins/RynthCore.Plugin.RynthChat/RynthChatPlugin.cs b/Plugins/RynthCore.Plugin.RynthChat/RynthChatPlugin.cs index 78cccc3..1546df6 100644 --- a/Plugins/RynthCore.Plugin.RynthChat/RynthChatPlugin.cs +++ b/Plugins/RynthCore.Plugin.RynthChat/RynthChatPlugin.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Runtime.InteropServices; using RynthCore.PluginCore; @@ -7,7 +7,8 @@ namespace RynthCore.Plugin.RynthChat; public sealed class RynthChatPlugin : RynthPluginBase { internal static readonly IntPtr NamePointer = Marshal.StringToHGlobalAnsi("RynthChat"); - internal static readonly IntPtr VersionPointer = Marshal.StringToHGlobalAnsi("0.3.0"); + // Previous release: 0.3.1. + internal static readonly IntPtr VersionPointer = Marshal.StringToHGlobalAnsi("0.3.2"); private readonly ChatBuffer _buffer = new(); @@ -29,9 +30,7 @@ public sealed class RynthChatPlugin : RynthPluginBase public override void OnChatWindowText(string? text, int chatType, ref int eat) { - // A plugin earlier in the dispatch ate the line (RynthAi's Meta Manager eats the - // reply to its own /myquests poll): keep it out of the chat window. - if (eat != 0) return; + // Always buffer for RynthChat, even when an earlier plugin ate the line for retail. _buffer.Add(text, chatType); } diff --git a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltFeatureCatalog.cs b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltFeatureCatalog.cs index 96b39c0..930bca2 100644 --- a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltFeatureCatalog.cs +++ b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltFeatureCatalog.cs @@ -15,16 +15,21 @@ // "checking" until the reply arrives, then on or off. // * No server bit at all (the Temple guardians, Paragon gear): content, on with the ILT world. // Off an ILT world nothing is claimed: every state is unknown. -// The list feeds the ILT settings window ("/ilt settings", IltSettingsView/) and "/ra hub features". +// The list feeds RynthOracle's About tab ("Server features", via the profile JSON), "/ra hub features", +// and the "RynthILT.Server" profile JSON other plugins read (Plugins/Shared/RynthIltServerApi.cs: +// RynthOracle's Fellowship tab takes the fellowship rules from it, and its Quests tab the /qb list). // Server facts copied from ACECustom: Fellowship.MaxFellows = 29 (Source/ACE.Server/Entity/ // Fellowship.cs), Zone Share (ZoneShareManager) and the fellowship luminance share. using System; using System.Collections.Generic; +using System.Globalization; +using System.Text; +using RynthCore.Plugin.Shared; namespace RynthCore.Plugin.RynthILT.Hub; /// One Leaftide feature: id, display text, where it lives, and the server bit that says whether it's on. -/// Stable id. +/// Stable id (the profile JSON's "key"). /// Display name. /// Character, Items, Fellowship or Activities (the list's sections). /// Where the Rynth tools handle it. @@ -45,6 +50,16 @@ internal enum IltKnown ProfileOff, } +/// The quest bonus list as the profile JSON carries it ("questBonus"), for RynthOracle's Quests tab. +/// The server has /qb turned off. +/// Bumped per parsed "/qb list"; 0 = not loaded this session. +/// The server's quest bonus count; -1 = unknown. +/// One line on the last request ("loading...", "12 completed, 3 incomplete", ...). +/// Completed bonus flags, sorted. +/// Incomplete bonus flags, sorted. +internal sealed record IltQuestBonusInfo(bool Disabled, int Generation, long Count, string Status, + IReadOnlyList Completed, IReadOnlyList Incomplete); + internal static class IltFeatureCatalog { public const string GroupCharacter = "Character"; @@ -60,16 +75,13 @@ internal static class IltFeatureCatalog /// ACECustom's fellowship member limit (Fellowship.MaxFellows); retail is 9. public const int IltFellowshipMax = 29; - /// A retail fellowship's member limit. - public const int RetailFellowshipMax = 9; - /// Every Leaftide feature RynthILT supports, in display order. public static readonly IltFeatureInfo[] All = { // Character progression and money. - new("bank", "Banking", GroupCharacter, "Mini Remote > Banking tab; Remote tab bank line", + new("bank", "Banking", GroupCharacter, "Global Inventory > Banking (/ginv bank); Remote tab bank line", "Bank pyreals, luminance, keys and coins; deposit, withdraw and transfer (/bank).", IltFeature.Bank, IltKnown.Checked), - new("bank_notes", "Trade note banking", GroupCharacter, "Mini Remote > Banking tab (trade notes)", + new("bank_notes", "Trade note banking", GroupCharacter, "Global Inventory > Banking (/ginv bank, notes)", "Deposit trade notes as pyreals, withdraw any note from I to MMD, transfer note value (/bank d n).", "bank_notes"), new("guardian", "Guardian (infinite base attributes)", GroupCharacter, "Guardian panel (/rc guardian)", "Temple of Enlightenment guardians raise base attributes past the retail cap.", null), @@ -102,7 +114,7 @@ internal static class IltFeatureCatalog "t11_craft_gate"), new("split_arrows", "Split arrows", GroupItems, "Mini Remote > Gear > Split arrows", "Missile weapons carry split arrows, added with White Quartz salvage.", "split_arrows"), - new("charms", "Charms", GroupItems, "Mini Remote > Charms tab", + new("charms", "Charms", GroupItems, "RynthOracle > Character (/ro character)", "Registry charms and the Guardian Hand, with their toggles; each charm is listed in the Charms section.", "charms"), new("clap", "Chunk clap (auto craft)", GroupItems, "Mini Remote > Gear tab", "Turns aetheria, chunks and trinkets into banked enlightened coins (/clap all).", IltFeature.Clap, IltKnown.Checked), @@ -111,10 +123,10 @@ internal static class IltFeatureCatalog new("pets", "Pet log", GroupPets, "Mini Remote > Pets tab", "Captured pets, registered with Professor Ruggan (/pets).", IltFeature.Pets, IltKnown.Checked), new("shinies", "Shiny log", GroupPets, "Mini Remote > Pets tab", "Rare shiny creature variants you captured (/shinies).", IltFeature.Shinies, IltKnown.Checked), new("monster_capture", "Monster capture", GroupPets, "Mini Remote > Pets tab", - "Siphon lenses capture a creature\'s look into a pet essence (<=20% health or under 20 HP; Asheron\'s Lens skips the gate). Auto-capture is the checkbox on the Pets roster.", "monster_capture"), - new("pet_breeding", "Pet breeding", GroupPets, "Mini Remote > Pets > Breeding", + "Siphon lenses capture a creature's look into a pet essence (≤20% health or under 20 HP; Asheron's Lens skips the gate). Auto-capture is the checkbox on the Pets roster.", "monster_capture"), + new("pet_breeding", "Pet breeding", GroupPets, "Mini Remote > Pets > Breeding; RynthOracle > Pet Breeding", "Breed two combat pet devices at the Seedy Motel for inherited and mutated offspring (/dance).", "pet_breeding"), - new("pet_maturity", "Pet maturity", GroupPets, "Mini Remote > Pets > Breeding", + new("pet_maturity", "Pet maturity", GroupPets, "Mini Remote > Pets > Breeding; RynthOracle > Pet Breeding", "Bred pets start small and weak and grow up with kills.", "pet_maturity"), new("pet_bond", "Pet bond", GroupPets, "Mini Remote > Pets tab", "Pets gain bond XP from kills, which scales their stats (/top bonds). On in ILT (breeding needs bond 100).", IltFeature.PetBond), @@ -130,9 +142,9 @@ internal static class IltFeatureCatalog "Ask for a name for your pet; staff approve it (/pet-name).", "pet_naming"), // Fellowship. - new("fellowship_large", "Large fellowships (up to 29)", GroupFellowship, "The game's fellowship panel", + new("fellowship_large", "Large fellowships (up to 29)", GroupFellowship, "RynthOracle > Fellowship", "Fellowships hold up to 29 members instead of retail's 9.", "fellowship_size"), - new("fship", "Fellowship commands", GroupFellowship, "ILT fellowship window (/ilt fellow)", + new("fship", "Fellowship commands", GroupFellowship, "RynthOracle > Fellowship (ILT /fship)", "Create, invite, invite your landblock, list nearby, leave and disband from chat (/fship).", "fship"), new("zone_share", "Zone Share", GroupFellowship, "Mini Remote > Session Stats (luminance, pass-up)", "XP and luminance shared with everyone in a Zone Share area, capped at a fellowship's size.", "zone_share"), @@ -158,11 +170,15 @@ internal static class IltFeatureCatalog "Curbs extreme evasion at very high defense skill. Off by default in ACECustom.", "defense_scaling", IltKnown.ProfileOff), // Activities. - new("quests", "Quest tracker", GroupActivities, "Mini Remote > Quests tab", + new("quests", "Quest tracker", GroupActivities, "RynthOracle > Quests tab", "Your quest timers from the server (/myquests).", IltFeature.Quests, IltKnown.Checked), - new("quest_bonus", "Quest bonus", GroupActivities, "Mini Remote > Quests tab (quest bonus)", + new("quest_bonus", "Quest bonus", GroupActivities, "RynthOracle > Quests tab", "Each quest completed adds to your XP bonus; the list (/qb).", IltFeature.Qb, IltKnown.Checked), new("bounties", "Bounties", GroupActivities, "Bounties window (/rc bounties)", "ACECustom bounties and your progress.", "bounties"), + new("vaulted_dungeons", "Vaulted Dungeons", GroupActivities, + "Mini Remote > Vaulted Dungeons (/ilt vaulted; Options > Navigation)", + "Keeps you in one Vaulted Dungeon via a tied portal recall gem; optional kill-client on no luminance kill.", + null), // content: on with the ILT world; the Options checkbox only shows the Mini Remote tab new("rifts", "Greater Rifts", GroupActivities, "Chat: /rift", "Private, timed dungeon runs that scale by tier (/rift).", "rifts"), new("room_assign", "Room Assign dungeons", GroupActivities, "Portals and recalls", "One-player rooms with their own spawns.", "room_assign"), @@ -226,7 +242,7 @@ internal static class IltFeatureCatalog foreach (IltCharmDef def in IltInventory.Charms) if (IltFeature.Charm(def.Name).Equals(key, StringComparison.OrdinalIgnoreCase)) return (def.Name, GroupCharms, (def.Effect.Length > 0 ? def.Effect + "\n" : string.Empty) - + "Where: Mini Remote > Charms tab\n" + charmNote); + + "Where: RynthOracle > Character (/ro character)\n" + charmNote); return (key.Substring(CharmKeyPrefix.Length), GroupCharms, charmNote); } return (key, GroupOther, "A server switch RynthILT reads from chat."); @@ -255,7 +271,69 @@ internal static class IltFeatureCatalog }; /// The fellowship member limit: ACECustom's 29 on an ILT world, retail's 9 elsewhere. - public static int FellowshipMax(bool iltWorld) => iltWorld ? IltFellowshipMax : RetailFellowshipMax; + public static int FellowshipMax(bool iltWorld) => iltWorld ? IltFellowshipMax : RynthIltServer.RetailFellowshipMax; + + /// + /// The "RynthILT.Server" profile JSON (schema in Plugins/Shared/RynthIltServerApi.cs). Pure: + /// everything comes in as arguments, so the tests build it without a client. Plain ASCII. + /// + public static string BuildProfileJson(bool iltWorld, string world, bool forced, string source, DateTime checkedUtc, + Func bit, IltQuestBonusInfo? questBonus = null) + { + var sb = new StringBuilder(4096); + sb.Append("{\"ilt\":").Append(iltWorld ? "true" : "false"); + sb.Append(",\"world\":\"").Append(Escape(world)).Append('"'); + sb.Append(",\"forced\":").Append(forced ? "true" : "false"); + sb.Append(",\"source\":\"").Append(Escape(source)).Append('"'); + sb.Append(",\"checked\":\"") + .Append(checkedUtc == DateTime.MinValue ? "" : checkedUtc.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ", CultureInfo.InvariantCulture)) + .Append('"'); + + sb.Append(",\"features\":["); + for (int i = 0; i < All.Length; i++) + { + IltFeatureInfo f = All[i]; + if (i > 0) sb.Append(','); + sb.Append("{\"key\":\"").Append(Escape(f.Key)) + .Append("\",\"label\":\"").Append(Escape(f.Label)) + .Append("\",\"group\":\"").Append(Escape(f.Group)) + .Append("\",\"state\":").Append(((int)StateOf(f, iltWorld, bit)).ToString(CultureInfo.InvariantCulture)) + .Append(",\"where\":\"").Append(Escape(f.Where)).Append("\"}"); + } + sb.Append(']'); + + int State(string key) => (int)StateOf(Find(key)!, iltWorld, bit); + sb.Append(",\"fellowship\":{\"maxMembers\":").Append(FellowshipMax(iltWorld).ToString(CultureInfo.InvariantCulture)) + .Append(",\"zoneShare\":").Append(State("zone_share").ToString(CultureInfo.InvariantCulture)) + .Append(",\"blackjack\":").Append(State("fellowship_blackjack").ToString(CultureInfo.InvariantCulture)) + .Append(",\"luminanceShare\":").Append(State("fellowship_luminance").ToString(CultureInfo.InvariantCulture)) + .Append('}'); + + // The /qb list (ILT worlds only): RynthOracle's Quests tab draws it. + if (questBonus != null && iltWorld) + { + sb.Append(",\"questBonus\":{\"disabled\":").Append(questBonus.Disabled ? "true" : "false") + .Append(",\"generation\":").Append(questBonus.Generation.ToString(CultureInfo.InvariantCulture)) + .Append(",\"count\":").Append(questBonus.Count.ToString(CultureInfo.InvariantCulture)) + .Append(",\"status\":\"").Append(Escape(questBonus.Status)).Append('"'); + AppendList(sb, "completed", questBonus.Completed); + AppendList(sb, "incomplete", questBonus.Incomplete); + sb.Append('}'); + } + sb.Append('}'); + return sb.ToString(); + + static void AppendList(StringBuilder b, string name, IReadOnlyList items) + { + b.Append(",\"").Append(name).Append("\":["); + for (int i = 0; i < items.Count; i++) + { + if (i > 0) b.Append(','); + b.Append('"').Append(Escape(items[i])).Append('"'); + } + b.Append(']'); + } + } /// The chat listing for "/ra hub features": one line per feature, ASCII only. public static List BuildChatLines(bool iltWorld, Func bit) @@ -270,4 +348,19 @@ internal static class IltFeatureCatalog } return lines; } + + /// JSON string body: quotes, backslashes and control characters escaped, anything non-ASCII as \uXXXX. + private static string Escape(string? s) + { + if (string.IsNullOrEmpty(s)) return string.Empty; + var sb = new StringBuilder(s.Length + 8); + foreach (char c in s) + { + if (c == '"') sb.Append("\\\""); + else if (c == '\\') sb.Append("\\\\"); + else if (c < 0x20 || c > 0x7E) sb.Append("\\u").Append(((int)c).ToString("x4", CultureInfo.InvariantCulture)); + else sb.Append(c); + } + return sb.ToString(); + } } diff --git a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltHubController.cs b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltHubController.cs index 9ded4c5..9419305 100644 --- a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltHubController.cs +++ b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltHubController.cs @@ -64,6 +64,8 @@ internal sealed class IltHubController public IltCharms CharmsTab { get; } /// Temple guardians: riddle translator, hand-in, attribute turn-in tracker. public IltGuardian Guardian { get; } + /// Vaulted Dungeons keeper (Mini Remote tab; Options > Navigation gate in RynthAi). + public IltVaultedDungeons VaultedDungeons { get; } /// True while this character's copy from RynthAi is unfinished (IltHubStore.WritesBlocked). /// The character's RynthAi folder while that copy is unfinished (read-only fallback). @@ -92,7 +94,8 @@ internal sealed class IltHubController Charms = new IltCharmTracker(_ctx); CharmsTab = new IltCharms(_ctx, Charms); Guardian = new IltGuardian(_ctx, QuestBonus); - _features.AddRange(new IIltFeature[] { Banking, PetLogs, Breeding, Rates, QuestBonus, Progression, Gear, CharmsTab, Games, Guardian }); + VaultedDungeons = new IltVaultedDungeons(_ctx); + _features.AddRange(new IIltFeature[] { Banking, PetLogs, Breeding, Rates, QuestBonus, Progression, Gear, CharmsTab, Games, VaultedDungeons, Guardian }); Banking.BalanceChanged += Rates.OnBankBalanceChanged; Rates.MovingMoney = () => Banking.MovingMoney; @@ -346,6 +349,7 @@ internal sealed class IltHubController IltProgression => LogCat.IltProgression, IltGear or IltCharms => LogCat.IltGear, IltGames => LogCat.IltGames, + IltVaultedDungeons => LogCat.IltHub, _ => LogCat.IltHub, }; @@ -456,7 +460,7 @@ internal sealed class IltHubController { // Quests and Pets are RynthAi's tabs: not ours to open. if (args.Length >= 2 && IltSections.IsUniversalTabName(args[1])) return false; - _ctx.Chat("[Mini Remote] Usage: /ra hub open pets|banking|gear|charms|games|guardian|bounties [show|hide|toggle] (character: /ro character, quests: /ro)"); + _ctx.Chat("[Mini Remote] Usage: /ra hub open pets|banking|gear|charms|games|vaulted|guardian|bounties [show|hide|toggle] (character: /ro character, quests: /ro)"); break; } OpenSection(section, args.Length > 2 ? args[2] : "toggle"); @@ -494,7 +498,8 @@ internal sealed class IltHubController break; default: _ctx.Chat("[Mini Remote] /ra hub [show|hide|toggle] (Mini Remote)|refresh|bank|status|features|force on|off|servers [list]|clap|confirm|cancel"); - _ctx.Chat("[Mini Remote] /ra hub open pets|banking|gear|charms|games [show|hide|toggle] (Mini Remote tabs; character: /ro character, quests: /ro)"); + _ctx.Chat("[Mini Remote] /ra hub open pets|banking|gear|charms|games|vaulted [show|hide|toggle] (Mini Remote tabs; character: /ro character, quests: /ro)"); + _ctx.Chat("[Mini Remote] /ilt vaulted [on|off|toggle|status] (Vaulted Dungeons; Options > Navigation > Vaulted Dungeons)"); _ctx.Chat("[Mini Remote] /ra hub profile list|save [shared]|load /ra hub suit list|test|load [name]"); _ctx.Chat("[Mini Remote] /ra hub attr run|stop|costs|status|auto on|off|every |raise (Skills panel > Progression)"); _ctx.Chat("[Mini Remote] /ra quests refresh (quiet /myquests) /ra pets [show|hide] /ilt qb (the quest bonus list)"); diff --git a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltHubUi.cs b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltHubUi.cs index 9cca44f..2904277 100644 --- a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltHubUi.cs +++ b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltHubUi.cs @@ -4,20 +4,21 @@ // Infinite Leaftide items) that read the Hub's state. // // The ILT sections are tabs of RynthAi's Mini Remote (its MiniRemoteHud draws the tab bar and -// calls RenderTab through RynthILT.Hub): Banking, Gear, Charms and Games. A tab is offered only -// while the server reports its feature on. The Character tab left the Mini Remote on 2026-10-13: +// calls RenderTab through RynthILT.Hub): Gear and Games. A tab is offered only while the server +// reports its feature on. Character, Charms and Banking left the Mini Remote on 2026-10-13: // - the session rates are RynthCore's Mini Remote "Session Stats" section (RenderRatesSection, // surface "section:ilt-rates"), below RynthAi's one session; -// - the character overview and session are RynthOracle's Character tab ("/ro character"); +// - the Leaftide feature list is RynthOracle's About tab ("Server features", from the profile); +// - the charms are RynthOracle's Character tab, the bank balances RynthInventory's Global +// Inventory "Banking" tab (both read "RynthILT.Data"); // - the "Treat this world as ILT" override and the ILT world names are RynthCore's // Options > Diagnostics server selection only ("/ra hub force" and "/ra hub servers" remain). -// The /qb list (RynthAi's Quests tab before it moved to RynthOracle) is RynthILT's own "Quests" -// section on the rail (RenderQuestBonusSection, surface "section:ilt-questbonus"). -// RenderSection draws the ILT pieces inside RynthAi's own surfaces (the Remote tab, the Pets tab, -// the Mini Remote menu). The Guardian is a RynthCore ILT panel (the bar's ILT button, next to -// Bounties), drawn through RenderGuardianPanel. Render() keeps the floating extras: the Games HUD and the confirmation -// modal. Augmentations / Enlightenment / XP planning live on the engine Skills panel. All AC -// actions go through IltHubContext.Post / Confirm so nothing here touches the game directly. +// RenderSection draws the ILT pieces inside RynthAi's own surfaces (the Remote tab, the Quests and +// Pets tabs, the Mini Remote menu). The Guardian is a RynthCore ILT panel (the bar's ILT button, +// next to Bounties), drawn through RenderGuardianPanel. Render() keeps the floating extras: the +// Games HUD and the confirmation modal. Augmentations / Enlightenment / XP planning live on the +// engine Skills panel. All AC actions go through IltHubContext.Post / Confirm so nothing here +// touches the game directly. using System; using System.Numerics; using ImGuiNET; @@ -66,10 +67,9 @@ internal sealed class IltHubUi } switch (section) { - case IltSection.Banking: _hub.Banking.Render(); break; case IltSection.Gear: _hub.Gear.Render(); break; - case IltSection.Charms: _hub.CharmsTab.Render(); break; case IltSection.Games: _hub.Games.Render(); break; + case IltSection.VaultedDungeons: _hub.VaultedDungeons.Render(); break; default: // A saved tab id from before the move: say where the section lives now. if (IltSections.MovedCommand(section) is string moved) @@ -95,20 +95,8 @@ internal sealed class IltHubUi ImGui.TextDisabled("XP planner, Augmentations and Enlightenment: Skills panel > Progression."); } - /// - /// The quest bonus list (/qb) in RynthILT's own Mini Remote "Quests" section (surface - /// "section:ilt-questbonus"); it was a section of RynthAi's Quests tab, which moved to RynthOracle. - /// - public void RenderQuestBonusSection() - { - if (!_ctx.Options.IsIltLikeWorld) - { - RenderHeader(); - RenderUnavailable(); - return; - } - _hub.QuestBonus.RenderQb(); - } + /// The /qb list in RynthILT's Quests section (surface "section:ilt-questbonus"). + public void RenderQuestBonusSection() => _hub.QuestBonus.RenderSection(); /// /// One of the ILT pieces RynthAi draws in its own surfaces (RynthIltHub.Section*). False when @@ -167,8 +155,8 @@ internal sealed class IltHubUi /// A button that opens a moved section's new home (posted: the command runs on the pump). private void MovedLink(IltSection section, string command) { - const string home = "RynthOracle > Character"; - SafeImGui.TextDisabled($"{IltSections.Label(section)} moved to {home}; the ILT session rates are in Session Stats."); + string home = command == IltSections.GlobalBankCommand ? "Global Inventory > Banking" : "RynthOracle > Character"; + ImGui.TextDisabled($"{IltSections.Label(section)} moved to {home}."); if (ImGui.SmallButton($"Open {home}##moved{(int)section}")) _ctx.Post(() => _hub.OpenMoved(section, command)); if (ImGui.IsItemHovered()) SafeImGui.SetTooltip(command); @@ -216,7 +204,7 @@ internal sealed class IltHubUi ImGui.TextDisabled("Bank: not loaded yet"); ImGui.SameLine(); if (ImGui.SmallButton("Load##mrbank")) _ctx.Post(() => _hub.Banking.RequestRefresh(quiet: true)); - if (ImGui.IsItemHovered()) ImGui.SetTooltip("Reads your bank balances (/bank, reply hidden). The Banking tab has the details."); + if (ImGui.IsItemHovered()) ImGui.SetTooltip("Reads your bank balances (/bank, reply hidden). Global Inventory > Banking (/ginv bank) has the details."); BankLink(); return; } @@ -233,15 +221,14 @@ internal sealed class IltHubUi ImGui.EndTable(); } - /// The Bank line's link to RynthILT's own Banking tab (Infinite Leaftide's bank stays RynthILT's). + /// The Bank line's link to RynthInventory's Global Inventory "Banking" tab (every character here). private void BankLink() { - if (!_hub.SectionAvailable(IltSection.Banking)) return; ImGui.SameLine(); - if (ImGui.SmallButton("Bank##mrbanklink")) - _ctx.Ai.MiniRemoteTab(IltSections.TabId(IltSection.Banking), "show"); + if (ImGui.SmallButton("Banks##mrbanklink")) + _ctx.Post(() => _hub.OpenMoved(IltSection.Banking, IltSections.GlobalBankCommand)); if (ImGui.IsItemHovered()) - ImGui.SetTooltip("The Banking tab: deposits, withdrawals and transfers (/ra hub open banking)."); + SafeImGui.SetTooltip("Global Inventory > Banking (/ginv bank): deposits, withdrawals, transfers and\nevery character's bank on this server."); } private static void Stat(string label, string value) @@ -284,8 +271,8 @@ internal sealed class IltHubUi /// /// RynthILT's own Infinite Leaftide entries, for when RynthCore sends no server list (older - /// RynthCore, or its ImGui layer off): the tabs, where Character went, and the Guardian / - /// Bounties panels. + /// RynthCore, or its ImGui layer off): the tabs, where Character / Charms / Banking went, and + /// the Guardian / Bounties panels. /// private bool RenderLocalMenu() { @@ -297,8 +284,10 @@ internal sealed class IltHubUi if (ImGui.MenuItem(IltSections.Label(section) + "##mrlocal", string.Empty, false, _hub.SectionAvailable(section))) _ctx.Ai.MiniRemoteTab(IltSections.TabId(section), "show"); } - if (ImGui.MenuItem("Character##mrlocal", IltSections.OracleCharacterCommand)) + if (ImGui.MenuItem("Character and charms##mrlocal", IltSections.OracleCharacterCommand)) _ctx.Post(() => _hub.OpenMoved(IltSection.Character, IltSections.OracleCharacterCommand)); + if (ImGui.MenuItem("Banking##mrlocal", IltSections.GlobalBankCommand, false, _hub.SectionAvailable(IltSection.Banking))) + _ctx.Post(() => _hub.OpenMoved(IltSection.Banking, IltSections.GlobalBankCommand)); if (ImGui.MenuItem("Guardian##mrlocal", "/rc guardian", false, _hub.SectionAvailable(IltSection.Guardian))) _ctx.Post(() => _hub.OpenEnginePanel("guardian", "Guardian", "show")); if (ImGui.MenuItem("Bounties##mrlocal", "/rc bounties")) diff --git a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltSections.cs b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltSections.cs index 080c7df..b9a7b13 100644 --- a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltSections.cs +++ b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltSections.cs @@ -1,35 +1,41 @@ // IltSections.cs - The Infinite Leaftide tabs of RynthAi's Mini Remote and the Guardian panel. // Originally SilentKelpie's ILT Hub sections (RynthAi IltHub/); moved to RynthILT 2026-10-13. // -// Banking, Gear, Charms and Games are Mini Remote tabs: RynthAi's MiniRemoteHud draws the tab bar -// (after its Remote, Pets and Crafting tabs) and asks RynthILT for each tab's body (RynthILT.Hub -// GetTabs / RenderTab); "/ra hub open
" picks one, and with RynthCore's sections rail -// RynthAi lists them as "section:" views (Inventory). Guardian is a RynthCore ILT panel -// instead (the bar's ILT button, next to Bounties; "/rc guardian"), drawn by this plugin through -// RynthPluginRenderEmbed("guardian"). The Pets tab is RynthAi's (every server: summoning essences -// aren't ILT's); quests are RynthOracle's. +// Gear and Games are Mini Remote tabs: RynthAi's MiniRemoteHud draws the tab bar (after its Remote, +// Quests and Pets tabs) and asks RynthILT for each tab's body (RynthILT.Hub GetTabs / RenderTab); +// "/ra hub open
" picks one. Guardian is a RynthCore ILT panel instead (the bar's ILT +// button, next to Bounties; "/rc guardian"), drawn by this plugin through +// RynthPluginRenderEmbed("guardian"). The Quests and Pets tabs are RynthAi's (every server: +// /myquests and summoning essences aren't ILT's). // -// Character was a Mini Remote tab until 2026-10-13. It moved out: -// the character overview and session -> RynthOracle's Character tab ("/ro character"); -// the ILT session rates -> RynthCore's Mini Remote "Session Stats" section -// (RynthILT's own surface "section:ilt-rates"); -// the force-server override -> RynthCore Options > Diagnostics only. -// Its names still parse, so old links and commands land on the new home (MovedCommand). Charms and -// Banking are Infinite Leaftide's own screens and stay RynthILT's tabs. +// Character, Charms and Banking were Mini Remote tabs until 2026-10-13. They moved out: +// Character -> RynthCore's Mini Remote "Session Stats" section (session rates; the force-server +// override lives only in RynthCore Options > Diagnostics) and RynthOracle's +// Character tab ("/ro character"); +// Charms -> RynthOracle's Character tab, a list fed by "RynthILT.Data" ("/ro character"); +// Banking -> RynthInventory's Global Inventory "Banking" tab, every character on this server +// ("/ginv bank"). +// Their names still parse, so old links and commands land on the new home (MovedCommand). using System; using System.Numerics; namespace RynthCore.Plugin.RynthILT.Hub; -/// ILT sections: the Mini Remote's ILT tabs, the one that moved out, then the Guardian panel. +/// ILT sections: the Mini Remote's ILT tabs, the sections that moved out, then the Guardian panel. internal enum IltSection { - /// Moved out (2026-10-13): RynthOracle's Character tab and the Session Stats section. + /// Moved out (2026-10-13): RynthOracle's Character tab. Character, + /// Moved out (2026-10-13): RynthInventory's Global Inventory "Banking" tab. Banking, Gear, Games, - /// Registry charms (acquired / status / tier / server) and the Guardian Hand. + /// + /// Vaulted Dungeons keeper (portal-recall gem + kill-client). Mini Remote tab on ILT worlds when + /// Options > Navigation > Vaulted Dungeons is enabled (RynthAi filters the tab). + /// + VaultedDungeons, + /// Moved out (2026-10-13): RynthOracle's Character tab (the charms list). Charms, // Keep Guardian last. Guardian, @@ -40,21 +46,25 @@ internal static class IltSections /// The ILT tabs, in tab-bar order (RynthAi puts them after its own tabs). public static readonly IltSection[] Tabs = { - IltSection.Banking, IltSection.Gear, IltSection.Charms, IltSection.Games, + IltSection.Gear, IltSection.Games, IltSection.VaultedDungeons, }; /// The Mini Remote's own tab (the remote itself): its tab id. public const string RemoteTab = ""; - /// RynthOracle's Character tab: the character overview and this session. + /// RynthOracle's Character tab: the character, its session and the charms list. public const string OracleCharacterCommand = "/ro character"; + /// RynthInventory's Global Inventory "Banking" tab: every character's bank on this server. + public const string GlobalBankCommand = "/ginv bank"; + public static string Label(IltSection s) => s switch { IltSection.Character => "Character", IltSection.Banking => "Banking", IltSection.Gear => "Gear", IltSection.Games => "Games", + IltSection.VaultedDungeons => "Vaulted Dungeons", IltSection.Charms => "Charms", IltSection.Guardian => "Guardian", _ => s.ToString(), @@ -70,13 +80,14 @@ internal static class IltSections IltSection.Banking => "banking", IltSection.Gear => "gear", IltSection.Games => "games", + IltSection.VaultedDungeons => "vaulted", IltSection.Charms => "charms", IltSection.Guardian => "guardian", _ => s.ToString().ToLowerInvariant(), }; - /// True for the sections drawn as Mini Remote tabs (Banking, Gear, Charms, Games). - public static bool IsTab(IltSection s) => s is IltSection.Banking or IltSection.Gear or IltSection.Charms or IltSection.Games; + /// True for the sections drawn as Mini Remote tabs (Gear, Games, Vaulted Dungeons). + public static bool IsTab(IltSection s) => s is IltSection.Gear or IltSection.Games or IltSection.VaultedDungeons; /// /// Where a section that moved out of the Mini Remote lives now, as the chat command that opens @@ -84,7 +95,8 @@ internal static class IltSections /// public static string? MovedCommand(IltSection s) => s switch { - IltSection.Character => OracleCharacterCommand, + IltSection.Character or IltSection.Charms => OracleCharacterCommand, + IltSection.Banking => GlobalBankCommand, _ => null, }; @@ -104,6 +116,8 @@ internal static class IltSections case "banking": case "bank": section = IltSection.Banking; return true; case "gear": section = IltSection.Gear; return true; case "games": case "game": section = IltSection.Games; return true; + case "vaulted": case "vaulteddungeons": case "vaulted-dungeons": + section = IltSection.VaultedDungeons; return true; case "charms": case "charm": section = IltSection.Charms; return true; case "guardian": case "temple": case "riddle": section = IltSection.Guardian; return true; default: section = IltSection.Gear; return false; @@ -116,10 +130,9 @@ internal static class IltSections ///
public static Vector2 TabSize(IltSection section) => section switch { - IltSection.Banking => new Vector2(560, 520), IltSection.Gear => new Vector2(560, 520), - IltSection.Charms => new Vector2(560, 520), IltSection.Games => new Vector2(520, 440), + IltSection.VaultedDungeons => new Vector2(360, 420), _ => new Vector2(520, 440), }; diff --git a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltVaultedDungeons.cs b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltVaultedDungeons.cs new file mode 100644 index 0000000..a383b5d --- /dev/null +++ b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltVaultedDungeons.cs @@ -0,0 +1,708 @@ +// IltVaultedDungeons.cs — Mini Remote "Vaulted Dungeons" tab (ILT / ACECustom only). +// Port of the UtilityBelt VaultedDungeons.lua script (owner 2026-09-27 / 2026-10-03): +// keeps the character in one Vaulted Dungeon via a tied Portal Recall Gem, and optionally +// /rc quit after N minutes without a real kill ("You've banked N Luminance." system line). +// +// Shown only on ILT-like worlds, and only when Options > Navigation > Vaulted Dungeons is on +// (RynthAi filters the tab; this module still runs whenever the character is on ILT so a +// saved Active state keeps working after a relog even if the tab is hidden). +using System; +using System.Collections.Generic; +using System.IO; +using System.Numerics; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Text.RegularExpressions; +using ImGuiNET; +using RynthCore.Plugin.Shared; +using RynthCore.PluginSdk; + +namespace RynthCore.Plugin.RynthILT.Hub; + +/// One known Vaulted Dungeon (landblock high word; the client does not see the layer). +internal readonly record struct VaultedDungeon(string Name, uint Landblock); + +internal sealed class IltVaultedDungeons : IIltFeature +{ + // Keep order stable: saved picks are by 1-based index into this list. + private static readonly VaultedDungeon[] Dungeons = + { + new("Tyrant's Quarry", 0x01F7), + new("Tusgian Barracks", 0x8C03), + new("Wailing Cells", 0x01C2), + new("Chamber of Idols", 0x5649), + new("Fiun Redoubt", 0x0178), // added 2026-09-27 + new("Tumerok Tunnels", 0x5754), // added 2026-10-03 + }; + + private static readonly string[] GemNames = + { + "Primary Portal Recall Gem", + "Secondary Portal Recall Gem", + }; + + private static readonly (string Name, float Value)[] Powers = + { + ("Fast", 0f), ("Medium", 0.5f), ("Full Power", 1f), + }; + + private static readonly int[] QuitPresets = { 1, 2, 5, 10, 15, 30 }; + + private const long FirstRecallAfterMs = 1000; + private const long RecallAfterMs = 5000; + private const int QuitMin = 1, QuitMax = 30; + private const long WarnEveryMs = 30_000; + private const string SettingsFileName = "settings.json"; + private const string SettingsBadFileName = "settings.unreadable.json"; + + private const string CmdMetaOff = "/vt opt set EnableMeta False"; + private const string CmdNavOff = "/vt opt set EnableNav False"; + private const string CmdRepeatOn = "/ub playeroption AutoRepeatAttack on"; + private const string CmdAttackBar = "/vt setattackbar "; + private const string CmdQuit = "/rc quit"; + + // System line only (no player sender): "You've banked 1,234 Luminance." + private static readonly Regex KillLine = new( + @"^You've banked [\d,]+ Luminance\.\s*$", + RegexOptions.Compiled | RegexOptions.CultureInvariant); + + private readonly IltHubContext _ctx; + private readonly object _gate = new(); + private Cfg _cfg = new(); + private bool _loaded; + private bool _dirty; + private string? _lastGoodJson; + + // Runtime (pump thread). + private long _outSinceMs; + private long _lastRecallMs; + private long _clockStartMs; + private long _realKillMs; + private bool _wasInside; + private bool _quitSent; + private long _lastWarnMs; + private string _state = "paused"; // paused / setup / in / out / portal / nogem + private long? _quitLeftMs; + private bool? _presentBefore; + private long _idleSecs; + private long _inSinceMs; + private long _portalSinceMs; + private int _kills; + private long _dungeonSecs; + private long _lastTickMs; + + // Snapshot for the render thread (copied under _gate). + private Snapshot _snap = Snapshot.Empty; + + public IltVaultedDungeons(IltHubContext ctx) => _ctx = ctx; + + // ── Persistence ───────────────────────────────────────────────────────── + + private string SettingsDir => Path.Combine(_ctx.Store.CharFolder, "VaultedDungeons"); + private string SettingsPath => Path.Combine(SettingsDir, SettingsFileName); + + private void EnsureLoaded() + { + if (_loaded) return; + _loaded = true; + try + { + string path = SettingsPath; + if (!File.Exists(path)) return; + string text = File.ReadAllText(path); + var cfg = JsonSerializer.Deserialize(text, JsonOpts); + if (cfg == null) return; + _cfg = Sanitize(cfg); + _lastGoodJson = text; + } + catch (Exception ex) + { + RynthLog.Write(LogCat.IltHub, $"Vaulted Dungeons: settings load failed: {ex.Message}"); + } + } + + private void SaveIfDirty() + { + if (!_dirty) return; + _dirty = false; + try + { + Directory.CreateDirectory(SettingsDir); + string path = SettingsPath; + // Corrupt / mid-write: keep a copy, then rewrite from last good + current cfg. + if (File.Exists(path)) + { + try + { + string existing = File.ReadAllText(path); + if (_lastGoodJson == null) + JsonSerializer.Deserialize(existing, JsonOpts); // throws if bad + } + catch + { + try + { + File.Copy(path, Path.Combine(SettingsDir, SettingsBadFileName), overwrite: true); + _ctx.Chat("[Vaulted Dungeons] settings.json would not read — kept a copy as " + + SettingsBadFileName + "."); + } + catch { /* best effort */ } + } + } + string json = JsonSerializer.Serialize(_cfg, JsonOpts); + File.WriteAllText(path, json); + _lastGoodJson = json; + } + catch (Exception ex) + { + RynthLog.Write(LogCat.IltHub, $"Vaulted Dungeons: settings save failed: {ex.Message}"); + } + } + + private static readonly JsonSerializerOptions JsonOpts = new() + { + WriteIndented = true, + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, + }; + + private static Cfg Sanitize(Cfg c) + { + c.Dungeon = ClampInt(c.Dungeon, 0, Dungeons.Length, 0); + c.Gem = ClampInt(c.Gem, 0, GemNames.Length, 0); + c.QuitMinutes = ClampInt(c.QuitMinutes, QuitMin, QuitMax, 2); + c.AttackPower = Powers[PowerIndex(c.AttackPower)].Value; + return c; + } + + private static int ClampInt(int v, int lo, int hi, int def) + => v < lo || v > hi ? def : v; + + private static int PowerIndex(float v) + { + int best = 0; + float bestGap = float.MaxValue; + for (int i = 0; i < Powers.Length; i++) + { + float gap = Math.Abs(Powers[i].Value - v); + if (gap < bestGap) { best = i; bestGap = gap; } + } + return best; + } + + private static string PowerText(float p) + { + string t = p.ToString("0.##", System.Globalization.CultureInfo.InvariantCulture); + return t; + } + + // ── IIltFeature ───────────────────────────────────────────────────────── + + public void Tick(long nowMs) + { + EnsureLoaded(); + SaveIfDirty(); + + // Time in dungeon (kills/hour): only while last state was "in". + if (_lastTickMs > 0 && _state == "in") + _dungeonSecs += Math.Max(0, (nowMs - _lastTickMs) / 1000); + _lastTickMs = nowMs; + + if (!_ctx.Host.HasGetPlayerPose || !_ctx.Host.TryGetPlayerPose(out uint cell, out _, out _, out _, out _, out _, out _, out _) || cell == 0) + { + Publish(); + return; + } + + uint landblock = cell >> 16; + bool portaling = _ctx.Host.HasIsPortaling && _ctx.Host.IsPortaling(); + VaultedDungeon? dungeon = _cfg.Dungeon > 0 && _cfg.Dungeon <= Dungeons.Length + ? Dungeons[_cfg.Dungeon - 1] + : null; + + // Present check (for Auto Start / arrive actions) even while Off. + if (dungeon == null) + _presentBefore = null; + else if (!portaling) + { + bool here = landblock == dungeon.Value.Landblock; + if (here && _presentBefore != true) OnArrive(dungeon.Value, nowMs); + _presentBefore = here; + } + + _quitLeftMs = null; + if (!_cfg.Active) + { + _state = "paused"; + _outSinceMs = 0; + Publish(); + return; + } + + string? gemName = _cfg.Gem > 0 && _cfg.Gem <= GemNames.Length ? GemNames[_cfg.Gem - 1] : null; + if (dungeon == null || gemName == null) + { + _state = "setup"; + _wasInside = false; + Warn(nowMs, dungeon == null + ? "Pick a dungeon in the Vaulted Dungeons tab." + : "Pick a recall gem in the Vaulted Dungeons tab."); + Publish(); + return; + } + + bool inside = landblock == dungeon.Value.Landblock; + if (inside && !portaling) + { + if (!_wasInside) + { + _clockStartMs = nowMs; + _quitSent = false; + _inSinceMs = nowMs; + } + _wasInside = true; + _outSinceMs = 0; + _portalSinceMs = 0; + _state = "in"; + _idleSecs = Math.Max(0, (nowMs - _clockStartMs) / 1000); + if (_cfg.Quit) + { + long quitAfterMs = _cfg.QuitMinutes * 60_000L; + _quitLeftMs = Math.Max(0, quitAfterMs - (nowMs - _clockStartMs)); + if (nowMs - _clockStartMs >= quitAfterMs && !_quitSent) + { + _quitSent = true; + _ctx.Chat($"[Vaulted Dungeons] No kill in {_cfg.QuitMinutes} minute" + + (_cfg.QuitMinutes == 1 ? "" : "s") + " — quitting."); + Invoke(CmdQuit); + } + } + Publish(); + return; + } + + _wasInside = false; + if (portaling) + { + _state = "portal"; + _outSinceMs = 0; + if (_portalSinceMs == 0) _portalSinceMs = nowMs; + Publish(); + return; + } + _portalSinceMs = 0; + + if (_outSinceMs == 0) _outSinceMs = nowMs; + _state = "out"; + + bool tried = _lastRecallMs >= _outSinceMs; + bool due = (!tried && nowMs - _outSinceMs >= FirstRecallAfterMs) + || (tried && nowMs - _lastRecallMs >= RecallAfterMs); + if (due) + { + var gem = _ctx.Inventory.FindByName(n => n.Equals(gemName, StringComparison.OrdinalIgnoreCase)); + if (gem != null) + { + _lastRecallMs = nowMs; + _ctx.Chat($"[Vaulted Dungeons] Not in {dungeon.Value.Name} — using the {gemName}."); + _ctx.Inventory.Use(gem); + } + else + { + _state = "nogem"; + Warn(nowMs, $"No {gemName} in your pack."); + } + } + Publish(); + } + + public bool OnChat(string text) + { + if (string.IsNullOrEmpty(text) || !KillLine.IsMatch(text.TrimEnd('\r', '\n'))) return false; + long now = IltHubContext.NowMs; + _clockStartMs = now; + _quitSent = false; + _realKillMs = now; + if (_state == "in") _kills++; + Publish(); + return false; // never eat the luminance line + } + + public void OnLogout() + { + SaveIfDirty(); + _wasInside = false; + _outSinceMs = 0; + _state = "paused"; + Publish(); + } + + // ── Arrive / commands ─────────────────────────────────────────────────── + + private void OnArrive(VaultedDungeon dungeon, long nowMs) + { + if (_cfg.AutoStart && !_cfg.Active) + { + _cfg.Active = true; + _outSinceMs = 0; + _dirty = true; + _ctx.Chat($"[Vaulted Dungeons] Arrived in {dungeon.Name} — switched On (Auto Start On Arrival)."); + } + if (_cfg.DisableMeta) Invoke(CmdMetaOff); + if (_cfg.DisableNav) Invoke(CmdNavOff); + if (_cfg.RepeatAttack) Invoke(CmdRepeatOn); + if (_cfg.SetPower) Invoke(CmdAttackBar + PowerText(_cfg.AttackPower)); + } + + private void Invoke(string cmd) + { + if (_ctx.Host.HasInvokeChatParser) _ctx.Host.InvokeChatParser(cmd); + } + + private void Warn(long nowMs, string text) + { + if (nowMs - _lastWarnMs < WarnEveryMs) return; + _lastWarnMs = nowMs; + _ctx.Chat("[Vaulted Dungeons] " + text); + } + + /// Pump-thread: /ilt vaulted [on|off|toggle|status]. + public bool HandleCommand(string[] args) + { + EnsureLoaded(); + string sub = args.Length > 0 ? args[0].ToLowerInvariant() : "status"; + switch (sub) + { + case "on": + case "start": + SetActive(true); + _ctx.Chat("[Vaulted Dungeons] On."); + return true; + case "off": + case "stop": + SetActive(false); + _ctx.Chat("[Vaulted Dungeons] Off."); + return true; + case "toggle": + SetActive(!_cfg.Active); + _ctx.Chat("[Vaulted Dungeons] " + (_cfg.Active ? "On." : "Off.")); + return true; + default: + string d = _cfg.Dungeon > 0 && _cfg.Dungeon <= Dungeons.Length + ? Dungeons[_cfg.Dungeon - 1].Name : "(none)"; + string g = _cfg.Gem > 0 && _cfg.Gem <= GemNames.Length + ? GemNames[_cfg.Gem - 1] : "(none)"; + _ctx.Chat($"[Vaulted Dungeons] {(_cfg.Active ? "On" : "Off")} — dungeon={d}, gem={g}, " + + $"kill-client={(_cfg.Quit ? $"{_cfg.QuitMinutes}m" : "off")}, state={_state}."); + _ctx.Chat("[Vaulted Dungeons] /ilt vaulted [on|off|toggle|status] (Mini Remote tab; Options > Navigation > Vaulted Dungeons)"); + return true; + } + } + + private void SetActive(bool value) + { + _cfg.Active = value; + _outSinceMs = 0; + _dirty = true; + if (!value) + { + _clockStartMs = IltHubContext.NowMs; + _quitSent = false; + _wasInside = false; + _quitLeftMs = null; + _state = "paused"; + } + Publish(); + } + + // ── Render snapshot ───────────────────────────────────────────────────── + + private void Publish() + { + lock (_gate) + { + _snap = new Snapshot( + _cfg.Active, _cfg.Dungeon, _cfg.Gem, _cfg.Quit, _cfg.QuitMinutes, + _cfg.ShowInDungeon, _cfg.AutoStart, _cfg.DisableMeta, _cfg.DisableNav, + _cfg.RepeatAttack, _cfg.SetPower, _cfg.AttackPower, + _state, _quitLeftMs, _idleSecs, _inSinceMs, _outSinceMs, _portalSinceMs, + _realKillMs, _kills, _dungeonSecs, IltHubContext.NowMs); + } + } + + private Snapshot Take() + { + lock (_gate) return _snap; + } + + // ── UI (render thread) ────────────────────────────────────────────────── + + private bool _showAdvanced; + // Pending edits from the UI, applied on the next pump tick via Post. + private void PostEdit(Action edit) + { + _ctx.Post(() => + { + EnsureLoaded(); + edit(_cfg); + _dirty = true; + Publish(); + }); + } + + public void Render() + { + // Settings load on the pump (Tick); the window only reads the snapshot. + Snapshot s = Take(); + + Vector4 colLabel = new(0.53f, 0.53f, 0.53f, 1f); + Vector4 colValue = new(1f, 1f, 1f, 1f); + Vector4 colGreen = new(0.27f, 0.80f, 0.40f, 1f); + Vector4 colAmber = new(0.95f, 0.65f, 0.20f, 1f); + Vector4 colRed = new(0.90f, 0.30f, 0.30f, 1f); + Vector4 colPurple = new(0.72f, 0.52f, 0.95f, 1f); + Vector4 colTitleRed = new(0.85f, 0.25f, 0.25f, 1f); + + // Title row: Vaulted (red) Dungeons (white) + On/Off + Advanced. + ImGui.TextColored(colTitleRed, "Vaulted"); + ImGui.SameLine(0, ImGui.CalcTextSize(" ").X); + ImGui.TextColored(colValue, "Dungeons"); + ImGui.SameLine(0, 16); + Vector4 pill = s.Active ? colGreen : new(0.85f, 0.10f, 0.10f, 1f); + ImGui.PushStyleColor(ImGuiCol.Button, pill); + ImGui.PushStyleColor(ImGuiCol.ButtonHovered, pill); + ImGui.PushStyleColor(ImGuiCol.ButtonActive, pill); + ImGui.PushStyleColor(ImGuiCol.Text, new Vector4(0.05f, 0.05f, 0.05f, 1f)); + if (ImGui.SmallButton((s.Active ? " On " : " Off ") + "##vdactive")) + _ctx.Post(() => SetActive(!s.Active)); + ImGui.PopStyleColor(4); + if (ImGui.IsItemHovered()) + ImGui.SetTooltip(s.Active + ? "On: keeping this character in the chosen dungeon.\nClick: turn off." + : "Off: doing nothing.\nClick: turn on."); + ImGui.SameLine(); + if (ImGui.SmallButton("Advanced##vdoptions")) _showAdvanced = !_showAdvanced; + + ImGui.Separator(); + + float labelW = ImGui.CalcTextSize("Recall Gem").X + 12; + void Label(string text) + { + ImGui.AlignTextToFramePadding(); + ImGui.TextColored(colLabel, text); + ImGui.SameLine(labelW); + } + + // Status + var (statusWord, statusCol) = s.State switch + { + "in" => ("In Dungeon", colGreen), + "out" => ("Recalling", colAmber), + "portal" => ("Portal Space", colPurple), + "setup" => ("Setup Needed", colAmber), + "nogem" => ("No Gem", colRed), + _ => ("Not Running", colRed), + }; + long since = s.State == "in" ? s.InSinceMs + : s.State == "out" ? s.OutSinceMs + : s.State == "portal" ? s.PortalSinceMs : 0; + string statusText = statusWord; + if (since > 0) + { + long secs = Math.Max(0, (s.NowMs - since) / 1000); + long h = secs / 3600, m = (secs / 60) % 60, sec = secs % 60; + statusText += h > 0 ? $" ({h}:{m:D2}:{sec:D2})" : $" ({m}:{sec:D2})"; + } + Label("Status"); + ImGui.TextColored(statusCol, statusText); + + // Dungeon combo (0 = pick, 1..N = Dungeons[i-1]) + Label("Dungeon"); + string[] dungeonChoices = BuildDungeonChoices(); + int dungeonIdx = s.Dungeon; + ImGui.SetNextItemWidth(260); + if (ImGui.Combo("##vddungeon", ref dungeonIdx, dungeonChoices, dungeonChoices.Length)) + PostEdit(c => { c.Dungeon = dungeonIdx; }); + + Label("Recall Gem"); + string[] gemChoices = { "Pick a gem", GemNames[0], GemNames[1] }; + int gemIdx = s.Gem; + ImGui.SetNextItemWidth(260); + if (ImGui.Combo("##vdgem", ref gemIdx, gemChoices, gemChoices.Length)) + PostEdit(c => { c.Gem = gemIdx; }); + if (ImGui.IsItemHovered()) + ImGui.SetTooltip("Tie this gem to the dungeon's portal first."); + + Label("Last Kill"); + if (s.State == "in" && s.RealKillMs > 0) + ImGui.TextUnformatted($"{(s.NowMs - s.RealKillMs) / 1000} s ago"); + else + ImGui.TextUnformatted("-"); + + Label("Session"); + string perHour = s.DungeonSecs < 60 ? "-" + : Commas((long)(s.Kills * 3600.0 / Math.Max(1, s.DungeonSecs))); + ImGui.TextUnformatted($"{Commas(s.Kills)} kills ({perHour} Per Hour)"); + + if (s.QuitLeftMs is long left && s.QuitMinutes > 0) + { + float frac = (float)(left / (double)(s.QuitMinutes * 60_000L)); + string barLabel = $"Kill Client ({left / 60_000}:{(left / 1000) % 60:D2})"; + ImGui.ProgressBar(Math.Clamp(frac, 0f, 1f), new Vector2(-1, ImGui.GetTextLineHeight()), barLabel); + } + + if (_showAdvanced) + { + ImGui.Separator(); + ImGui.TextColored(colValue, "Advanced"); + + bool quit = s.Quit; + if (ImGui.Checkbox("Kill Client##vdquit", ref quit)) + { + bool on = quit; + _ctx.Post(() => + { + EnsureLoaded(); + _cfg.Quit = on; + _cfg.QuitMinutes = ClampInt(_cfg.QuitMinutes, QuitMin, QuitMax, 2); + _clockStartMs = IltHubContext.NowMs; + _quitSent = false; + _dirty = true; + Publish(); + }); + } + if (ImGui.IsItemHovered()) + ImGui.SetTooltip("No kill for the set minutes in the dungeon → /rc quit closes the client.\n" + + "A kill is the server's \"You've banked N Luminance.\" line."); + + ImGui.SameLine(); + ImGui.TextColored(colLabel, "after"); + ImGui.SameLine(); + if (ImGui.SmallButton($"{s.QuitMinutes} minute{(s.QuitMinutes == 1 ? "" : "s")}##vdmincycle")) + _ctx.Post(() => + { + EnsureLoaded(); + _cfg.QuitMinutes = StepPreset(_cfg.QuitMinutes, +1); + _clockStartMs = IltHubContext.NowMs; + _quitSent = false; + _dirty = true; + Publish(); + }); + if (ImGui.IsItemClicked(ImGuiMouseButton.Right)) + _ctx.Post(() => + { + EnsureLoaded(); + _cfg.QuitMinutes = StepPreset(_cfg.QuitMinutes, -1); + _clockStartMs = IltHubContext.NowMs; + _quitSent = false; + _dirty = true; + Publish(); + }); + if (ImGui.IsItemHovered()) + ImGui.SetTooltip("Minutes with no kill before Kill Client quits.\nClick: longer. Right-click: shorter. (1, 2, 5, 10, 15, 30)"); + + BoolRow("Auto Start On Arrival##vdautostart", s.AutoStart, + v => PostEdit(c => c.AutoStart = v), + "Switch On by itself when you arrive in the chosen dungeon (logging in there counts)."); + + BoolRow("Disable Meta##vdnometa", s.DisableMeta, + v => PostEdit(c => c.DisableMeta = v), + "On arriving: " + CmdMetaOff); + + BoolRow("Disable Nav##vdnonav", s.DisableNav, + v => PostEdit(c => c.DisableNav = v), + "On arriving: " + CmdNavOff); + + BoolRow("Repeat Attacks On##vdrepeat", s.RepeatAttack, + v => PostEdit(c => c.RepeatAttack = v), + "On arriving: " + CmdRepeatOn); + + BoolRow("Set Attack Power##vdpower", s.SetPower, + v => PostEdit(c => c.SetPower = v), + "On arriving: " + CmdAttackBar + PowerText(s.AttackPower)); + ImGui.SameLine(); + int pi = PowerIndex(s.AttackPower); + if (ImGui.SmallButton(Powers[pi].Name + "##vdpowercycle")) + PostEdit(c => c.AttackPower = Powers[(pi + 1) % Powers.Length].Value); + if (ImGui.IsItemClicked(ImGuiMouseButton.Right)) + PostEdit(c => c.AttackPower = Powers[(pi - 1 + Powers.Length) % Powers.Length].Value); + if (ImGui.IsItemHovered()) + ImGui.SetTooltip("Fast (0), Medium (0.5) or Full Power (1).\nClick: next. Right-click: back."); + } + + ImGui.Spacing(); + ImGui.TextDisabled("Note: the client sees the landblock, not the layer — standing in the retail copy also counts as \"in it\"."); + ImGui.TextDisabled("/ilt vaulted [on|off|toggle|status]"); + } + + private static void BoolRow(string id, bool value, Action set, string tip) + { + bool v = value; + if (ImGui.Checkbox(id, ref v)) set(v); + if (ImGui.IsItemHovered()) ImGui.SetTooltip(tip); + } + + private static string[] BuildDungeonChoices() + { + var list = new string[Dungeons.Length + 1]; + list[0] = "Pick a dungeon"; + for (int i = 0; i < Dungeons.Length; i++) list[i + 1] = Dungeons[i].Name; + return list; + } + + private static int StepPreset(int current, int dir) + { + if (dir > 0) + { + foreach (int m in QuitPresets) if (m > current) return m; + return QuitPresets[0]; + } + for (int i = QuitPresets.Length - 1; i >= 0; i--) + if (QuitPresets[i] < current) return QuitPresets[i]; + return QuitPresets[^1]; + } + + private static string Commas(long n) + { + string s = Math.Abs(n).ToString(); + var chars = new List(); + for (int i = 0; i < s.Length; i++) + { + if (i > 0 && (s.Length - i) % 3 == 0) chars.Add(','); + chars.Add(s[i]); + } + return (n < 0 ? "-" : "") + new string(chars.ToArray()); + } + + // ── Config / snapshot types ───────────────────────────────────────────── + + private sealed class Cfg + { + public bool Active { get; set; } + /// 0 = none, 1..N = Dungeons index. + public int Dungeon { get; set; } + /// 0 = none, 1 = primary, 2 = secondary. + public int Gem { get; set; } + public bool Quit { get; set; } + public int QuitMinutes { get; set; } = 2; + public bool ShowInDungeon { get; set; } + public bool AutoStart { get; set; } + public bool DisableMeta { get; set; } + public bool DisableNav { get; set; } + public bool RepeatAttack { get; set; } + public bool SetPower { get; set; } + public float AttackPower { get; set; } + } + + private readonly record struct Snapshot( + bool Active, int Dungeon, int Gem, bool Quit, int QuitMinutes, + bool ShowInDungeon, bool AutoStart, bool DisableMeta, bool DisableNav, + bool RepeatAttack, bool SetPower, float AttackPower, + string State, long? QuitLeftMs, long IdleSecs, long InSinceMs, long OutSinceMs, long PortalSinceMs, + long RealKillMs, int Kills, long DungeonSecs, long NowMs) + { + public static Snapshot Empty => new(false, 0, 0, false, 2, + false, false, false, false, false, false, 0f, + "paused", null, 0, 0, 0, 0, 0, 0, 0, 0); + } +} diff --git a/Plugins/RynthCore.Plugin.RynthILT/IltSettingsView/IltSettingsModel.cs b/Plugins/RynthCore.Plugin.RynthILT/IltSettingsView/IltSettingsModel.cs index 9f9076a..47cd538 100644 --- a/Plugins/RynthCore.Plugin.RynthILT/IltSettingsView/IltSettingsModel.cs +++ b/Plugins/RynthCore.Plugin.RynthILT/IltSettingsView/IltSettingsModel.cs @@ -55,6 +55,15 @@ internal sealed class IltSettingsModel if (view != null) Volatile.Write(ref _engine, view); } + /// + /// Older "servermenu" text push (RynthPluginApplyRemoteCommand). No-op here: the verdict now + /// comes from / IltEngineVerdict. Kept so ApplyRemoteCommand compiles. + /// + public void ApplyEngine(string? payload) { _ = payload; } + + /// Older "iltfeatures" text push. No-op; features come from the Hub's PublishFeatures. + public void ApplyFeatures(string? payload) { _ = payload; } + /// The Hub's own feature read (plugin tick); null clears it. Any thread. public void PublishFeatures(IltFeatureView? view) => Volatile.Write(ref _features, view); diff --git a/Plugins/RynthCore.Plugin.RynthILT/RynthCore.Plugin.RynthILT.csproj b/Plugins/RynthCore.Plugin.RynthILT/RynthCore.Plugin.RynthILT.csproj index 7e7966a..aec2d81 100644 --- a/Plugins/RynthCore.Plugin.RynthILT/RynthCore.Plugin.RynthILT.csproj +++ b/Plugins/RynthCore.Plugin.RynthILT/RynthCore.Plugin.RynthILT.csproj @@ -8,13 +8,14 @@ Bounty/ the Bounties window's tracker (ported from SilentKelpie's rynth/RynthSuite PR #11). Hub/ the ILT Hub (SilentKelpie's): the Mini Remote's ILT tabs (Character, Banking, Gear, Charms, Games), the Guardian, the progression planners and the attribute raiser, - server feature detection, the Rings inscription chain (Gear tab). Moved out of - RynthAi 2026-10-13: RynthAi's Mini Remote hosts the tabs through RynthILT.Hub, and - RynthILT borrows from RynthAi through RynthAi.Hub (Plugins/Shared/RynthIltHubApi.cs, - RynthAiHubApi.cs). + server feature detection. Moved out of RynthAi 2026-10-13: RynthAi's Mini Remote + hosts the tabs through RynthILT.Hub, and RynthILT borrows from RynthAi through + RynthAi.Hub (Plugins/Shared/RynthIltHubApi.cs, RynthAiHubApi.cs). IltSettingsView/ a copy of the ILT settings (RynthCore's verdict, this character's override, the - ILT world names, the Hub's feature read) in its own window ("/ilt settings"). - IltFellowship/ ILT's /fship commands as buttons ("/ilt fellow"). + ILT world names, the Hub's feature read), in RynthCore's Mini Remote and its + own window ("/ilt settings"). + IltFellowship/ ILT's /fship commands as buttons (RynthCore's Fellowship section, "/ilt fellow", + and RynthAi's Fellowship view). --> net10.0-windows @@ -33,17 +34,16 @@ x86 + newer call (plugin interfaces v68, live object ids v69, vendor trade v67, the chat parser, + world names and the plugin-command broker) is behind its Has* check, as it was in RynthAi. --> 66 - + Infinite Leaftide (ACECustom) features: the ILT Hub (the Mini Remote's ILT tabs: banking, gear, charms, games), the Guardian, bounties, progression, the attribute raiser, the ILT settings and the /fship fellowship commands. + ilt Infinite Leaftide infiniteleaftide.online InfiniteLeaftide|*Leaftide* - Infinite Leaftide (ACECustom) features: the ILT Hub (the Mini Remote's ILT tabs: banking, gear, charms, games), the Guardian, bounties, progression, the attribute raiser, the ring inscription chain, the ILT settings and the /fship fellowship commands. @@ -55,9 +55,9 @@ - - + + - + @@ -78,7 +78,7 @@ - + diff --git a/Plugins/RynthCore.Plugin.RynthILT/RynthILTPlugin.cs b/Plugins/RynthCore.Plugin.RynthILT/RynthILTPlugin.cs index b57ad97..1ff47c4 100644 --- a/Plugins/RynthCore.Plugin.RynthILT/RynthILTPlugin.cs +++ b/Plugins/RynthCore.Plugin.RynthILT/RynthILTPlugin.cs @@ -59,6 +59,9 @@ public sealed class RynthILTPlugin : RynthPluginBase /// The ILT session extras' surface in RynthCore's Mini Remote "Session Stats" section. internal const string RatesSurface = "section:ilt-rates"; + /// The /qb list surface (RynthOracle Quests / ILT quest-bonus embed). + internal const string QuestBonusSurface = "section:ilt-questbonus"; + /// The fellowship commands' surface in RynthCore's Fellowship section. internal const string FellowshipSurface = "section:ilt-fellowship"; @@ -381,6 +384,7 @@ public sealed class RynthILTPlugin : RynthPluginBase SettingsSurface => _settingsUi.RenderBody, FellowshipSurface => _fellowshipUi.RenderBody, RatesSurface => RenderRatesSurface, + QuestBonusSurface => RenderQuestBonusSurface, _ => null, }; if (body == null) return false; @@ -411,6 +415,14 @@ public sealed class RynthILTPlugin : RynthPluginBase hub.RenderRatesSection(); } + /// The /qb list (render thread), or a line saying the Hub is not ready yet. + private void RenderQuestBonusSurface() + { + IltHubController? hub = _hub; + if (hub == null) { ImGui.TextDisabled("ILT quest bonus starts once RynthILT's Hub is ready."); return; } + hub.RenderQuestBonusSection(); + } + /// /// RynthPluginGetSectionsJson: the ILT session extras in RynthCore's Session Stats section /// (the "char" id) and the fellowship commands in its Fellowship section, Infinite Leaftide @@ -625,6 +637,14 @@ public sealed class RynthILTPlugin : RynthPluginBase case "hub": case "rates": break; + case "vaulted": + case "vaulteddungeons": + { + // "/ilt vaulted [on|off|toggle|status]": the Vaulted Dungeons keeper. + if (_hub == null) { ChatLine("[RynthILT] ILT features not ready (log in first)."); return; } + _hub.VaultedDungeons.HandleCommand(args); + return; + } case "settings": case "options": { @@ -645,6 +665,7 @@ public sealed class RynthILTPlugin : RynthPluginBase case "help": ChatLine("[RynthILT] /ilt hub ... (the Mini Remote's ILT tabs; same as /ra hub ...), /ilt guardian ..., /ilt servers [list||default],"); ChatLine("[RynthILT] /ilt bounty [list|refresh] - the tracked ACECustom bounties (the Bounties window: the ILT button on the RynthCore bar, or /rc bounties),"); + ChatLine("[RynthILT] /ilt vaulted [on|off|toggle|status] - Vaulted Dungeons (Mini Remote tab; enable in Options > Navigation),"); ChatLine("[RynthILT] /ilt settings [show|hide|toggle] - the ILT settings: the world verdict, the ILT world names and a feature summary (force a server: RynthCore Options > Diagnostics; all features: RynthOracle > About),"); ChatLine("[RynthILT] /ilt fellow [show|hide|toggle] - ILT's /fship commands as buttons (also in the Mini Remote's Fellowship section and RynthOracle's Fellowship tab),"); ChatLine("[RynthILT] /ilt trace [on|off], /ilt debug [on|off]."); diff --git a/Plugins/RynthCore.Plugin.RynthOracle/Data/IltServerProfile.cs b/Plugins/RynthCore.Plugin.RynthOracle/Data/IltServerProfile.cs new file mode 100644 index 0000000..38bc2ef --- /dev/null +++ b/Plugins/RynthCore.Plugin.RynthOracle/Data/IltServerProfile.cs @@ -0,0 +1,232 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Text; +using System.Text.Json; +using RynthCore.Plugin.Shared; +using RynthCore.PluginSdk; + +namespace RynthCore.Plugin.RynthOracle.Data; + +/// One Leaftide feature from RynthILT's profile: its state on this server and where it lives. +internal sealed record IltFeature(string Key, string Label, string Group, int State, string Where); + +/// +/// The ACECustom quest bonus list ("/qb list") as RynthILT last read it (the profile's "questBonus" +/// object). 0 = not loaded this session; -1 = unknown. +/// +internal sealed record IltQuestBonusList(bool Disabled, int Generation, long Count, string Status, + IReadOnlyList Completed, IReadOnlyList Incomplete); + +/// +/// What RynthILT reports about the Infinite Leaftide server (the "RynthILT.Server" profile JSON, +/// Plugins/Shared/RynthIltServerApi.cs): whether this is an ILT world, the Leaftide features with +/// their server state, and the fellowship rules. without RynthILT; every field is +/// read leniently so an older or newer RynthILT still parses. +/// +internal sealed class IltServerProfile +{ + /// No RynthILT (or nothing parsed): a retail fellowship and no features. + public static readonly IltServerProfile None = new(); + + /// RynthILT answered with a profile. + public bool Available { get; private init; } + public bool Ilt { get; private init; } + public string World { get; private init; } = ""; + public bool Forced { get; private init; } + public string Source { get; private init; } = ""; + /// Last server-options check (UTC); MinValue = never. + public DateTime CheckedUtc { get; private init; } = DateTime.MinValue; + public IReadOnlyList Features { get; private init; } = Array.Empty(); + + /// The server's fellowship size limit (retail 9 without RynthILT or off ILT). + public int FellowshipMax { get; private init; } = RynthIltServer.RetailFellowshipMax; + /// Fellowship feature states (RynthIltServer.State*): Zone Share, Fellowship Blackjack, luminance share. + public int ZoneShare { get; private init; } = RynthIltServer.StateUnknown; + public int Blackjack { get; private init; } = RynthIltServer.StateUnknown; + public int LuminanceShare { get; private init; } = RynthIltServer.StateUnknown; + + /// The /qb list (ILT worlds with RynthILT 0.2.3 or later); null = none offered. + public IltQuestBonusList? QuestBonus { get; private init; } + + /// The features in one group, in RynthILT's order. + public IEnumerable InGroup(string group) + { + foreach (IltFeature f in Features) + if (string.Equals(f.Group, group, StringComparison.OrdinalIgnoreCase)) yield return f; + } + + /// Parses the profile JSON; when it is empty or not JSON. + public static IltServerProfile Parse(string? json) + { + if (string.IsNullOrWhiteSpace(json)) return None; + try + { + using JsonDocument doc = JsonDocument.Parse(json); + JsonElement root = doc.RootElement; + if (root.ValueKind != JsonValueKind.Object) return None; + + var features = new List(); + if (root.TryGetProperty("features", out JsonElement fs) && fs.ValueKind == JsonValueKind.Array) + { + foreach (JsonElement f in fs.EnumerateArray()) + { + if (f.ValueKind != JsonValueKind.Object) continue; + string key = Str(f, "key"); + if (key.Length == 0) continue; + string label = Str(f, "label"); + features.Add(new IltFeature(key, label.Length > 0 ? label : key, Str(f, "group"), + Int(f, "state", RynthIltServer.StateUnknown), Str(f, "where"))); + } + } + + bool ilt = Bool(root, "ilt"); + int max = RynthIltServer.RetailFellowshipMax; + int zone = RynthIltServer.StateUnknown, bj = RynthIltServer.StateUnknown, lum = RynthIltServer.StateUnknown; + if (root.TryGetProperty("fellowship", out JsonElement fel) && fel.ValueKind == JsonValueKind.Object) + { + max = Int(fel, "maxMembers", max); + zone = Int(fel, "zoneShare", zone); + bj = Int(fel, "blackjack", bj); + lum = Int(fel, "luminanceShare", lum); + } + // A bogus size would let the tab claim room nobody has; stay within what the reader handles. + if (max < 1 || max > 64) max = RynthIltServer.RetailFellowshipMax; + + DateTime checkedUtc = DateTime.MinValue; + string when = Str(root, "checked"); + if (when.Length > 0 + && DateTime.TryParse(when, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime t)) + checkedUtc = t; + + return new IltServerProfile + { + Available = true, + Ilt = ilt, + World = Str(root, "world"), + Forced = Bool(root, "forced"), + Source = Str(root, "source"), + CheckedUtc = checkedUtc, + Features = features, + FellowshipMax = max, + ZoneShare = zone, + Blackjack = bj, + LuminanceShare = lum, + QuestBonus = ParseQuestBonus(root), + }; + } + catch (JsonException) + { + return None; + } + } + + /// The "questBonus" object, or null when the profile has none. + private static IltQuestBonusList? ParseQuestBonus(JsonElement root) + { + if (!root.TryGetProperty("questBonus", out JsonElement q) || q.ValueKind != JsonValueKind.Object) return null; + long count = q.TryGetProperty("count", out JsonElement c) && c.ValueKind == JsonValueKind.Number && c.TryGetInt64(out long n) ? n : -1; + return new IltQuestBonusList(Bool(q, "disabled"), Int(q, "generation", 0), count, Str(q, "status"), + Strings(q, "completed"), Strings(q, "incomplete")); + } + + private static string[] Strings(JsonElement o, string name) + { + if (!o.TryGetProperty(name, out JsonElement a) || a.ValueKind != JsonValueKind.Array) return Array.Empty(); + var list = new List(a.GetArrayLength()); + foreach (JsonElement e in a.EnumerateArray()) + if (e.ValueKind == JsonValueKind.String && e.GetString() is { Length: > 0 } s) list.Add(s); + return list.ToArray(); + } + + /// "on", "off" or "checking" for a feature state. + public static string StateText(int state) => state switch + { + RynthIltServer.StateOn => "on", + RynthIltServer.StateOff => "off", + _ => "checking", + }; + + private static string Str(JsonElement o, string name) => + o.TryGetProperty(name, out JsonElement v) && v.ValueKind == JsonValueKind.String ? v.GetString() ?? "" : ""; + + private static bool Bool(JsonElement o, string name) => + o.TryGetProperty(name, out JsonElement v) && v.ValueKind == JsonValueKind.True; + + private static int Int(JsonElement o, string name, int fallback) => + o.TryGetProperty(name, out JsonElement v) && v.ValueKind == JsonValueKind.Number && v.TryGetInt32(out int i) ? i : fallback; +} + +/// +/// Reads RynthILT's "RynthILT.Server" interface on the plugin pump. Looks the table up through the +/// host (re-checked while RynthILT is missing or after it unloads, Version 0) and copies the JSON +/// out every ; goes up when the profile changes. +/// +internal sealed unsafe class IltServerLink +{ + private const long PollMs = 2000; + private const long RequeryMs = 10_000; + // Room for the /qb list (hundreds of flags) on top of the features. + private const int MaxBuffer = 512 * 1024; + + private RynthIltServerApiV1* _table; + private long _nextPollAt, _nextQueryAt; + private byte[] _buffer = new byte[8192]; + private string _lastJson = ""; + + public IltServerProfile Profile { get; private set; } = IltServerProfile.None; + public int Revision { get; private set; } + + /// Forget the profile (logout); the next poll reads it again. + public void Clear() + { + _nextPollAt = 0; + SetJson(""); + } + + /// Pump thread. Cheap when not due. + public void Poll(RynthCoreHost host, long now) + { + if (now < _nextPollAt) return; + _nextPollAt = now + PollMs; + RynthIltServerApiV1* t = Table(host, now); + SetJson(t == null ? "" : Read(t)); + } + + /// The table, re-queried when it is missing or RynthILT has shut down (Version 0). + private RynthIltServerApiV1* Table(RynthCoreHost host, long now) + { + if (_table != null && _table->Version >= 1) return _table; + _table = null; + if (now < _nextQueryAt || !host.HasGetPluginInterface) return null; + _nextQueryAt = now + RequeryMs; + var p = (RynthIltServerApiV1*)host.GetPluginInterface(RynthIltServer.PluginName, RynthIltServerApiV1.InterfaceName, RynthIltServerApiV1.InterfaceVersion); + if (p != null && p->Version >= 1 && p->StructSize >= (uint)sizeof(RynthIltServerApiV1) && p->GetProfileJson != null) + _table = p; + return _table; + } + + /// Copies the JSON out, growing the buffer once when RynthILT says it didn't fit. + private string Read(RynthIltServerApiV1* t) + { + for (int attempt = 0; attempt < 2; attempt++) + { + int len; + fixed (byte* b = _buffer) len = t->GetProfileJson(b, _buffer.Length); + if (len <= 0) return ""; + if (len < _buffer.Length) return Encoding.UTF8.GetString(_buffer, 0, len); + if (len + 1 > MaxBuffer) return ""; + _buffer = new byte[len + 1024]; + } + return ""; + } + + /// Takes a profile JSON (internal: the tests feed one without RynthILT). + internal void SetJson(string json) + { + if (json == _lastJson) return; + _lastJson = json; + Profile = IltServerProfile.Parse(json); + Revision++; + } +} diff --git a/Plugins/RynthCore.Plugin.RynthOracle/Data/ServerIdentity.cs b/Plugins/RynthCore.Plugin.RynthOracle/Data/ServerIdentity.cs index 050a628..cc78c30 100644 --- a/Plugins/RynthCore.Plugin.RynthOracle/Data/ServerIdentity.cs +++ b/Plugins/RynthCore.Plugin.RynthOracle/Data/ServerIdentity.cs @@ -10,9 +10,11 @@ internal static class ServerTags public const string Aelrynth = "Aelrynth"; public const string Conquest = "Conquest"; public const string Levistras = "Levistras"; + /// Infinite Leaftide (ACECustom). Its server rules come from RynthILT ("RynthILT.Server"). + public const string InfiniteLeaftide = "InfiniteLeaftide"; /// Tags with a quest pack (Resources\quests.<tag>.csv) or features. - public static readonly string[] Known = { Aelrynth, Conquest, Levistras }; + public static readonly string[] Known = { Aelrynth, Conquest, Levistras, InfiniteLeaftide }; } /// @@ -31,8 +33,9 @@ internal static class ServerTags /// mod's player properties 9101-9103, which only Aelrynth sends. /// Aelrynth's live config still names the world "Aeshnidae" (its earlier name); both count. /// ConquestAC and Levistras are matched on their world names, as upstream does -/// (Decal's CharacterFilter.Server). Infinite Leaftide has no RynthOracle pages: its screens are -/// RynthILT's, so RynthCore's "ilt" server gives no tag here. +/// (Decal's CharacterFilter.Server). Infinite Leaftide is matched on a world name containing +/// "Leaftide", or on RynthILT's own verdict (its world list or the character's override) when +/// RynthILT is loaded. /// internal sealed class ServerIdentity { @@ -55,11 +58,12 @@ internal sealed class ServerIdentity Set("", "", "not logged in"); } + /// RynthILT's profile reports an ILT world (IltServerLink); false without RynthILT. /// /// RynthCore's server list (plugin API v86, ServerStateClient); null on older engines. When there, /// it decides: it already applies this character's overrides and the Diagnostics page's pick. /// - public void Refresh(RynthCoreHost host, uint playerId, EngineServerState? engine = null) + public void Refresh(RynthCoreHost host, uint playerId, bool rynthIltSaysIlt = false, EngineServerState? engine = null) { if (engine != null) { @@ -98,6 +102,11 @@ internal sealed class ServerIdentity source = "the Aelrynth Bank properties (older engine)"; } } + if (tag.Length == 0 && rynthIltSaysIlt) + { + tag = ServerTags.InfiniteLeaftide; + source = "RynthILT: an Infinite Leaftide world"; + } Set(tag, world, source); } @@ -139,6 +148,7 @@ internal sealed class ServerIdentity /// The tag for a RynthCore server id; "" for servers without RynthOracle features. public static string TagForEngineId(string? id) => (id ?? "").Trim().ToLowerInvariant() switch { + EngineServerState.IltId => ServerTags.InfiniteLeaftide, EngineServerState.AelrynthId => ServerTags.Aelrynth, "conquest" => ServerTags.Conquest, "levistras" => ServerTags.Levistras, @@ -148,6 +158,7 @@ internal sealed class ServerIdentity /// The RynthCore server id for a tag; "" for none. public static string EngineIdForTag(string? tag) => tag switch { + ServerTags.InfiniteLeaftide => EngineServerState.IltId, ServerTags.Aelrynth => EngineServerState.AelrynthId, ServerTags.Conquest => "conquest", ServerTags.Levistras => "levistras", @@ -165,6 +176,9 @@ internal sealed class ServerIdentity return ServerTags.Conquest; if (w.Equals(ServerTags.Levistras, StringComparison.OrdinalIgnoreCase)) return ServerTags.Levistras; + // "InfiniteLeaftide", "Infinite Leaftide", staging copies: RynthILT's own world rule. + if (w.IndexOf("Leaftide", StringComparison.OrdinalIgnoreCase) >= 0) + return ServerTags.InfiniteLeaftide; return ""; } diff --git a/Plugins/RynthCore.Plugin.RynthOracle/OracleContext.cs b/Plugins/RynthCore.Plugin.RynthOracle/OracleContext.cs index bc841aa..9fc0a33 100644 --- a/Plugins/RynthCore.Plugin.RynthOracle/OracleContext.cs +++ b/Plugins/RynthCore.Plugin.RynthOracle/OracleContext.cs @@ -19,11 +19,26 @@ internal sealed class OracleContext public readonly VoidTracker Void = new(); public readonly FellowshipTracker Fellowship = new(); public readonly ServerIdentity Server = new(); + /// RynthILT's server profile (Leaftide features, fellowship rules); None without RynthILT. + public readonly IltServerLink Ilt = new(); + /// RynthILT's "RynthILT.Data" (the Character tab's charms list and Toggle buttons). + public readonly RynthCore.Plugin.Shared.RynthIltDataClient IltData = new(); + /// The charms RynthILT last reported (None without RynthILT); read while the Character tab shows. + public RynthCore.Plugin.Shared.IltCharmsView Charms = RynthCore.Plugin.Shared.IltCharmsView.None; /// RynthAi's session (the one session every tracker shows); read while the Character tab shows. public readonly RynthCore.Plugin.Shared.RynthAiSessionClient AiSession = new(); /// The last session RynthAi reported; SessionKnown false without RynthAi. public RynthCore.Plugin.Shared.SessionStatsV1 Session; public bool SessionKnown; + /// The last charm Toggle's outcome, shown under the charms list. + public string CharmMessage = ""; + /// RynthILT's pet breeding tracker (None without it); read while the Pet Breeding tab shows. + public RynthCore.Plugin.Shared.IltBreedingView Breeding = RynthCore.Plugin.Shared.IltBreedingView.None; + /// The last breeding button's outcome, shown under the tab's buttons. + public string BreedingMessage = ""; + + /// Set by the plugin: sends a verb to RynthILT's breeding tracker (RynthIltDataApi PetBreedingCommand). + public Func BreedingCommand = _ => false; /// RynthCore's server list (API v86) and the active server owner's settings; State null on older engines. public readonly RynthCore.Plugin.Shared.ServerStateClient ServerState = new(); /// ConquestAC-only data (tag Conquest); fed only while on ConquestAC. @@ -48,6 +63,9 @@ internal sealed class OracleContext /// Set by the plugin: sends a chat command to the server as if typed (the views' buttons). public Func Send = _ => false; + /// Set by the plugin: asks RynthILT to use a carried charm or Guardian Hand (its toggle id). + public Func ToggleCharm = _ => false; + /// Set by the plugin: runs a chat command through RynthCore's plugin dispatch (another plugin's window). public Func RunCommand = _ => false; diff --git a/Plugins/RynthCore.Plugin.RynthOracle/PluginExports.cs b/Plugins/RynthCore.Plugin.RynthOracle/PluginExports.cs index d3c9231..442aff6 100644 --- a/Plugins/RynthCore.Plugin.RynthOracle/PluginExports.cs +++ b/Plugins/RynthCore.Plugin.RynthOracle/PluginExports.cs @@ -38,7 +38,7 @@ public static unsafe class PluginExports public static IntPtr GetVersion() { // Keep in step with RynthOraclePlugin.Version (a u8 literal can't be built from a const string). - try { return LiteralPointer("0.2.1"u8); } + try { return LiteralPointer("0.2.8"u8); } catch { return IntPtr.Zero; } } diff --git a/Plugins/RynthCore.Plugin.RynthOracle/RynthCore.Plugin.RynthOracle.csproj b/Plugins/RynthCore.Plugin.RynthOracle/RynthCore.Plugin.RynthOracle.csproj index b3fbe8b..cb140b2 100644 --- a/Plugins/RynthCore.Plugin.RynthOracle/RynthCore.Plugin.RynthOracle.csproj +++ b/Plugins/RynthCore.Plugin.RynthOracle/RynthCore.Plugin.RynthOracle.csproj @@ -52,15 +52,22 @@ + + + + ("RynthServer.Profile" / "RynthILT.Server"): which server this is, overrides included. --> + + + diff --git a/Plugins/RynthCore.Plugin.RynthOracle/RynthOraclePlugin.cs b/Plugins/RynthCore.Plugin.RynthOracle/RynthOraclePlugin.cs index 1cd8e30..4200623 100644 --- a/Plugins/RynthCore.Plugin.RynthOracle/RynthOraclePlugin.cs +++ b/Plugins/RynthCore.Plugin.RynthOracle/RynthOraclePlugin.cs @@ -18,12 +18,12 @@ namespace RynthCore.Plugin.RynthOracle; /// public sealed class RynthOraclePlugin : RynthPluginBase { - // Previous release: 0.2.0. - public const string Version = "0.2.1"; + // Previous release: 0.2.5. + public const string Version = "0.2.8"; private const long QuestReadDelayMs = 6000; // after login, before the hidden /myquests private const long CharacterReadMs = 1000; - // The Character tab's session (RynthAi): read only while that tab is on screen. + // The Character tab's charms (RynthILT) and session (RynthAi): read only while that tab is on screen. private const long CharacterExtrasReadMs = 2000; private const long BookWorldWaitMs = 15_000; // how long the quest book waits for the world name @@ -40,9 +40,12 @@ public sealed class RynthOraclePlugin : RynthPluginBase private long _loginMs; private long _nextCharacterReadMs; private long _nextCharacterExtrasMs; + private string _charmsJson = ""; + private long _nextBreedingMs; + private string _breedingJson = ""; private bool _voidAutoDecided; private bool _dailyCheckStarted; - private int _seenFlagRevision = -1, _seenCatalogRevision = -1, _seenVoidRevision = -1; + private int _seenFlagRevision = -1, _seenCatalogRevision = -1, _seenVoidRevision = -1, _seenIltRevision = -1; // RynthCore's server list (ServerStateClient.Revision) last applied to the server identity. private int _seenServerStateRevision = -1; private bool _noUiLogged; @@ -59,6 +62,8 @@ public sealed class RynthOraclePlugin : RynthPluginBase _c.RequestQuests = RequestQuests; _c.Send = cmd => _c.InWorld && Host.InvokeChatParser(cmd); _c.RunCommand = cmd => _c.InWorld && Host.InvokeChatParser(cmd); + _c.ToggleCharm = ToggleCharm; + _c.BreedingCommand = BreedingCommand; _ui.Log = msg => Host.Log(msg); _mainView = new OracleView(_c); @@ -112,10 +117,12 @@ public sealed class RynthOraclePlugin : RynthPluginBase _c.Flags.Clear(); _c.Void.Clear(); _c.Server.Reset(); + _c.Ilt.Clear(); + _c.Ilt.Poll(Host, Environment.TickCount64); _c.ServerState.Clear(); _c.ServerState.Poll(Host, Environment.TickCount64, force: true); _seenServerStateRevision = _c.ServerState.Revision; - _c.Server.Refresh(Host, Host.GetPlayerId(), _c.ServerState.State); + _c.Server.Refresh(Host, Host.GetPlayerId(), _c.Ilt.Profile.Ilt, _c.ServerState.State); _catalogTag = null; ApplyServer(); _conquestLoginRead = false; @@ -153,23 +160,40 @@ public sealed class RynthOraclePlugin : RynthPluginBase _c.Conquest.Clear(); _c.Boards.Clear(); _c.Server.Reset(); + _c.Ilt.Clear(); _c.ServerState.Clear(); _c.TitlesKnown = false; _c.EarnedTitles.Clear(); ClearCharacterExtras(); } - /// Forgets the Character tab's session (login, logout): the next character's comes fresh. + /// Forgets the Character tab's charms and session (login, logout): the next character's come fresh. private void ClearCharacterExtras() { + _c.Charms = Shared.IltCharmsView.None; + _charmsJson = ""; + _c.CharmMessage = ""; + _c.Breeding = Shared.IltBreedingView.None; + _breedingJson = ""; + _c.BreedingMessage = ""; _c.Session = default; _c.SessionKnown = false; _c.AiSession.Reset(); } + /// The Character tab's Toggle: RynthILT checks the id is one of the player's charms and uses it. + private bool ToggleCharm(uint id) + { + bool ok = _c.InWorld && _c.IltData.ToggleCharm(Host, Environment.TickCount64, id); + _c.CharmMessage = ok ? "Toggled; the status updates in a moment." : "RynthILT didn't take that (not carried any more, or RynthILT isn't loaded)."; + _nextCharacterExtrasMs = Environment.TickCount64 + 1000; // re-read soon so the new state shows + if (_main != null) _main.NeedsPass = true; + return ok; + } + /// - /// While the Character tab is on screen: RynthAi's session, every . - /// Nothing is read with the window closed or on another tab. + /// While the Character tab is on screen: RynthILT's charms JSON and RynthAi's session, every + /// . Nothing is read with the window closed or on another tab. /// private void ReadCharacterExtras(long now) { @@ -177,6 +201,13 @@ public sealed class RynthOraclePlugin : RynthPluginBase if (now < _nextCharacterExtrasMs) return; _nextCharacterExtrasMs = now + CharacterExtrasReadMs; + string json = _c.IltData.ReadCharms(Host, now); + if (!string.Equals(json, _charmsJson, StringComparison.Ordinal)) + { + _charmsJson = json; + _c.Charms = Shared.IltCharmsView.Parse(json); + _main.NeedsPass = true; + } bool known = _c.AiSession.TryGet(Host, now, out Shared.SessionStatsV1 s); if (known != _c.SessionKnown || known && (s.Xp != _c.Session.Xp || s.Lum != _c.Session.Lum || s.Kills != _c.Session.Kills)) _main.NeedsPass = true; @@ -184,12 +215,40 @@ public sealed class RynthOraclePlugin : RynthPluginBase _c.Session = known ? s : default; } + /// The Pet Breeding tab's buttons: a verb for RynthILT's tracker, then a quick re-read. + private bool BreedingCommand(string verb) + { + long now = Environment.TickCount64; + bool ok = _c.InWorld && _c.IltData.PetBreedingCommand(Host, now, verb); + _c.BreedingMessage = ok ? "Sent to RynthILT; the tab updates in a moment." : "RynthILT didn't take that (not loaded, or older than 0.2.7)."; + _nextBreedingMs = now + 800; + if (_main != null) _main.NeedsPass = true; + return ok; + } + + /// + /// While the Pet Breeding tab is on screen: RynthILT's breeding JSON every + /// (reading it keeps RynthILT's tracker scanning). Nothing is read with the window closed or on another tab. + /// + private void ReadBreeding(long now) + { + if (_main == null || _mainView == null || !_main.Visible || _mainView.Tab != OracleView.TabBreeding) return; + if (now < _nextBreedingMs) return; + _nextBreedingMs = now + CharacterExtrasReadMs; + string json = _c.IltData.ReadPetBreeding(Host, now); + if (string.Equals(json, _breedingJson, StringComparison.Ordinal)) return; + _breedingJson = json; + _c.Breeding = Shared.IltBreedingView.Parse(json); + _main.NeedsPass = true; + } + /// Shows the main window on a tab (another plugin's link, or a /ro tab command). private void ShowTab(string tab) { if (_mainView != null) _mainView.Tab = tab; if (_main != null) { _main.Visible = true; _main.NeedsPass = true; } if (tab == OracleView.TabCharacter) _nextCharacterExtrasMs = 0; // read at once + if (tab == OracleView.TabBreeding) _nextBreedingMs = 0; } /// @@ -310,11 +369,20 @@ public sealed class RynthOraclePlugin : RynthPluginBase break; case "character": case "char": - // The Character tab: the character overview and RynthAi's session (the generic part of - // the Mini Remote's old Character tab; Infinite Leaftide's charms stay RynthILT's). + case "charms": + case "charm": + // The Character tab: where the Mini Remote's Character and Charms tabs moved (2026-10-13). // RynthAi, RynthILT and RynthCore's menus link here; it shows, never toggles off. ShowTab(OracleView.TabCharacter); break; + case "breeding": + case "breed": + case "pets": + // The Pet Breeding tab (Infinite Leaftide): RynthAi's Character menu and its Pets > Breeding tab link here. + if (!_c.Server.Is(ServerTags.InfiniteLeaftide)) + _c.Print("Pet breeding is an Infinite Leaftide feature; this server isn't recognised as Infinite Leaftide."); + ShowTab(OracleView.TabBreeding); + break; case "status": string pack = _c.Catalog.PackServer.Length > 0 ? $" + {_c.Catalog.ServerCount} {_c.Catalog.PackServer}" : ""; string titles = _c.TitlesKnown ? $", {_c.EarnedTitles.Count} titles held" : ""; @@ -322,18 +390,20 @@ public sealed class RynthOraclePlugin : RynthPluginBase + $"{_c.Flags.Flags.Count} quest flags read, {_c.Catalog.RetailCount} retail quests{pack}, {_c.Void.Dots.Count} Void spells tracked{titles}."); break; case "about": - // The About tab (settings, the server RynthCore says this is). + case "features": + // The About tab (its "Server features" list is RynthILT's; RynthILT's settings link here). _c.Print("Based on Oracle of Dereth by Advis Eveldan - thank you! github.com/advis61/OracleOfDereth (MIT)"); ShowTab(OracleView.TabAbout); break; default: - _c.Print("Commands: /ro (window), /ro character (Character tab: status, session), /ro void (Void window), " - + "/ro timers (Quest Timers window), /ro fellowship (Fellowship tab), /ro quests (read quest flags), /ro status, " - + "/ro about (About tab: settings, server)"); + _c.Print("Commands: /ro (window), /ro character (Character tab: status, session, charms), /ro void (Void window), " + + "/ro timers (Quest Timers window), /ro fellowship (Fellowship tab), /ro breeding (Pet Breeding tab, Infinite Leaftide), " + + "/ro quests (read quest flags), /ro status, " + + "/ro about (About tab: settings, server features)"); break; } - if (arg is "" or "void" or "timers" or "timer" or "fellowship" or "fellow" or "fship" or "character" or "char" - or "about" && !Host.HasUi && !_noUiLogged) + if (arg is "" or "void" or "timers" or "timer" or "fellowship" or "fellow" or "fship" or "character" or "char" or "charms" or "charm" + or "breeding" or "breed" or "pets" or "about" or "features" && !Host.HasUi && !_noUiLogged) { _noUiLogged = true; _c.Print("This RynthCore engine can't show plugin windows (it needs script windows, API v71, with ImGui on). /ro status still works."); @@ -418,14 +488,23 @@ public sealed class RynthOraclePlugin : RynthPluginBase if (!_c.InWorld) return; + // RynthILT's profile (every 2 s): the Fellowship tab's size and Leaftide fellowship features. + _c.Ilt.Poll(Host, now); + if (_c.Ilt.Revision != _seenIltRevision) + { + _seenIltRevision = _c.Ilt.Revision; + if (_main != null) _main.NeedsPass = true; + } + ReadCharacterExtras(now); + ReadBreeding(now); // RynthCore's server list (every 2 s): a new pick or override applies now, not at the next character read. _c.ServerState.Poll(Host, now); if (_c.ServerState.Revision != _seenServerStateRevision) { _seenServerStateRevision = _c.ServerState.Revision; - _c.Server.Refresh(Host, _c.Character.PlayerId != 0 ? _c.Character.PlayerId : Host.GetPlayerId(), _c.ServerState.State); + _c.Server.Refresh(Host, _c.Character.PlayerId != 0 ? _c.Character.PlayerId : Host.GetPlayerId(), _c.Ilt.Profile.Ilt, _c.ServerState.State); ApplyServer(); if (_main != null) _main.NeedsPass = true; } @@ -451,7 +530,7 @@ public sealed class RynthOraclePlugin : RynthPluginBase _nextCharacterReadMs = now + CharacterReadMs; _c.Character.Read(Host); _c.Void.RemoveExpired(now); - _c.Server.Refresh(Host, _c.Character.PlayerId, _c.ServerState.State); + _c.Server.Refresh(Host, _c.Character.PlayerId, _c.Ilt.Profile.Ilt, _c.ServerState.State); ApplyServer(); LoadQuestBook(now); ReadTitles(); diff --git a/Plugins/RynthCore.Plugin.RynthOracle/Views/CharacterTab.cs b/Plugins/RynthCore.Plugin.RynthOracle/Views/CharacterTab.cs index c5fe314..cfa3552 100644 --- a/Plugins/RynthCore.Plugin.RynthOracle/Views/CharacterTab.cs +++ b/Plugins/RynthCore.Plugin.RynthOracle/Views/CharacterTab.cs @@ -8,9 +8,8 @@ namespace RynthCore.Plugin.RynthOracle.Views; /// /// Character: level and experience, luminance, the status summary (upstream's Status HUD: buff, -/// house, beer, page and rare timers, key skills, aetheria surges), RynthAi's session (the generic -/// part of the Mini Remote's old Character tab, moved here 2026-10-13) and the full buff list. -/// Infinite Leaftide's charms stay RynthILT's (its Charms tab in the Mini Remote). +/// house, beer, page and rare timers, key skills, aetheria surges), RynthAi's session, RynthILT's +/// charms (the Mini Remote's Character and Charms tabs moved here 2026-10-13) and the full buff list. /// internal sealed partial class OracleView { @@ -57,6 +56,7 @@ internal sealed partial class OracleView Field(w, "Summoning", SkillText(c.Summoning), 300f, 400f); DrawSession(w); + DrawCharms(w); var list = new List(c.Enchantments); list.Sort((a, b) => a.Remaining.CompareTo(b.Remaining)); @@ -105,6 +105,97 @@ internal sealed partial class OracleView private static string RateText(double perHour) => perHour > 0 ? TimeText.Number((long)Math.Round(perHour)) : "0"; + /// + /// "Charms": RynthILT's Infinite Leaftide charm list (the Mini Remote's old Charms tab), with a + /// Toggle for each carried charm and Guardian Hand. Nothing is listed here: RynthILT sends the + /// list, so a charm it learns about shows up without an Oracle update. + /// + private void DrawCharms(UiWindow w) + { + Shared.IltCharmsView v = _c.Charms; + if (!v.Loaded) + { + if (_c.Server.Is(ServerTags.InfiniteLeaftide)) + { + w.SeparatorText("Charms"); + w.TextDisabled("Load RynthILT to list your Infinite Leaftide charms here."); + } + return; + } + if (!v.Available) return; // not an ILT world: no charms + + w.SeparatorText("Charms"); + w.TextDisabled($"{v.Acquired} acquired, {v.Active} on (from RynthILT{(v.World.Length > 0 ? ", " + v.World : "")})."); + if (_c.CharmMessage.Length > 0) w.TextDisabled(_c.CharmMessage); + + if (w.CollapsingHeader($"Charms ({v.Charms.Count})", "c.charms", defaultOpen: true)) + { + if (v.Charms.Count == 0) w.TextDisabled("RynthILT hasn't listed any charms yet."); + for (int i = 0; i < v.Charms.Count; i++) + { + Shared.IltCharmRow r = v.Charms[i]; + CharmState(w, r.Active); + w.SameLine(50f); + if (r.Carried) w.Text(Cut(r.Name, 30)); + else w.TextDisabled(Cut(r.Name, 30)); + if (r.Effect.Length > 0) w.Tooltip(r.Effect); + w.SameLine(270f); + w.TextDisabled(r.MaxTier > 0 ? $"T{r.Tier}/{r.MaxTier}" : r.Tier > 0 ? $"T{r.Tier}" : "-"); + w.SameLine(330f); + w.TextDisabled(AcquiredText(r)); + if (r.Server == "off") + { + w.SameLine(430f); + w.TextColored(UiColors.Red, "server off"); + } + if (r.Carried && r.ToggleId != 0) + { + w.SameLine(510f); + uint id = r.ToggleId; + w.SmallButton("Toggle", "c.charm." + i, () => _c.ToggleCharm(id)); + } + } + } + + if (v.Hands.Count > 0 && w.CollapsingHeader($"Guardian Hands ({v.Hands.Count})", "c.hands", defaultOpen: true)) + { + for (int i = 0; i < v.Hands.Count; i++) + { + Shared.IltHandRow h = v.Hands[i]; + CharmState(w, h.Active); + w.SameLine(50f); + w.Text(Cut(h.Name, 30)); + if (h.Server == "off") + { + w.SameLine(430f); + w.TextColored(UiColors.Red, "server off"); + } + w.SameLine(510f); + uint id = h.Id; + w.SmallButton("Toggle", "c.hand." + i, () => _c.ToggleCharm(id)); + } + } + } + + /// ON in green, OFF in red, "?" in grey (status not read yet). + private static void CharmState(UiWindow w, string active) + { + switch (active) + { + case "on": w.TextColored(UiColors.Green, "ON"); break; + case "off": w.TextColored(UiColors.Red, "OFF"); break; + default: w.TextColored(UiColors.Grey, "?"); break; + } + } + + /// Carried (with the count), stored (seen on this character before) or not acquired. + internal static string AcquiredText(Shared.IltCharmRow r) => r.Acquired switch + { + "carried" => r.Count > 1 ? $"carried x{r.Count}" : "carried", + "seen" => r.LastSeen.Length > 0 ? "seen " + r.LastSeen : "seen", + _ => "not acquired", + }; + /// /// The buff timer: the soonest-ending long (over 15 minutes) buff that isn't a beer, a debuff /// or one of the not-really-buffs, with how many there are (upstream's rule). diff --git a/Plugins/RynthCore.Plugin.RynthOracle/Views/OracleView.cs b/Plugins/RynthCore.Plugin.RynthOracle/Views/OracleView.cs index 949dce7..cd94a0f 100644 --- a/Plugins/RynthCore.Plugin.RynthOracle/Views/OracleView.cs +++ b/Plugins/RynthCore.Plugin.RynthOracle/Views/OracleView.cs @@ -11,7 +11,7 @@ internal sealed partial class OracleView { public const string TabQuests = "Quests", TabCharacter = "Character", TabAugs = "Augs", TabSociety = "Society", TabMarkers = "Markers", TabTitles = "Titles", TabVoid = "Void", TabFellowship = "Fellowship", - TabBoards = "Leaderboards", TabConquest = "Conquest", TabAbout = "About"; + TabBoards = "Leaderboards", TabConquest = "Conquest", TabBreeding = "Pet Breeding", TabAbout = "About"; /// A tab: shown where any of its server tags matches the server; no tags = everywhere (retail). private sealed record TabDef(string Name, string[] Servers, Action Draw, bool LiveTimers); @@ -40,6 +40,7 @@ internal sealed partial class OracleView // Server-specific: each parser and its commands only exist on its own server. new(TabBoards, new[] { Data.ServerTags.Conquest, Data.ServerTags.Aelrynth }, DrawBoards, false), new(TabConquest, new[] { Data.ServerTags.Conquest }, DrawConquest, true), + new(TabBreeding, new[] { Data.ServerTags.InfiniteLeaftide }, DrawBreeding, false), new(TabAbout, any, DrawAbout, false), }; } diff --git a/Plugins/RynthCore.Plugin.RynthOracle/Views/PetBreedingTab.cs b/Plugins/RynthCore.Plugin.RynthOracle/Views/PetBreedingTab.cs new file mode 100644 index 0000000..71289b0 --- /dev/null +++ b/Plugins/RynthCore.Plugin.RynthOracle/Views/PetBreedingTab.cs @@ -0,0 +1,204 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using RynthCore.Plugin.RynthOracle.Ui; +using RynthCore.Plugin.Shared; + +namespace RynthCore.Plugin.RynthOracle.Views; + +/// +/// "Pet Breeding" (Infinite Leaftide): RynthILT's breeding tracker, the same one as RynthAi's Mini +/// Remote Pets > Breeding tab. RynthILT reads the essences, learns the server's rules and runs the +/// actions; this tab draws its JSON ("RynthILT.Data" GetPetBreedingJson) and sends its verbs back. +/// Dance and supply uses ask here first (RynthILT doesn't ask again). +/// +internal sealed partial class OracleView +{ + /// Essence rows drawn at most (each is about eight ops; the window's op budget is shared). + private const int BreedingMaxRows = 40; + + /// The breeding verb waiting for Yes / No, with its question ("" = none). + private string _breedConfirmVerb = "", _breedConfirmText = ""; + /// The essence the supplies are used on (index into the essence list). + private int _breedTarget; + + private void DrawBreeding(UiWindow w) + { + IltBreedingView v = _c.Breeding; + w.SeparatorText("Pet Breeding"); + if (!v.Loaded) + { + w.TextDisabled(_c.IltData.Connected && !_c.IltData.PetBreedingSupported + ? "This RynthILT is older than 0.2.7 and has no breeding tracker; update RynthILT." + : "Load RynthILT (0.2.7 or later) to track pet breeding here. Reading..."); + return; + } + + uint col = v.Enabled == "off" ? UiColors.Red : v.Enabled == "on" ? UiColors.Green : UiColors.Yellow; + w.TextColored(col, v.Enabled switch + { + "off" => "Pet breeding is off on this server.", + "on" => $"Pet breeding: on. Breeding room: {v.Room}.", + _ => "Pet breeding: not confirmed yet (Diagnostics in the breeding room checks).", + }); + if (v.Bond == "off") w.TextColored(UiColors.Yellow, "Pet bond is off here, so bond can't reach the breeding minimum."); + + w.SmallButton("Refresh", "br.refresh", () => _c.BreedingCommand(IltBreedingView.RefreshVerb())); + w.Tooltip("Re-appraise every essence (charges, rest timers, bond, growth)."); + w.SameLine(); + w.SmallButton("Diagnostics", "br.debug", () => _c.BreedingCommand(IltBreedingView.DebugVerb())); + w.Tooltip("@breed-debug: whether you're in the breeding room, your pet, partners nearby."); + w.SameLine(); + w.SmallButton("Dance", "br.dance", () => AskBreeding(IltBreedingView.DanceVerb(), + "Dance now? If your partner dances in time with both pets summoned in the same room, the breed happens.")); + w.Tooltip("@dance: both owners must dance within a few seconds."); + w.SameLine(); + w.SmallButton("Mini Remote", "br.remote", () => _c.RunCommand("/ra hub open breeding")); + w.Tooltip("RynthAi's Mini Remote, Pets > Breeding (the same tracker, with the pair planner)."); + + if (_breedConfirmVerb.Length > 0) + { + w.TextColored(UiColors.Gold, _breedConfirmText); + string verb = _breedConfirmVerb; + w.SmallButton("Yes", "br.yes", () => { _breedConfirmVerb = ""; _c.BreedingCommand(verb); }); + w.SameLine(); + w.SmallButton("No", "br.no", () => _breedConfirmVerb = ""); + } + if (v.Message.Length > 0) w.TextDisabled(v.Message); + else if (_c.BreedingMessage.Length > 0) w.TextDisabled(_c.BreedingMessage); + if (v.FreeSlots == 0) w.TextColored(UiColors.Yellow, "Your main pack is full: as the dam's owner you couldn't receive the baby."); + + DrawBreedEssences(w, v); + DrawBreedPairs(w, v); + DrawBreedSupplies(w, v); + DrawBreedRules(w, v); + DrawBreedEvents(w, v); + } + + /// Holds a verb until the player clicks Yes. + private void AskBreeding(string verb, string question) + { + _breedConfirmVerb = verb; + _breedConfirmText = question; + } + + private void DrawBreedEssences(UiWindow w, IltBreedingView v) + { + int ready = 0; + foreach (IltBreedEssenceRow e in v.Essences) if (e.Ready) ready++; + if (!w.CollapsingHeader($"Essences ({ready} ready of {v.Essences.Count})", "br.ess", defaultOpen: true)) return; + if (v.Essences.Count == 0) { w.TextDisabled("No combat pet essences in your pack."); return; } + for (int i = 0; i < v.Essences.Count && i < BreedingMaxRows; i++) + { + IltBreedEssenceRow e = v.Essences[i]; + w.TextColored(e.Ready ? UiColors.Green : e.Problems.Count > 0 && e.ReadyIn > 0 ? UiColors.Yellow : UiColors.Grey, Cut(e.Status, 22)); + w.SameLine(170f); + w.Text(Cut(e.Name, 32)); + w.Tooltip(BreedTooltip(e)); + w.SameLine(410f); + w.TextDisabled($"{(e.Male ? "M" : "F")} T{(e.Tier > 0 ? e.Tier.ToString(CultureInfo.InvariantCulture) : "?")} B{e.Bond} " + + $"Mut {e.Mutations}{(e.PotencyMutations > 0 ? "+" + e.PotencyMutations + "p" : "")}"); + } + if (v.Essences.Count > BreedingMaxRows) w.TextDisabled($"... and {v.Essences.Count - BreedingMaxRows} more (see the Mini Remote)."); + } + + private static string BreedTooltip(IltBreedEssenceRow e) + { + var lines = new List { $"{e.Name}: {(e.Male ? "stud" : "dam")}, tier {e.Tier}, bond {e.Bond}" }; + if (e.Male) lines.Add($"Charges {e.Charges}/{e.ChargesMax}"); + if (e.Juvenile) lines.Add($"Growing: {e.Stage}, {Math.Max(0, e.KillsRequired - e.Kills)} kills to Adult"); + if (e.Boosters.Count > 0) lines.Add("Boosters: " + string.Join(", ", e.Boosters)); + foreach (string p in e.Problems) lines.Add("- " + p); + return string.Join("\n", lines); + } + + private static void DrawBreedPairs(UiWindow w, IltBreedingView v) + { + if (v.Pairs.Count == 0) return; + if (!w.CollapsingHeader($"Ready pairs ({v.Pairs.Count})", "br.pairs", defaultOpen: true)) return; + w.TextDisabled("Stat mutation odds; fewer inherited mutations keep the odds up. Each owner dances with their own pet."); + for (int i = 0; i < v.Pairs.Count; i++) + { + IltBreedPairRow p = v.Pairs[i]; + w.Text($"{Cut(p.Stud, 26)} x {Cut(p.Dam, 26)}"); + w.SameLine(400f); + w.TextDisabled($"{Pct(p.ChanceWorst)}-{Pct(p.ChanceBest)}, inherits {p.InheritMin}-{p.InheritMax}"); + } + } + + private void DrawBreedSupplies(UiWindow w, IltBreedingView v) + { + long carried = 0; + foreach (IltBreedSupplyRow s in v.Supplies) carried += s.Count; + if (!w.CollapsingHeader($"Supplies ({carried} carried)", "br.sup", defaultOpen: false)) return; + w.TextDisabled("Ivo sells these at the Seedy Motel. Boosters are spent by the essence's next breed."); + + IltBreedEssenceRow? target = null; + if (v.Essences.Count > 0) + { + var names = new List(v.Essences.Count); + foreach (IltBreedEssenceRow e in v.Essences) names.Add(Cut(e.Name, 34)); + int index = Math.Clamp(_breedTarget, 0, v.Essences.Count - 1); + w.Combo("Use on", "br.target", index, names, i => _breedTarget = i); + target = v.Essences[index]; + } + + for (int i = 0; i < v.Supplies.Count; i++) + { + IltBreedSupplyRow s = v.Supplies[i]; + w.TextColored(s.Count > 0 ? UiColors.Green : UiColors.Grey, $"{s.Count,3} {s.Name}"); + w.Tooltip(s.Price > 0 ? $"{s.Effect}\nIvo's price: {Price(s.Price)} pyreals" : s.Effect); + if (!s.Apply || s.Count <= 0 || target == null) continue; + w.SameLine(330f); + if (System.Linq.Enumerable.Contains(s.Targets, target.Id)) + { + string verb = IltBreedingView.ApplyVerb(s.Key, target.Id); + string q = $"Use {s.Name} on {target.Name}? {s.Effect}"; + w.SmallButton("Use", "br.use." + i, () => AskBreeding(verb, q)); + } + else w.TextDisabled("-"); + } + } + + private static void DrawBreedRules(UiWindow w, IltBreedingView v) + { + if (!w.CollapsingHeader("Server rules", "br.rules", defaultOpen: false)) return; + w.TextDisabled("Values this server showed win over the ILT profile, which wins over ACE's defaults."); + foreach (IltBreedRuleRow r in v.Rules) + { + w.Text(r.Label); + if (r.Help.Length > 0) w.Tooltip(r.Help); + w.SameLine(230f); + w.Text(r.Value); + w.SameLine(310f); + w.TextColored(r.Source == "seen on server" ? UiColors.Green : UiColors.Grey, r.Source); + } + if (v.Debug is { } d) + { + w.Separator(); + w.TextDisabled($"Last diagnostics ({d.When} UTC):"); + if (d.Location.Length > 0) w.BulletText("You: " + d.Location); + if (d.Match.Length > 0) w.BulletText(d.Match == "valid" ? "In the breeding room" : "Not in the breeding room"); + if (d.Pet.Length > 0) w.BulletText("Pet: " + d.Pet + (d.Sex.Length > 0 ? " (" + d.Sex + ")" : "")); + if (d.Partners >= 0) w.BulletText($"Partners nearby: {d.Partners}"); + } + } + + private static void DrawBreedEvents(UiWindow w, IltBreedingView v) + { + if (!w.CollapsingHeader($"Recent events ({v.Events.Count})", "br.events", defaultOpen: false)) return; + if (v.Events.Count == 0) w.TextDisabled("Nothing yet: rituals, births, growth and charges land here."); + foreach (IltBreedEventRow e in v.Events) + { + w.TextDisabled(e.When); + w.SameLine(130f); + w.TextWrapped(e.Text); + } + } + + private static string Pct(double v) => (v * 100).ToString("0.#", CultureInfo.InvariantCulture) + "%"; + + private static string Price(long p) => p >= 1_000_000 + ? (p / 1_000_000.0).ToString("0.##", CultureInfo.InvariantCulture) + "M" + : p.ToString("N0", CultureInfo.InvariantCulture); +} diff --git a/Plugins/Shared/RynthIltDataApi.cs b/Plugins/Shared/RynthIltDataApi.cs index fa34804..f1b5d68 100644 --- a/Plugins/Shared/RynthIltDataApi.cs +++ b/Plugins/Shared/RynthIltDataApi.cs @@ -1,13 +1,12 @@ // ============================================================================ // RynthSuite - Plugins/Shared/RynthIltDataApi.cs -// The "RynthILT.Data" interface: the Infinite Leaftide data RynthILT's Mini Remote Charms -// and Banking tabs show, for other plugins to draw (SilentKelpie's RynthOracle Character -// tab and RynthInventory Global Inventory "Banking" tab read it; neither is in this tree yet): -// - the registry charms and Guardian Hands (GetCharmsJson, ToggleCharm); -// - the bank balances of every character RynthILT has seen on this server, and -// deposits, withdrawals, transfers and balance reads (GetBankJson, BankCommand); -// - version 2: the pet breeding tracker (GetPetBreedingJson, PetBreedingCommand). -// Separate from "RynthServer.Profile" (the server's settings) and "RynthILT.Hub" (RynthAi's +// The "RynthILT.Data" interface: the Infinite Leaftide data other plugins draw now that +// the Mini Remote's Charms and Banking tabs are gone (2026-10-13): +// - RynthOracle's Character tab lists the registry charms (GetCharmsJson, ToggleCharm); +// - RynthInventory's Global Inventory "Banking" tab lists the bank balances of every +// character RynthILT has seen on this server, and sends deposits, withdrawals, +// transfers and balance reads (GetBankJson, BankCommand). +// Separate from "RynthILT.Server" (the feature profile) and "RynthILT.Hub" (RynthAi's // exact-version table) so neither has to change for this. // Compiled into RynthILT and its readers (linked source), so the layout can't drift. // @@ -47,11 +46,10 @@ // transfer // The reader confirms a transfer with the player before sending it (RynthILT doesn't ask again). // -// Version 2 (RynthILT 0.3.1) appends GetPetBreedingJson and PetBreedingCommand: the data of the -// pet breeding tracker RynthILT draws in the Mini Remote's Pets > Breeding sub-tab (no plugin in -// this tree reads it yet). Readers still query version 1 and accept a version-1 table, so charms -// and the bank keep working with an older RynthILT; they use the breeding functions only when -// the table says Version >= 2 and is that big (HasPetBreeding). +// Version 2 (RynthILT 0.2.7) appends GetPetBreedingJson and PetBreedingCommand (RynthOracle's +// Pet Breeding tab). Readers still query version 1 and accept a version-1 table, so charms and +// the bank keep working with an older RynthILT; they use the breeding functions only when the +// table says Version >= 2 and is that big (HasPetBreeding). // // GetPetBreedingJson payload (IltPetBreeding.BuildJson; read leniently): // { "available": true, "world": "...", "enabled": "on"|"off"|"unknown", "maturity": "...", "bond": "...", @@ -128,7 +126,7 @@ public unsafe struct RynthIltDataApiV1 } /// -/// A reader of "RynthILT.Data". Looks the table up through the host, +/// A reader of "RynthILT.Data" (RynthOracle, RynthInventory). Looks the table up through the host, /// re-queried while RynthILT is missing or after it unloads (Version 0), and copies a JSON out on /// request. Pump thread only. /// diff --git a/Plugins/Shared/RynthIltServerApi.cs b/Plugins/Shared/RynthIltServerApi.cs new file mode 100644 index 0000000..2f1984e --- /dev/null +++ b/Plugins/Shared/RynthIltServerApi.cs @@ -0,0 +1,71 @@ +// ============================================================================ +// RynthSuite - Plugins/Shared/RynthIltServerApi.cs +// The "RynthILT.Server" interface: what RynthILT knows about the Infinite Leaftide +// server, for any plugin that wants it without drawing RynthILT's UI (RynthOracle's +// Fellowship tab, for one). One call hands out a JSON snapshot: whether this is an +// ILT world, every Leaftide feature RynthILT supports with the server's state for it, +// and the server's fellowship rules. +// Separate from "RynthILT.Hub" (RynthIltHubApi.cs) so that interface, which RynthAi asks +// for at an exact version, never has to change for this. +// Compiled into RynthILT and its readers (linked source), so the layout can't drift. +// +// Rules (as the other shared interfaces): +// - Append-only: new functions go at the end, and Version goes up. +// - Strings are UTF-8, NUL-terminated. The JSON itself is plain ASCII. +// - Every function returns safely (no exception crosses the boundary). +// - The table is allocated once per loaded copy of RynthILT and never freed; shutdown +// sets Version to 0, and a reader re-queries (host GetPluginInterface) when it sees that. +// +// GetProfileJson payload (every field may be missing on an older RynthILT; read leniently): +// { +// "ilt": true, // ILT world (its world list, or the character's override) +// "world": "InfiniteLeaftide", // the world name the server announced ("" before login) +// "forced": false, // "Treat this world as ILT" is on +// "source": "probe", // where the feature bits came from ("ilt-features", "probe", "") +// "checked": "2026-10-13T21:25:37Z", // last server-options check (UTC), "" = never +// "features": [ { "key": "bank", "label": "Banking", "group": "Character", +// "state": 1, "where": "Mini Remote > Banking tab" }, ... ], +// // state: 1 on, 0 off, -1 not known yet +// "fellowship": { "maxMembers": 29, "zoneShare": 1, "blackjack": 0, "luminanceShare": 1 } +// } +// ============================================================================ + +using System.Runtime.InteropServices; + +namespace RynthCore.Plugin.Shared; + +/// Constants of the "RynthILT.Server" interface. +public static class RynthIltServer +{ + /// The providing plugin's display name. + public const string PluginName = "RynthILT"; + + /// Feature state in the profile JSON: the server reports it on. + public const int StateOn = 1; + /// Feature state: the server reports it off. + public const int StateOff = 0; + /// Feature state: not known yet (not checked, not an ILT world, or no RynthILT). + public const int StateUnknown = -1; + + /// A retail fellowship's member limit (what a reader assumes without RynthILT). + public const int RetailFellowshipMax = 9; +} + +[StructLayout(LayoutKind.Sequential)] +public unsafe struct RynthIltServerApiV1 +{ + public const string InterfaceName = "RynthILT.Server"; + public const uint InterfaceVersion = 1; + + public uint Version; // InterfaceVersion of the table RynthILT filled; 0 once it has shut down + public uint StructSize; // sizeof(RynthIltServerApiV1) as RynthILT built it + + /// + /// GetProfileJson(buffer, capacity): writes the profile JSON (UTF-8, NUL-terminated) into + /// buffer when it fits, and returns its length in bytes without the NUL. A return value of + /// capacity or more means nothing was written: call again with a bigger buffer. 0 = nothing + /// to report (RynthILT shutting down). Any thread (it hands out a snapshot RynthILT's pump + /// rebuilds about once a second). + /// + public delegate* unmanaged[Cdecl] GetProfileJson; +} diff --git a/Plugins/Shared/ServerCommandShare.cs b/Plugins/Shared/ServerCommandShare.cs index 0d0d588..32c6d3c 100644 --- a/Plugins/Shared/ServerCommandShare.cs +++ b/Plugins/Shared/ServerCommandShare.cs @@ -4,11 +4,9 @@ // plugin-command broker (Host.SendPluginCommand, action "servercommands"). // // A server plugin (RynthILT for Infinite Leaftide's /fship) knows its server's extra -// commands and keeps them as a ServerCommandSet; it draws them itself (ServerCommandPanel.cs). -// For another plugin's view of that section (SilentKelpie's RynthAi Fellowship tab, not in -// this tree yet) the sender re-sends every few seconds while its server is active and sends -// an empty list when it isn't, so the receiver drops a list that stops arriving (the sender -// unloaded). +// commands; RynthAi draws them in its own view of that section (the Fellowship tab). The +// sender re-sends every few seconds while its server is active and sends an empty list when +// it isn't, so the receiver drops a list that stops arriving (the sender unloaded). // // Payload: ANSI text, one record per line, fields split by tabs: // S section serverId serverName diff --git a/Shared/RynthCore.LootSdk/Editing/LootRuleText.cs b/Shared/RynthCore.LootSdk/Editing/LootRuleText.cs index 9145fce..5196665 100644 --- a/Shared/RynthCore.LootSdk/Editing/LootRuleText.cs +++ b/Shared/RynthCore.LootSdk/Editing/LootRuleText.cs @@ -49,6 +49,9 @@ public static class LootRuleText (48, "WeaponSkill"), (54, "WeaponEncumbrance"), // 54 was labelled MaxDamage until 2026-10-07; max damage is 44 (87, "MaxStructure"), (88, "Structure"), (105, "ItemWorkmanship"), (107, "ItemMaxMana"), (131, "MaterialType"), (158, "WieldRequirements"), (159, "WieldSkilltype"), (160, "WieldDifficulty"), + // ACECustom / ACE appraisal: slayer weapons (166) and combat-essence pet stats (9053 / 9056). + // "Slayer Type" is the player-facing name; the ACE property is still SlayerCreatureType. + (166, "Slayer Type"), (9053, "Pet Bond Level"), (9056, "Pet Potency Stored"), (218, "EquippedSlots"), (353, "ImbuedEffect"), (370, "DamageRating"), (371, "DamageResistRating"), (372, "CritRating"), (373, "CritResistRating"), (374, "CritDamageRating"), (375, "CritDamageResistRating"), (376, "HealBoostRating"), (377, "NetherResistRating"), (379, "VitalityRating"), @@ -81,7 +84,8 @@ public static class LootRuleText public static readonly (int Id, string Name)[] DoubleKeys = { (5, "ManaRate"), (22, "DamageVariance"), (29, "WeaponDefense"), (62, "WeaponOffense"), - (63, "DamageMod"), (144, "ManaConversionMod"), (149, "WeaponMissileDefense"), + (63, "DamageMod"), (138, "Slayer Damage Bonus"), // often unset on ACE appraisal; prefer LongDesc / int 166 + (144, "ManaConversionMod"), (149, "WeaponMissileDefense"), (150, "WeaponMagicDefense"), (152, "ElementalDamageVsMonsters"), (167, "CooldownDuration"), (0x0A000009, "SalvageWorkmanship"), (0x0A00000B, "Variance"), (0x0A00000C, "AttackBonus"), (0x0A00000E, "DamageBonus"), @@ -158,6 +162,42 @@ public static class LootRuleText (512, "Mana"), (1024, "Nether"), }; + /// + /// Slayer Type (166 / ACE SlayerCreatureType): ACE CreatureType enum names + /// (same set as RynthAi CreatureTypeNames). Index 0 is Invalid and omitted. + /// Listed A–Z so players can find a type quickly; ids stay ACE order for .utl. + /// Unknown ids still show as "value N". + /// + public static readonly (int Id, string Name)[] CreatureTypes = BuildCreatureTypes(); + + private static (int Id, string Name)[] BuildCreatureTypes() + { + // Keep in sync with Plugins/RynthCore.Plugin.RynthAi/CreatureData/CreatureTypeNames.cs. + string[] names = + { + "Invalid", "Olthoi", "Banderling", "Drudge", "Mosswart", "Lugian", "Tumerok", "Mite", "Tusker", + "Phyntos Wasp", "Rat", "Auroch", "Cow", "Golem", "Undead", "Gromnie", "Reedshark", "Armoredillo", + "Fae", "Virindi", "Wisp", "Knathtead", "Shadow", "Mattekar", "Mumiyah", "Rabbit", "Sclavus", + "Shallows Shark", "Monouga", "Zefir", "Skeleton", "Human", "Shreth", "Chittick", "Moarsman", + "Olthoi Larvae", "Slithis", "Deru", "Fire Elemental", "Snowman", "Unknown", "Bunny", + "Lightning Elemental", "Rockslide", "Grievver", "Niffis", "Ursuin", "Crystal", "Hollow Minion", + "Scarecrow", "Idol", "Empyrean", "Hopeslayer", "Doll", "Marionette", "Carenzi", "Siraluun", + "Aun Tumerok", "Hea Tumerok", "Simulacrum", "Acid Elemental", "Frost Elemental", "Elemental", + "Statue", "Wall", "Altered Human", "Device", "Harbinger", "Dark Sarcophagus", "Chicken", + "Gotrok Lugian", "Margul", "Bleached Rabbit", "Nasty Rabbit", "Grimacing Rabbit", "Burun", + "Target", "Ghost", "Fiun", "Eater", "Penguin", "Ruschk", "Thrungus", "Viamontian Knight", + "Remoran", "Swarm", "Moar", "Enchanted Arms", "Sleech", "Mukkir", "Merwart", "Food", + "Paradox Olthoi", "Harvest", "Energy", "Apparition", "Aerbax", "Touched", "Blighted Moarsman", + "Gear Knight", "Gurog", "Anekshay", + }; + var list = new List<(int, string)>(names.Length - 1); + for (int i = 1; i < names.Length; i++) + list.Add((i, names[i])); + // Alphabetical for the picker (same idea as Skills); id is what the .utl stores. + list.Sort((a, b) => string.Compare(a.Item2, b.Item2, StringComparison.OrdinalIgnoreCase)); + return list.ToArray(); + } + /// /// The names for a long key's value, or null when the key's value is a plain /// number. Unknown values are still valid: show them as "value N". @@ -169,6 +209,7 @@ public static class LootRuleText 131 => Materials, 158 => WieldRequirements, 159 => Skills, + 166 => CreatureTypes, T11.T11Keys.WeaponGrade => T11.T11Catalog.Grades, T11.T11Keys.GearGrade => T11.T11Catalog.Grades, _ => null, @@ -178,7 +219,7 @@ public static class LootRuleText public static bool ValueTableIsFlags(int longKey) => longKey is 45 or 0x0D000021; /// The long keys that have a value table, for the vocabulary. - public static readonly int[] KeysWithValueTables = { 45, 48, 131, 158, 159, 0x0D000020, 0x0D000021, T11.T11Keys.WeaponGrade, T11.T11Keys.GearGrade }; + public static readonly int[] KeysWithValueTables = { 45, 48, 131, 158, 159, 166, 0x0D000020, 0x0D000021, T11.T11Keys.WeaponGrade, T11.T11Keys.GearGrade }; /// /// True for the conditions whose value is picked by name when the key has a diff --git a/Tools/RynthCore.LootEditor/LongValuePicker.cs b/Tools/RynthCore.LootEditor/LongValuePicker.cs index a358fd7..9a284c2 100644 --- a/Tools/RynthCore.LootEditor/LongValuePicker.cs +++ b/Tools/RynthCore.LootEditor/LongValuePicker.cs @@ -81,10 +81,20 @@ internal sealed class LongValuePicker : ContentControl _box.Width = 80; _box.Margin = new Thickness(4, 0, 0, 0); ToolTip.SetTip(_box, "Any number, named or not"); - _combo = new ComboBox { HorizontalAlignment = HorizontalAlignment.Stretch, MinWidth = 160 }; + _combo = new ComboBox + { + HorizontalAlignment = HorizontalAlignment.Stretch, + MinWidth = 160, + IsTextSearchEnabled = true, // type while open to jump (Olthoi, Virindi, …) + MaxDropDownHeight = 360, + }; _combo.DisplayMemberBinding = new Avalonia.Data.Binding(nameof(Opt.Display)); if (LootRuleText.ValueTableIsFlags(key)) ToolTip.SetTip(_combo, "Flags: other combinations are typed as a number in the box"); + else if (key == 166) + ToolTip.SetTip(_combo, "Slayer creature type — pick by name (list is A–Z). Any slayer: use >= 1"); + else + ToolTip.SetTip(_combo, "Pick by name, or type a number in the box"); _combo.SelectionChanged += (_, _) => { if (_syncing || _combo.SelectedItem is not Opt { Id: int id }) return; diff --git a/Tools/RynthCore.LootSdkTests/LootValueNameTests.cs b/Tools/RynthCore.LootSdkTests/LootValueNameTests.cs index f65f912..30e365a 100644 --- a/Tools/RynthCore.LootSdkTests/LootValueNameTests.cs +++ b/Tools/RynthCore.LootSdkTests/LootValueNameTests.cs @@ -39,12 +39,19 @@ internal static partial class Program { ("skills", LootRuleText.Skills), ("wield requirements", LootRuleText.WieldRequirements), ("materials", LootRuleText.Materials), ("damage types", LootRuleText.DamageTypes), + ("creature types", LootRuleText.CreatureTypes), }) { Eq(table.Select(t => t.Id).Distinct().Count(), table.Length, $"{label}: ids unique"); Check(table.All(t => t.Name.Length > 0 && t.Name.All(ch => ch >= 32 && ch < 128)), $"{label}: names ASCII"); Eq(table.Select(t => t.Name).Distinct().Count(), table.Length, $"{label}: names unique"); } + Check(ReferenceEquals(LootRuleText.ValueTableFor(166), LootRuleText.CreatureTypes), "166 Slayer Type -> creature types"); + Eq(LootRuleText.LongKeys.First(k => k.Id == 166).Name, "Slayer Type", "166 player-facing name"); + Eq(LootRuleText.ValueName(166, "1"), "Olthoi", "ValueName 166/1 Olthoi"); + Check(LootRuleText.CreatureTypes.Select(t => t.Name) + .SequenceEqual(LootRuleText.CreatureTypes.Select(t => t.Name).OrderBy(n => n, StringComparer.OrdinalIgnoreCase)), + "creature types listed alphabetically"); // Retail / ACE numbering (the old table had Light Weapons at 47, which is Missile Weapons). string Skill(int id) => LootRuleText.Skills.First(s => s.Id == id).Name;