diff --git a/Plugins/RynthCore.Plugin.RynthAChard/RynthCore.Plugin.RynthAChard.csproj b/Plugins/RynthCore.Plugin.RynthAChard/RynthCore.Plugin.RynthAChard.csproj
index 589c30a..718e597 100644
--- a/Plugins/RynthCore.Plugin.RynthAChard/RynthCore.Plugin.RynthAChard.csproj
+++ b/Plugins/RynthCore.Plugin.RynthAChard/RynthCore.Plugin.RynthAChard.csproj
@@ -9,7 +9,7 @@
AChard
a-chard.ddns.net
AChard|A-Chard
- AChard only: the server card (rules, account limits, botting policy, links, account setup) in the Mini Remote.
+ AChard only: the server card (rules, account limits, botting policy, links, account setup) in its own window on the RynthCore bar.
diff --git a/Plugins/RynthCore.Plugin.RynthAelrynth/RynthCore.Plugin.RynthAelrynth.csproj b/Plugins/RynthCore.Plugin.RynthAelrynth/RynthCore.Plugin.RynthAelrynth.csproj
index f3dabeb..ec7cffd 100644
--- a/Plugins/RynthCore.Plugin.RynthAelrynth/RynthCore.Plugin.RynthAelrynth.csproj
+++ b/Plugins/RynthCore.Plugin.RynthAelrynth/RynthCore.Plugin.RynthAelrynth.csproj
@@ -19,7 +19,7 @@
Aelrynth
aelrynth.com|144.217.84.148
Aelrynth*|Aeshnidae*
- Aelrynth only: the server card (its mods, links, account setup), Aelrynth's leaderboards and Trials records in the Mini Remote, the account vault in Global Inventory, the difficulty tier for RynthAi, and Aelrynth's quests in RynthOracle.
+ Aelrynth only: the server card (its mods, links, account setup), Aelrynth's leaderboards and Trials records in its own window on the RynthCore bar, the account vault in Global Inventory, the difficulty tier for RynthAi, and Aelrynth's quests in RynthOracle.
diff --git a/Plugins/RynthCore.Plugin.RynthColdeve/RynthCore.Plugin.RynthColdeve.csproj b/Plugins/RynthCore.Plugin.RynthColdeve/RynthCore.Plugin.RynthColdeve.csproj
index 551ffc8..8e0f531 100644
--- a/Plugins/RynthCore.Plugin.RynthColdeve/RynthCore.Plugin.RynthColdeve.csproj
+++ b/Plugins/RynthCore.Plugin.RynthColdeve/RynthCore.Plugin.RynthColdeve.csproj
@@ -9,7 +9,7 @@
Coldeve
play.coldeve.ac
Coldeve
- Coldeve only: the server card (rules, account limits, botting policy, links, account setup) in the Mini Remote.
+ Coldeve only: the server card (rules, account limits, botting policy, links, account setup) in its own window on the RynthCore bar.
diff --git a/Plugins/RynthCore.Plugin.RynthConquest/RynthCore.Plugin.RynthConquest.csproj b/Plugins/RynthCore.Plugin.RynthConquest/RynthCore.Plugin.RynthConquest.csproj
index 550509a..87ea1b0 100644
--- a/Plugins/RynthCore.Plugin.RynthConquest/RynthCore.Plugin.RynthConquest.csproj
+++ b/Plugins/RynthCore.Plugin.RynthConquest/RynthCore.Plugin.RynthConquest.csproj
@@ -14,7 +14,7 @@
Conquest
acconquest.ddns.net
Conquest|ConquestAC
- Conquest only: the server card, and Conquest's bank (with auto-deposit), augmentations, levels past 275, fellowships, custom quests and leaderboards in the Mini Remote, and Conquest's quests in RynthOracle.
+ Conquest only: the server card, and Conquest's bank (with auto-deposit), augmentations, levels past 275, fellowships, custom quests and leaderboards in its own window on the RynthCore bar, and Conquest's quests in RynthOracle.
diff --git a/Plugins/RynthCore.Plugin.RynthDerptide/RynthCore.Plugin.RynthDerptide.csproj b/Plugins/RynthCore.Plugin.RynthDerptide/RynthCore.Plugin.RynthDerptide.csproj
index b1e82e5..b336483 100644
--- a/Plugins/RynthCore.Plugin.RynthDerptide/RynthCore.Plugin.RynthDerptide.csproj
+++ b/Plugins/RynthCore.Plugin.RynthDerptide/RynthCore.Plugin.RynthDerptide.csproj
@@ -9,7 +9,7 @@
Derptide
ac.derptide.net
Derptide
- Derptide only: the server card (rules, account limits, botting policy, links, account setup) in the Mini Remote.
+ Derptide only: the server card (rules, account limits, botting policy, links, account setup) in its own window on the RynthCore bar.
diff --git a/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/AttributesTitles.cs b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/AttributesTitles.cs
new file mode 100644
index 0000000..a84fe3c
--- /dev/null
+++ b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/AttributesTitles.cs
@@ -0,0 +1,146 @@
+// AttributesTitles.cs - The Attributes and Titles pages of the DreamWeave Skills panel (2026-11-07, Tom:
+// "build the attributes and titles tabs ... make it complete"): the rows they show, their footer text and
+// the character's titles as the server sent them. Pure (no ImGui, no host): RynthServerPack.Tests covers it.
+//
+// Attributes: the six attributes and three vital maximums, in retail's order, with retail's icons and
+// hover text (the Character panel's), base and buffed values and raise costs from the engine's training
+// numbers (GetTrainingInfo, as the skills), and the vitals' current values ("250/300", as retail).
+//
+// Titles: the server sends the whole list once, at login (game event 0x0029 CharacterTitle: u32 1, u32 the
+// displayed title, u32 count, count x u32 title ids) and one title at a time after (0x002B UpdateTitle: u32
+// title, u32 set-as-displayed). The plugin keeps them per character in its settings, so a hot reload (which
+// misses the login's list) still has them. Choosing one sends game action 0x002C through "/rc title ".
+using System;
+using System.Buffers.Binary;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+
+namespace RynthCore.Plugin.RynthDreamWeave;
+
+/// One attribute (Kind 1, Stype 1..6) or vital maximum (Kind 2, Stype 1 health, 3 stamina, 5 mana).
+internal sealed record AttributeLine(int Kind, uint Stype, string Name, uint Icon, int Base, int Buffed,
+ long CostOne, long CostTen, bool Raisable, bool AtTop, uint Ranks, uint XpSpent, int Current = -1)
+{
+ public int BuffDelta => Buffed - Base;
+ public bool IsVital => Kind == 2;
+
+ /// The row's value: an attribute's buffed value, a vital's "current/maximum".
+ public string ValueText => IsVital && Current >= 0
+ ? Current.ToString(CultureInfo.InvariantCulture) + "/" + Buffed.ToString(CultureInfo.InvariantCulture)
+ : Buffed.ToString(CultureInfo.InvariantCulture);
+}
+
+internal static class AttributesPage
+{
+ /// Retail's rows, in its order: (kind, stype, name, icon, hover text).
+ public static readonly (int Kind, uint Stype, string Name, uint Icon, string Tip)[] Rows =
+ {
+ (1, 1, "Strength", 0x060002C8u, "Measures your character's muscular power."),
+ (1, 2, "Endurance", 0x060002C4u, "Measures how healthy your character is."),
+ (1, 4, "Coordination", 0x060002C9u, "Measures your character's reflexes"),
+ (1, 3, "Quickness", 0x060002C6u, "Measures how fast your character is."),
+ (1, 5, "Focus", 0x060002C5u, "Measures your character's mind and senses."),
+ (1, 6, "Self", 0x060002C7u, "Measures your character's willpower."),
+ (2, 1, "Health", 0x06004C3Bu, "(Endurance/2)\nIf you run out of health, you will die!"),
+ (2, 3, "Stamina", 0x06004C3Cu, "(Endurance)\nAffects your actions and movement."),
+ (2, 5, "Mana", 0x06004C3Du, "(Self)\nAffects how much magic you can cast."),
+ };
+
+ public static int RowIndex(int kind, uint stype) => Array.FindIndex(Rows, r => r.Kind == kind && r.Stype == stype);
+
+ public static string Tip(AttributeLine a)
+ {
+ int i = RowIndex(a.Kind, a.Stype);
+ return i >= 0 ? Rows[i].Tip : "";
+ }
+
+ /// The footer's title: "Strength: 250" and the buff part (" (+10)").
+ public static (string Text, string Delta) FooterTitle(AttributeLine? a)
+ {
+ if (a == null) return ("Select an Attribute to Improve", "");
+ int d = a.BuffDelta;
+ return (a.Name + ": " + a.Buffed.ToString(CultureInfo.InvariantCulture), d > 0 ? $" (+{d})" : d < 0 ? $" ({d})" : "");
+ }
+
+ public static ((string Label, string Value) One, (string Label, string Value) Two) FooterLines(SkillsSheet sheet, AttributeLine? a)
+ {
+ string credits = sheet.SkillCredits >= 0 ? SkillsSheet.Number(sheet.SkillCredits) : "";
+ string unassigned = sheet.UnassignedXp >= 0 ? SkillsSheet.Xp(sheet.UnassignedXp) : "";
+ if (a == null) return (("Skill Credits Available:", credits), ("Unassigned Experience:", unassigned));
+ return (("Experience To Raise:", a.CostOne > 0 ? SkillsSheet.Xp(a.CostOne) : "Infinity!"), ("Unassigned Experience:", unassigned));
+ }
+
+ public static bool CanRaiseOne(SkillsSheet sheet, AttributeLine a)
+ => !sheet.Busy && a.Raisable && a.CostOne > 0 && sheet.UnassignedXp >= a.CostOne;
+
+ public static bool CanRaiseTen(SkillsSheet sheet, AttributeLine a)
+ => !sheet.Busy && a.Raisable && a.CostTen > 0 && sheet.UnassignedXp >= a.CostTen;
+
+ /// The way through the current rank (0..1) on the attribute or vital chart: the footer's blue bar.
+ public static float RankProgress(AttributeLine a)
+ {
+ uint[] chart = a.IsVital ? RetailData.VitalXp : RetailData.AttributeXp;
+ if (a.AtTop || a.Ranks + 1 >= chart.Length) return 0f;
+ uint from = chart[a.Ranks], to = chart[a.Ranks + 1];
+ if (to <= from || a.XpSpent <= from) return 0f;
+ if (a.XpSpent >= to) return 1f;
+ return (float)((double)(a.XpSpent - from) / (to - from));
+ }
+}
+
+/// The character's titles: the one displayed and every one earned (ids, CharacterTitleId's numbers).
+internal sealed record TitleList(uint Displayed, IReadOnlyList Earned)
+{
+ public static readonly TitleList Empty = new(0, Array.Empty());
+
+ public bool Known => Earned.Count > 0;
+
+ /// The earned titles' text, sorted as retail's list (by text, then id); unknown ids left out.
+ public List<(uint Id, string Text)> Sorted()
+ => Earned.Select(id => (Id: id, Text: SkillsLayout.Title((int)id)))
+ .Where(t => t.Text.Length > 0)
+ .OrderBy(t => t.Text, StringComparer.Ordinal).ThenBy(t => t.Id)
+ .ToList();
+
+ /// Game event 0x0029 CharacterTitle's body: u32 1, u32 displayed, u32 count, count x u32.
+ public static bool TryParseTable(ReadOnlySpan body, out TitleList list)
+ {
+ list = Empty;
+ if (body.Length < 12) return false;
+ uint displayed = BinaryPrimitives.ReadUInt32LittleEndian(body.Slice(4));
+ uint count = BinaryPrimitives.ReadUInt32LittleEndian(body.Slice(8));
+ if (count > 10000 || body.Length < 12 + 4 * (long)count) return false;
+ var ids = new List((int)count);
+ for (int i = 0; i < count; i++) ids.Add(BinaryPrimitives.ReadUInt32LittleEndian(body.Slice(12 + 4 * i)));
+ list = new TitleList(displayed, ids);
+ return true;
+ }
+
+ /// Game event 0x002B UpdateTitle's body (u32 title, u32 set as displayed) applied to this list.
+ public TitleList WithUpdate(ReadOnlySpan body)
+ {
+ if (body.Length < 8) return this;
+ uint id = BinaryPrimitives.ReadUInt32LittleEndian(body);
+ bool display = BinaryPrimitives.ReadUInt32LittleEndian(body.Slice(4)) != 0;
+ var earned = Earned.Contains(id) || id == 0 ? Earned : Earned.Append(id).ToList();
+ return new TitleList(display ? id : Displayed, earned);
+ }
+
+ /// A copy with another displayed title (CharacterTitleId changed, e.g. after Set as Display Title).
+ public TitleList WithDisplayed(uint id) => id == 0 || id == Displayed ? this : new TitleList(id, Earned);
+
+ /// "433|1,7,433" for the plugin's settings.
+ public string Save() => Displayed.ToString(CultureInfo.InvariantCulture) + "|" + string.Join(",", Earned.Select(i => i.ToString(CultureInfo.InvariantCulture)));
+
+ public static TitleList Load(string? saved)
+ {
+ if (string.IsNullOrEmpty(saved)) return Empty;
+ string[] p = saved.Split('|');
+ if (p.Length != 2 || !uint.TryParse(p[0], NumberStyles.None, CultureInfo.InvariantCulture, out uint shown)) return Empty;
+ var ids = new List();
+ foreach (string s in p[1].Split(',', StringSplitOptions.RemoveEmptyEntries))
+ if (uint.TryParse(s, NumberStyles.None, CultureInfo.InvariantCulture, out uint id)) ids.Add(id);
+ return new TitleList(shown, ids);
+ }
+}
diff --git a/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/CharacterPage.cs b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/CharacterPage.cs
new file mode 100644
index 0000000..cc23d81
--- /dev/null
+++ b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/CharacterPage.cs
@@ -0,0 +1,97 @@
+// CharacterPage.cs - RynthDreamWeave's "Character" page (2026-11-07, Tom: "add this to the actual Dreamweave
+// plugin UI. The settings and the ability to open the new skills panel ... to not have to use chat
+// commands"): a tab of the DreamWeave window on RynthCore's bar (and of the /rserver window) that opens and
+// closes the Character panel (SkillsPanel), on any of its pages, and holds its setting.
+using System;
+using ImGuiNET;
+using RynthCore.Plugin.ServerPack;
+using RynthCore.Plugin.Shared;
+
+namespace RynthCore.Plugin.RynthDreamWeave;
+
+/// The Character page. Render thread; what it changes is saved on the tick.
+internal sealed class CharacterPage
+{
+ private readonly Func _active;
+ private readonly Func _panelState; // 1 open, 0 closed, -1 this RynthCore can't host it
+ private readonly Action _open; // opens the panel on a page (0 Attributes, 1 Skills, 2 Titles)
+ private readonly Action _close;
+ private readonly Func _replacesAc;
+ private readonly Action _setReplacesAc;
+ private readonly Func _onePanel;
+ private readonly Action _setOnePanel;
+
+ public CharacterPage(Func active, Func panelState, Action open, Action close,
+ Func replacesAc, Action setReplacesAc, Func onePanel, Action setOnePanel)
+ {
+ _active = active;
+ _panelState = panelState;
+ _open = open;
+ _close = close;
+ _replacesAc = replacesAc;
+ _setReplacesAc = setReplacesAc;
+ _onePanel = onePanel;
+ _setOnePanel = setOnePanel;
+ }
+
+ public ServerPage Page() => new("character", "Character",
+ "The retail Character window, whose XP for next level keeps reading past level 275 (RynthDreamWeave).", Draw);
+
+ private void Draw()
+ {
+ if (!_active())
+ {
+ SafeImGui.TextWrapped("This page is for DreamWeave. RynthCore doesn't see this world as DreamWeave "
+ + "(check RynthCore Options > Diagnostics, or /rserver info).");
+ return;
+ }
+ SafeImGui.TextWrapped("AC's Character window (Attributes, Skills and Titles), drawn as retail draws it, with "
+ + "\"XP for next level\" read from DreamWeave's own chart past level 275, where AC's "
+ + "own window shows a negative number.");
+ ImGui.Spacing();
+
+ int state = _panelState();
+ if (state < 0)
+ {
+ SafeImGui.TextWrapped("This RynthCore can't show it: it needs plugin windows that draw their own frame "
+ + "(plugin API v90). Update RynthCore.");
+ return;
+ }
+
+ if (state == 1)
+ {
+ if (ImGui.Button("Close the Character panel##dw_char_close")) _close();
+ }
+ else if (ImGui.Button("Open the Character panel##dw_char_open")) _open(1);
+ Tooltip("Also on RynthCore's bar (\"DreamWeave Skills\"), and with /rserver skills.");
+
+ SafeImGui.TextDisabled("Open it on:");
+ ImGui.SameLine();
+ if (ImGui.SmallButton("Attributes##dw_char_attr")) _open(0);
+ ImGui.SameLine();
+ if (ImGui.SmallButton("Skills##dw_char_skills")) _open(1);
+ ImGui.SameLine();
+ if (ImGui.SmallButton("Titles##dw_char_titles")) _open(2);
+
+ ImGui.Spacing();
+ bool replace = _replacesAc();
+ if (ImGui.Checkbox("Open it instead of AC's Character window##dw_char_replace", ref replace)) _setReplacesAc(replace);
+ Tooltip("On: AC's toolbar button and key for the Character window open (and close) this panel instead. "
+ + "AC's Character Information window (the backpack button) stays AC's own.\nOff: AC's own windows "
+ + "open as usual; open this one from here or from RynthCore's bar.");
+
+ bool one = _onePanel();
+ if (ImGui.Checkbox("One panel at a time, as retail##dw_char_onepanel", ref one)) _setOnePanel(one);
+ Tooltip("On: opening it puts away AC's open panel (inventory, spellbook, social, options, map...), and "
+ + "opening one of those puts it away, as retail's panels share one frame.\nOff: it stays open beside them.");
+
+ ImGui.Spacing();
+ SafeImGui.TextDisabled("Move it by its gold frame, resize it from its bottom edge, Ctrl+wheel over it for a "
+ + "bigger or smaller panel. Right-click its tabs for the same setting.");
+ }
+
+ private static void Tooltip(string text)
+ {
+ if (ImGui.IsItemHovered()) SafeImGui.SetTooltip(text);
+ }
+}
diff --git a/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/DreamWeaveBank.cs b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/DreamWeaveBank.cs
new file mode 100644
index 0000000..abe67b3
--- /dev/null
+++ b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/DreamWeaveBank.cs
@@ -0,0 +1,213 @@
+// DreamWeaveBank.cs - DreamWeave's banked luminance, for Lum/hr (2026-11-02). DreamWeave puts the
+// luminance a character earns in its bank on the server: the client never gets the character's
+// luminance (PropertyInt64 6) or a bank property, and no "You've banked N Luminance." line, so
+// RynthSuite's session stats (SessionStats.cs) saw no luminance there. The only reading is the
+// bank command: "/b" (DreamWeave's /bank, Source/ACE.Server/Command/Handlers/PlayerCommands.cs,
+// ShowBankBalances) answers with System lines, all "[BANK] ...":
+// [BANK] Your balances:
+// [BANK] Pyreals (shared by every character on this account): 1,234
+// [BANK] Luminance: 8,904,758
+// [BANK] Legendary Keys: 3
+// [BANK] Promissory Notes: 0
+// [BANK] Offline Bonus Time: ... (when the server has offline bonus)
+// [BANK] Alternate Character Bonus +N% until ... (when the character has it)
+// [BANK] Type /bank for the full list of commands.
+// So this sends "/b" every minute while logged in on DreamWeave (not in the first 20 s after
+// login), reads "[BANK] Luminance: N" and publishes it as the profile value "bankLuminance"
+// (RynthServerProfile.ValueBankLuminance), whose rises the session stats count as luminance
+// earned. A /b the player types is read the same way (and its reply always shows).
+//
+// Deposits move the character's luminance into the bank without earning it. A single deposit says
+// how much ("[BANK] Deposited N luminance. Balance: B"); "/b d" (deposit all) only prints the new
+// balances ("[BANK] Deposited all. Pyreals: ... | Luminance: B | ..."), so what the bank gained since
+// the last reading is taken as moved in. Both are taken out of the published value, so they never
+// count as earned. Luminance can't be withdrawn or transferred on DreamWeave; spending it from the
+// bank (augmentations) is a drop, which readers don't count, and the value never goes below 0.
+//
+// Every reply regex is anchored at the start of the line (after an optional chat timestamp), so a
+// pasted copy in a tell or a chat channel can't set the value.
+// Threads: everything here runs under Gate (pump; the page draws holding it), except
+// NoteTypedCommand, which the chat bar calls on AC's thread (it only touches interlocked fields).
+// Pure: RynthServerPack.Tests covers it.
+using System;
+using System.Text.RegularExpressions;
+using System.Threading;
+using RynthCore.Plugin.ServerPack;
+using RynthCore.Plugin.Shared;
+
+namespace RynthCore.Plugin.RynthDreamWeave;
+
+internal sealed class DreamWeaveBank
+{
+ public const string SettingCheckEveryMinute = "checkBankEveryMinute";
+ /// The profile value the session stats read ("RynthServer.Profile" values).
+ public const string LuminanceKey = RynthServerProfile.ValueBankLuminance;
+ /// The bank command (DreamWeave's /bank with no words: the balances).
+ public const string Command = "/b";
+ /// After login, before the first check (login's own chat and the server's welcome first).
+ public const long FirstCheckDelayMs = 20_000;
+ /// A check this often; a reading of any kind (a /b typed too) starts the minute again.
+ public const long CheckIntervalMs = 60_000;
+
+ private const string Ts = @"^\s*(?:\[[^\]]*\][\s:]*)?";
+ private static readonly Regex LuminanceLine = new(Ts + @"\[BANK\]\s+Luminance:\s*([\d,]+)\s*$");
+ // The rest of the /b reply: its header, "Name: value" balances (no digits or '.' in the name, so a
+ // deposit line isn't one), the alt bonus line and the closing hint.
+ private static readonly Regex ReplyLine = new(Ts + @"\[BANK\]\s+(?:Your balances:|[A-Za-z][A-Za-z '()]*:\s*\S.*"
+ + @"|Alternate Character Bonus\b.*|Type /bank for the full list of commands\.)\s*$");
+ private static readonly Regex DepositLine = new(Ts + @"\[BANK\]\s+Deposited\s+([\d,]+)\s+luminance\.\s*Balance:\s*([\d,]+)", RegexOptions.IgnoreCase);
+ private static readonly Regex DepositAllLine = new(Ts + @"\[BANK\]\s+Deposited all\..*\|\s*Luminance:\s*([\d,]+)\s*\|", RegexOptions.IgnoreCase);
+
+ /// Held for everything below (pump and render thread).
+ public readonly object Gate = new();
+
+ /// Check the bank every minute (Lum/hr). On by default.
+ public bool CheckEveryMinute = true;
+
+ /// The luminance in the bank at the last reading (null before one this login).
+ public long? Luminance { get; private set; }
+ /// Luminance moved in from the character (deposits) since login, taken out of the published value.
+ public long MovedIn { get; private set; }
+ public DateTime ReadUtc { get; private set; } = DateTime.MinValue;
+
+ /// What the profile value says: the bank less what deposits moved in. Null before a reading.
+ public long? Published => Luminance is long l ? l - MovedIn : null;
+
+ private readonly ServerChatRequest _request = new();
+ private long _nextCheckMs = long.MaxValue;
+ private int _selfSends; // our "/b" send not yet seen by the chat bar (0 or 1)
+ private int _typedByPlayer; // the player typed /b (AC's thread sets it)
+
+ public void LoadSettings(ServerPackSettings s) => CheckEveryMinute = s.GetBool(SettingCheckEveryMinute, true);
+
+ public void SaveSettings(ServerPackSettings s)
+ {
+ if (s.SetBool(SettingCheckEveryMinute, CheckEveryMinute)) s.Save();
+ }
+
+ /// A character logged in (or the plugin loaded in game): the bank is read fresh.
+ public void Login(long nowMs)
+ {
+ Clear();
+ _nextCheckMs = nowMs + FirstCheckDelayMs;
+ }
+
+ public void Logout()
+ {
+ Clear();
+ _nextCheckMs = long.MaxValue;
+ }
+
+ private void Clear()
+ {
+ Luminance = null;
+ MovedIn = 0;
+ ReadUtc = DateTime.MinValue;
+ _request.Clear();
+ Interlocked.Exchange(ref _selfSends, 0);
+ Interlocked.Exchange(ref _typedByPlayer, 0);
+ }
+
+ /// The every-minute check: "/b" when one is due now (and the setting is on), else null.
+ public string? CheckDue(long nowMs)
+ {
+ if (!CheckEveryMinute || nowMs < _nextCheckMs) return null;
+ _nextCheckMs = nowMs + CheckIntervalMs;
+ return Request(nowMs);
+ }
+
+ /// A check now (the page's button, or the minute): its reply is ours. Returns the command.
+ public string Request(long nowMs)
+ {
+ _request.Sent(nowMs);
+ // One at a time: if the engine's chat bar never sees our sends, the count still can't grow.
+ Interlocked.Exchange(ref _selfSends, 1);
+ return Command;
+ }
+
+ /// The request didn't go out (not logged in, no chat parser).
+ public void NotSent()
+ {
+ _request.Clear();
+ Interlocked.Exchange(ref _selfSends, 0);
+ }
+
+ /// True for what the player types to see the balances ("/b", "/bank"), not "/b d" and the like.
+ public static bool IsBalanceCommand(string? text)
+ {
+ string t = (text ?? string.Empty).Trim();
+ return t.Equals("/b", StringComparison.OrdinalIgnoreCase) || t.Equals("/bank", StringComparison.OrdinalIgnoreCase);
+ }
+
+ /// AC's thread (chat bar): a "/b" went through it. Ours, or typed by the player?
+ public void NoteTypedCommand()
+ {
+ if (Interlocked.Decrement(ref _selfSends) >= 0) return;
+ Interlocked.Exchange(ref _selfSends, 0);
+ Interlocked.Exchange(ref _typedByPlayer, 1);
+ }
+
+ /// Pump tick: the player asked too, so the reply is theirs and shows.
+ public void Tick()
+ {
+ if (Interlocked.Exchange(ref _typedByPlayer, 0) != 0) _request.Clear();
+ }
+
+ ///
+ /// An incoming chat line on DreamWeave: reads the bank's luminance and deposits. True when the
+ /// line answers RynthDreamWeave's own "/b" (to keep it out of the chat window).
+ ///
+ public bool OnChatLine(string? text, long nowMs)
+ {
+ if (string.IsNullOrEmpty(text)) return false;
+ string line = text.TrimEnd('\r', '\n');
+ Match m;
+ if ((m = LuminanceLine.Match(line)).Success)
+ {
+ if (TryNumber(m.Groups[1].Value, out long lum)) Read(lum, nowMs);
+ return Ours(nowMs);
+ }
+ if ((m = DepositLine.Match(line)).Success)
+ {
+ // "Deposited N luminance. Balance: B": N moved in, and B is a reading.
+ if (TryNumber(m.Groups[1].Value, out long moved) && TryNumber(m.Groups[2].Value, out long balance))
+ {
+ MovedIn += moved;
+ Read(balance, nowMs);
+ }
+ return false;
+ }
+ if ((m = DepositAllLine.Match(line)).Success)
+ {
+ // Deposit all: only the new balance. What the bank gained since the last reading moved in.
+ if (TryNumber(m.Groups[1].Value, out long balance))
+ {
+ if (Luminance is long before && balance > before) MovedIn += balance - before;
+ Read(balance, nowMs);
+ }
+ return false;
+ }
+ return ReplyLine.IsMatch(line) && Ours(nowMs);
+ }
+
+ private void Read(long luminance, long nowMs)
+ {
+ Luminance = luminance;
+ // Spent from the bank below what deposits brought: those deposits are gone too (the value stays 0 or more).
+ if (MovedIn > luminance) MovedIn = luminance;
+ ReadUtc = DateTime.UtcNow;
+ // Read just now: the next check is a minute away.
+ if (_nextCheckMs != long.MaxValue) _nextCheckMs = nowMs + CheckIntervalMs;
+ }
+
+ private bool Ours(long nowMs)
+ {
+ bool ours = _request.Awaiting(nowMs);
+ _request.Extend(nowMs);
+ return ours;
+ }
+
+ private static bool TryNumber(string text, out long value)
+ => long.TryParse(text.Replace(",", string.Empty), System.Globalization.NumberStyles.None,
+ System.Globalization.CultureInfo.InvariantCulture, out value);
+}
diff --git a/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/DreamWeavePages.cs b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/DreamWeavePages.cs
new file mode 100644
index 0000000..80ed128
--- /dev/null
+++ b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/DreamWeavePages.cs
@@ -0,0 +1,85 @@
+// DreamWeavePages.cs - RynthDreamWeave's Bank page (2026-11-02): the every-minute bank check that gives
+// Lum/hr its luminance on DreamWeave (DreamWeaveBank.cs), its setting and a Check now button. A tab of
+// the DreamWeave window on RynthCore's bar (and of the /rserver window).
+using System;
+using System.Globalization;
+using ImGuiNET;
+using RynthCore.Plugin.ServerPack;
+using RynthCore.Plugin.Shared;
+
+namespace RynthCore.Plugin.RynthDreamWeave;
+
+/// The Bank page. Render thread: draws holding the bank's lock, and queues what it sends for the tick.
+internal sealed class DreamWeavePages
+{
+ private readonly DreamWeaveBank _bank;
+ private readonly Func _active;
+ private readonly Action _runOnTick;
+ private readonly Action _checkNow;
+ private readonly Action _saveSettings;
+
+ /// RynthDreamWeave's server is this world.
+ /// Queues work for the plugin tick (ServerPackPlugin.RunOnTick).
+ /// Sends RynthDreamWeave's own /b (pump thread).
+ /// Writes the bank's settings (pump thread).
+ public DreamWeavePages(DreamWeaveBank bank, Func active, Action runOnTick, Action checkNow, Action saveSettings)
+ {
+ _bank = bank;
+ _active = active;
+ _runOnTick = runOnTick;
+ _checkNow = checkNow;
+ _saveSettings = saveSettings;
+ }
+
+ public ServerPage[] Pages() => new[]
+ {
+ new ServerPage("bank", "Bank", "DreamWeave's bank: the luminance Lum/hr counts (RynthDreamWeave).", DrawBank),
+ };
+
+ private void DrawBank()
+ {
+ if (!_active())
+ {
+ SafeImGui.TextWrapped("This page is for DreamWeave. RynthCore doesn't see this world as DreamWeave "
+ + "(check RynthCore Options > Diagnostics, or /rserver info).");
+ return;
+ }
+ lock (_bank.Gate)
+ {
+ SafeImGui.TextDisabled("Banked luminance");
+ ImGui.SameLine(200f);
+ SafeImGui.Text(_bank.Luminance is long lum ? lum.ToString("N0", CultureInfo.InvariantCulture) : "not read yet");
+ if (_bank.ReadUtc != DateTime.MinValue)
+ {
+ ImGui.SameLine();
+ SafeImGui.TextDisabled($"(read at {_bank.ReadUtc.ToLocalTime():HH:mm:ss})");
+ }
+ if (_bank.MovedIn > 0)
+ {
+ SafeImGui.TextDisabled("Deposited this login");
+ ImGui.SameLine(200f);
+ SafeImGui.Text(_bank.MovedIn.ToString("N0", CultureInfo.InvariantCulture));
+ Tooltip("Luminance moved from the character into the bank: not counted as earned.");
+ }
+
+ ImGui.Spacing();
+ bool check = _bank.CheckEveryMinute;
+ if (ImGui.Checkbox("Check the bank every minute (Lum/hr)##dw_bank_check", ref check))
+ {
+ _bank.CheckEveryMinute = check;
+ _runOnTick(_saveSettings);
+ }
+ Tooltip("DreamWeave keeps earned luminance in the bank, where the client can't see it. RynthDreamWeave "
+ + "sends /b once a minute and hides its reply; the Lum/hr in the Mini Remote and RynthTracker "
+ + "counts what the bank gains. A /b you type yourself always shows its reply.");
+
+ if (ImGui.Button("Check now##dw_bank_now")) _runOnTick(_checkNow);
+ Tooltip("Sends /b now.");
+ }
+ }
+
+ private static void Tooltip(string text)
+ {
+ if (ImGui.IsItemHovered()) SafeImGui.SetTooltip(text);
+ }
+}
diff --git a/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/DreamWeaveXp.cs b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/DreamWeaveXp.cs
new file mode 100644
index 0000000..3fce7c1
--- /dev/null
+++ b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/DreamWeaveXp.cs
@@ -0,0 +1,74 @@
+// DreamWeaveXp.cs - DreamWeave's level chart past retail's 275, for the Skills panel's
+// "XP for next level".
+//
+// The retail client reads the next level's total from portal.dat's XpTable, which ends at level 275,
+// so on DreamWeave (levels past 275 for enlightened characters) AC's own Character panel subtracts the
+// player's total from the level-275 total and shows a NEGATIVE number (a level-344 character with
+// 600,303,541,190 XP reads -409,077,230,943). DreamWeave's server extends the chart itself:
+// ACE-DreamWeave Source/ACE.Server/Entity/EnlightenmentXpCurve.cs (public, github.com/Awful-Waffle-Rofl/
+// ACE-DreamWeave, read 2026-11-07) grows each level past 275 by the ratio of the chart's last two steps,
+// as an exact fraction, until the total would pass long.MaxValue / 2. This is that rule, re-implemented
+// (no code copied), so the panel reads what the server will ask for.
+//
+// Pure: RynthServerPack.Tests checks it against the server's numbers.
+using System;
+using System.Collections.Generic;
+
+namespace RynthCore.Plugin.RynthDreamWeave;
+
+internal static class DreamWeaveXp
+{
+ /// The server's ceiling for a chart total: half of long.MaxValue.
+ public const ulong TotalCap = (ulong)(long.MaxValue / 2);
+
+ private static readonly Lazy Chart = new(() => Extend(RetailData.LevelTotals, TotalCap), true);
+
+ /// Total XP to reach each level (index = level), retail's 0..275 then DreamWeave's tail.
+ public static IReadOnlyList Totals => Chart.Value;
+
+ /// The highest level the chart reaches.
+ public static int MaxLevel => Chart.Value.Length - 1;
+
+ ///
+ /// followed by levels whose step grows by last step / step before it (an exact
+ /// fraction; a flat or shrinking tail repeats its last step), never below the step before, until the next
+ /// total would pass .
+ ///
+ internal static ulong[] Extend(IReadOnlyList retail, ulong cap)
+ {
+ var chart = new List(retail);
+ if (chart.Count < 3) return chart.ToArray();
+ int last = chart.Count - 1;
+ ulong step = chart[last] - chart[last - 1];
+ ulong before = chart[last - 1] - chart[last - 2];
+ ulong num = step, den = before;
+ if (den == 0 || num <= den) num = den = 1;
+ if (step == 0) return chart.ToArray();
+ ulong total = chart[last];
+ while (true)
+ {
+ ulong next = (ulong)((UInt128)step * num / den);
+ if (next < step) next = step;
+ if (next > cap - total) break;
+ total += next;
+ step = next;
+ chart.Add(total);
+ }
+ return chart.ToArray();
+ }
+
+ ///
+ /// The XP still needed for the next level, as the panel's "XP for next level" line: null at the
+ /// chart's top (retail's panel says "Infinity!" there) or when the level is unknown. A total already
+ /// past the next level's (the server levels the character on its next award) reads 0.
+ ///
+ public static long? ToNextLevel(int level, long totalXp) => ToNextLevel(Totals, level, totalXp);
+
+ internal static long? ToNextLevel(IReadOnlyList chart, int level, long totalXp)
+ {
+ if (level < 1 || totalXp < 0 || level + 1 >= chart.Count) return null;
+ ulong next = chart[level + 1];
+ ulong have = (ulong)totalXp;
+ return have >= next ? 0 : (long)(next - have);
+ }
+}
diff --git a/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/OnePanelRule.cs b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/OnePanelRule.cs
new file mode 100644
index 0000000..38e4d49
--- /dev/null
+++ b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/OnePanelRule.cs
@@ -0,0 +1,50 @@
+// OnePanelRule.cs - one main panel at a time, as retail (2026-11-08, Tom: "in retail you can only have one
+// panel open at a time (skills, inventory, etc.)"). Retail's main panels share one frame, so opening one puts
+// the other away. The Character panel (SkillsPanel) is drawn by RynthDreamWeave, not AC, so this keeps the
+// rule between it and AC's own main panels: it opening closes the AC panel that is open, and an AC panel
+// opening closes it.
+//
+// Edges only: AC's open state is read at most 5 times a second, so a panel this rule just asked AC to close
+// still reads open for a moment; that's not an AC panel opening, and an AC panel that stays open while the
+// Character panel opens is the Character panel's open (it wins). Pure: the plugin feeds it what it sees each
+// frame and does what it says (DreamWeaveSkills.ServerRender).
+namespace RynthCore.Plugin.RynthDreamWeave;
+
+internal sealed class OnePanelRule
+{
+ private bool _seen;
+ private bool _oursWas;
+ private uint _acWas;
+
+ /// What to do this frame.
+ public readonly record struct Step(uint CloseAc, bool CloseOurs);
+
+ ///
+ /// : the Character panel is open; : bit i set = AC's
+ /// main panel i is open (DreamWeaveSkills.MainAcPanels). The first call only learns where things are.
+ ///
+ public Step Next(bool oursOpen, uint acOpen)
+ {
+ if (!_seen)
+ {
+ _seen = true;
+ _oursWas = oursOpen;
+ _acWas = acOpen;
+ return default;
+ }
+ uint opened = acOpen & ~_acWas;
+ bool oursOpened = oursOpen && !_oursWas;
+ _oursWas = oursOpen;
+ _acWas = acOpen;
+ // The Character panel just opened: it puts away the AC panels that are open.
+ if (oursOpened) return new Step(acOpen, false);
+ // An AC panel opened while it's open: it goes.
+ // (_oursWas stays true: it still reads open on the next frame, and that isn't it opening again - which
+ // would close the panel that just opened.)
+ if (oursOpen && opened != 0) return new Step(0, true);
+ return default;
+ }
+
+ /// Forget what was seen (the rule turned off, or the world changed).
+ public void Reset() => _seen = false;
+}
diff --git a/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/RetailData.cs b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/RetailData.cs
new file mode 100644
index 0000000..1ba27c5
--- /dev/null
+++ b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/RetailData.cs
@@ -0,0 +1,111 @@
+// RetailData.cs - The shapes of the retail data RetailData.g.cs carries (generated from portal.dat by
+// Tools/RetailDataGen/gen_retail_data.py): a skill table row and a dat font's glyph table.
+// Pure (no ImGui, no host): RynthServerPack.Tests covers the lookups.
+using System.Collections.Generic;
+
+namespace RynthCore.Plugin.RynthDreamWeave;
+
+///
+/// A SkillTable row: the skill's id, name, 0x06 icon, whether it is usable untrained (MinLevel 1), and the
+/// hover tooltip: its formula line ("( Focus + Self ) / 4", empty for a skill with no attribute part) and
+/// its description.
+///
+internal sealed record RetailSkill(uint Id, string Name, uint Icon, bool UsableUntrained, string Formula, string Description);
+
+/// One glyph of a dat font: where it sits on the sheet and how it advances.
+internal readonly record struct RetailGlyph(int SheetX, int SheetY, int Width, int Height, int Before, int After, int Top)
+{
+ /// The pen's advance (retail: before + width + after).
+ public int Advance => Before + Width + After;
+}
+
+///
+/// A retail dat font (a Font file, 0x40xxxxxx): its glyph sheets (0x06 A8 textures the engine hands over
+/// as GetIconTexture kind FontSheet), line height and the glyph table for ASCII and Latin-1.
+/// The outline sheet is set only for the faces the panel draws outlined (the level number).
+///
+internal sealed class RetailFont
+{
+ private readonly Dictionary _glyphs = new();
+
+ public RetailFont(uint id, int lineHeight, int baseline, int borderX, int borderY,
+ uint sheet, int sheetWidth, int sheetHeight, uint outlineSheet, int outlineWidth, int outlineHeight, short[] glyphs)
+ {
+ Id = id;
+ LineHeight = lineHeight;
+ Baseline = baseline;
+ BorderX = borderX;
+ BorderY = borderY;
+ Sheet = sheet;
+ SheetWidth = sheetWidth;
+ SheetHeight = sheetHeight;
+ OutlineSheet = outlineSheet;
+ OutlineWidth = outlineWidth;
+ OutlineHeight = outlineHeight;
+ for (int i = 0; i + 7 < glyphs.Length; i += 8)
+ _glyphs[(char)glyphs[i]] = new RetailGlyph(glyphs[i + 1], glyphs[i + 2], glyphs[i + 3], glyphs[i + 4],
+ glyphs[i + 5], glyphs[i + 6], glyphs[i + 7]);
+ }
+
+ public uint Id { get; }
+ public int LineHeight { get; }
+ public int Baseline { get; }
+ public int BorderX { get; }
+ public int BorderY { get; }
+ public uint Sheet { get; }
+ public int SheetWidth { get; }
+ public int SheetHeight { get; }
+ public uint OutlineSheet { get; }
+ public int OutlineWidth { get; }
+ public int OutlineHeight { get; }
+
+ public bool TryGlyph(char c, out RetailGlyph glyph) => _glyphs.TryGetValue(c, out glyph);
+
+ /// Breaks at spaces into lines no wider than design px
+ /// (a word wider than that gets a line of its own).
+ public List Wrap(string? text, int width)
+ {
+ var lines = new List();
+ foreach (string para in (text ?? "").Replace("\r", "").Split('\n'))
+ {
+ string line = "";
+ foreach (string word in para.Split(' ', System.StringSplitOptions.RemoveEmptyEntries))
+ {
+ string next = line.Length == 0 ? word : line + " " + word;
+ if (line.Length > 0 && Measure(next) > width) { lines.Add(line); line = word; }
+ else line = next;
+ }
+ if (line.Length > 0) lines.Add(line);
+ }
+ return lines;
+ }
+
+ /// The width of in design pixels (characters the font lacks are skipped, as retail).
+ public int Measure(string? text)
+ {
+ if (string.IsNullOrEmpty(text)) return 0;
+ int w = 0;
+ foreach (char c in text)
+ if (_glyphs.TryGetValue(c, out RetailGlyph g)) w += g.Advance;
+ return w;
+ }
+}
+
+internal static partial class RetailData
+{
+ private static Dictionary? _byId;
+
+ /// The skill table row for an id, or null.
+ public static RetailSkill? Skill(uint id)
+ {
+ _byId ??= BuildIndex();
+ return _byId.TryGetValue(id, out RetailSkill? s) ? s : null;
+ }
+
+ private static Dictionary BuildIndex()
+ {
+ var map = new Dictionary(Skills.Length);
+ foreach (RetailSkill s in Skills) map[s.Id] = s;
+ return map;
+ }
+}
diff --git a/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/RetailData.g.cs b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/RetailData.g.cs
new file mode 100644
index 0000000..78cab9d
--- /dev/null
+++ b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/RetailData.g.cs
@@ -0,0 +1,1364 @@
+// by Tools/RetailDataGen/gen_retail_data.py from a retail client_portal.dat.
+// The numbers the retail client reads to draw its Character panel: do not edit by hand.
+namespace RynthCore.Plugin.RynthDreamWeave;
+
+internal static partial class RetailData
+{
+ /// XpTable 0x0E000018: total experience to reach each level, 0..275.
+ public static readonly ulong[] LevelTotals =
+ {
+ 0UL, 0UL, 1000UL, 2777UL, 5697UL, 10248UL,
+ 17031UL, 26784UL, 40391UL, 58895UL, 83511UL, 115645UL,
+ 156898UL, 209088UL, 274259UL, 354692UL, 452925UL, 571762UL,
+ 714286UL, 883872UL, 1084206UL, 1319289UL, 1593459UL, 1911400UL,
+ 2278153UL, 2699136UL, 3180153UL, 3727407UL, 4347513UL, 5047517UL,
+ 5834900UL, 6717600UL, 7704021UL, 8803044UL, 10024047UL, 11376914UL,
+ 12872048UL, 14520384UL, 16333408UL, 18323161UL, 20502261UL, 22883912UL,
+ 25481915UL, 28310688UL, 31385275UL, 34721359UL, 38335275UL, 42244029UL,
+ 46465302UL, 51017472UL, 55919623UL, 61191556UL, 66853809UL, 72927666UL,
+ 79435170UL, 86399136UL, 93843170UL, 101791673UL, 110269863UL, 119303784UL,
+ 128920317UL, 139147200UL, 150013037UL, 161547311UL, 173780397UL, 186743581UL,
+ 200469064UL, 214989984UL, 230340425UL, 246555428UL, 263671011UL, 281724178UL,
+ 300752932UL, 320796288UL, 341894292UL, 364088025UL, 387419625UL, 411932296UL,
+ 437670319UL, 464679072UL, 493005039UL, 522695823UL, 553800159UL, 586367933UL,
+ 620450186UL, 656099136UL, 693368187UL, 732311940UL, 772986213UL, 815448050UL,
+ 859755734UL, 905968800UL, 954148054UL, 1004355577UL, 1056654747UL, 1111110248UL,
+ 1167788081UL, 1226755584UL, 1288081441UL, 1351835695UL, 1418089761UL, 1486916445UL,
+ 1558389948UL, 1632585888UL, 1709581309UL, 1789454692UL, 1872285975UL, 1958156562UL,
+ 2047149336UL, 2139348672UL, 2234840456UL, 2333712089UL, 2436052509UL, 2541952200UL,
+ 2651503203UL, 2764799136UL, 2881935203UL, 3003008207UL, 3128116563UL, 3257360317UL,
+ 3390841150UL, 3528662400UL, 3670929071UL, 3817747844UL, 3969227097UL, 4125476914UL,
+ 4286609098UL, 4452737184UL, 4623976457UL, 4800443961UL, 4982258511UL, 5169540711UL,
+ 5362412965UL, 5560999488UL, 5765426325UL, 5975821358UL, 6192314325UL, 6415036828UL,
+ 6644122352UL, 6879706272UL, 7121925872UL, 7370920356UL, 7626830859UL, 7889800466UL,
+ 8159974219UL, 8437499136UL, 8722524219UL, 9015200473UL, 9315680913UL, 9624120583UL,
+ 9940676567UL, 10265508000UL, 10598776087UL, 10940644110UL, 11291277447UL, 11650843580UL,
+ 12019512114UL, 12397454784UL, 12784845474UL, 13181860228UL, 13588677261UL, 14005476978UL,
+ 14432441981UL, 14869757088UL, 15317609341UL, 15776188025UL, 16245684675UL, 16726293095UL,
+ 17218209369UL, 17721631872UL, 18236761289UL, 18763800622UL, 19302955209UL, 19854432732UL,
+ 20418443236UL, 20995199136UL, 21584915236UL, 22187808740UL, 22804099263UL, 23434008850UL,
+ 24077761983UL, 24735585600UL, 25407709103UL, 26094364377UL, 26795785797UL, 27512210247UL,
+ 28243877131UL, 28991028384UL, 29753908491UL, 30532764494UL, 31327846011UL, 32139405244UL,
+ 32967696998UL, 33812978688UL, 34675510358UL, 35555554692UL, 36453377025UL, 37369245362UL,
+ 38303430385UL, 39256205472UL, 40227846705UL, 41218632889UL, 42228845559UL, 43258768999UL,
+ 44308690253UL, 45378899136UL, 46469688253UL, 47581353006UL, 48714191613UL, 49868505116UL,
+ 51044597400UL, 52242775200UL, 53463348120UL, 54706628644UL, 55972932147UL, 57262576914UL,
+ 58575884147UL, 59913177984UL, 61274785507UL, 62661036761UL, 64072264761UL, 65508805511UL,
+ 66970998015UL, 68459184288UL, 69973709375UL, 71514921358UL, 73083171375UL, 74678813628UL,
+ 76302205402UL, 77953707072UL, 79633682122UL, 81342497156UL, 83080521909UL, 84848129266UL,
+ 86645695269UL, 88473599136UL, 90332223269UL, 92221953273UL, 94143177963UL, 96096289383UL,
+ 98081682817UL, 100099756800UL, 102150913137UL, 104235556910UL, 106354096497UL, 108506943580UL,
+ 110694513164UL, 112917223584UL, 115175496524UL, 117469757028UL, 119800433511UL, 122167957778UL,
+ 124572765031UL, 127015293888UL, 129495986391UL, 132015288025UL, 134573647725UL, 137171517895UL,
+ 139809354419UL, 142487616672UL, 145206767539UL, 147967273422UL, 150769604259UL, 153614233532UL,
+ 156501638286UL, 159432299136UL, 162406700286UL, 165425329540UL, 168488678313UL, 171597241650UL,
+ 174751518233UL, 177952010400UL, 181199224153UL, 184493669177UL, 187835858847UL, 191226310247UL,
+ };
+
+ /// XpTable 0x0E000018: skill credits granted on reaching each level, 0..275.
+ public static readonly byte[] LevelCredits =
+ {
+ 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1,
+ 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1,
+ };
+
+ /// XpTable 0x0E000018: total XP to reach each rank of a trained skill, 0..208.
+ public static readonly uint[] TrainedSkillXp =
+ {
+ 0U, 58U, 138U, 243U, 372U, 526U, 704U, 908U,
+ 1138U, 1395U, 1678U, 1988U, 2326U, 2693U, 3089U, 3515U,
+ 3971U, 4459U, 4980U, 5534U, 6122U, 6747U, 7408U, 8107U,
+ 8846U, 9625U, 10448U, 11316U, 12230U, 13192U, 14206U, 15273U,
+ 16396U, 17578U, 18821U, 20130U, 21508U, 22958U, 24485U, 26092U,
+ 27786U, 29572U, 31454U, 33438U, 35533U, 37743U, 40078U, 42545U,
+ 45152U, 47911U, 50830U, 53921U, 57196U, 60668U, 64350U, 68259U,
+ 72409U, 76818U, 81506U, 86493U, 91800U, 97451U, 103472U, 109890U,
+ 116736U, 124040U, 131838U, 140167U, 149067U, 158582U, 168758U, 179646U,
+ 191301U, 203781U, 217149U, 231474U, 246830U, 263297U, 280959U, 299911U,
+ 320252U, 342089U, 365539U, 390727U, 417789U, 446871U, 478129U, 511735U,
+ 547871U, 586735U, 628540U, 673517U, 721913U, 773996U, 830054U, 890401U,
+ 955370U, 1025326U, 1100659U, 1181791U, 1269177U, 1363308U, 1464714U, 1573965U,
+ 1691679U, 1818520U, 1955205U, 2102508U, 2261264U, 2432373U, 2616806U, 2815610U,
+ 3029917U, 3260945U, 3510009U, 3778529U, 4068034U, 4380177U, 4716738U, 5079638U,
+ 5470950U, 5892911U, 6347931U, 6838614U, 7367765U, 7938414U, 8553825U, 9217523U,
+ 9933309U, 10705283U, 11537868U, 12435837U, 13404336U, 14448918U, 15575574U, 16790764U,
+ 18101461U, 19515183U, 21040043U, 22684790U, 24458865U, 26372451U, 28436532U, 30662960U,
+ 33064516U, 35654992U, 38449264U, 41463378U, 44714647U, 48221744U, 52004816U, 56085593U,
+ 60487519U, 65235884U, 70357967U, 75883199U, 81843326U, 88272594U, 95207949U, 102689242U,
+ 110759467U, 119465000U, 128855871U, 138986049U, 149913755U, 161701793U, 174417913U, 188135201U,
+ 202932500U, 218894860U, 236114028U, 254688979U, 274726480U, 296341707U, 319658907U, 344812110U,
+ 371945902U, 401216255U, 432791424U, 466852915U, 503596527U, 543233477U, 585991620U, 632116749U,
+ 681874018U, 735549461U, 793451636U, 855913403U, 923293832U, 995980273U, 1074390578U, 1158975507U,
+ 1250221316U, 1348652558U, 1454835090U, 1569379334U, 1692943784U, 1826238790U, 1970030642U, 2125145977U,
+ 2292476532U, 2472984268U, 2667706901U, 2877763869U, 3104362767U, 3348806291U, 3612499722U, 3896959013U,
+ 4203819496U,
+ };
+
+ /// XpTable 0x0E000018: total XP to reach each rank of a specialized skill, 0..226.
+ public static readonly uint[] SpecializedSkillXp =
+ {
+ 0U, 23U, 56U, 97U, 149U, 211U, 282U, 364U,
+ 456U, 558U, 671U, 795U, 931U, 1077U, 1236U, 1406U,
+ 1589U, 1784U, 1992U, 2214U, 2449U, 2699U, 2963U, 3243U,
+ 3539U, 3850U, 4180U, 4527U, 4892U, 5277U, 5683U, 6109U,
+ 6559U, 7031U, 7529U, 8052U, 8603U, 9183U, 9794U, 10437U,
+ 11115U, 11829U, 12582U, 13376U, 14213U, 15098U, 16031U, 17018U,
+ 18061U, 19165U, 20332U, 21569U, 22879U, 24267U, 25740U, 27304U,
+ 28964U, 30728U, 32603U, 34597U, 36720U, 38981U, 41389U, 43956U,
+ 46695U, 49616U, 52736U, 56067U, 59627U, 63433U, 67504U, 71859U,
+ 76521U, 81513U, 86860U, 92590U, 98732U, 105319U, 112384U, 119965U,
+ 128101U, 136836U, 146216U, 156291U, 167116U, 178749U, 191252U, 204694U,
+ 219149U, 234694U, 251416U, 269407U, 288765U, 309599U, 332022U, 356161U,
+ 382148U, 410131U, 440264U, 472717U, 507671U, 545324U, 585886U, 629586U,
+ 676672U, 726408U, 777982U, 831204U, 886706U, 944149U, 1004623U, 1068144U,
+ 1134867U, 1204278U, 1276904U, 1353312U, 1434114U, 1518971U, 1607595U, 1700755U,
+ 1799280U, 1903065U, 2011073U, 2124346U, 2244006U, 2368266U, 2497430U, 2631909U,
+ 2771224U, 2917013U, 3067048U, 3222235U, 3383635U, 3551467U, 3725130U, 3904206U,
+ 4089485U, 4280974U, 4478917U, 4684816U, 4898446U, 5119881U, 5349513U, 5587084U,
+ 5832707U, 6086897U, 6350606U, 6623252U, 6905759U, 7199598U, 7510827U, 7835138U,
+ 8185908U, 8566254U, 8983087U, 9452180U, 9978231U, 10590938U, 11292080U, 12080597U,
+ 12978687U, 13957900U, 14971249U, 16103320U, 17322402U, 18634617U, 20062065U, 21585981U,
+ 23214900U, 24936844U, 26808511U, 28810492U, 30975492U, 33221583U, 35528463U, 38089744U,
+ 40943261U, 43951402U, 47181470U, 50806066U, 54703511U, 59258291U, 64461548U, 70511600U,
+ 77114508U, 84284685U, 92045555U, 100330262U, 109182433U, 118957009U, 129861131U, 141695103U,
+ 154193427U, 167565923U, 183038936U, 200856634U, 221282414U, 244600416U, 271117157U, 301163291U,
+ 336095513U, 374298608U, 418187661U, 466210448U, 520850007U, 581627417U, 648104789U, 721888505U,
+ 802632699U, 890043017U, 984880677U, 1085966844U, 1196187351U, 1315497790U, 1443929007U, 1582593030U,
+ 1730689458U, 1891512364U, 2064457725U, 2249031458U, 2449858070U, 2667631083U, 2902448781U, 3160874561U,
+ 3440192563U, 3750444304U, 4100490438U,
+ };
+
+ /// XpTable 0x0E000018: total XP to reach each rank of an attribute, 0..190.
+ public static readonly uint[] AttributeXp =
+ {
+ 0U, 110U, 277U, 501U, 784U, 1125U, 1527U, 1988U,
+ 2511U, 3097U, 3746U, 4459U, 5238U, 6084U, 6998U, 7982U,
+ 9038U, 10167U, 11372U, 12654U, 14015U, 15459U, 16988U, 18604U,
+ 20311U, 22113U, 24012U, 26014U, 28122U, 30341U, 32676U, 35132U,
+ 37716U, 40434U, 43293U, 46301U, 49465U, 52795U, 56300U, 59991U,
+ 63878U, 67975U, 72295U, 76851U, 81659U, 86737U, 92102U, 97775U,
+ 103775U, 110128U, 116858U, 123991U, 131559U, 139591U, 148124U, 157194U,
+ 166843U, 177113U, 188053U, 199715U, 212153U, 225429U, 239609U, 254762U,
+ 270967U, 288306U, 306870U, 326756U, 348070U, 370928U, 395453U, 421779U,
+ 450054U, 480434U, 513091U, 548210U, 585992U, 626654U, 670432U, 717582U,
+ 768378U, 823122U, 882136U, 945773U, 1014414U, 1088469U, 1168386U, 1254649U,
+ 1347781U, 1448351U, 1556972U, 1674311U, 1801089U, 1938088U, 2086155U, 2246205U,
+ 2419233U, 2606314U, 2808613U, 3027394U, 3264023U, 3519983U, 3796877U, 4096444U,
+ 4420567U, 4771285U, 5150808U, 5561528U, 6006039U, 6487148U, 7007896U, 7571580U,
+ 8181768U, 8842327U, 9557443U, 10331656U, 11169877U, 12077431U, 13060084U, 14124082U,
+ 15276190U, 16523738U, 17874666U, 19337572U, 20921773U, 22637359U, 24495261U, 26507320U,
+ 28686361U, 31046278U, 33602120U, 36370190U, 39368147U, 42615120U, 46131828U, 49940719U,
+ 54066105U, 58534323U, 63373901U, 68615745U, 74293328U, 80442912U, 87103777U, 94318471U,
+ 102133083U, 110597540U, 119765922U, 129696811U, 140453665U, 152105222U, 164725942U, 178396483U,
+ 193204214U, 209243776U, 226617688U, 245437001U, 265822007U, 287903011U, 311821164U, 337729361U,
+ 365793227U, 396192167U, 429120520U, 464788799U, 503425038U, 545276249U, 590610001U, 639716134U,
+ 692908610U, 750527522U, 812941268U, 880548904U, 953782704U, 1033110914U, 1119040753U, 1212121655U,
+ 1312948783U, 1422166831U, 1540474151U, 1668627219U, 1807445467U, 1957816530U, 2120701915U, 2297143157U,
+ 2488268472U, 2695299977U, 2919561502U, 3162487055U, 3425629996U, 3710672964U, 4019438644U,
+ };
+
+ /// XpTable 0x0E000018: total XP to reach each rank of a vital's maximum, 0..196.
+ public static readonly uint[] VitalXp =
+ {
+ 0U, 73U, 183U, 331U, 517U, 743U, 1008U, 1312U,
+ 1658U, 2044U, 2472U, 2943U, 3457U, 4015U, 4619U, 5268U,
+ 5965U, 6711U, 7505U, 8352U, 9250U, 10203U, 11212U, 12279U,
+ 13406U, 14595U, 15848U, 17169U, 18561U, 20025U, 21566U, 23187U,
+ 24893U, 26687U, 28574U, 30559U, 32647U, 34845U, 37158U, 39594U,
+ 42160U, 44864U, 47715U, 50722U, 53895U, 57247U, 60788U, 64531U,
+ 68492U, 72685U, 77126U, 81834U, 86829U, 92130U, 97762U, 103748U,
+ 110116U, 116895U, 124115U, 131812U, 140021U, 148784U, 158142U, 168143U,
+ 178838U, 190282U, 202534U, 215659U, 229726U, 244812U, 260999U, 278375U,
+ 297036U, 317087U, 338640U, 361819U, 386755U, 413592U, 442486U, 473604U,
+ 507130U, 543260U, 582210U, 624211U, 669513U, 718390U, 771135U, 828069U,
+ 889536U, 955912U, 1027602U, 1105046U, 1188719U, 1279139U, 1376862U, 1482495U,
+ 1596694U, 1720167U, 1853685U, 1998080U, 2154256U, 2323189U, 2505939U, 2703654U,
+ 2917575U, 3149049U, 3399533U, 3670609U, 3963986U, 4281518U, 4625212U, 4997243U,
+ 5399967U, 5835936U, 6307913U, 6818893U, 7372119U, 7971105U, 8619656U, 9321894U,
+ 10082286U, 10905668U, 11797280U, 12762798U, 13808370U, 14940657U, 16166873U, 17494831U,
+ 18932998U, 20490543U, 22177399U, 24004326U, 25982977U, 28125979U, 30447007U, 32960875U,
+ 35683629U, 38632653U, 41826775U, 45286392U, 49033597U, 53092322U, 57488493U, 62250191U,
+ 67407835U, 72994377U, 79045509U, 85599896U, 92699419U, 100389447U, 108719122U, 117741679U,
+ 127514781U, 138100892U, 149567674U, 161988421U, 175442525U, 190015988U, 205801968U, 222901379U,
+ 241423530U, 261486830U, 283219543U, 306760608U, 332260525U, 359882324U, 389802601U, 422212649U,
+ 457319683U, 495348165U, 536541237U, 581162277U, 629496585U, 681853203U, 738566897U, 800000293U,
+ 866546197U, 938630108U, 1016712940U, 1101293965U, 1192914009U, 1292158910U, 1399663264U, 1516114484U,
+ 1642257192U, 1778897985U, 1926910591U, 2087241457U, 2260915797U, 2449044157U, 2652829505U, 2873574933U,
+ 3112691986U, 3371709687U, 3652284316U, 3956210003U, 4285430197U,
+ };
+
+ /// SkillTable 0x0E000004: id, name, icon, usable untrained (MinLevel 1), and the hover
+ /// tooltip's formula line and description.
+ public static readonly RetailSkill[] Skills =
+ {
+ new(6, "Melee Defense", 0x06000165u, true, "( Quickness + Coordination ) / 3", "Helps you evade melee (hand-to-hand) attacks."),
+ new(7, "Missile Defense", 0x06000164u, true, "( Quickness + Coordination ) / 5", "Helps you avoid damage in missile (long-range) combat."),
+ new(14, "Arcane Lore", 0x0600016Eu, true, "( Focus ) / 3", "Allows you to activate the magical power of certain weapons and armor."),
+ new(15, "Magic Defense", 0x06000163u, true, "( Self + Focus ) / 7", "Helps you resist magic from spells and magic items."),
+ new(16, "Mana Conversion", 0x06000170u, false, "( Focus + Self ) / 6", "Reduces the Mana consumed by spells and magic items."),
+ new(18, "Item Tinkering", 0x0600209Bu, true, "( Focus + Coordination ) / 2", "Lets you improve many items (including trinkets, armor and weapons) in certain basic ways."),
+ new(19, "Assess Person", 0x0600209Fu, true, "", "Allows you to discern the attributes of humans. Reduces extra damage when Deception triggers Sneak Attack damage."),
+ new(20, "Deception", 0x0600016Au, true, "", "Helps prevent others from determining your attributes. Gives a chance to trigger Sneak Attack damage from the front."),
+ new(21, "Healing", 0x06000133u, false, "( Focus + Coordination ) / 3", "Helps you heal injuries on yourself and others."),
+ new(22, "Jump", 0x0600016Bu, true, "( Strength + Coordination ) / 2", "Helps you jump higher and fall farther without taking damage."),
+ new(23, "Lockpick", 0x0600016Du, false, "( Coordination + Focus ) / 3", "Lets you analyze locks and pick them open."),
+ new(24, "Run", 0x06000173u, true, "( Quickness )", "Helps you run faster and jump farther."),
+ new(27, "Assess Creature", 0x0600209Eu, true, "", "Allows you to discern the attributes of creatures."),
+ new(28, "Weapon Tinkering", 0x0600209Du, true, "( Focus + Strength ) / 2", "Lets you improve the properties of weapons."),
+ new(29, "Armor Tinkering", 0x0600209Au, true, "( Focus + Endurance ) / 2", "Lets you improve the properties of armor."),
+ new(30, "Magic Item Tinkering", 0x0600209Cu, true, "( Focus )", "Lets you add magical properties to weapons and armor."),
+ new(31, "Creature Enchantment", 0x06001363u, false, "( Focus + Self ) / 4", "Allows you to cast spells that affect a creature's abilities."),
+ new(32, "Item Enchantment", 0x0600135Bu, false, "( Focus + Self ) / 4", "Allows you to cast spells that affect an item's properties."),
+ new(33, "Life Magic", 0x06001364u, false, "( Focus + Self ) / 4", "Allows you to transfer vital energy and cast magical protections and vulnerabilities."),
+ new(34, "War Magic", 0x06001365u, false, "( Focus + Self ) / 4", "Lets you cast spells that damage creatures."),
+ new(35, "Leadership", 0x06001366u, true, "", "Affects the experience gained from your vassals."),
+ new(36, "Loyalty", 0x06001367u, true, "", "Affects experience given to your patron in an allegiance."),
+ new(37, "Fletching", 0x06001A55u, false, "( Coordination + Focus ) / 3", "Lets you make and modify arrows and quarrels."),
+ new(38, "Alchemy", 0x060019E4u, false, "( Coordination + Focus ) / 3", "Lets you prepare gem components, potions and oils."),
+ new(39, "Cooking", 0x06001A54u, false, "( Coordination + Focus ) / 3", "Lets you make and modify foodstuffs."),
+ new(40, "Salvaging", 0x060035AEu, true, "", "Lets you salvage materials from loot items."),
+ new(41, "Two Handed Combat", 0x06006A00u, true, "( Strength + Coordination ) / 3", "Helps you wield all two handed weapons."),
+ new(43, "Void Magic", 0x06006E8Cu, false, "( Focus + Self ) / 4", "Lets you cast nether spells that damage and curse creatures."),
+ new(44, "Heavy Weapons", 0x06007126u, true, "( Strength + Coordination ) / 3", "Helps you wield heavy one handed melee weapons."),
+ new(45, "Light Weapons", 0x06007127u, true, "( Strength + Coordination ) / 3", "Helps you wield light one handed melee weapons. Also helps you punch and kick."),
+ new(46, "Finesse Weapons", 0x06007125u, true, "( Quickness + Coordination ) / 3", "Helps you wield finesse style melee weapons."),
+ new(47, "Missile Weapons", 0x0600015Fu, true, "( Coordination ) / 2", "Helps you fire missile weapons such as bows, crossbows and thrown weapons."),
+ new(48, "Shield", 0x06007128u, true, "( Strength + Coordination ) / 2", "Helps you wield shields."),
+ new(49, "Dual Wield", 0x06007124u, true, "( Coordination + Coordination ) / 3", "You can fight with one handed melee weapons in your off hand."),
+ new(50, "Recklessness", 0x0600015Du, false, "( Strength + Quickness ) / 3", "Set your power bar near the center to both deal and receive more damage from non-critical hits."),
+ new(51, "Sneak Attack", 0x06007129u, false, "( Coordination + Quickness ) / 3", "Lets your melee, missile and magic attacks do more damage from behind."),
+ new(52, "Dirty Fighting", 0x06007123u, false, "( Strength + Coordination ) / 3", "Melee and missile attacks weaken opponents. High reduces attacks and weakens heals, low reduces defenses, and medium causes bleeds."),
+ new(54, "Summoning", 0x0600740Cu, false, "( Endurance + Self ) / 3", "Allows you to summon creatures to attack your foes."),
+ };
+
+ /// String table 0x2300000E: CharacterTitleId -> the title (the header's second line).
+ public static readonly System.Collections.Generic.Dictionary Titles = new()
+ {
+ [1] = "Adventurer",
+ [2] = "Archer",
+ [3] = "Blademaster",
+ [4] = "Enchanter",
+ [5] = "Life Mage",
+ [6] = "Sorcerer",
+ [7] = "Vagabond",
+ [8] = "Warrior",
+ [9] = "Bow Hunter",
+ [10] = "Life Caster",
+ [11] = "Soldier",
+ [12] = "Swashbuckler",
+ [13] = "War Mage",
+ [14] = "Wayfarer",
+ [15] = "Abhorrent Warrior",
+ [16] = "Alchemist",
+ [17] = "Annihilator",
+ [18] = "Apothecary",
+ [19] = "Arctic Adventurer",
+ [20] = "Arctic Mattekar Annihilator",
+ [21] = "Artifex",
+ [22] = "Axe Warrior",
+ [23] = "Ballisteer",
+ [24] = "Bane of the Remoran",
+ [25] = "Blood Shreth Butcher",
+ [26] = "Bloodletter",
+ [27] = "Broodu Killer",
+ [28] = "Browerk Killer",
+ [29] = "Bug Butcher",
+ [30] = "Bugstomper",
+ [31] = "Bunny Master",
+ [32] = "Carenzi Slayer",
+ [33] = "Chain Breaker",
+ [34] = "Champion of Dereth",
+ [35] = "Champion of Sanamar",
+ [36] = "Champion of Silyun",
+ [37] = "Chef",
+ [38] = "Creature Adept",
+ [39] = "Dagger Fighter",
+ [40] = "Deadeye",
+ [41] = "Deathcap Defeater",
+ [42] = "Defender of Dereth",
+ [43] = "Deliverer",
+ [44] = "Diplomat",
+ [45] = "Dire Mattekar Dispatcher",
+ [46] = "Duelist",
+ [47] = "Ebon Gromnie Eradicator",
+ [48] = "Engorged Scourge",
+ [49] = "Evoker",
+ [50] = "Explorer",
+ [51] = "Exterminator",
+ [52] = "Fisherman",
+ [53] = "Fletcher",
+ [54] = "Floeshark Flogger",
+ [55] = "Friend of Sanamar",
+ [56] = "Friend of Silyun",
+ [57] = "Gaerlan Slayer",
+ [58] = "Gardener Weeder",
+ [59] = "Glenden Wood Knight",
+ [60] = "Glenden Wood Militia",
+ [61] = "Golden God",
+ [62] = "Grave Robber",
+ [63] = "Guardian of Dereth",
+ [64] = "Gumshoe",
+ [65] = "Guppy Master",
+ [66] = "Heart Ripper",
+ [67] = "Hero of Dereth",
+ [68] = "Hero of Sanamar",
+ [69] = "Hero of Silyun",
+ [70] = "Honorary Snowman",
+ [71] = "Honorary Windreave",
+ [72] = "Hunter",
+ [73] = "Impaler",
+ [74] = "Insatiable Slayer",
+ [75] = "Invader's Bane",
+ [76] = "Iron Chef",
+ [77] = "Iron-Spined Chittick Immolator",
+ [78] = "Item Adept",
+ [79] = "Keeper of Dereth",
+ [80] = "Keerik Killer",
+ [81] = "Kingslayer",
+ [82] = "Kiree Killer",
+ [83] = "K'nath An'dras Assassinator",
+ [84] = "Lakeman",
+ [85] = "Life Adept",
+ [86] = "Lightbringer",
+ [87] = "Mace Warrior",
+ [88] = "Man-At-Arms Thrasher",
+ [89] = "Master Fletcher",
+ [90] = "Master of Slaughter",
+ [91] = "Master of Staves",
+ [92] = "Miner",
+ [93] = "Moarsman Defiler",
+ [94] = "Morale Smasher",
+ [95] = "Mosswart Worshipper Whipper",
+ [96] = "Mottled Carenzi Mauler",
+ [97] = "Mud Slinger",
+ [98] = "Naughty Skeleton Snuffer",
+ [99] = "Olthoi Ripper Reducer",
+ [100] = "Paragon of Death",
+ [101] = "Philanthropist",
+ [102] = "Plate Armoredillo Punisher",
+ [103] = "Platinum Prowler",
+ [104] = "Polar Ursuin Pounder",
+ [105] = "Polardillo Pummeler",
+ [106] = "Pond Scum",
+ [107] = "Pro Fisherman",
+ [108] = "Projectilist",
+ [109] = "Pugilist",
+ [110] = "Queenslayer",
+ [111] = "Ravenous Killer",
+ [112] = "Red Fury",
+ [113] = "Reeshan Killer",
+ [114] = "Rehir Killer",
+ [115] = "Repugnant Eater Ripper",
+ [116] = "Resistance Fighter",
+ [117] = "Resistance Recruit",
+ [118] = "Servant of The Deep",
+ [119] = "Sezzherei Slayer",
+ [120] = "Shadow Stalker",
+ [121] = "Shallows Shark Nemesis",
+ [122] = "Sharpshooter",
+ [123] = "Shellfish Hater",
+ [124] = "Shield of Glenden",
+ [125] = "Shredder",
+ [126] = "Silver Serf",
+ [127] = "Siraluun Slasher",
+ [128] = "Skipper",
+ [129] = "Skullcrusher",
+ [130] = "Skullsplitter",
+ [131] = "Slicer",
+ [132] = "Sniper",
+ [133] = "Soldier Slaughterer",
+ [134] = "Spear Warrior",
+ [135] = "Spring Cleaner",
+ [136] = "Staff Warrior",
+ [137] = "Stonebreaker",
+ [138] = "Sureshot",
+ [139] = "Swordfighter",
+ [140] = "Theurgist",
+ [141] = "Thrungus Reaper",
+ [142] = "Timberman",
+ [143] = "Tracker",
+ [144] = "Trapper",
+ [145] = "Tukora Lieutenant Trouncer",
+ [146] = "Unarmed Brawler",
+ [147] = "Violator Grievver Vetoer",
+ [148] = "Voracious Flayer",
+ [149] = "Voracious Hunter",
+ [150] = "War Adept",
+ [151] = "Warden of Dereth",
+ [152] = "Warlock",
+ [153] = "Warlord of Dereth",
+ [154] = "Warrior Vanquisher",
+ [155] = "Wicked Skeleton Walloper",
+ [156] = "Windreave Stalker",
+ [157] = "Worker Obliterator",
+ [158] = "Dryreach Militia",
+ [159] = "Honorary Shadow Hunter",
+ [160] = "Perforated Knight",
+ [162] = "Pest Control",
+ [163] = "Rat Reaper",
+ [164] = "Nymph Maniac",
+ [165] = "\\$imiu\\$",
+ [166] = "2nd Place Lore- Quiz Night",
+ [167] = "AC Veteran",
+ [171] = "Ankle Biter",
+ [172] = "Annoying Furry Talking Animal",
+ [173] = "Archer Assassin",
+ [174] = "Archmage",
+ [175] = "Asheron's Call God",
+ [176] = "Avatar of Kain",
+ [177] = "Azure Assailant",
+ [178] = "Baby Bunny Master",
+ [179] = "Baron Oddity",
+ [180] = "Beginning of the End",
+ [181] = "Best Melee in DT",
+ [182] = "Big Block",
+ [183] = "Big Rocx",
+ [184] = "Blood",
+ [185] = "Bounty Hunter",
+ [186] = "British Tootsie",
+ [187] = "Bug Bait",
+ [188] = "Bunny Killer",
+ [189] = "Carebear Stare",
+ [190] = "Certified Ganksta",
+ [191] = "Chicken Nugget",
+ [192] = "Chicken Select",
+ [193] = "Chimaera's Champion",
+ [194] = "Co-Monarch of TheChosen",
+ [195] = "Containment Unit",
+ [196] = "Coolest Title Ever!",
+ [197] = "Corrosive Soul",
+ [198] = "Cow Killer",
+ [199] = "Cowboy",
+ [200] = "Crystal Lord King",
+ [201] = "Cuddly Kitten >\\^..\\^<",
+ [202] = "Curmudgeon's Friend",
+ [203] = "Cursed Adventurer",
+ [204] = "Dagger Master",
+ [205] = "Dark Sword Lady",
+ [206] = "Darktides Finest",
+ [207] = "Darktides Most Wanted",
+ [208] = "Dead Meat",
+ [209] = "Deadly Eggburt",
+ [210] = "Death by Default",
+ [211] = "Death by Pumpkin",
+ [212] = "Death by Sappho",
+ [213] = "Death Specialist",
+ [214] = "Defender of Mr. P",
+ [215] = "Dereth's Gladiator",
+ [216] = "Dereth's Master Dodger",
+ [217] = "Dev Evader",
+ [218] = "Dev Killer",
+ [219] = "Dev Slayer",
+ [220] = "Double Fashion King",
+ [221] = "Double Golem Killer",
+ [222] = "Double Survival Champion",
+ [223] = "Dude of DOOM!",
+ [224] = "Ecto Cooler",
+ [226] = "Envoy Slayer",
+ [227] = "Escapee Killer",
+ [228] = "Evil Toothfairy",
+ [229] = "Fancy Title",
+ [230] = "Fashion King",
+ [231] = "Fashion Penguin King",
+ [232] = "Fashion Queen",
+ [233] = "Fashion Victim",
+ [234] = "Fearless Fighter",
+ [235] = "Flag Boy",
+ [236] = "Frelorn Slayer",
+ [237] = "Friend to Mr. P",
+ [238] = "Gangsta Style",
+ [239] = "Gangster",
+ [240] = "Ghostbuster",
+ [241] = "Gimp",
+ [242] = "Gimp Goddess",
+ [243] = "Gimpy Mage of Might",
+ [244] = "Gladiator Champion",
+ [245] = "Glowing Archer",
+ [246] = "God of the Swordsman",
+ [247] = "Golem Killer",
+ [248] = "Golem Slayer",
+ [249] = "Great Pookie Slayer",
+ [250] = "Guardian Angel",
+ [251] = "Guardian of Arwic",
+ [252] = "Hamster Herder",
+ [253] = "Hamster Vitae",
+ [254] = "Have Bunnie's Will Travel",
+ [255] = "Have Trike Will Babble",
+ [256] = "Hide and Seek Specialist",
+ [257] = "Hollywood Bud",
+ [258] = "Holtburg Survival Champion",
+ [259] = "Holtburg's Survivor Champion",
+ [260] = "Honorary Pink Eep",
+ [261] = "Hungry Hungry Hippo",
+ [262] = "Husband of Lynnie",
+ [263] = "Husbands Healer",
+ [265] = "I liked dying!",
+ [266] = "Jessica <3",
+ [267] = "King of all that is Pumpkin",
+ [268] = "King of Caul",
+ [269] = "King of Darktide",
+ [270] = "King of Pierce Diggys",
+ [271] = "Knight Rider",
+ [272] = "Lady of the Four Towers",
+ [273] = "Lange Gang",
+ [274] = "Level Master",
+ [275] = "Leviathan",
+ [276] = "Leviathan Slayer",
+ [277] = "Libe Events Manager",
+ [278] = "Life Preserver",
+ [279] = "Live Event Coordinator",
+ [280] = "Live Events Manager",
+ [281] = "Live Op Coordinator",
+ [282] = "Lore- 2nd Place",
+ [283] = "Lore 2nd Place Quiz Night",
+ [286] = "Lore Master",
+ [289] = "Lore Master 2nd Place",
+ [290] = "Lore Master of Staves",
+ [291] = "Lots of Vitae",
+ [292] = "Lucky Lady",
+ [293] = "Mad Cow Slayer",
+ [294] = "Mages Assitant",
+ [295] = "Master Tinkerer",
+ [296] = "Mayor of Ayan Baqur",
+ [297] = "Minty Fresh",
+ [298] = "Misunderstood Pengy",
+ [299] = "Mom",
+ [300] = "Mommy Pengy",
+ [301] = "Mosswart Ally",
+ [302] = "Mr. Nice Guy",
+ [303] = "Murderer",
+ [305] = "Newby Title",
+ [306] = "Nice Blue Lady",
+ [307] = "Number one draft pick",
+ [308] = "Old School",
+ [309] = "Paradox Slayer",
+ [310] = "Patron Saint of the Lifestone",
+ [311] = "Peacebear",
+ [312] = "Penguin Killer",
+ [313] = "Pig Farmer",
+ [314] = "Pink Bunny Killer",
+ [315] = "Pink Bunny Master",
+ [316] = "Pink Goddess",
+ [317] = "Pink Lady",
+ [318] = "PK Queen",
+ [319] = "Playa Killa King",
+ [320] = "Pokemon Slayer",
+ [321] = "Pretty Pumpkin",
+ [322] = "Prisoner",
+ [323] = "Protector of the Cheese",
+ [324] = "Proton Pack",
+ [325] = "Pumpkin Slayer",
+ [326] = "Pumpkin Stalker",
+ [327] = "Purple Pengy",
+ [328] = "Pwner of Newbs",
+ [329] = "Queen of Brats",
+ [330] = "Queens Crafter",
+ [332] = "Queen's Pack Rat",
+ [333] = "Queen's Packrat",
+ [334] = "Queen's Tinker",
+ [335] = "Rawr!",
+ [336] = "Rayne's Mage Pet",
+ [337] = "Reggae Renegade",
+ [338] = "Ring Bearer",
+ [339] = "Ring ring ring.....Bananaphone",
+ [340] = "Road Kill",
+ [341] = "Rolling Death Destroyer",
+ [342] = "Royal Chef",
+ [343] = "Royal Cook",
+ [344] = "Rugged",
+ [345] = "Sanitation Engineer",
+ [346] = "Scarecrow Slayer",
+ [347] = "Scary Pumkpkin Dominator",
+ [348] = "Scary Pumpkin Slayer",
+ [349] = "Sentinal",
+ [350] = "Sentry",
+ [351] = "Shadow Child",
+ [352] = "Shadow Hunter",
+ [353] = "Shadow Slayer",
+ [354] = "Slayer of the Great Pookie",
+ [355] = "Slimer",
+ [356] = "Snazzy Dresser",
+ [357] = "Soul Man",
+ [358] = "Spooky Title",
+ [359] = "Staff Masta",
+ [360] = "Staypuffed Mallow Girl",
+ [361] = "Super Gimped Adventurer",
+ [362] = "Supercalifragilisticexpialidocious",
+ [363] = "Superman",
+ [364] = "Survivor Champion",
+ [365] = "Sword Scholar",
+ [366] = "Teh Newb",
+ [367] = "Teh Saint",
+ [368] = "Testing Guy",
+ [369] = "The Bait",
+ [370] = "The Chosen King",
+ [371] = "The Come Back Kid",
+ [372] = "The Forgotten",
+ [373] = "The Gimped",
+ [374] = "The Great and Powerful",
+ [375] = "The Half-Fox",
+ [376] = "The Noob",
+ [377] = "The Purple Fez",
+ [378] = "The Pwnerer",
+ [379] = "The Unknown Pk",
+ [380] = "Thunder Chicken Slayer",
+ [381] = "TM Killer",
+ [382] = "Tough Guy",
+ [383] = "Tradesman of Auberean",
+ [384] = "Treasure Hunter",
+ [385] = "Tremendous Monouga Master",
+ [386] = "Triple Golem Killer",
+ [387] = "Turbine Slayer",
+ [388] = "Twins of Terror",
+ [389] = "Uberest Noob on Frostfell",
+ [390] = "Underworld-Thugg",
+ [391] = "Viamontian Slayer",
+ [392] = "Vitae King",
+ [393] = "Vitae Vixen",
+ [394] = "Vixen of Vitae",
+ [395] = "Wabbit Bait",
+ [396] = "Wabbit Killer",
+ [397] = "Wandering Fool",
+ [398] = "Warden's Assistant",
+ [399] = "Wardens Thug",
+ [400] = "Wimp",
+ [401] = "Wolfpack Crafter",
+ [402] = "Wonder Woman",
+ [403] = "Ya got served",
+ [406] = "Supreme Bunny Master",
+ [407] = "Guardian of the Dark",
+ [408] = "April's Fool",
+ [409] = "Ulgrim's Eep",
+ [410] = "Mukkir Masher",
+ [411] = "Harbinger's Bane",
+ [412] = "Master of the Elements",
+ [413] = "Killcrane's Ally",
+ [414] = "Apprentice Shadow Hunter",
+ [415] = "Squire of the Golden Flame",
+ [416] = "Knight of the Golden Flame",
+ [417] = "Knight of the Whispering Blade",
+ [418] = "The Black Spear",
+ [420] = "Carraida's Avenger",
+ [421] = "Paragon of the Whispering Blade",
+ [422] = "Paragon of the Rossu Morta",
+ [423] = "Chosen of Varicci",
+ [424] = "Chosen of Elysa",
+ [425] = "Small Mukkir Squasher",
+ [426] = "Blood Warrior",
+ [427] = "Strategist",
+ [428] = "War Beast",
+ [429] = "Champion of Daemal",
+ [430] = "Hero of the Golden Flame",
+ [431] = "Slayer of the Black Spear",
+ [433] = "Obviously Bored",
+ [434] = "Zefir Zapper",
+ [435] = "Tusker Blight",
+ [436] = "Elemental Eradicator",
+ [437] = "Expert Banished Hunter",
+ [438] = "Expert Fallen Hunter",
+ [439] = "Elite Head Hunter",
+ [440] = "Friend of the Frostglaive",
+ [441] = "Squire of New Viamont",
+ [442] = "Reanimator",
+ [443] = "Zombie Incursion Survivor",
+ [444] = "Ulgrim's Drinking Buddy",
+ [445] = "Master of the Porcelain Altar",
+ [446] = "Master of the Mystical Mug",
+ [447] = "Colosseum Champion",
+ [448] = "Titan",
+ [449] = "Colossus",
+ [450] = "Master Gladiator",
+ [451] = "Fearless",
+ [452] = "Lord of the Arena",
+ [453] = "Ring Master",
+ [454] = "Pit Fighter",
+ [455] = "Myrmidon",
+ [456] = "Hostile Combatant",
+ [457] = "Survivalist",
+ [458] = "Warrior of the Seventh Circle",
+ [459] = "Gladiator",
+ [460] = "Contender",
+ [461] = "Drudge Dread",
+ [462] = "Arena Custodian",
+ [463] = "Arena Rat",
+ [464] = "Scrapper",
+ [465] = "Champion of Stone",
+ [466] = "Champion of Sickles",
+ [467] = "Champion of the Wild",
+ [468] = "Champion of the Hive",
+ [469] = "Champion of Assassins",
+ [470] = "Immortal Champion",
+ [471] = "Ruuk Ally",
+ [472] = "Seeker of Asheron",
+ [473] = "Seeker of Torgluuk",
+ [474] = "Portal Ritualist",
+ [475] = "Ranger Ruuk",
+ [476] = "Basher Slasher",
+ [477] = "Guruk Hunter",
+ [478] = "Dead Eye for the Colossi",
+ [479] = "Fiendish Huntsman",
+ [480] = "Monster Killer",
+ [481] = "Bosh Bosh Kibosh",
+ [482] = "Mushroom Collector",
+ [483] = "Fungal Farmer",
+ [484] = "Mushroom Man",
+ [485] = "Fungi",
+ [486] = "Mushroom King",
+ [487] = "Thrungamandius",
+ [488] = "Initiate of the Blade",
+ [489] = "Torgluuk's Liberator",
+ [490] = "Burun Liberator",
+ [491] = "Asheron's Savior",
+ [492] = "Asheron's Defender",
+ [494] = "Fuzzy Bunny Slayer",
+ [495] = "Moar Hunter",
+ [496] = "Spiketooth Slayer",
+ [497] = "Tower Guardian Architect",
+ [498] = "Artisan of the Flame and Light",
+ [499] = "Guardian of the Tower",
+ [500] = "Cragstone Militia",
+ [501] = "Cragstone Knight",
+ [502] = "Guardian of Cragstone",
+ [503] = "Knight of the Windmill",
+ [504] = "Hero of House Mhoire",
+ [505] = "Lady Tairla's Champion",
+ [506] = "Royal Investigator",
+ [507] = "Wanga Fighter",
+ [508] = "Hoogan's Hero",
+ [509] = "Cragstone Firefighter",
+ [511] = "Stalker Stalker",
+ [512] = "Ravenous",
+ [513] = "Altered Hunter",
+ [514] = "Augmented Hunter",
+ [515] = "Drudge Doom",
+ [516] = "Defender of Kryst",
+ [517] = "Paradox-touched Queenslayer",
+ [518] = "Amelia's Caretaker",
+ [519] = "Prodigal Tusker Slayer",
+ [520] = "Mudmouth's Bane",
+ [521] = "Oolutanga's Bane",
+ [522] = "Prodigal Shadow Slayer",
+ [523] = "Prodigal Harbinger Slayer",
+ [524] = "Blood Seeker",
+ [525] = "Storm Rider",
+ [526] = "Meddler",
+ [527] = "Vile Betrayer",
+ [528] = "Spy",
+ [529] = "Slithis Slayer",
+ [530] = "Chosen of the Rift",
+ [531] = "Rift Shifter",
+ [532] = "Rift Walker",
+ [533] = "Reef Builder",
+ [534] = "Reef Breaker",
+ [535] = "Crypt Rat",
+ [536] = "Grave Stalker",
+ [537] = "Bone Breaker",
+ [538] = "Crypt Creeper",
+ [539] = "Tomb Raider",
+ [540] = "Follower of the Vine",
+ [541] = "Harvester",
+ [542] = "Harvester Harvester",
+ [543] = "Harvester Harvester Harvester",
+ [544] = "Pumpkin Throne Usurper",
+ [545] = "Death Knight",
+ [546] = "",
+ [547] = "Tracker Guardian",
+ [548] = "Dojiro Sangi's Savior",
+ [549] = "Master of the Hunt",
+ [550] = "Initiate of the Hunt",
+ [551] = "Apprentice of the Hunt",
+ [552] = "Disciple of the Hunt",
+ [553] = "Seeker of the Hunt",
+ [554] = "Champion of the Hunt",
+ [555] = "Guardian of Linvak Tukal",
+ [556] = "Unwitting Participant",
+ [557] = "Friend of Rheaga",
+ [558] = "Slayer of Rheaga",
+ [559] = "Protector of the Past",
+ [560] = "Warrior of the Past",
+ [561] = "Anthropologist",
+ [562] = "Gold Farmer",
+ [563] = "Third Eye Blinder",
+ [564] = "Dire Drudge Decapitator",
+ [565] = "Renegade Hunter",
+ [566] = "Banderling Bully",
+ [567] = "Xenophobic",
+ [568] = "Shadow Sunderer",
+ [569] = "Dire Huntsman",
+ [570] = "Game Warden",
+ [571] = "Honorary Rea of the Aun",
+ [572] = "Hope of the Past",
+ [573] = "Beacon of Hope",
+ [574] = "Aerbax's Bane",
+ [575] = "Aerbax Slayer",
+ [576] = "Jester's Emancipator",
+ [577] = "Jester's Fool",
+ [578] = "Jester's Accomplice",
+ [579] = "Honorary Burun Scout",
+ [580] = "Marble Wrangler",
+ [581] = "Secret Keeper",
+ [582] = "Jester's Little Helper",
+ [583] = "Hard to Kill",
+ [584] = "Expendable",
+ [585] = "Novice of the Sea",
+ [586] = "Acolyte of the Sea",
+ [587] = "Minister of the Sea",
+ [588] = "Defender of the Sea",
+ [589] = "Champion of the Sea",
+ [590] = "Master of the Sea",
+ [591] = "Defeater of the Blight",
+ [592] = "Champion of the Aerlinthe Node",
+ [593] = "Champion of the A'mun Node",
+ [594] = "Champion of the Esper Node",
+ [595] = "Champion of the Halaetan Node",
+ [596] = "Champion of the Linvak Node",
+ [597] = "Champion of the Obsidian Node",
+ [599] = "Ulgrim's Happy Hundredth",
+ [600] = "Plucker of Eyes",
+ [601] = "Warden of the Burning Wood",
+ [602] = "Tough Tough",
+ [603] = "Archaeologist",
+ [604] = "Hero of Woe",
+ [605] = "Defender of Silyun",
+ [606] = "Memorial Champion",
+ [607] = "Thane of Colier",
+ [608] = "Guardian of the Keep",
+ [609] = "Warrior of the Crater Lake",
+ [611] = "Arwician",
+ [612] = "Desert Warrior",
+ [613] = "Mayoi Protector",
+ [614] = "Stone Collector",
+ [615] = "Rock Star",
+ [616] = "Rock Hound",
+ [617] = "Warrior of Woe",
+ [618] = "Has way too much time",
+ [619] = "Champion Immemorial",
+ [620] = "Colier Miner",
+ [621] = "Legionnaire",
+ [622] = "Volcanologist",
+ [623] = "Hilltop Defender",
+ [624] = "Arwic Noble",
+ [625] = "Zharalim",
+ [626] = "Samurai",
+ [627] = "Guardian in the Patriarch Raids",
+ [628] = "Warden in the Patriarch Raids",
+ [629] = "Hero of the Patriarch Raids",
+ [630] = "Marked by the Patriarchs",
+ [637] = "Cathedrals Champion",
+ [638] = "Asheron's Militia",
+ [639] = "Minik Ra's Bane",
+ [640] = "Kazyk Ri's Bane",
+ [641] = "Nivinizk's Bane",
+ [642] = "Minik Ra's Nemesis",
+ [643] = "Kazyk Ri's Nemesis",
+ [644] = "Nivinizk's Nemesis",
+ [645] = "Auberean's Sentinel",
+ [646] = "Dereth's Elite",
+ [647] = "Defender of the Deru",
+ [648] = "Bane of the Blessed",
+ [649] = "Negotiator",
+ [650] = "Bane of the Blight",
+ [651] = "Gifted",
+ [652] = "Seasonal Seeker",
+ [653] = "Amateur Explorer",
+ [654] = "Experienced Explorer",
+ [655] = "Adept Explorer",
+ [656] = "Master Explorer",
+ [657] = "Elite Explorer",
+ [658] = "Mountain Climber",
+ [659] = "Daredevil",
+ [660] = "Sky Diver",
+ [661] = "Spelunker",
+ [662] = "Party-Goer",
+ [663] = "Crater Crasher",
+ [664] = "Tactical Aid",
+ [665] = "True Tactician",
+ [666] = "Tactical Fantastical",
+ [667] = "Fire of the Tanada",
+ [668] = "Crystalline Adventurer",
+ [669] = "Wisp Whipper",
+ [670] = "Burning Soul",
+ [671] = "Frozen Fighter",
+ [672] = "Dedicated",
+ [673] = "Assassin",
+ [674] = "Death Dealer",
+ [675] = "Bridge Jumper",
+ [676] = "Sure Step",
+ [677] = "Player Slayer",
+ [678] = "Bathed in Blood",
+ [679] = "I Am Darktide",
+ [680] = "Darkness in the Light",
+ [681] = "Beginning's End",
+ [682] = "Nexus Crawler",
+ [683] = "Selfless Soul",
+ [684] = "Timeless Adventurer",
+ [685] = "Virindi Informer",
+ [686] = "No Cage Can Hold Me",
+ [687] = "All for One",
+ [688] = "One for All",
+ [689] = "Jack-O'-All Trades",
+ [690] = "Knight of the Northeast Tower",
+ [691] = "Knight of the Northwest Tower",
+ [692] = "Knight of the Southeast Tower",
+ [693] = "Knight of the Southwest Tower",
+ [694] = "Knight of the Mhoire Throne",
+ [695] = "Historian of the Mhoire Throne",
+ [696] = "Champion of House Mhoire",
+ [697] = "Swordbearer of House Mhoire",
+ [698] = "Archmage of House Mhoire",
+ [699] = "Seeker of Castle Mhoire",
+ [700] = "Steward of Castle Mhoire",
+ [701] = "Golden Gear Crafter",
+ [702] = "Ally of the Gold Primus",
+ [703] = "Gear Knight Assassin",
+ [704] = "Gear Knight Recruiter",
+ [705] = "Gear Knight Emissary",
+ [706] = "Menhir Seeker",
+ [707] = "Mana Field Finder",
+ [708] = "Assistant's Assistant",
+ [709] = "Arcanum Adventurer",
+ [710] = "Gear Knight Defender",
+ [711] = "Soldier of the Queen",
+ [712] = "Spitter of the Queen",
+ [713] = "Bloodstone Hunter",
+ [714] = "Guiding Light",
+ [715] = "Clouded Soul",
+ [716] = "Undercover of Darkness",
+ [717] = "Brought to Light",
+ [719] = "Illuminating the Shadows",
+ [720] = "Exploring Archaeologist",
+ [721] = "Contract Killer",
+ [722] = "Shadow Puppet",
+ [723] = "Hopebringer",
+ [724] = "In the Dark",
+ [726] = "Searching the Shadows",
+ [727] = "Shadow Soldier",
+ [728] = "Bright Knight",
+ [729] = "Merciful Killer",
+ [730] = "Soul Siphon",
+ [731] = "The Tou-Tou Terror",
+ [732] = "Double Agent",
+ [733] = "Duleing with the Dark",
+ [734] = "Creature of Chaos",
+ [735] = "Conspirator",
+ [736] = "Hero of the Night",
+ [737] = "Master of the Twisted Word",
+ [738] = "The Nightmare Lord",
+ [739] = "The Nightmare Mage",
+ [740] = "The Twisted Weaver",
+ [741] = "Lord of Dark Dreams",
+ [743] = "The Dark Dreamwalker",
+ [745] = "The Dreamslayer",
+ [746] = "The Nightmare Stalker",
+ [748] = "The Thought Spiral",
+ [751] = "Master of the Oubliette",
+ [753] = "The Restless",
+ [754] = "Fiery Spirit",
+ [755] = "Icy Veins",
+ [756] = "Shocking Disposition",
+ [757] = "Acidic Soul",
+ [758] = "Grounded Morals",
+ [759] = "Darkened Heart",
+ [760] = "The True Emperor",
+ [761] = "Bearer of Darkness",
+ [763] = "Healer Ritualist",
+ [764] = "Vanquisher of the Titan",
+ [765] = "Derethian Newbie",
+ [766] = "Novice Wanderer",
+ [767] = "Notable Citizen",
+ [768] = "Adept Adventurer",
+ [769] = "Intrepid Explorer",
+ [770] = "Supreme Soldier",
+ [771] = "Epic Warrior",
+ [772] = "Paragon of New Aluvia",
+ [773] = "An Auberean Legend",
+ [774] = "Heretic",
+ [775] = "Captain",
+ [776] = "Pet Savior",
+ [777] = "Avalanche Avoider",
+ [778] = "Liberator of Uziz",
+ [779] = "Out of Tune",
+ [780] = "Hive Queenslayer",
+ [781] = "Eviscerator Decimator",
+ [782] = "Ultimate Warrior",
+ [783] = "Stone Cold Killer",
+ [784] = "Queller of Rage",
+ [785] = "Ender of Torment",
+ [786] = "Controller of Emotions",
+ [787] = "Rynthid Ravager",
+ [788] = "Lothus Servitor",
+ [789] = "Ally of the Lothus",
+ [790] = "Ally of the Council",
+ [791] = "Emotional Wreck",
+ [792] = "Minion Marauder",
+ [793] = "Rynthid Wrecker",
+ [794] = "Night Owl",
+ [795] = "Mender of the Rift",
+ [796] = "Sorcerer Slayer",
+ [797] = "Rage Quitter",
+ [798] = "Purifier",
+ [799] = "Fan of Asheron",
+ [801] = "Shutterbug",
+ [802] = "The Focused",
+ [803] = "Dereth Recruiter",
+ [804] = "Fowl Follower",
+ [805] = "Follower of Asheron",
+ [806] = "Follows Directions",
+ [807] = "Can't Follow Directions",
+ [808] = "Likes Asheron",
+ [809] = "Likes Getting Titles",
+ [810] = "Likes Where This Is Going",
+ [811] = "Likes Ulgrim",
+ [812] = "Likable",
+ [813] = "Captivating",
+ [814] = "Master of Ceremony",
+ [815] = "Road Warrior",
+ [816] = "Thriller",
+ [817] = "Haunts Your Dreams",
+ [818] = "Asheron's Collect Caller",
+ [819] = "The Inquisitive",
+ [820] = "Portal Stormer",
+ [821] = "Bringer of Pain",
+ [822] = "Harbinger of Madness",
+ [823] = "Marked by Luck",
+ [824] = "Marked by Fate",
+ [825] = "Marked by Fame",
+ [826] = "Marked by Glamour",
+ [827] = "Marked by Bacon",
+ [828] = "Puzzlemaster",
+ [829] = "Riddle Ravager",
+ [830] = "The Cool Kids Club",
+ [831] = "Epic Win",
+ [832] = "Epic Fail",
+ [833] = "Always Picked First",
+ [834] = "Always Picked Last",
+ [835] = "Forever Alone",
+ [837] = "Hungry for Moar",
+ [838] = "I Can Haz Title Nao",
+ [839] = "Snowbunny",
+ [840] = "Cold as Ice",
+ [841] = "Penguin Plunge",
+ [842] = "Flower Sniffer",
+ [843] = "Springs Into Action",
+ [844] = "Heats Things Up",
+ [845] = "Cruel Summer",
+ [846] = "Hot in the City",
+ [847] = "Runs Through Sprinklers",
+ [848] = "The Knowledgeable",
+ [849] = "Well Trained",
+ [850] = "Pumpkin Lord",
+ [851] = "Haunted",
+ [852] = "Possessed",
+ [853] = "Doomsayer",
+ [854] = "Accursed",
+ [855] = "Cold Turkey",
+ [856] = "Jive Turkey",
+ [857] = "Present Protector",
+ [858] = "Holly Jolly Helper",
+ [859] = "Loss Prevention",
+ [860] = "Gift Gopher",
+ [861] = "Holiday Hero",
+ [862] = "Crown Of the Deru",
+ [863] = "Viridian Dreamer",
+ [864] = "Viridian Lord",
+ [865] = "Viridian Knight",
+ [866] = "Viridian Stalker",
+ [867] = "Viridian Slayer",
+ [868] = "Viridian Purifier",
+ [869] = "Knight Of Thorns",
+ [870] = "Hunter Of Thorns",
+ [871] = "Mage Of Thorns",
+ [872] = "Thornstalker",
+ [873] = "Champion Of The Viridian Tree",
+ [874] = "Corruptor Of The Root",
+ [875] = "Killer Among Shadows",
+ [876] = "Servant Of The Vile",
+ [877] = "Knight Of Corrupted Amber",
+ [878] = "Gauntlet Champion",
+ [879] = "Bloodthirsty",
+ [880] = "Gauntlet Gladiator",
+ [881] = "Wily Warrior",
+ [882] = "Soldier of Fortune",
+ [883] = "Society Savage",
+ [884] = "Coin Collector",
+ [885] = "Brutal Barbarian",
+ [886] = "Idolized",
+ [887] = "Master of Puppets",
+ [888] = "Titan Slayer",
+ [889] = "Awakened",
+ [890] = "Enlightened",
+ [891] = "Illuminated",
+ [892] = "Transcended",
+ [893] = "Cosmic Conscious",
+ [894] = "Last Man Standing",
+ };
+
+ /// Font 0x40000002: glyphs as char, sheet x, y, w, h, before, after, top.
+ public static readonly RetailFont Pal14 = new(0x40000002u, 14, 11, 3, 3, 0x06005ECFu, 1024, 214, 0x00000000u, 0, 0, new short[]
+ {
+ 32,3,3,3,14,0,1,0, 33,12,3,1,7,1,1,4, 34,19,3,3,2,0,1,4, 35,28,3,4,7,0,1,4,
+ 36,38,3,5,9,0,0,3, 37,49,3,7,7,0,1,4, 38,62,3,7,7,0,0,4, 39,75,3,1,2,1,0,4,
+ 40,82,3,2,9,1,0,4, 41,90,3,2,9,0,1,4, 42,98,3,4,3,0,0,4, 43,108,3,5,5,0,0,5,
+ 44,119,3,2,3,0,1,10, 45,127,3,3,1,0,0,8, 46,136,3,1,1,1,1,10, 47,143,3,3,8,0,0,4,
+ 48,152,3,4,7,0,1,4, 49,162,3,4,7,0,1,4, 50,172,3,4,7,0,1,4, 51,182,3,4,7,0,1,4,
+ 52,192,3,5,7,-1,1,4, 53,203,3,4,7,0,1,4, 54,213,3,4,7,0,1,4, 55,223,3,4,7,0,1,4,
+ 56,233,3,4,7,0,1,4, 57,243,3,4,7,0,1,4, 58,253,3,1,5,1,1,6, 59,260,3,2,7,0,1,6,
+ 60,268,3,4,5,0,1,5, 61,278,3,4,3,0,1,6, 62,288,3,4,5,0,1,5, 63,298,3,4,7,0,1,4,
+ 64,308,3,6,6,0,0,5, 65,320,3,7,7,0,0,4, 66,333,3,5,7,0,1,4, 67,344,3,6,7,1,0,4,
+ 68,356,3,7,7,0,1,4, 69,369,3,5,7,0,1,4, 70,380,3,5,7,0,1,4, 71,391,3,6,7,1,1,4,
+ 72,403,3,8,7,0,0,4, 73,417,3,3,7,0,0,4, 74,426,3,3,9,0,0,4, 75,435,3,7,7,0,0,4,
+ 76,448,3,6,7,0,0,4, 77,460,3,9,7,0,0,4, 78,475,3,8,7,0,0,4, 79,489,3,6,7,1,1,4,
+ 80,501,3,6,7,0,1,4, 81,513,3,6,9,1,1,4, 82,525,3,7,7,0,0,4, 83,538,3,5,8,0,0,3,
+ 84,549,3,5,7,1,1,4, 85,560,3,8,7,0,0,4, 86,574,3,7,7,0,0,4, 87,587,3,11,7,0,0,4,
+ 88,604,3,7,7,0,0,4, 89,617,3,7,7,0,0,4, 90,630,3,6,7,0,1,4, 91,642,3,2,9,1,0,4,
+ 92,650,3,4,8,1,1,4, 93,660,3,2,9,0,1,4, 94,668,3,5,4,0,0,4, 95,679,3,5,1,0,0,12,
+ 96,690,3,2,2,0,1,4, 97,698,3,5,5,1,0,6, 98,709,3,5,7,0,1,4, 99,720,3,3,5,1,1,6,
+ 100,729,3,5,7,1,0,4, 101,740,3,4,5,1,1,6, 102,750,3,3,7,0,0,4, 103,759,3,5,8,0,0,6,
+ 104,770,3,6,7,0,0,4, 105,782,3,3,7,0,0,4, 106,791,3,2,10,0,1,4, 107,799,3,6,7,0,0,4,
+ 108,811,3,3,7,0,0,4, 109,820,3,9,5,0,0,6, 110,835,3,6,5,0,0,6, 111,847,3,4,5,1,1,6,
+ 112,857,3,5,8,0,1,6, 113,868,3,5,8,1,0,6, 114,879,3,4,5,0,0,6, 115,889,3,3,5,1,1,6,
+ 116,898,3,3,7,0,0,4, 117,907,3,6,5,0,0,6, 118,919,3,5,5,0,0,6, 119,930,3,9,5,0,0,6,
+ 120,945,3,5,5,0,0,6, 121,956,3,5,8,0,0,6, 122,967,3,4,5,0,0,6, 123,977,3,3,9,0,0,4,
+ 124,986,3,1,7,2,2,4, 125,993,3,3,9,0,0,4, 126,1002,3,4,2,0,1,6, 160,1012,3,3,14,0,1,0,
+ 161,3,23,1,8,1,1,6, 162,10,23,4,6,0,1,6, 163,20,23,5,7,0,0,4, 164,31,23,5,5,0,0,6,
+ 165,42,23,5,7,0,0,4, 166,53,23,1,7,2,2,4, 167,60,23,4,9,0,1,4, 168,70,23,4,1,0,-1,4,
+ 169,80,23,7,7,0,0,4, 170,93,23,2,5,0,1,4, 171,101,23,4,3,0,1,7, 172,111,23,4,3,0,1,7,
+ 173,121,23,3,1,0,0,8, 174,130,23,7,7,0,0,4, 175,143,23,3,1,0,0,4, 176,152,23,3,3,1,0,4,
+ 177,161,23,5,6,0,0,5, 178,172,23,2,4,0,1,4, 179,180,23,2,4,0,1,4, 180,188,23,2,2,1,0,4,
+ 181,196,23,5,8,1,0,6, 182,207,23,6,9,0,0,4, 183,219,23,1,1,1,1,8, 184,226,23,2,2,1,0,11,
+ 185,234,23,3,4,0,0,4, 186,243,23,3,5,0,1,4, 187,252,23,4,3,1,0,7, 188,262,23,8,7,0,0,4,
+ 189,276,23,7,7,0,1,4, 190,289,23,8,7,0,0,4, 191,303,23,4,8,0,0,6, 192,313,23,7,10,0,0,1,
+ 193,326,23,7,10,0,0,1, 194,339,23,7,10,0,0,1, 195,352,23,7,10,0,0,1, 196,365,23,7,9,0,0,2,
+ 197,378,23,7,11,0,0,0, 198,391,23,9,7,0,1,4, 199,406,23,6,10,1,0,4, 200,418,23,5,10,0,1,1,
+ 201,429,23,5,10,0,1,1, 202,440,23,5,10,0,1,1, 203,451,23,5,9,0,1,2, 204,462,23,3,10,0,0,1,
+ 205,471,23,3,10,0,0,1, 206,480,23,3,10,0,0,1, 207,489,23,3,9,0,0,2, 208,498,23,7,7,0,1,4,
+ 209,511,23,8,10,0,0,1, 210,525,23,6,10,1,1,1, 211,537,23,6,10,1,1,1, 212,549,23,6,10,1,1,1,
+ 213,561,23,6,10,1,1,1, 214,573,23,6,9,1,1,2, 215,585,23,4,4,0,1,6, 216,595,23,6,7,1,1,4,
+ 217,607,23,8,10,0,0,1, 218,621,23,8,10,0,0,1, 219,635,23,8,10,0,0,1, 220,649,23,8,9,0,0,2,
+ 221,663,23,7,10,0,0,1, 222,676,23,5,7,0,1,4, 223,687,23,5,7,0,1,4, 224,698,23,5,8,1,0,3,
+ 225,709,23,5,8,1,0,3, 226,720,23,5,8,1,0,3, 227,731,23,5,8,1,0,3, 228,742,23,5,7,1,0,4,
+ 229,753,23,5,9,1,0,2, 230,764,23,6,5,1,1,6, 231,776,23,3,7,1,1,6, 232,785,23,4,8,1,1,3,
+ 233,795,23,4,8,1,1,3, 234,805,23,4,8,1,1,3, 235,815,23,4,7,1,1,4, 236,825,23,3,8,0,0,3,
+ 237,834,23,3,8,0,0,3, 238,843,23,3,8,0,0,3, 239,852,23,4,7,-1,0,4, 240,862,23,4,7,1,1,4,
+ 241,872,23,6,8,0,0,3, 242,884,23,4,8,1,1,3, 243,894,23,4,8,1,1,3, 244,904,23,4,8,1,1,3,
+ 245,914,23,4,8,1,1,3, 246,924,23,4,7,1,1,4, 247,934,23,5,5,0,0,5, 248,945,23,6,5,0,0,6,
+ 249,957,23,6,8,0,0,3, 250,969,23,6,8,0,0,3, 251,981,23,6,8,0,0,3, 252,993,23,6,7,0,0,4,
+ 253,1005,23,5,11,0,0,3, 254,1016,23,5,10,0,1,4, 255,3,40,5,10,0,0,4,
+ });
+
+ /// Font 0x40000000: glyphs as char, sheet x, y, w, h, before, after, top.
+ public static readonly RetailFont Pal16 = new(0x40000000u, 16, 12, 4, 4, 0x06005EE5u, 1024, 312, 0x00000000u, 0, 0, new short[]
+ {
+ 32,4,4,3,16,0,1,0, 33,15,4,1,8,1,1,4, 34,24,4,3,3,1,1,4, 35,35,4,5,8,0,0,4,
+ 36,48,4,5,10,0,1,3, 37,61,4,8,8,0,1,4, 38,77,4,8,8,1,0,4, 39,93,4,1,3,1,1,4,
+ 40,102,4,3,11,1,0,4, 41,113,4,3,11,0,1,4, 42,124,4,4,4,0,0,4, 43,136,4,5,5,0,1,6,
+ 44,149,4,2,3,0,1,11, 45,159,4,3,1,0,0,9, 46,170,4,1,1,1,1,11, 47,179,4,4,9,0,0,4,
+ 48,191,4,5,8,0,1,4, 49,204,4,4,8,0,2,4, 50,216,4,5,8,0,1,4, 51,229,4,5,8,0,1,4,
+ 52,242,4,5,8,0,1,4, 53,255,4,5,8,0,1,4, 54,268,4,5,8,0,1,4, 55,281,4,5,8,0,1,4,
+ 56,294,4,5,8,0,1,4, 57,307,4,5,8,0,1,4, 58,320,4,1,5,1,1,7, 59,329,4,2,7,0,1,7,
+ 60,339,4,5,7,0,1,5, 61,352,4,5,3,0,1,7, 62,365,4,5,7,0,1,5, 63,378,4,4,8,1,0,4,
+ 64,390,4,7,7,0,0,5, 65,405,4,9,8,0,0,4, 66,422,4,6,8,0,1,4, 67,436,4,6,8,1,1,4,
+ 68,450,4,8,8,0,1,4, 69,466,4,6,8,0,1,4, 70,480,4,6,8,0,0,4, 71,494,4,8,8,1,0,4,
+ 72,510,4,9,8,0,0,4, 73,527,4,3,8,0,0,4, 74,538,4,3,10,0,0,4, 75,549,4,8,8,0,0,4,
+ 76,565,4,6,8,0,1,4, 77,579,4,11,8,0,0,4, 78,598,4,9,8,0,0,4, 79,615,4,7,8,1,1,4,
+ 80,630,4,6,8,0,1,4, 81,644,4,7,10,1,1,4, 82,659,4,7,8,0,0,4, 83,674,4,5,9,1,1,3,
+ 84,687,4,7,8,0,0,4, 85,702,4,8,8,0,0,4, 86,718,4,9,8,0,0,4, 87,735,4,11,8,0,0,4,
+ 88,754,4,7,8,0,0,4, 89,769,4,7,8,0,0,4, 90,784,4,6,8,1,0,4, 91,798,4,2,10,1,1,4,
+ 92,808,4,4,9,1,2,4, 93,820,4,2,10,1,1,4, 94,830,4,5,4,0,1,4, 95,843,4,6,1,0,0,13,
+ 96,857,4,2,2,1,1,4, 97,867,4,5,5,0,0,7, 98,880,4,5,8,0,1,4, 99,893,4,4,5,1,1,7,
+ 100,905,4,5,8,1,0,4, 101,918,4,4,5,1,1,7, 102,930,4,4,8,0,-1,4, 103,942,4,5,8,1,1,7,
+ 104,955,4,6,8,0,0,4, 105,969,4,3,7,0,0,5, 106,980,4,2,10,0,1,5, 107,990,4,6,8,0,0,4,
+ 108,1004,4,3,8,0,0,4, 109,4,28,9,5,0,0,7, 110,21,28,6,5,0,0,7, 111,35,28,5,5,1,1,7,
+ 112,48,28,5,8,0,1,7, 113,61,28,5,8,1,0,7, 114,74,28,4,5,0,0,7, 115,86,28,3,5,1,1,7,
+ 116,97,28,3,7,0,0,5, 117,108,28,6,5,0,0,7, 118,122,28,7,5,0,0,7, 119,137,28,9,5,0,0,7,
+ 120,154,28,5,5,0,0,7, 121,167,28,7,8,0,0,7, 122,182,28,5,5,0,1,7, 123,195,28,3,10,0,0,4,
+ 124,206,28,1,8,2,2,4, 125,215,28,3,10,0,0,4, 126,226,28,5,2,0,1,7, 160,239,28,3,16,0,1,0,
+ 161,250,28,1,8,1,1,7, 162,259,28,5,7,0,1,6, 163,272,28,5,8,0,1,4, 164,285,28,6,6,0,0,6,
+ 165,299,28,5,8,0,1,4, 166,312,28,1,8,2,2,4, 167,321,28,5,10,0,0,4, 168,334,28,4,1,0,0,5,
+ 169,346,28,8,8,0,0,4, 170,362,28,3,5,0,1,4, 171,373,28,4,3,0,1,8, 172,385,28,5,3,0,1,7,
+ 173,398,28,3,1,0,0,9, 174,409,28,8,8,0,0,4, 175,425,28,4,1,0,0,4, 176,437,28,3,3,0,1,4,
+ 177,448,28,5,6,0,1,6, 178,461,28,3,5,0,1,4, 179,472,28,3,5,0,1,4, 180,483,28,2,2,1,1,4,
+ 181,493,28,6,8,1,0,7, 182,507,28,6,10,1,0,4, 183,521,28,1,1,1,1,8, 184,530,28,3,3,1,0,12,
+ 185,541,28,3,5,0,1,4, 186,552,28,3,5,0,1,4, 187,563,28,4,3,1,0,8, 188,575,28,9,8,0,0,4,
+ 189,592,28,8,8,0,1,4, 190,608,28,9,8,0,0,4, 191,625,28,4,8,0,1,7, 192,637,28,9,11,0,0,1,
+ 193,654,28,9,11,0,0,1, 194,671,28,9,11,0,0,1, 195,688,28,9,11,0,0,1, 196,705,28,9,10,0,0,2,
+ 197,722,28,9,12,0,0,0, 198,739,28,10,8,0,1,4, 199,757,28,6,11,1,1,4, 200,771,28,6,11,0,1,1,
+ 201,785,28,6,11,0,1,1, 202,799,28,6,11,0,1,1, 203,813,28,6,10,0,1,2, 204,827,28,3,11,0,0,1,
+ 205,838,28,3,11,0,0,1, 206,849,28,3,11,0,0,1, 207,860,28,4,10,0,-1,2, 208,872,28,8,8,0,1,4,
+ 209,888,28,9,11,0,0,1, 210,905,28,7,11,1,1,1, 211,920,28,7,11,1,1,1, 212,935,28,7,11,1,1,1,
+ 213,950,28,7,11,1,1,1, 214,965,28,7,10,1,1,2, 215,980,28,4,4,1,1,7, 216,992,28,7,8,1,1,4,
+ 217,1007,28,8,11,0,0,1, 218,4,52,8,11,0,0,1, 219,20,52,8,11,0,0,1, 220,36,52,8,10,0,0,2,
+ 221,52,52,7,11,0,0,1, 222,67,52,6,8,0,1,4, 223,81,52,6,8,0,1,4, 224,95,52,5,8,0,0,4,
+ 225,108,52,5,8,0,0,4, 226,121,52,5,8,0,0,4, 227,134,52,5,8,0,0,4, 228,147,52,5,7,0,0,5,
+ 229,160,52,5,9,0,0,3, 230,173,52,7,5,0,1,7, 231,188,52,4,7,1,1,7, 232,200,52,4,8,1,1,4,
+ 233,212,52,4,8,1,1,4, 234,224,52,4,8,1,1,4, 235,236,52,4,7,1,1,5, 236,248,52,3,8,0,0,4,
+ 237,259,52,3,8,0,0,4, 238,270,52,3,8,0,0,4, 239,281,52,4,7,-1,0,5, 240,293,52,4,8,1,1,4,
+ 241,305,52,6,8,0,0,4, 242,319,52,5,8,1,1,4, 243,332,52,5,8,1,1,4, 244,345,52,5,8,1,1,4,
+ 245,358,52,5,8,1,1,4, 246,371,52,5,7,1,1,5, 247,384,52,5,5,0,1,6, 248,397,52,6,5,0,0,7,
+ 249,411,52,6,8,0,0,4, 250,425,52,6,8,0,0,4, 251,439,52,6,8,0,0,4, 252,453,52,6,7,0,0,5,
+ 253,467,52,7,11,0,0,4, 254,482,52,5,11,0,1,4, 255,495,52,7,10,0,0,5,
+ });
+
+ /// Font 0x40000001: glyphs as char, sheet x, y, w, h, before, after, top.
+ public static readonly RetailFont Pal18 = new(0x40000001u, 18, 14, 4, 4, 0x06005EE7u, 1024, 361, 0x00000000u, 0, 0, new short[]
+ {
+ 32,4,4,3,18,0,1,0, 33,15,4,1,9,1,2,5, 34,24,4,3,3,1,1,5, 35,35,4,7,9,0,0,5,
+ 36,50,4,5,11,1,1,4, 37,63,4,10,9,0,1,5, 38,81,4,9,9,0,1,5, 39,98,4,1,3,1,1,5,
+ 40,107,4,3,12,1,0,5, 41,118,4,3,12,0,1,5, 42,129,4,4,4,0,1,5, 43,141,4,7,7,0,0,6,
+ 44,156,4,2,3,0,1,13, 45,166,4,4,1,0,1,10, 46,178,4,1,1,1,1,13, 47,187,4,4,11,0,0,5,
+ 48,199,4,5,9,1,1,5, 49,212,4,4,9,1,2,5, 50,224,4,6,9,1,0,5, 51,238,4,5,9,1,1,5,
+ 52,251,4,6,9,0,1,5, 53,265,4,6,9,0,1,5, 54,279,4,5,9,1,1,5, 55,292,4,5,9,1,1,5,
+ 56,305,4,5,9,1,1,5, 57,318,4,5,9,1,1,5, 58,331,4,1,6,1,1,8, 59,340,4,2,8,0,1,8,
+ 60,350,4,5,7,1,1,6, 61,363,4,5,3,1,1,8, 62,376,4,5,7,1,1,6, 63,389,4,4,9,0,1,5,
+ 64,401,4,8,8,0,1,6, 65,417,4,9,9,0,1,5, 66,434,4,7,9,0,1,5, 67,449,4,8,9,0,1,5,
+ 68,465,4,8,9,0,1,5, 69,481,4,6,9,0,1,5, 70,495,4,6,9,0,1,5, 71,509,4,9,9,0,1,5,
+ 72,526,4,9,9,0,1,5, 73,543,4,3,9,0,1,5, 74,554,4,4,12,-1,1,5, 75,566,4,8,9,0,1,5,
+ 76,582,4,7,9,0,1,5, 77,597,4,11,9,0,1,5, 78,616,4,10,9,0,1,5, 79,634,4,9,9,0,1,5,
+ 80,651,4,7,9,0,1,5, 81,666,4,9,11,0,1,5, 82,683,4,8,9,0,1,5, 83,699,4,6,10,0,1,4,
+ 84,713,4,7,9,0,1,5, 85,728,4,9,9,0,1,5, 86,745,4,9,9,0,1,5, 87,762,4,13,9,0,1,5,
+ 88,783,4,8,9,0,1,5, 89,799,4,8,9,0,1,5, 90,815,4,8,9,0,1,5, 91,831,4,3,12,1,1,5,
+ 92,842,4,4,11,2,2,5, 93,854,4,3,12,0,2,5, 94,865,4,7,5,0,0,5, 95,880,4,7,1,0,0,15,
+ 96,895,4,2,2,1,1,5, 97,905,4,6,6,0,1,8, 98,919,4,7,9,0,1,5, 99,934,4,5,6,0,1,8,
+ 100,947,4,7,9,0,1,5, 101,962,4,5,6,0,1,8, 102,975,4,4,9,0,0,5, 103,987,4,6,10,0,1,8,
+ 104,1001,4,7,9,0,1,5, 105,1016,4,3,8,0,1,6, 106,4,30,2,12,0,2,6, 107,14,30,7,9,0,0,5,
+ 108,29,30,3,9,0,1,5, 109,40,30,11,6,0,1,8, 110,59,30,7,6,0,1,8, 111,74,30,6,6,0,1,8,
+ 112,88,30,7,10,0,1,8, 113,103,30,7,10,0,0,8, 114,118,30,5,6,0,1,8, 115,131,30,5,6,0,1,8,
+ 116,144,30,4,8,0,1,6, 117,156,30,7,6,0,1,8, 118,171,30,7,6,0,1,8, 119,186,30,11,6,0,1,8,
+ 120,205,30,6,6,0,1,8, 121,219,30,7,10,0,1,8, 122,234,30,6,6,0,1,8, 123,248,30,3,11,0,1,5,
+ 124,259,30,1,10,2,3,4, 125,268,30,3,11,0,1,5, 126,279,30,5,2,1,1,9, 160,292,30,3,18,0,1,0,
+ 161,303,30,1,9,1,2,8, 162,312,30,5,8,1,1,7, 163,325,30,6,9,0,1,5, 164,339,30,6,6,0,1,8,
+ 165,353,30,7,9,0,0,5, 166,368,30,1,10,2,3,4, 167,377,30,6,12,0,1,5, 168,391,30,4,1,0,0,5,
+ 169,403,30,9,9,0,1,5, 170,420,30,4,6,0,0,5, 171,432,30,6,5,0,1,8, 172,446,30,5,3,1,1,8,
+ 173,459,30,4,1,0,1,10, 174,471,30,9,9,0,1,5, 175,488,30,4,1,0,0,5, 176,500,30,4,4,0,1,5,
+ 177,512,30,7,7,0,0,7, 178,527,30,4,6,0,1,5, 179,539,30,4,6,0,1,5, 180,551,30,2,2,1,1,5,
+ 181,561,30,6,9,1,1,8, 182,575,30,7,11,0,1,5, 183,590,30,1,1,1,2,10, 184,599,30,3,4,1,0,14,
+ 185,610,30,3,6,1,1,5, 186,621,30,4,6,0,1,5, 187,633,30,6,5,0,1,8, 188,647,30,10,9,0,1,5,
+ 189,665,30,10,9,0,1,5, 190,683,30,10,9,0,1,5, 191,701,30,4,9,0,1,8, 192,713,30,9,12,0,1,2,
+ 193,730,30,9,12,0,1,2, 194,747,30,9,12,0,1,2, 195,764,30,9,12,0,1,2, 196,781,30,9,11,0,1,3,
+ 197,798,30,9,13,0,1,1, 198,815,30,11,9,0,1,5, 199,834,30,8,13,0,1,5, 200,850,30,6,12,0,1,2,
+ 201,864,30,6,12,0,1,2, 202,878,30,6,12,0,1,2, 203,892,30,6,11,0,1,3, 204,906,30,4,12,-1,1,2,
+ 205,918,30,4,12,0,0,2, 206,930,30,3,12,0,1,2, 207,941,30,4,11,0,0,3, 208,953,30,8,9,0,1,5,
+ 209,969,30,10,12,0,1,2, 210,987,30,9,12,0,1,2, 211,1004,30,9,12,0,1,2, 212,4,56,9,12,0,1,2,
+ 213,21,56,9,12,0,1,2, 214,38,56,9,11,0,1,3, 215,55,56,5,5,1,1,7, 216,68,56,9,9,0,1,5,
+ 217,85,56,9,12,0,1,2, 218,102,56,9,12,0,1,2, 219,119,56,9,12,0,1,2, 220,136,56,9,11,0,1,3,
+ 221,153,56,8,12,0,1,2, 222,169,56,7,9,0,1,5, 223,184,56,6,9,0,1,5, 224,198,56,6,9,0,1,5,
+ 225,212,56,6,9,0,1,5, 226,226,56,6,9,0,1,5, 227,240,56,6,9,0,1,5, 228,254,56,6,8,0,1,6,
+ 229,268,56,6,10,0,1,4, 230,282,56,9,6,0,1,8, 231,299,56,5,9,0,1,8, 232,312,56,5,9,0,1,5,
+ 233,325,56,5,9,0,1,5, 234,338,56,5,9,0,1,5, 235,351,56,5,8,0,1,6, 236,364,56,3,9,0,1,5,
+ 237,375,56,3,9,0,1,5, 238,386,56,4,9,-1,1,5, 239,398,56,4,8,-1,1,6, 240,410,56,6,9,0,1,5,
+ 241,424,56,7,9,0,1,5, 242,439,56,6,9,0,1,5, 243,453,56,6,9,0,1,5, 244,467,56,6,9,0,1,5,
+ 245,481,56,6,9,0,1,5, 246,495,56,6,8,0,1,6, 247,509,56,5,5,1,1,7, 248,522,56,6,6,0,1,8,
+ 249,536,56,7,9,0,1,5, 250,551,56,7,9,0,1,5, 251,566,56,7,9,0,1,5, 252,581,56,7,8,0,1,6,
+ 253,596,56,7,13,0,1,5, 254,611,56,7,13,0,1,5, 255,626,56,7,12,0,1,6,
+ });
+
+ /// Font 0x40000004: glyphs as char, sheet x, y, w, h, before, after, top.
+ public static readonly RetailFont Pal20 = new(0x40000004u, 20, 16, 4, 4, 0x06005EFAu, 1024, 409, 0x00000000u, 0, 0, new short[]
+ {
+ 32,4,4,4,20,0,1,0, 33,16,4,1,10,1,2,6, 34,25,4,4,3,1,1,6, 35,37,4,7,10,0,0,6,
+ 36,52,4,7,12,0,1,5, 37,67,4,11,10,1,1,6, 38,86,4,10,10,1,1,6, 39,104,4,1,3,1,1,6,
+ 40,113,4,3,13,1,1,6, 41,124,4,3,13,0,2,6, 42,135,4,5,5,0,0,6, 43,148,4,7,7,0,1,8,
+ 44,163,4,3,4,0,1,14, 45,174,4,4,1,0,1,12, 46,186,4,1,2,1,2,14, 47,195,4,5,12,0,0,6,
+ 48,208,4,6,10,1,1,6, 49,222,4,5,10,2,1,6, 50,235,4,7,10,1,0,6, 51,250,4,6,10,1,1,6,
+ 52,264,4,7,10,1,0,6, 53,279,4,7,10,0,1,6, 54,294,4,6,10,1,1,6, 55,308,4,6,10,1,1,6,
+ 56,322,4,6,10,1,1,6, 57,336,4,6,10,1,1,6, 58,350,4,1,7,1,2,9, 59,359,4,3,9,0,1,9,
+ 60,370,4,6,7,1,1,8, 61,384,4,6,3,1,1,10, 62,398,4,6,7,1,1,8, 63,412,4,6,10,0,1,6,
+ 64,426,4,9,9,0,1,7, 65,443,4,9,10,1,1,6, 66,460,4,7,10,1,1,6, 67,475,4,9,10,1,1,6,
+ 68,492,4,10,10,1,1,6, 69,510,4,7,10,1,1,6, 70,525,4,7,10,1,0,6, 71,540,4,10,10,1,0,6,
+ 72,558,4,10,10,1,1,6, 73,576,4,3,10,1,1,6, 74,587,4,4,13,0,1,6, 75,599,4,9,10,1,1,6,
+ 76,616,4,7,10,1,1,6, 77,631,4,13,10,1,1,6, 78,652,4,10,10,1,1,6, 79,670,4,10,10,1,1,6,
+ 80,688,4,7,10,1,1,6, 81,703,4,10,12,1,1,6, 82,721,4,9,10,1,0,6, 83,738,4,7,11,1,1,5,
+ 84,753,4,9,10,0,0,6, 85,770,4,10,10,1,1,6, 86,788,4,9,10,1,1,6, 87,805,4,13,10,1,1,6,
+ 88,826,4,9,10,0,0,6, 89,843,4,9,10,0,0,6, 90,860,4,9,10,0,1,6, 91,877,4,3,13,1,1,6,
+ 92,888,4,5,12,2,2,6, 93,901,4,3,13,0,2,6, 94,912,4,7,5,0,1,6, 95,927,4,8,1,0,0,18,
+ 96,943,4,3,3,1,1,5, 97,954,4,6,7,0,1,9, 98,968,4,8,11,0,1,5, 99,984,4,6,7,0,1,9,
+ 100,998,4,8,11,0,1,5, 101,1014,4,6,7,0,1,9, 102,4,32,5,11,0,0,5, 103,17,32,6,11,1,1,9,
+ 104,31,32,8,11,0,1,5, 105,47,32,3,10,0,1,6, 106,58,32,3,14,-1,2,6, 107,69,32,8,11,0,1,5,
+ 108,85,32,3,11,0,1,5, 109,96,32,13,7,0,1,9, 110,117,32,8,7,0,1,9, 111,133,32,7,7,0,1,9,
+ 112,148,32,8,11,0,1,9, 113,164,32,8,11,0,1,9, 114,180,32,5,7,0,1,9, 115,193,32,5,7,0,1,9,
+ 116,206,32,4,9,0,1,7, 117,218,32,8,7,0,1,9, 118,234,32,7,7,0,1,9, 119,249,32,11,7,0,1,9,
+ 120,268,32,7,7,0,1,9, 121,283,32,7,11,0,1,9, 122,298,32,6,7,0,1,9, 123,312,32,3,14,1,1,5,
+ 124,323,32,1,11,3,3,5, 125,332,32,3,14,0,2,5, 126,343,32,6,2,1,1,10, 160,357,32,4,20,0,1,0,
+ 161,369,32,1,11,1,2,9, 162,378,32,6,9,1,1,8, 163,392,32,6,10,1,1,6, 164,406,32,7,7,0,1,9,
+ 165,421,32,7,10,1,0,6, 166,436,32,1,11,3,3,5, 167,445,32,6,13,0,1,6, 168,459,32,4,1,0,1,6,
+ 169,471,32,11,10,0,0,6, 170,490,32,4,6,0,0,6, 171,502,32,6,5,1,1,10, 172,516,32,6,4,1,1,10,
+ 173,530,32,4,1,0,1,12, 174,542,32,11,10,0,0,6, 175,561,32,5,1,0,0,6, 176,574,32,4,4,1,1,6,
+ 177,586,32,7,9,0,1,7, 178,601,32,4,6,0,1,6, 179,613,32,4,6,0,1,6, 180,625,32,3,3,1,1,5,
+ 181,636,32,7,11,1,1,9, 182,651,32,7,12,1,1,6, 183,666,32,1,2,1,2,10, 184,675,32,3,4,1,1,16,
+ 185,686,32,3,6,1,1,6, 186,697,32,4,6,0,1,6, 187,709,32,6,5,1,1,10, 188,723,32,10,10,1,1,6,
+ 189,741,32,10,10,1,1,6, 190,759,32,11,10,0,1,6, 191,778,32,6,11,0,1,9, 192,792,32,9,14,1,1,2,
+ 193,809,32,9,14,1,1,2, 194,826,32,9,14,1,1,2, 195,843,32,9,13,1,1,3, 196,860,32,9,12,1,1,4,
+ 197,877,32,9,14,1,1,2, 198,894,32,13,10,0,1,6, 199,915,32,9,14,1,1,6, 200,932,32,7,14,1,1,2,
+ 201,947,32,7,14,1,1,2, 202,962,32,7,14,1,1,2, 203,977,32,7,13,1,1,3, 204,992,32,4,14,0,1,2,
+ 205,1004,32,4,14,1,0,2, 206,4,60,5,14,0,0,2, 207,17,60,5,13,0,0,3, 208,30,60,10,10,1,1,6,
+ 209,48,60,10,14,1,1,2, 210,66,60,10,14,1,1,2, 211,84,60,10,14,1,1,2, 212,102,60,10,14,1,1,2,
+ 213,120,60,10,14,1,1,2, 214,138,60,10,13,1,1,3, 215,156,60,6,6,1,1,9, 216,170,60,10,10,1,1,6,
+ 217,188,60,10,14,1,1,2, 218,206,60,10,14,1,1,2, 219,224,60,10,14,1,1,2, 220,242,60,10,13,1,1,3,
+ 221,260,60,9,14,0,0,2, 222,277,60,7,10,1,1,6, 223,292,60,7,11,0,1,5, 224,307,60,6,11,0,1,5,
+ 225,321,60,6,11,0,1,5, 226,335,60,6,11,0,1,5, 227,349,60,6,10,0,1,6, 228,363,60,6,10,0,1,6,
+ 229,377,60,6,11,0,1,5, 230,391,60,11,7,0,1,9, 231,410,60,6,11,0,1,9, 232,424,60,6,11,0,1,5,
+ 233,438,60,6,11,0,1,5, 234,452,60,6,11,0,1,5, 235,466,60,6,10,0,1,6, 236,480,60,4,11,-1,1,5,
+ 237,492,60,4,11,0,0,5, 238,504,60,5,11,-1,0,5, 239,517,60,4,10,-1,1,6, 240,529,60,7,11,0,1,5,
+ 241,544,60,8,10,0,1,6, 242,560,60,7,11,0,1,5, 243,575,60,7,11,0,1,5, 244,590,60,7,11,0,1,5,
+ 245,605,60,7,10,0,1,6, 246,620,60,7,10,0,1,6, 247,635,60,7,5,0,1,9, 248,650,60,7,7,0,1,9,
+ 249,665,60,8,11,0,1,5, 250,681,60,8,11,0,1,5, 251,697,60,8,11,0,1,5, 252,713,60,8,10,0,1,6,
+ 253,729,60,7,15,0,1,5, 254,744,60,8,15,0,1,5, 255,760,60,7,14,0,1,6,
+ });
+
+ /// Font 0x40000010: glyphs as char, sheet x, y, w, h, before, after, top.
+ public static readonly RetailFont Stone36 = new(0x40000010u, 36, 27, 5, 5, 0x06005ED9u, 512, 402, 0x06005EDAu, 512, 402, new short[]
+ {
+ 32,5,5,14,36,0,1,0, 33,29,5,5,20,0,1,7, 34,44,5,5,5,1,1,7, 35,59,5,16,22,-1,0,6,
+ 36,85,5,14,26,1,1,4, 37,109,5,18,20,1,1,7, 38,137,5,29,20,1,1,7, 39,176,5,2,5,1,1,7,
+ 40,188,5,5,26,1,0,4, 41,203,5,4,25,0,2,5, 42,217,5,10,9,0,0,7, 43,237,5,10,10,2,4,13,
+ 44,257,5,3,6,-1,2,24, 45,270,5,9,1,-1,1,20, 46,289,5,2,3,1,3,24, 47,301,5,15,24,0,0,5,
+ 48,326,5,13,19,1,1,8, 49,349,5,5,19,1,2,8, 50,364,5,14,20,0,0,8, 51,388,5,13,19,1,1,8,
+ 52,411,5,14,20,1,0,7, 53,435,5,13,19,0,2,8, 54,458,5,14,19,1,0,8, 55,482,5,14,21,0,-1,7,
+ 56,5,51,14,19,0,1,8, 57,29,51,13,19,0,1,8, 58,52,51,2,11,1,2,16, 59,64,51,4,14,1,0,16,
+ 60,78,51,13,14,2,2,14, 61,101,51,10,5,1,0,16, 62,121,51,13,14,2,2,14, 63,144,51,11,20,0,1,7,
+ 64,165,51,21,22,1,1,6, 65,196,51,19,21,1,-1,7, 66,225,51,16,20,0,0,7, 67,251,51,20,20,1,0,7,
+ 68,281,51,21,23,1,1,4, 69,312,51,20,20,1,1,7, 70,342,51,13,26,0,0,7, 71,365,51,20,26,1,0,7,
+ 72,395,51,21,27,-1,0,1, 73,426,51,6,20,-1,1,7, 74,442,51,6,26,-1,1,7, 75,458,51,22,27,-1,-2,1,
+ 76,490,51,16,27,-2,0,1, 77,5,88,34,20,1,1,7, 78,49,88,18,22,0,2,6, 79,77,88,22,20,1,0,7,
+ 80,109,88,21,27,-1,1,7, 81,140,88,22,26,1,1,7, 82,172,88,18,20,0,-1,7, 83,200,88,14,20,1,1,7,
+ 84,224,88,24,21,0,-2,6, 85,258,88,17,20,1,2,7, 86,285,88,22,21,0,-2,7, 87,317,88,27,20,1,2,7,
+ 88,354,88,21,20,0,-1,7, 89,385,88,17,26,1,2,7, 90,412,88,21,22,0,1,6, 91,443,88,4,22,2,0,6,
+ 92,457,88,15,25,0,0,5, 93,482,88,4,22,0,2,6, 94,496,88,7,3,1,1,11, 95,5,125,16,1,0,0,26,
+ 96,31,125,7,4,3,-10,10, 97,48,125,12,14,0,1,14, 98,70,125,11,17,0,2,10, 99,91,125,11,11,0,1,16,
+ 100,112,125,12,17,0,1,10, 101,134,125,11,11,0,0,16, 102,155,125,9,18,0,0,16, 103,174,125,12,20,1,1,14,
+ 104,196,125,12,17,0,1,10, 105,218,125,4,16,0,1,11, 106,232,125,5,22,0,0,11, 107,247,125,12,17,0,1,10,
+ 108,269,125,7,16,0,0,11, 109,286,125,19,11,0,1,16, 110,315,125,12,11,0,1,16, 111,337,125,12,11,0,1,16,
+ 112,359,125,13,19,0,1,15, 113,382,125,12,17,0,2,16, 114,404,125,11,12,0,0,15, 115,425,125,9,11,0,2,16,
+ 116,444,125,13,12,-1,0,15, 117,467,125,12,11,1,0,16, 118,489,125,11,12,0,0,16, 119,5,157,18,11,1,0,16,
+ 120,33,157,18,18,-4,-1,15, 121,61,157,11,18,1,1,16, 122,82,157,13,13,0,0,15, 123,105,157,4,21,0,2,7,
+ 124,119,157,3,22,0,2,6, 125,132,157,4,21,0,2,7, 126,146,157,7,2,1,1,12, 160,163,157,14,36,0,1,0,
+ 161,187,157,5,20,0,1,16, 162,202,157,11,15,1,1,14, 163,223,157,15,21,0,1,7, 164,248,157,15,14,1,0,11,
+ 165,273,157,19,26,1,0,7, 167,302,157,11,21,1,1,7, 168,323,157,6,2,3,-9,12, 169,339,157,19,19,1,2,8,
+ 170,368,157,8,10,0,0,7, 174,386,157,19,19,1,2,8, 175,415,157,9,1,2,-11,13, 180,434,157,7,4,2,-9,10,
+ 181,451,157,12,15,0,1,16, 183,473,157,2,3,1,3,16, 184,485,157,5,5,2,-7,27, 186,500,157,7,8,0,1,8,
+ 191,5,203,11,20,0,1,16, 192,26,203,19,25,1,-1,3, 193,55,203,19,25,1,-1,3, 194,84,203,19,24,1,-1,4,
+ 195,113,203,19,23,1,-1,5, 196,142,203,19,23,1,-1,5, 197,171,203,19,25,1,-1,3, 198,200,203,32,21,1,1,7,
+ 199,242,203,20,25,1,0,7, 200,272,203,20,24,1,1,3, 201,302,203,20,24,1,1,3, 202,332,203,20,23,1,1,4,
+ 203,362,203,20,22,1,1,5, 204,392,203,7,24,-2,1,3, 205,409,203,7,24,-2,1,3, 206,426,203,7,23,-1,0,4,
+ 207,443,203,7,22,-2,1,5, 209,460,203,18,23,0,2,5, 210,5,238,22,24,1,0,3, 211,37,238,22,24,1,0,3,
+ 212,69,238,22,23,1,0,4, 213,101,238,22,22,1,0,5, 214,133,238,22,22,1,0,5, 215,165,238,0,36,0,1,0,
+ 216,175,238,22,24,1,0,5, 217,207,238,17,24,1,2,3, 218,234,238,17,24,1,2,3, 219,261,238,17,23,1,2,4,
+ 220,288,238,17,22,1,2,5, 223,315,238,14,23,0,1,11, 224,339,238,12,18,0,1,10, 225,361,238,12,18,0,1,10,
+ 226,383,238,12,17,0,1,11, 227,405,238,12,16,0,1,12, 228,427,238,12,16,0,1,12, 229,449,238,12,17,0,1,11,
+ 230,471,238,19,13,0,1,14, 231,5,284,12,16,0,0,16, 232,27,284,11,17,0,0,10, 233,48,284,11,17,0,0,10,
+ 234,69,284,11,16,0,0,11, 235,90,284,11,15,0,0,12, 236,111,284,7,17,-1,-1,10, 237,128,284,7,17,-2,0,10,
+ 238,145,284,7,16,-1,-1,11, 239,162,284,6,15,-1,0,12, 241,178,284,12,15,0,1,12, 242,200,284,12,17,0,1,10,
+ 243,222,284,12,17,0,1,10, 244,244,284,12,16,0,1,11, 245,266,284,12,15,0,1,12, 246,288,284,12,15,0,1,12,
+ 248,310,284,12,15,0,1,14, 249,332,284,12,17,1,0,10, 250,354,284,12,17,1,0,10, 251,376,284,12,16,1,0,11,
+ 252,398,284,12,15,1,0,12, 253,420,284,0,36,0,1,0, 255,430,284,11,22,1,1,12,
+ });
+
+}
diff --git a/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/SkillsPanel.cs b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/SkillsPanel.cs
new file mode 100644
index 0000000..080cc10
--- /dev/null
+++ b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/SkillsPanel.cs
@@ -0,0 +1,781 @@
+// SkillsPanel.cs - The DreamWeave Skills panel: retail's Character panel on its Skills page, drawn 1:1,
+// with "XP for next level" read from DreamWeave's chart past level 275 (DreamWeaveXp) instead of the
+// client's, which ends at 275 and shows a negative number there.
+//
+// Everything is the retail client's own: the positions are LayoutDesc 0x2100002E's (the Character panel,
+// page 0x1000022C), the pictures its 0x06 textures (GetIconTexture kind UiSprite) and the text its dat
+// fonts (Palatino_Linotype_14/16/18, Chat_PalatinoLinotype_Large and Stonehenge_36 for the level),
+// drawn glyph by glyph from their sheets (kind FontSheet) with the glyph tables in RetailData.g.cs.
+// An engine without those kinds (before 2026-11-07) gets flat stand-ins and ImGui's font, same layout.
+//
+// Design pixels: the panel is 300 wide inside a 5-pixel gold frame (retail's 0x0600612A..D); the
+// window is 310 at 100% and everything scales with its draw size (Ctrl+wheel over it).
+//
+// The tabs row is the drag handle; Attributes and Titles open AC's own Character and Character
+// Information panels; the minimize button closes this one. A row click selects a skill for the footer,
+// whose arrow raises it one rank (or trains it with credits) and "+10" ten ranks, as retail's do.
+//
+// AC's render thread. Reads SkillsReader's snapshot; reads and raises are queued for the tick.
+using System;
+using System.Collections.Generic;
+using System.Numerics;
+using ImGuiNET;
+using RynthCore.PluginSdk;
+
+namespace RynthCore.Plugin.RynthDreamWeave;
+
+internal sealed class SkillsPanel
+{
+ // ── LayoutDesc 0x2100002E (design pixels) ───────────────────────────
+ public const int PanelW = 300, Frame = 5;
+ private const int TabW = 92, TabH = 25, CapW = 17, CloseX = 276, CloseW = 24;
+ private const int HeaderH = 105, RuleH = 7, ListTop = 112, FooterH = 55, RowH = 20, BannerW = 280;
+ private const int ScrollX = 281, ScrollW = 16, ScrollBtn = 16, ScrollCap = 3;
+
+ private const uint ArtEdgeTop = 0x0600612Au, ArtEdgeLeft = 0x0600612Bu, ArtEdgeBottom = 0x0600612Cu, ArtEdgeRight = 0x0600612Du,
+ ArtCorner = 0x06006129u, ArtPage = 0x06004CC2u, ArtClose = 0x06001393u, ArtClosePressed = 0x06001394u,
+ ArtHeaderRule = 0x06004CB8u, ArtPlate = 0x060011A6u, ArtXpFill = 0x060011A5u, ArtRankFill = 0x06000F8Au, ArtRule = 0x06004CC7u, ArtRowSelected = 0x06000F93u,
+ ArtTrack = 0x06004C5Fu, ArtThumbTop = 0x06004C60u, ArtThumbMid = 0x06004C63u, ArtThumbBottom = 0x06004C66u,
+ ArtScrollUp = 0x06004C69u, ArtScrollDown = 0x06004C6Cu,
+ ArtRaise = 0x06004CB6u, ArtRaiseGhost = 0x06004CB7u, ArtRaiseTen = 0x0600712Bu, ArtRaiseTenGhost = 0x0600712Cu;
+ // Tab 3-slices: "Open" (the shown page) and "Closed" states.
+ private static readonly uint[] TabOpen = { 0x06005D92u, 0x06005D94u, 0x06005D96u };
+ private static readonly uint[] TabClosed = { 0x06005D93u, 0x06005D95u, 0x06005D97u };
+
+ private static uint Banner(SkillSection s) => s switch
+ {
+ SkillSection.Specialized => 0x06000F90u,
+ SkillSection.Trained => 0x06000F86u,
+ SkillSection.Untrained => 0x06000F98u,
+ _ => 0x06000F89u,
+ };
+
+ // ── Colours (ImGui ABGR) ────────────────────────────────────────────
+ private const uint White = 0xFFFFFFFFu, Black = 0xFF000000u;
+ private static readonly uint Body = Rgb(235, 230, 209); // OpenAC's "parchment" for the footer prompt
+ private static readonly uint TabOn = Rgb(204, 204, 204), TabOff = Rgb(127, 127, 127);
+ private static readonly uint Gold = Rgb(255, 242, 127); // the level number (the layout's 1, .949, .498)
+ private static readonly uint Green = Rgb(0, 255, 0), Red = Rgb(255, 0, 0);
+
+ private static uint Rgb(int r, int g, int b) => 0xFF000000u | ((uint)b << 16) | ((uint)g << 8) | (uint)r;
+
+ private readonly RynthCoreHost _host;
+ private readonly SkillsReader _reader;
+ private readonly Action _onTick;
+ private readonly Action _chat;
+ private readonly string _title;
+
+ private int _tab = 1; // 0 Attributes, 1 Skills, 2 Titles
+ private uint _selected; // the skill selected on the Skills page
+ private int _attrSelected = -1; // the row selected on the Attributes page (AttributesPage.Rows)
+ private uint _titleSelected; // the title selected on the Titles page
+ private float _scroll; // rows scrolled (fractional while the thumb is dragged)
+ private float _attrScroll, _titleScroll;
+ private readonly Func _replacesAc;
+ private readonly Action _setReplacesAc;
+ private bool _thumbDrag;
+ private float _thumbGrab;
+ // Resizing from the bottom edge (retail's Character window: height only). Design px, frame included.
+ private bool _resizing;
+ private float _resizeStartH, _resizeStartY, _dragH;
+ private float _wantH; // the height asked for after a resize, until the window has it
+ private long _wantSince;
+ private ImDrawListPtr _dl;
+ private Vector2 _origin; // the content's top-left (inside the frame), screen pixels
+ private float _k = 1f; // screen pixels per design pixel
+
+ public SkillsPanel(RynthCoreHost host, SkillsReader reader, string title, Action onTick, Action chat,
+ Func replacesAc, Action setReplacesAc)
+ {
+ _host = host;
+ _reader = reader;
+ _title = title;
+ _onTick = onTick;
+ _chat = chat;
+ _replacesAc = replacesAc;
+ _setReplacesAc = setReplacesAc;
+ }
+
+ /// Logout: nothing selected, back to the top.
+ public void Reset()
+ {
+ _selected = 0;
+ _attrSelected = -1;
+ _titleSelected = 0;
+ _scroll = _attrScroll = _titleScroll = 0;
+ }
+
+ /// Opens on a page (0 Attributes, 1 Skills, 2 Titles): AC's own Character window asked for (the replace option).
+ public void ShowPage(int tab) => _tab = Math.Clamp(tab, 0, 2);
+
+ /// The page shown (0 Attributes, 1 Skills, 2 Titles).
+ public int CurrentPage => _tab;
+
+ ///
+ /// Draws the panel into the host's frameless window (its body, edge to edge) and returns the size it
+ /// wants (the host fits the window to it). : popped out (the engine draws no
+ /// retail pictures there).
+ ///
+ public Vector2 Draw(bool popped)
+ {
+ if (_reader.ReadDue()) _onTick(() => _reader.Read(_host));
+ SkillsSheet sheet = _reader.Sheet;
+
+ Vector2 start = ImGui.GetCursorScreenPos();
+ Vector2 avail = ImGui.GetContentRegionAvail();
+ if (avail.X < 60 || avail.Y < 60) return new Vector2(0, Math.Max(60, avail.Y));
+ // The scale is the window's own draw size (Ctrl+wheel on it, 30-250%; Settings > UI > Toolbar), 100% =
+ // retail's own pixels until it's set: never the window's width, Windows' display scaling or the text
+ // size, which every panel follows ("All panels"; Tom's is 160%). Retail's panel is a fixed 300 wide and
+ // isn't scaled, and the window is fitted to the panel (2026-11-07: the window's width, the DPI-scaled UI
+ // font, then the text size drew it 1.4-1.6x: "still massive").
+ int pct = _host.PanelScale(_title);
+ _k = pct > 0 ? Math.Clamp(pct / 100f, 0.3f, 2.5f) : 1f;
+ _dl = ImGui.GetWindowDrawList();
+ _origin = new Vector2(MathF.Round(start.X + Frame * _k), MathF.Round(start.Y + Frame * _k));
+
+ // The height drawn: the window's, or while the bottom edge is dragged the dragged one (drawn past the
+ // window's edge, the way retail's frame follows the mouse), and after the release the asked-for one
+ // until the host has fitted the window to it ("fitHeight").
+ float windowH = avail.Y / _k;
+ if (_wantH > 0 && (MathF.Abs(windowH - _wantH) < 1f || Environment.TickCount64 - _wantSince > 2000)) _wantH = 0;
+ float panelH = MathF.Floor(_resizing ? _dragH : _wantH > 0 ? _wantH : windowH);
+ panelH = Math.Max(panelH, MinPanelH);
+ float contentH = panelH - 2 * Frame;
+ int pageH = (int)contentH - TabH;
+
+ float panelW = (PanelW + 2 * Frame) * _k;
+ _dl.PushClipRect(start, start + new Vector2(Math.Max(avail.X, panelW), Math.Max(avail.Y, panelH * _k)), false);
+ try
+ {
+ DrawPanel(sheet, pageH, popped);
+ }
+ finally { _dl.PopClipRect(); }
+
+ ImGui.SetCursorScreenPos(start);
+ ImGui.Dummy(new Vector2(avail.X, avail.Y));
+ return new Vector2(MathF.Ceiling(panelW), MathF.Ceiling(panelH * _k));
+ }
+
+ /// The smallest panel retail allows: header, three rows, footer (design px, frame included).
+ private const int MinPanelH = TabH + ListTop + 3 * RowH + RuleH + 3 + FooterH + 2 * Frame;
+
+ private void DrawPanel(SkillsSheet sheet, int pageH, bool popped)
+ {
+ Page(pageH);
+ Tabs();
+ _tipKey = 0;
+ if (_tab == 2) TitlesPage(sheet, pageH);
+ else
+ {
+ Header(sheet);
+ if (_tab == 0) AttributesPageDraw(sheet, pageH);
+ else
+ {
+ List rows = SkillsLayout.Rows(sheet.Skills);
+ SkillLine? selected = Find(sheet, _selected);
+ if (selected == null) _selected = 0;
+ SkillList(sheet, rows, pageH);
+ Footer(sheet, selected, pageH);
+ }
+ if (!sheet.HasNumbers)
+ {
+ string wait = _reader.Message.Length > 0 ? _reader.Message : "Reading your character...";
+ Text(RetailData.Pal16, wait, 0, TabH + ListTop, BannerW, RowH * 2, White, center: true);
+ }
+ }
+ UpdateTooltip();
+ FrameArt(TabH + pageH);
+ FrameHandles(TabH + pageH, popped);
+ OptionsMenu();
+ Tooltip();
+ }
+
+ // ── The Attributes page (the header and footer are the Skills page's) ──
+
+ private void AttributesPageDraw(SkillsSheet sheet, int pageH)
+ {
+ IReadOnlyList rows = sheet.AttributeRows;
+ int top = TabH + ListTop;
+ int listH = pageH - ListTop - FooterH - RuleH - 3;
+ int visible = Math.Max(1, listH / RowH);
+ float maxScroll = Math.Max(0, rows.Count - visible);
+
+ ImGui.SetCursorScreenPos(P(0, top));
+ ImGui.InvisibleButton("##dw_attr_list", S(BannerW, listH));
+ bool listHovered = ImGui.IsItemHovered();
+ bool clicked = ImGui.IsItemClicked(ImGuiMouseButton.Left);
+ if (listHovered && !ImGui.GetIO().KeyCtrl) _attrScroll -= ImGui.GetIO().MouseWheel * 3;
+ _attrScroll = Math.Clamp(_attrScroll, 0, maxScroll);
+ int first = (int)MathF.Round(_attrScroll);
+
+ _dl.PushClipRect(P(0, top), P(BannerW, top + listH), true);
+ try
+ {
+ for (int i = first, y = top; i < rows.Count && y < top + listH; i++, y += RowH)
+ {
+ AttributeLine a = rows[i];
+ int row = AttributesPage.RowIndex(a.Kind, a.Stype);
+ if (row == _attrSelected) SpriteCropped(ArtRowSelected, 0, y, BannerW, RowH, 282, 20, 0x60206080u);
+ Icon(a.Icon, 0, y, 20);
+ Text(RetailData.Pal18, a.Name, 25, y, 150, RowH, White);
+ uint color = a.Buffed > a.Base ? Green : a.Buffed < a.Base ? Red : White;
+ Text(RetailData.Pal18, a.ValueText, 125, y, 149, RowH, color, right: true);
+ if (clicked && Hit(0, y, BannerW, RowH)) _attrSelected = row;
+ if (listHovered && Hit(0, y, BannerW, RowH)) Hover(1000u + (uint)row, AttributesPage.Tip(a));
+ }
+ }
+ finally { _dl.PopClipRect(); }
+ if (rows.Count > visible) ScrollBar("attr", ref _attrScroll, top, listH, visible, rows.Count, maxScroll);
+
+ AttributeLine? sel = null;
+ foreach (AttributeLine a in rows) if (AttributesPage.RowIndex(a.Kind, a.Stype) == _attrSelected) sel = a;
+ (string title, string delta) = AttributesPage.FooterTitle(sel);
+ var (one, two) = AttributesPage.FooterLines(sheet, sel);
+ FooterBox(pageH, title, delta, sel?.BuffDelta ?? 0, one, two, sel != null,
+ sel != null ? AttributesPage.RankProgress(sel) : 0,
+ sel != null && AttributesPage.CanRaiseOne(sheet, sel), sel != null && AttributesPage.CanRaiseTen(sheet, sel), showTen: true,
+ sel == null ? null : () => _onTick(() => _reader.Raise(_host, sel, ten: false, _chat)),
+ sel == null ? null : () => _onTick(() => _reader.Raise(_host, sel, ten: true, _chat)));
+ }
+
+ // ── The Titles page (0x10000539) ────────────────────────────────────
+
+ private const uint ArtTitleRule = 0x06001420u;
+ // The red button, a 3-slice: left 32, a stretched 15-wide middle, right 32; pressed -1, ghosted -2.
+ private static readonly uint[] ArtRedButton = { 0x06004C96u, 0x06004C99u, 0x06004C9Cu };
+ private const int TitleRowH = 24;
+
+ private void TitlesPage(SkillsSheet sheet, int pageH)
+ {
+ int y = TabH;
+ TitleList book = sheet.TitleBook;
+ Text(RetailData.Pal18, "Current Display Title:", 8, y + 20, 270, 18, White);
+ string current = book.Displayed != 0 ? SkillsLayout.Title((int)book.Displayed) : "";
+ Text(RetailData.Pal18, current.Length > 0 ? current : "None", 8, y + 40, 270, 18, Gold, center: true);
+ if (Hit(8, y + 40, 270, 18))
+ Hover(2u, "This is the title that all other players will see when they examine your character.");
+ Sprite(ArtTitleRule, 0, y + 60, PanelW, 9, 0xFF54788Fu);
+ Text(RetailData.Pal18, "All Available Titles:", 8, y + 70, 270, 18, White);
+
+ // The button anchors to the bottom (retail: 200x32 at the page's foot), the rule 10 above it.
+ int buttonY = y + pageH - 37;
+ int ruleY = buttonY - 10;
+ int top = y + 90, listH = Math.Max(TitleRowH, ruleY - 4 - top);
+ List<(uint Id, string Text)> titles = book.Sorted();
+ int visible = Math.Max(1, listH / TitleRowH);
+ float maxScroll = Math.Max(0, titles.Count - visible);
+
+ ImGui.SetCursorScreenPos(P(8, top));
+ ImGui.InvisibleButton("##dw_title_list", S(270, listH));
+ bool listHovered = ImGui.IsItemHovered();
+ bool clicked = ImGui.IsItemClicked(ImGuiMouseButton.Left);
+ if (listHovered && !ImGui.GetIO().KeyCtrl) _titleScroll -= ImGui.GetIO().MouseWheel * 3;
+ _titleScroll = Math.Clamp(_titleScroll, 0, maxScroll);
+ int first = (int)MathF.Round(_titleScroll);
+
+ _dl.PushClipRect(P(8, top), P(278, top + listH), true);
+ try
+ {
+ if (!book.Known)
+ Text(RetailData.Pal16, "Your titles show here after your next login.", 8, top, 270, TitleRowH * 2, White, center: true);
+ for (int i = first, ry = top; i < titles.Count && ry < top + listH; i++, ry += TitleRowH)
+ {
+ (uint id, string text) = titles[i];
+ if (id == _titleSelected) SpriteCropped(ArtRowSelected, 8, ry, 270, TitleRowH, 282, 20, 0x60206080u);
+ Text(RetailData.Pal16, text, 12, ry, 262, TitleRowH, id == book.Displayed ? Gold : White);
+ if (clicked && Hit(8, ry, 270, TitleRowH)) _titleSelected = id;
+ }
+ }
+ finally { _dl.PopClipRect(); }
+ if (titles.Count > visible) ScrollBar("title", ref _titleScroll, top, listH, visible, titles.Count, maxScroll);
+
+ Sprite(ArtTitleRule, 0, ruleY, PanelW, 9, 0xFF54788Fu);
+ // "Set as Display Title": ghosted until another title than the displayed one is selected.
+ bool can = _titleSelected != 0 && _titleSelected != book.Displayed;
+ ImGui.SetCursorScreenPos(P(53, buttonY));
+ bool pressed = ImGui.InvisibleButton("##dw_set_title", S(200, 32));
+ bool held = ImGui.IsItemActive();
+ uint d = !can ? 2u : held ? 1u : 0u;
+ Sprite(ArtRedButton[0] - d, 53, buttonY, 32, 32, 0xFF20208Cu);
+ Sprite(ArtRedButton[1] - d, 85, buttonY, 136, 32, 0xFF20208Cu);
+ Sprite(ArtRedButton[2] - d, 221, buttonY, 32, 32, 0xFF20208Cu);
+ Text(RetailData.Pal18, "Set as Display Title", 53, buttonY, 200, 32, can ? White : TabOff, center: true);
+ if (pressed && can)
+ {
+ uint id = _titleSelected;
+ _onTick(() => _reader.SetDisplayTitle(_host, id, _chat));
+ }
+ }
+
+ // ── Options (right-click the frame or the tabs) ─────────────────────
+
+ private void OptionsMenu()
+ {
+ if (ImGui.IsMouseClicked(ImGuiMouseButton.Right) && Hit(-Frame, -Frame, PanelW + 2 * Frame, TabH + Frame))
+ ImGui.OpenPopup("##dw_skills_options");
+ if (!ImGui.BeginPopup("##dw_skills_options")) return;
+ try
+ {
+ bool replace = _replacesAc();
+ if (ImGui.Checkbox("Open this instead of AC's Character window", ref replace)) _setReplacesAc(replace);
+ if (ImGui.IsItemHovered())
+ ImGui.SetTooltip("AC's toolbar button and key for the Character window open this panel instead.");
+ }
+ finally { ImGui.EndPopup(); }
+ }
+
+ ///
+ /// Retail's window handling: the gold frame moves the window (an 8 px band round the edge, as AC's
+ /// window border), and the bottom edge and its corners resize it, height only, as AC's Character window.
+ /// The cursor shows which.
+ ///
+ private void FrameHandles(int contentH, bool popped)
+ {
+ const int Band = 8; // retail's border band: the frame and 3 px inside it
+ int inside = Band - Frame;
+
+ // Resize first: the bottom edge (and its corners) belong to the resize, as in retail.
+ ImGui.SetCursorScreenPos(P(-Frame, contentH - inside));
+ ImGui.InvisibleButton("##dw_resize", S(PanelW + 2 * Frame, Band));
+ bool resizeHot = ImGui.IsItemHovered() || ImGui.IsItemActive();
+ if (!popped)
+ {
+ float mouseY = ImGui.GetMousePos().Y / _k;
+ if (ImGui.IsItemActivated())
+ {
+ _resizing = true;
+ _resizeStartH = contentH + 2 * Frame;
+ _resizeStartY = mouseY;
+ _dragH = _resizeStartH;
+ }
+ if (_resizing && ImGui.IsItemActive())
+ {
+ float screenH = ImGui.GetIO().DisplaySize.Y / _k;
+ _dragH = Math.Clamp(_resizeStartH + (mouseY - _resizeStartY), MinPanelH, Math.Max(MinPanelH, screenH));
+ }
+ if (_resizing && !ImGui.IsItemActive())
+ {
+ _resizing = false;
+ _wantH = MathF.Floor(_dragH);
+ _wantSince = Environment.TickCount64;
+ }
+ }
+ if (resizeHot && !popped) ImGui.SetMouseCursor(ImGuiMouseCursor.ResizeNS);
+
+ // Move: the top band and the two sides.
+ bool moveHot = false;
+ void MoveBand(string id, int x, int y, int w, int h)
+ {
+ ImGui.SetCursorScreenPos(P(x, y));
+ ImGui.InvisibleButton(id, S(w, h));
+ _host.PanelDragWithLastItem();
+ moveHot |= ImGui.IsItemHovered() || ImGui.IsItemActive();
+ }
+ MoveBand("##dw_move_top", -Frame, -Frame, PanelW + 2 * Frame, Frame);
+ MoveBand("##dw_move_left", -Frame, 0, Band, contentH - inside);
+ MoveBand("##dw_move_right", PanelW - inside, 0, Band, contentH - inside);
+ if (moveHot && !resizeHot) ImGui.SetMouseCursor(ImGuiMouseCursor.ResizeAll);
+ }
+
+ // ── Frame, page, tabs ───────────────────────────────────────────────
+
+ private void FrameArt(int contentH)
+ {
+ int w = PanelW;
+ Sprite(ArtEdgeTop, -Frame, -Frame, w + 2 * Frame, Frame, 0xFF54788Fu);
+ Sprite(ArtEdgeBottom, -Frame, contentH, w + 2 * Frame, Frame, 0xFF54788Fu);
+ Sprite(ArtEdgeLeft, -Frame, -Frame, Frame, contentH + 2 * Frame, 0xFF54788Fu);
+ Sprite(ArtEdgeRight, w, -Frame, Frame, contentH + 2 * Frame, 0xFF54788Fu);
+ Sprite(ArtCorner, -Frame, -Frame, Frame, Frame, 0xFF6B95B1u);
+ Sprite(ArtCorner, w, -Frame, Frame, Frame, 0xFF6B95B1u);
+ Sprite(ArtCorner, -Frame, contentH, Frame, Frame, 0xFF6B95B1u);
+ Sprite(ArtCorner, w, contentH, Frame, Frame, 0xFF6B95B1u);
+ }
+
+ private void Page(int pageH)
+ {
+ // The page background is a 48x48 black at alpha 175, tiled: the world shows through, as retail.
+ // It runs under the tab row too (retail's slanted tab corners show it, not the world).
+ IntPtr t = Tex(RynthIconKind.UiSprite, ArtPage);
+ int fullH = TabH + pageH;
+ for (int y = 0; y < fullH; y += 48)
+ for (int x = 0; x < PanelW; x += 48)
+ {
+ int w = Math.Min(48, PanelW - x), h = Math.Min(48, fullH - y);
+ if (t != IntPtr.Zero)
+ _dl.AddImage(t, P(x, y), P(x + w, y + h), Vector2.Zero, new Vector2(w / 48f, h / 48f));
+ else
+ _dl.AddRectFilled(P(x, y), P(x + w, y + h), 0xAF000000u);
+ }
+ }
+
+ private void Tabs()
+ {
+ string[] names = { "Attributes", "Skills", "Titles" };
+ for (int i = 0; i < 3; i++)
+ {
+ bool open = i == _tab;
+ uint[] art = open ? TabOpen : TabClosed;
+ int x0 = i * TabW;
+ // Left cap, a stretched middle, then the right cap: the layout puts it at 83 in a 92-wide tab,
+ // so only its first 9 columns show (the slant), as retail.
+ Sprite(art[0], x0, 0, CapW, TabH, open ? 0xFF161E24u : Black);
+ Sprite(art[1], x0 + CapW, 0, TabW - 2 * CapW + 8, TabH, open ? 0xFF161E24u : Black);
+ SpriteCropped(art[2], x0 + TabW - 9, 0, 9, TabH, 17, 25, open ? 0xFF161E24u : Black);
+ Text(RetailData.Pal16, names[i], x0, 0, TabW, TabH, open ? TabOn : TabOff, center: true);
+ // Tabs only switch the page, as retail's (the window moves by its frame).
+ ImGui.SetCursorScreenPos(P(x0, 0));
+ if (ImGui.InvisibleButton("##dw_tab" + i, S(TabW, TabH))) _tab = i;
+ }
+
+ ImGui.SetCursorScreenPos(P(CloseX, 0));
+ bool closed = ImGui.InvisibleButton("##dw_close", S(CloseW, TabH));
+ bool held = ImGui.IsItemActive();
+ Sprite(held ? ArtClosePressed : ArtClose, CloseX, 0, CloseW, TabH, 0xFF20282Eu);
+ if (closed) _host.SetPanelOpen(_title, RynthPanelOpen.Close);
+ }
+
+ // ── The header (0x10000230, shared with the Attributes page) ─────────
+
+ private void Header(SkillsSheet s)
+ {
+ int y = TabH;
+ Text(RetailData.Pal18, s.Name, 0, y, 230, 20, White, center: true);
+ Text(RetailData.Pal14, s.Identity, 0, y + 20, 230, 15, White, center: true);
+ Text(RetailData.Pal14, s.PkStatus, 0, y + 35, 230, 15, White, center: true);
+ if (s.LuminanceMax is long max)
+ {
+ Text(RetailData.Pal16, "Luminance:", 0, y + 52, 110, 18, White);
+ Text(RetailData.Pal16, $"{SkillsSheet.Xp(s.LuminanceAvailable ?? 0)} / {SkillsSheet.Xp(max)}", 110, y + 52, 120, 18, White, right: true);
+ }
+ Text(RetailData.Pal16, "Total Experience (XP):", 0, y + 70, 130, 18, White);
+ Text(RetailData.Pal16, s.TotalXp >= 0 ? SkillsSheet.Xp(s.TotalXp) : "", 130, y + 70, 100, 18, White, right: true);
+ Sprite(ArtPlate, 0, y + 88, 230, 17, 0xFF1E2A4Au);
+ // The plate's red inset (the layout's child at (0,1) 230x15) is a bar: it fills with the way
+ // through the current level, on DreamWeave's chart past 275.
+ float progress = SkillsLayout.LevelProgress(s.Level, s.TotalXp);
+ if (progress > 0)
+ {
+ IntPtr fill = Tex(RynthIconKind.UiSprite, ArtXpFill);
+ float w = 230 * progress;
+ if (fill != IntPtr.Zero) _dl.AddImage(fill, P(0, y + 89), P(w, y + 104), Vector2.Zero, new Vector2(progress, 1));
+ else _dl.AddRectFilled(P(0, y + 89), P(w, y + 104), Rgb(160, 30, 10));
+ }
+ Text(RetailData.Pal16, "XP for next level:", 0, y + 88, 130, 17, White);
+ Text(RetailData.Pal16, s.NextLevelText, 130, y + 88, 100, 17, White, right: true);
+ Sprite(ArtHeaderRule, 230, y, 5, HeaderH, 0xFF54788Fu);
+ Text(RetailData.Pal16, "Character", 235, y + 1, 65, 17, White, center: true);
+ Text(RetailData.Pal16, "Level", 235, y + 18, 65, 17, White, center: true);
+ if (s.Level > 0)
+ Text(RetailData.Stone36, SkillsSheet.Number(s.Level), 235, y + 35, 65, 50, Gold, center: true, outline: true);
+ Sprite(ArtRule, 0, y + HeaderH, PanelW, RuleH, 0xFF54788Fu);
+ }
+
+ // ── The list (0x1000023D) and its scrollbar (0x1000023E) ────────────
+
+ private void SkillList(SkillsSheet sheet, List rows, int pageH)
+ {
+ int top = TabH + ListTop;
+ int listH = pageH - ListTop - FooterH - RuleH - 3;
+ int visible = Math.Max(1, listH / RowH);
+ float maxScroll = Math.Max(0, rows.Count - visible);
+
+ // Wheel over the list scrolls it (Ctrl+wheel is the host's draw size).
+ ImGui.SetCursorScreenPos(P(0, top));
+ ImGui.InvisibleButton("##dw_list", S(BannerW, listH));
+ bool listHovered = ImGui.IsItemHovered();
+ bool clicked = ImGui.IsItemClicked(ImGuiMouseButton.Left);
+ if (listHovered && !ImGui.GetIO().KeyCtrl) _scroll -= ImGui.GetIO().MouseWheel * 3;
+ _scroll = Math.Clamp(_scroll, 0, maxScroll);
+ int first = (int)MathF.Round(_scroll);
+
+ Vector2 clipMin = P(0, top), clipMax = P(BannerW, top + listH);
+ _dl.PushClipRect(clipMin, clipMax, true);
+ try
+ {
+ for (int i = first, y = top; i < rows.Count && y < top + listH; i++, y += RowH)
+ {
+ SkillRow row = rows[i];
+ if (row.IsBanner)
+ {
+ SpriteCropped(Banner(row.Section), 0, y, BannerW, RowH, 282, 20, 0xFF3A1E2Au);
+ Text(RetailData.Pal18, SkillsLayout.Title(row.Section), 4, y, BannerW - 8, RowH, White);
+ continue;
+ }
+ SkillLine s = row.Skill!;
+ if (s.Id == _selected) SpriteCropped(ArtRowSelected, 0, y, BannerW, RowH, 282, 20, 0x60206080u);
+ Icon(s.Icon, 0, y, 20);
+ // The list's rows are Palatino 18 (retail's skill rows), the header and footer 16.
+ Text(RetailData.Pal18, s.Name, 25, y, 150, RowH, White);
+ uint color = s.Buffed > s.Base ? Green : s.Buffed < s.Base ? Red : White;
+ Text(RetailData.Pal18, SkillsSheet.Number(s.Buffed), 175, y, 99, RowH, color, right: true);
+ if (clicked && Hit(0, y, BannerW, RowH)) _selected = s.Id;
+ if (listHovered && Hit(0, y, BannerW, RowH) && RetailData.Skill(s.Id) is RetailSkill info)
+ Hover(s.Id, info.Formula.Length > 0 ? info.Formula + "\n" + info.Description : info.Description);
+ }
+ }
+ finally
+ {
+ _dl.PopClipRect();
+ }
+
+ if (rows.Count > visible) ScrollBar("skills", ref _scroll, top, listH, visible, rows.Count, maxScroll);
+ }
+
+ // ── The tooltip (drawn last, over everything) ───────────────────────
+ // Hovering a row a moment shows retail's tooltip: a skill's formula and description, an attribute's
+ // or vital's text, the displayed title's explanation.
+
+ private const long TooltipDelayMs = 400;
+ private const int TooltipWrap = 230; // design px: retail breaks the description at about this width
+ private static readonly uint TooltipBorder = Rgb(196, 164, 92), TooltipBack = 0xE0000000u;
+ private uint _hoverId, _tipKey;
+ private long _hoverSince;
+ private string _tipCandidate = "";
+ private string? _tipText;
+
+ /// This frame, the mouse is on something with a tooltip ( tells one row from another).
+ private void Hover(uint key, string text)
+ {
+ _tipKey = key;
+ _tipCandidate = text;
+ }
+
+ private void UpdateTooltip()
+ {
+ long now = Environment.TickCount64;
+ if (_tipKey != _hoverId) { _hoverId = _tipKey; _hoverSince = now; }
+ _tipText = _tipKey != 0 && now - _hoverSince >= TooltipDelayMs && _tipCandidate.Length > 0 ? _tipCandidate : null;
+ }
+
+ private void Tooltip()
+ {
+ if (_tipText == null) return;
+ RetailFont f = RetailData.Pal14;
+ List lines = f.Wrap(_tipText, TooltipWrap);
+ if (lines.Count == 0) return;
+ int w = 0;
+ foreach (string l in lines) w = Math.Max(w, f.Measure(l));
+ int boxW = w + 8, boxH = lines.Count * f.LineHeight + 6;
+
+ // Below and right of the cursor, kept on screen. Design px from the panel's origin.
+ Vector2 mouse = ImGui.GetMousePos(), screen = ImGui.GetIO().DisplaySize;
+ float x = (mouse.X - _origin.X) / _k + 14, y = (mouse.Y - _origin.Y) / _k + 16;
+ float maxX = (screen.X - _origin.X) / _k - boxW - 2, maxY = (screen.Y - _origin.Y) / _k - boxH - 2;
+ int bx = (int)MathF.Round(Math.Max(-_origin.X / _k, Math.Min(x, maxX)));
+ int by = (int)MathF.Round(Math.Max(-_origin.Y / _k, Math.Min(y, maxY)));
+
+ ImDrawListPtr saved = _dl;
+ _dl = ImGui.GetForegroundDrawList();
+ try
+ {
+ _dl.AddRectFilled(P(bx, by), P(bx + boxW, by + boxH), TooltipBack);
+ _dl.AddRect(P(bx, by), P(bx + boxW, by + boxH), TooltipBorder, 0, ImDrawFlags.None, Math.Max(1f, _k));
+ for (int i = 0; i < lines.Count; i++)
+ Text(f, lines[i], bx + 4, by + 3 + i * f.LineHeight, boxW - 8, f.LineHeight, White);
+ }
+ finally { _dl = saved; }
+ }
+
+
+
+ private void ScrollBar(string id, ref float scroll, int top, int h, int visible, int total, float maxScroll)
+ {
+ // The track: a chain of 16x32 links, tiled.
+ IntPtr track = Tex(RynthIconKind.UiSprite, ArtTrack);
+ for (int y = top + ScrollBtn; y < top + h - ScrollBtn; y += 32)
+ {
+ int th = Math.Min(32, top + h - ScrollBtn - y);
+ if (track != IntPtr.Zero) _dl.AddImage(track, P(ScrollX, y), P(ScrollX + ScrollW, y + th), Vector2.Zero, new Vector2(1, th / 32f));
+ else _dl.AddRectFilled(P(ScrollX + 6, y), P(ScrollX + 10, y + th), 0xFF3C6A8Au);
+ }
+ // The arrows.
+ if (Button("##dw_up_" + id, ArtScrollUp, ScrollX, top, ScrollW, ScrollBtn)) scroll = Math.Max(0, scroll - 1);
+ if (Button("##dw_dn_" + id, ArtScrollDown, ScrollX, top + h - ScrollBtn, ScrollW, ScrollBtn)) scroll = Math.Min(maxScroll, scroll + 1);
+
+ // The thumb: caps and a stretched blue middle, sized to the share of the list that shows.
+ int trackTop = top + ScrollBtn, trackH = h - 2 * ScrollBtn;
+ if (trackH <= 8) return;
+ int thumbH = Math.Clamp((int)(trackH * visible / (float)total), 16, trackH);
+ int thumbY = trackTop + (int)((trackH - thumbH) * (maxScroll > 0 ? scroll / maxScroll : 0));
+ ImGui.SetCursorScreenPos(P(ScrollX, trackTop));
+ ImGui.InvisibleButton("##dw_track_" + id, S(ScrollW, trackH));
+ float mouseY = (ImGui.GetMousePos().Y - _origin.Y) / _k;
+ if (ImGui.IsItemActivated())
+ {
+ if (mouseY >= thumbY && mouseY < thumbY + thumbH) { _thumbDrag = true; _thumbGrab = mouseY - thumbY; }
+ else scroll = Math.Clamp(scroll + (mouseY < thumbY ? -visible : visible), 0, maxScroll);
+ }
+ if (_thumbDrag && ImGui.IsItemActive() && trackH > thumbH)
+ scroll = Math.Clamp((mouseY - _thumbGrab - trackTop) / (trackH - thumbH) * maxScroll, 0, maxScroll);
+ if (!ImGui.IsItemActive()) _thumbDrag = false;
+ Sprite(ArtThumbTop, ScrollX, thumbY, ScrollW, ScrollCap, 0xFF8C5A1Eu);
+ Sprite(ArtThumbMid, ScrollX, thumbY + ScrollCap, ScrollW, thumbH - 2 * ScrollCap, 0xFF8C3A10u);
+ Sprite(ArtThumbBottom, ScrollX, thumbY + thumbH - ScrollCap, ScrollW, ScrollCap, 0xFF8C5A1Eu);
+ }
+
+ // ── The footer (0x10000240 with nothing selected, 0x10000247 with a row), shared by both pages ──
+
+ private void Footer(SkillsSheet sheet, SkillLine? s, int pageH)
+ {
+ (string title, string delta) = SkillsLayout.FooterTitle(s);
+ var (one, two) = SkillsLayout.FooterLines(sheet, s);
+ // The arrow raises one rank (trains an untrained skill); +10 shows for trained and specialized.
+ FooterBox(pageH, title, delta, s?.BuffDelta ?? 0, one, two, s != null,
+ s != null ? SkillsLayout.RankProgress(s) : 0,
+ s != null && SkillsLayout.CanRaiseOne(sheet, s), s != null && SkillsLayout.CanRaiseTen(sheet, s),
+ showTen: s != null && s.Class >= SkillClass.Trained,
+ s == null ? null : () => _onTick(() => _reader.Raise(_host, s, ten: false, _chat)),
+ s == null ? null : () => _onTick(() => _reader.Raise(_host, s, ten: true, _chat)));
+ }
+
+ ///
+ /// The footer: the selected row's title ("Salvaging: 303 (+45)", the buff part green or red), then two
+ /// label/value lines; with a row selected the first sits on the plate whose blue inset fills with the way
+ /// through the rank, and the raise arrow and +10 stand at the right. With nothing selected, the prompt.
+ ///
+ private void FooterBox(int pageH, string title, string delta, int buffDelta,
+ (string Label, string Value) one, (string Label, string Value) two, bool selected, float rank,
+ bool canOne, bool canTen, bool showTen, Action? raiseOne, Action? raiseTen)
+ {
+ int ruleY = TabH + pageH - FooterH - RuleH - 3;
+ int y = TabH + pageH - FooterH;
+ Sprite(ArtRule, 0, ruleY, PanelW, RuleH, 0xFF54788Fu);
+ if (!selected)
+ {
+ Text(RetailData.Pal20, title, 0, y, PanelW, 20, Body, center: true);
+ Text(RetailData.Pal16, one.Label, 5, y + 20, 195, 17, White);
+ Text(RetailData.Pal16, one.Value, 200, y + 20, 95, 17, White, right: true);
+ Text(RetailData.Pal16, two.Label, 5, y + 37, 195, 18, White);
+ Text(RetailData.Pal16, two.Value, 200, y + 37, 95, 18, White, right: true);
+ return;
+ }
+
+ int w = RetailData.Pal20.Measure(title) + RetailData.Pal20.Measure(delta);
+ int x = (PanelW - w) / 2;
+ Text(RetailData.Pal20, title, x, y, PanelW, 20, White);
+ if (delta.Length > 0)
+ Text(RetailData.Pal20, delta, x + RetailData.Pal20.Measure(title), y, PanelW, 20, buffDelta > 0 ? Green : Red);
+ Sprite(ArtPlate, 5, y + 20, 240, 17, 0xFF1E2A4Au);
+ // The plate's blue inset (the layout's child at (0,1) 240x15) is a bar: the way through the rank
+ // (a skill's fills by itself from use).
+ if (rank > 0)
+ {
+ IntPtr fill = Tex(RynthIconKind.UiSprite, ArtRankFill);
+ float fw = 240 * rank;
+ if (fill != IntPtr.Zero) _dl.AddImage(fill, P(5, y + 21), P(5 + fw, y + 36), Vector2.Zero, new Vector2(rank, 1));
+ else _dl.AddRectFilled(P(5, y + 21), P(5 + fw, y + 36), Rgb(21, 66, 160));
+ }
+ Text(RetailData.Pal16, one.Label, 5, y + 20, 145, 17, White);
+ Text(RetailData.Pal16, one.Value, 150, y + 20, 95, 17, White, right: true);
+ Text(RetailData.Pal16, two.Label, 5, y + 37, 145, 18, White);
+ Text(RetailData.Pal16, two.Value, 150, y + 37, 95, 18, White, right: true);
+
+ if (Button("##dw_raise", canOne ? ArtRaise : ArtRaiseGhost, 260, y + 26, 30, 26) && canOne) raiseOne?.Invoke();
+ if (showTen && Button("##dw_raise10", canTen ? ArtRaiseTen : ArtRaiseTenGhost, 260, y, 30, 26) && canTen) raiseTen?.Invoke();
+ }
+ // ── Drawing helpers (design pixels in, screen pixels out) ───────────
+
+ private Vector2 P(float x, float y) => new(_origin.X + x * _k, _origin.Y + y * _k);
+ private Vector2 S(float w, float h) => new(Math.Max(1, w * _k), Math.Max(1, h * _k));
+
+ private bool Hit(int x, int y, int w, int h)
+ {
+ Vector2 m = ImGui.GetMousePos(), a = P(x, y), b = P(x + w, y + h);
+ return m.X >= a.X && m.X < b.X && m.Y >= a.Y && m.Y < b.Y;
+ }
+
+ private IntPtr Tex(RynthIconKind kind, uint id) => id == 0 ? IntPtr.Zero : _host.GetIconTexture(kind, id);
+
+ /// A retail picture stretched over the box (a flat stand-in until the engine has made it).
+ private void Sprite(uint id, int x, int y, int w, int h, uint fallback)
+ {
+ if (w <= 0 || h <= 0) return;
+ IntPtr t = Tex(RynthIconKind.UiSprite, id);
+ if (t == IntPtr.Zero) { _dl.AddRectFilled(P(x, y), P(x + w, y + h), fallback); return; }
+ _dl.AddImage(t, P(x, y), P(x + w, y + h));
+ }
+
+ /// The top-left x of a x picture, unscaled.
+ private void SpriteCropped(uint id, int x, int y, int w, int h, int texW, int texH, uint fallback)
+ {
+ IntPtr t = Tex(RynthIconKind.UiSprite, id);
+ if (t == IntPtr.Zero) { _dl.AddRectFilled(P(x, y), P(x + w, y + h), fallback); return; }
+ _dl.AddImage(t, P(x, y), P(x + w, y + h), Vector2.Zero, new Vector2(Math.Min(1f, w / (float)texW), Math.Min(1f, h / (float)texH)));
+ }
+
+ private void Icon(uint id, int x, int y, int size)
+ {
+ IntPtr t = Tex(RynthIconKind.Icon, id);
+ if (t != IntPtr.Zero) _dl.AddImage(t, P(x, y), P(x + size, y + size));
+ }
+
+ /// A retail button: its picture, and true when clicked.
+ private bool Button(string imguiId, uint art, int x, int y, int w, int h)
+ {
+ ImGui.SetCursorScreenPos(P(x, y));
+ bool clicked = ImGui.InvisibleButton(imguiId, S(w, h));
+ Sprite(art, x, y, w, h, 0xFF3C8A3Cu);
+ return clicked;
+ }
+
+ ///
+ /// Text in a retail dat font, left-aligned (or / )
+ /// in the box and centred down it, glyph by glyph from the font's sheet;
+ /// draws the font's outline sheet in black under it (the level number). ImGui's font stands in on an
+ /// engine without font sheets.
+ ///
+ private void Text(RetailFont font, string? text, int x, int y, int w, int h, uint color,
+ bool right = false, bool center = false, bool outline = false)
+ {
+ if (string.IsNullOrEmpty(text)) return;
+ int width = font.Measure(text);
+ float left = right ? x + w - width : center ? x + (w - width) / 2f : x;
+ float top = y + (h - font.LineHeight) / 2f;
+ IntPtr sheet = Tex(RynthIconKind.FontSheet, font.Sheet);
+ if (sheet == IntPtr.Zero)
+ {
+ Vector2 sz = ImGui.CalcTextSize(text);
+ float fx = right ? P(x + w, 0).X - sz.X : center ? P(x + w / 2f, 0).X - sz.X / 2 : P(x, 0).X;
+ _dl.AddText(new Vector2(fx, P(0, y + h / 2f).Y - sz.Y / 2), color, text);
+ return;
+ }
+ left = MathF.Round(left);
+ top = MathF.Round(top);
+ if (outline && font.OutlineSheet != 0)
+ {
+ IntPtr back = Tex(RynthIconKind.FontSheet, font.OutlineSheet);
+ if (back != IntPtr.Zero) Glyphs(font, text, left, top, back, font.OutlineWidth, font.OutlineHeight, Black, font.BorderX, font.BorderY);
+ }
+ Glyphs(font, text, left, top, sheet, font.SheetWidth, font.SheetHeight, color, 0, 0);
+ }
+
+ private void Glyphs(RetailFont font, string text, float x, float y, IntPtr sheet, int sheetW, int sheetH, uint color, int bx, int by)
+ {
+ float pen = x;
+ foreach (char c in text)
+ {
+ if (!font.TryGlyph(c, out RetailGlyph g)) continue;
+ if (g.Width > 0 && g.Height > 0)
+ {
+ float gx = pen + g.Before - bx, gy = y + g.Top - by;
+ int sx = g.SheetX - bx, sy = g.SheetY - by, gw = g.Width + 2 * bx, gh = g.Height + 2 * by;
+ if (sx < 0) { gx -= sx; gw += sx; sx = 0; }
+ if (sy < 0) { gy -= sy; gh += sy; sy = 0; }
+ if (gw > 0 && gh > 0)
+ _dl.AddImage(sheet, P(gx, gy), P(gx + gw, gy + gh),
+ new Vector2(sx / (float)sheetW, sy / (float)sheetH),
+ new Vector2((sx + gw) / (float)sheetW, (sy + gh) / (float)sheetH), color);
+ }
+ pen += g.Advance;
+ }
+ }
+
+ private static SkillLine? Find(SkillsSheet sheet, uint id)
+ {
+ if (id == 0) return null;
+ foreach (SkillLine s in sheet.Skills) if (s.Id == id) return s;
+ return null;
+ }
+}
diff --git a/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/SkillsReader.cs b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/SkillsReader.cs
new file mode 100644
index 0000000..b0cdeab
--- /dev/null
+++ b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/SkillsReader.cs
@@ -0,0 +1,224 @@
+// SkillsReader.cs - Reads the character for the Skills panel and spends XP for it, on the plugin tick.
+//
+// Reading: while the panel is drawn it asks for a read about four times a second (RequestRead, render
+// thread); the tick then reads the engine's training numbers (GetTrainingInfo, v79: the engine refreshes
+// them every 2 s while asked, and at once after a raise) and the header's properties, and publishes one
+// SkillsSheet. Nothing is read while the panel is closed.
+//
+// Spending: the panel's raise arrow and "+10" queue a Raise (or a train, for an untrained skill) with the
+// cost the player saw; the engine refuses it when the cost changed meanwhile (RaiseResult.CostChanged),
+// so a click never spends more than the footer said. Like retail's arrow there is no confirm.
+using System;
+using System.Threading;
+using RynthCore.PluginSdk;
+
+namespace RynthCore.Plugin.RynthDreamWeave;
+
+internal sealed class SkillsReader
+{
+ private const uint IntGender = 113, IntHeritage = 188, IntPkStatus = 134, IntAllegianceRank = 30, IntCharacterTitleId = 261;
+ private const uint QuadAvailableLuminance = 6, QuadMaximumLuminance = 7;
+ private const long ReadEveryMs = 250;
+
+ private readonly TrainingEntryNative[] _entries = new TrainingEntryNative[128];
+ private SkillsSheet _sheet = SkillsSheet.Empty;
+ private long _lastAsk;
+ private int _readQueued;
+ private string _message = "";
+
+ /// The newest snapshot (any thread).
+ public SkillsSheet Sheet => Volatile.Read(ref _sheet);
+
+ /// The last raise's refusal, for the footer ("" when none). Any thread.
+ public string Message => Volatile.Read(ref _message);
+
+ ///
+ /// Render thread, each frame the panel draws: true when a read is due (the caller queues
+ /// for the tick). At most four a second, one in flight.
+ ///
+ public bool ReadDue()
+ {
+ long now = Environment.TickCount64;
+ if (now - Volatile.Read(ref _lastAsk) < ReadEveryMs) return false;
+ if (Interlocked.Exchange(ref _readQueued, 1) == 1) return false;
+ Volatile.Write(ref _lastAsk, now);
+ return true;
+ }
+
+ /// Logout: forget the character.
+ public void Clear()
+ {
+ Volatile.Write(ref _sheet, SkillsSheet.Empty);
+ Volatile.Write(ref _message, "");
+ }
+
+ /// Plugin tick: reads the numbers and publishes a new sheet when they are in.
+ public void Read(RynthCoreHost host)
+ {
+ try
+ {
+ if (!host.HasTraining) { Volatile.Write(ref _message, "This RynthCore is too old for the Skills panel (needs plugin API v79)."); return; }
+ if (!host.TryGetTrainingInfo(out TrainingInfoNative info, _entries, out int count)) return;
+ var skills = new System.Collections.Generic.List(64);
+ var attrs = new AttributeLine?[AttributesPage.Rows.Length];
+ uint health = 0, stam = 0, mana = 0;
+ bool haveVitals = host.TryGetPlayerVitals(out health, out _, out stam, out _, out mana, out _);
+ for (int i = 0; i < Math.Min(count, _entries.Length); i++)
+ {
+ TrainingEntryNative e = _entries[i];
+ if (e.Kind is TrainingKind.Attribute or TrainingKind.Vital)
+ {
+ int kind = e.Kind == TrainingKind.Attribute ? 1 : 2;
+ int row = AttributesPage.RowIndex(kind, e.Stype);
+ if (row < 0) continue;
+ var r = AttributesPage.Rows[row];
+ int current = kind == 2 && haveVitals ? (int)(e.Stype switch { 1 => health, 3 => stam, _ => mana }) : -1;
+ attrs[row] = new AttributeLine(kind, e.Stype, r.Name, r.Icon, e.Base, e.Buffed, e.CostOne, e.CostTen,
+ e.Raisable, e.AtTop, e.Ranks, e.XpSpent, current);
+ continue;
+ }
+ if (e.Kind != TrainingKind.Skill || e.Class is < 1 or > 3) continue;
+ RetailSkill? table = RetailData.Skill(e.Stype);
+ if (table == null) continue; // a skill the retail table doesn't list (retired): retail doesn't show it either
+ bool usable = (e.Flags & TrainingEntryFlags.UsableUntrained) != 0 || e.Class >= 2 || table.UsableUntrained;
+ skills.Add(new SkillLine(e.Stype, table.Name, table.Icon, (SkillClass)e.Class, usable,
+ e.Base, e.Buffed, e.CostOne, e.CostTen, e.TrainCredits, e.Raisable, e.Trainable, e.AtTop,
+ e.Ranks, e.XpSpent));
+ }
+
+ uint me = host.GetPlayerId();
+ string name = me != 0 && host.HasGetObjectName && host.TryGetObjectName(me, out string n) ? n : "";
+ int gender = Int(host, me, IntGender), heritage = Int(host, me, IntHeritage), pk = Int(host, me, IntPkStatus);
+ // Retail's header: the allegiance rank's title before the name ("Yeoman Drakkon"), and the
+ // character title chosen in the Titles tab ("Obviously Bored") after sex and heritage.
+ name = SkillsLayout.NameLine(name, gender, heritage, Int(host, me, IntAllegianceRank));
+ int titleId = Int(host, me, IntCharacterTitleId);
+ string title = SkillsLayout.Title(titleId);
+ long? lumMax = Quad(host, me, QuadMaximumLuminance);
+ long? lumAvail = Quad(host, me, QuadAvailableLuminance);
+ TitleList titles = TitlesFor(me).WithDisplayed((uint)Math.Max(0, titleId));
+
+ var attrList = new System.Collections.Generic.List(attrs.Length);
+ foreach (AttributeLine? a in attrs) if (a != null) attrList.Add(a);
+ var sheet = new SkillsSheet(name, SkillsLayout.Identity(gender, heritage, title), SkillsLayout.PkStatus(pk),
+ info.Level, info.TotalXp, info.UnassignedXp, info.SkillCredits,
+ lumMax is > 0 ? lumAvail ?? 0 : null, lumMax is > 0 ? lumMax : null,
+ skills, info.Busy, info.SnapshotVersion, attrList, titles);
+ Volatile.Write(ref _sheet, sheet);
+ }
+ finally
+ {
+ Volatile.Write(ref _readQueued, 0);
+ }
+ }
+
+ ///
+ /// Plugin tick: the raise arrow ( false: one rank, or train an untrained skill
+ /// with credits) or "+10", at the cost the footer showed. The answer comes back in the numbers;
+ /// a refusal is said in the footer and chat.
+ ///
+ public void Raise(RynthCoreHost host, SkillLine skill, bool ten, Action chat)
+ {
+ RaiseResult r;
+ if (skill.Class < SkillClass.Trained)
+ r = host.TrainSkill(skill.Id, skill.TrainCredits);
+ else
+ r = host.Raise(TrainingKind.Skill, skill.Id, ten ? 10u : 1u, ten ? skill.CostTen : skill.CostOne, out _);
+ string why = r switch
+ {
+ RaiseResult.Sent => "",
+ RaiseResult.CostChanged or RaiseResult.Stale or RaiseResult.NotReady or RaiseResult.Busy
+ => "The numbers changed; look again and press once more.",
+ RaiseResult.NotEnough => skill.Class < SkillClass.Trained ? "Not enough skill credits." : "Not enough unassigned experience.",
+ RaiseResult.NotRaisable => $"{skill.Name} can't be raised any further.",
+ RaiseResult.Unavailable => "This client can't raise skills from a plugin.",
+ RaiseResult.EngineTooOld => "This RynthCore is too old to raise skills (needs plugin API v79).",
+ _ => $"{skill.Name} wasn't raised ({r}).",
+ };
+ Volatile.Write(ref _message, why);
+ Volatile.Write(ref _lastAsk, 0); // read again at once
+ if (why.Length > 0) chat(why);
+ }
+
+ // ── Titles (the server's list, kept per character: AttributesTitles.cs) ──
+
+ private readonly object _titlesGate = new();
+ private readonly System.Collections.Generic.Dictionary _titles = new();
+ private Func? _loadTitles;
+ private Action? _saveTitles;
+
+ /// Where the titles are kept between sessions (the plugin's settings, by character id).
+ public void SetTitleStore(Func load, Action save)
+ {
+ _loadTitles = load;
+ _saveTitles = save;
+ }
+
+ private TitleList TitlesFor(uint me)
+ {
+ if (me == 0) return TitleList.Empty;
+ lock (_titlesGate)
+ {
+ if (_titles.TryGetValue(me, out TitleList? t)) return t;
+ t = TitleList.Load(_loadTitles?.Invoke(me));
+ _titles[me] = t;
+ return t;
+ }
+ }
+
+ /// Pump thread: game event 0x0029 (the whole list, at login) or 0x002B (one title) for .
+ public void OnTitleEvent(uint me, uint eventType, ReadOnlySpan body)
+ {
+ if (me == 0) return;
+ TitleList next;
+ lock (_titlesGate)
+ {
+ TitleList now = _titles.TryGetValue(me, out TitleList? t) ? t : TitleList.Load(_loadTitles?.Invoke(me));
+ if (eventType == 0x0029) { if (!TitleList.TryParseTable(body, out next)) return; }
+ else next = now.WithUpdate(body);
+ _titles[me] = next;
+ }
+ _saveTitles?.Invoke(me, next.Save());
+ Volatile.Write(ref _lastAsk, 0); // show it at once
+ }
+
+ /// Plugin tick: show as the character's title (retail's "Set as Display Title").
+ public void SetDisplayTitle(RynthCoreHost host, uint titleId, Action chat)
+ {
+ if (titleId == 0) return;
+ if (!host.HasInvokeChatParser || !host.InvokeChatParser("/rc title " + titleId.ToString(System.Globalization.CultureInfo.InvariantCulture)))
+ chat("Couldn't set the title: this RynthCore can't send it (needs the engine from 2026-11-07).");
+ Volatile.Write(ref _lastAsk, 0);
+ }
+
+ ///
+ /// Plugin tick: raises an attribute (Kind 1) or vital maximum (Kind 2) one or ten ranks at the cost the
+ /// footer showed, as the skills' arrows do.
+ ///
+ public void Raise(RynthCoreHost host, AttributeLine a, bool ten, Action chat)
+ {
+ RaiseResult r = host.Raise(a.IsVital ? TrainingKind.Vital : TrainingKind.Attribute, a.Stype, ten ? 10u : 1u,
+ ten ? a.CostTen : a.CostOne, out _);
+ string why = r switch
+ {
+ RaiseResult.Sent => "",
+ RaiseResult.CostChanged or RaiseResult.Stale or RaiseResult.NotReady or RaiseResult.Busy
+ => "The numbers changed; look again and press once more.",
+ RaiseResult.NotEnough => "Not enough unassigned experience.",
+ RaiseResult.NotRaisable => $"{a.Name} can't be raised any further.",
+ RaiseResult.Unavailable => "This client can't raise attributes from a plugin.",
+ RaiseResult.EngineTooOld => "This RynthCore is too old to raise attributes (needs plugin API v79).",
+ _ => $"{a.Name} wasn't raised ({r}).",
+ };
+ Volatile.Write(ref _message, why);
+ Volatile.Write(ref _lastAsk, 0);
+ if (why.Length > 0) chat(why);
+ }
+
+ private static int Int(RynthCoreHost host, uint id, uint stype)
+ => id != 0 && host.HasGetObjectIntProperty && host.TryGetObjectIntProperty(id, stype, out int v) ? v : 0;
+
+
+ private static long? Quad(RynthCoreHost host, uint id, uint stype)
+ => id != 0 && host.TryGetObjectQuadProperty(id, stype, out long v) ? v : null;
+}
diff --git a/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/SkillsSheet.cs b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/SkillsSheet.cs
new file mode 100644
index 0000000..261302a
--- /dev/null
+++ b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/SkillsSheet.cs
@@ -0,0 +1,258 @@
+// SkillsSheet.cs - What the DreamWeave Skills panel shows: one immutable snapshot of the character,
+// read on the plugin tick (SkillsReader) and drawn on the render thread (SkillsPanel).
+//
+// The numbers are the engine's (plugin API v79 GetTrainingInfo: level, total and unassigned XP, skill
+// credits, and per skill its class, base and buffed values and the XP for +1 and +10, priced from the
+// client's own tables), the header's words the player object's properties. The one number the client
+// can't give past level 275 is the next level's total: that comes from DreamWeaveXp.
+//
+// Building the rows from that snapshot is pure (Build), so RynthServerPack.Tests covers the sections,
+// their order and the footer's text.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+
+namespace RynthCore.Plugin.RynthDreamWeave;
+
+/// A skill's training: untrained 1, trained 2, specialized 3 (the training API's Class).
+internal enum SkillClass { None = 0, Untrained = 1, Trained = 2, Specialized = 3 }
+
+/// One skill as the engine reported it.
+internal sealed record SkillLine(uint Id, string Name, uint Icon, SkillClass Class, bool Usable,
+ int Base, int Buffed, long CostOne, long CostTen, int TrainCredits, bool Raisable, bool Trainable, bool AtTop,
+ uint Ranks = 0, uint XpSpent = 0)
+{
+ /// The buff part of the value (buffed - base).
+ public int BuffDelta => Buffed - Base;
+}
+
+/// The character as the panel shows it.
+internal sealed record SkillsSheet(
+ string Name, string Identity, string PkStatus,
+ int Level, long TotalXp, long UnassignedXp, int SkillCredits,
+ long? LuminanceAvailable, long? LuminanceMax,
+ IReadOnlyList Skills, bool Busy, uint Version,
+ IReadOnlyList? Attributes = null, TitleList? Titles = null)
+{
+ public static readonly SkillsSheet Empty = new("", "", "", 0, -1, -1, -1, null, null, Array.Empty(), false, 0);
+
+ /// The Attributes page's rows (retail's order); empty until read.
+ public IReadOnlyList AttributeRows => Attributes ?? Array.Empty();
+
+ /// The Titles page's list; empty until the server's list has been seen once.
+ public TitleList TitleBook => Titles ?? TitleList.Empty;
+
+ public bool HasNumbers => Skills.Count > 0;
+
+ /// "XP for next level": DreamWeave's chart past 275, retail's below it.
+ public string NextLevelText
+ {
+ get
+ {
+ if (TotalXp < 0 || Level <= 0) return "";
+ long? need = DreamWeaveXp.ToNextLevel(Level, TotalXp);
+ return need is long n ? Xp(n) : "Infinity!";
+ }
+ }
+
+ public static string Xp(long value) => value.ToString("N0", CultureInfo.InvariantCulture);
+
+ public static string Number(int value) => value.ToString(CultureInfo.InvariantCulture);
+}
+
+/// A row of the skills list: a section banner, or a skill.
+internal readonly record struct SkillRow(SkillSection Section, SkillLine? Skill)
+{
+ public bool IsBanner => Skill == null;
+}
+
+/// The page's four sections, in order, with their banner art (LayoutDesc 0x2100002E's).
+internal enum SkillSection { Specialized, Trained, Untrained, Unusable }
+
+internal static class SkillsLayout
+{
+ ///
+ /// The list as retail draws it: Specialized, Trained, Untrained (usable untrained) and Unusable
+ /// Skills, each a banner then its skills by name; a section with no skills is left out.
+ ///
+ public static List Rows(IReadOnlyList skills)
+ {
+ var rows = new List(skills.Count + 4);
+ foreach (SkillSection section in new[] { SkillSection.Specialized, SkillSection.Trained, SkillSection.Untrained, SkillSection.Unusable })
+ {
+ var members = new List();
+ foreach (SkillLine s in skills)
+ if (SectionOf(s) == section) members.Add(s);
+ if (members.Count == 0) continue;
+ members.Sort((a, b) => string.Compare(a.Name, b.Name, StringComparison.OrdinalIgnoreCase));
+ rows.Add(new SkillRow(section, null));
+ foreach (SkillLine s in members) rows.Add(new SkillRow(section, s));
+ }
+ return rows;
+ }
+
+ public static SkillSection? SectionOf(SkillLine s) => s.Class switch
+ {
+ SkillClass.Specialized => SkillSection.Specialized,
+ SkillClass.Trained => SkillSection.Trained,
+ SkillClass.Untrained => s.Usable ? SkillSection.Untrained : SkillSection.Unusable,
+ _ => null,
+ };
+
+ public static string Title(SkillSection section) => section switch
+ {
+ SkillSection.Specialized => "Specialized Skills",
+ SkillSection.Trained => "Trained Skills",
+ SkillSection.Untrained => "Untrained Skills",
+ _ => "Unusable Skills",
+ };
+
+ /// The footer's title: "Salvaging: 303" then the buff part ("(+45)") drawn green or red.
+ public static (string Text, string Delta) FooterTitle(SkillLine? s)
+ {
+ if (s == null) return ("Select a Skill to Improve", "");
+ if (s.Class < SkillClass.Trained) return (s.Name, "");
+ string text = s.Name + ": " + SkillsSheet.Number(s.Buffed);
+ int d = s.BuffDelta;
+ return (text, d > 0 ? $" (+{d})" : d < 0 ? $" ({d})" : "");
+ }
+
+ /// The footer's two label/value lines (retail's words).
+ public static ((string Label, string Value) One, (string Label, string Value) Two) FooterLines(SkillsSheet sheet, SkillLine? s)
+ {
+ string credits = sheet.SkillCredits >= 0 ? SkillsSheet.Number(sheet.SkillCredits) : "";
+ string unassigned = sheet.UnassignedXp >= 0 ? SkillsSheet.Xp(sheet.UnassignedXp) : "";
+ if (s == null)
+ return (("Skill Credits Available:", credits), ("Unassigned Experience:", unassigned));
+ if (s.Class < SkillClass.Trained)
+ return (("Skill Credits To Raise:", s.TrainCredits > 0 ? SkillsSheet.Number(s.TrainCredits) : "Infinity!"),
+ ("Skill Credits Available:", credits));
+ return (("Experience To Raise:", s.CostOne > 0 ? SkillsSheet.Xp(s.CostOne) : "Infinity!"),
+ ("Unassigned Experience:", unassigned));
+ }
+
+ /// Whether the raise arrow (+1, or train for an untrained skill) can be pressed now.
+ public static bool CanRaiseOne(SkillsSheet sheet, SkillLine s)
+ {
+ if (sheet.Busy) return false;
+ if (s.Class >= SkillClass.Trained) return s.Raisable && s.CostOne > 0 && sheet.UnassignedXp >= s.CostOne;
+ return s.Trainable && s.TrainCredits > 0 && sheet.SkillCredits >= s.TrainCredits;
+ }
+
+ /// Whether "+10" can be pressed now (trained or specialized, ten ranks left and affordable).
+ public static bool CanRaiseTen(SkillsSheet sheet, SkillLine s)
+ => !sheet.Busy && s.Class >= SkillClass.Trained && s.Raisable && s.CostTen > 0 && sheet.UnassignedXp >= s.CostTen;
+
+ ///
+ /// Retail's header line one: the allegiance rank's title for the heritage and sex, then the name
+ /// ("Yeoman Drakkon"); the name alone with no rank (0) or no title for the heritage.
+ ///
+ public static string NameLine(string name, int gender, int heritage, int rank)
+ {
+ string? title = RankTitle(gender, heritage, rank);
+ return string.IsNullOrEmpty(title) || string.IsNullOrEmpty(name) ? name : title + " " + name;
+ }
+
+ // Allegiance rank titles 1..10 by heritage (male; female where it differs). Game text, as the client shows it.
+ private static readonly string[] AluvianM = { "Yeoman", "Baronet", "Baron", "Reeve", "Thane", "Ealdor", "Duke", "Aetheling", "King", "High King" };
+ private static readonly string[] AluvianF = { "Yeoman", "Baronet", "Baroness", "Reeve", "Thane", "Ealdor", "Duchess", "Aetheling", "Queen", "High Queen" };
+ private static readonly string[] GharuM = { "Sayyid", "Shayk", "Maulan", "Mu'allim", "Naquib", "Qadi", "Mushir", "Amir", "Malik", "Sultan" };
+ private static readonly string[] GharuF = { "Sayyida", "Shayka", "Maulana", "Mu'allima", "Naquiba", "Qadiya", "Mushira", "Amira", "Malika", "Sultana" };
+ private static readonly string[] ShoM = { "Jinin", "Jo-chueh", "Nan-chueh", "Shi-chueh", "Ta-chueh", "Kun-chueh", "Kou", "Taikou", "Ou", "Koutei" };
+ private static readonly string[] ShoF = { "Jinin", "Jo-chueh", "Nan-chueh", "Shi-chueh", "Ta-chueh", "Kun-chueh", "Kou", "Taikou", "Jo-ou", "Koutei" };
+ private static readonly string[] ViaM = { "Squire", "Banner", "Baron", "Viscount", "Count", "Marquis", "Duke", "Grand Duke", "King", "High King" };
+ private static readonly string[] ViaF = { "Dame", "Banner", "Baroness", "Viscountess", "Countess", "Marquise", "Duchess", "Grand Duchess", "Queen", "High Queen" };
+ private static readonly string[] ShadowM = { "Tenebrous", "Shade", "Squire", "Knight", "Void Knight", "Void Lord", "Duke", "Archduke", "Highborn", "King" };
+ private static readonly string[] ShadowF = { "Tenebrous", "Shade", "Squire", "Knight", "Void Knight", "Void Lady", "Duchess", "Archduchess", "Highborn", "Queen" };
+ private static readonly string[] Tumerok = { "Xutua", "Tuona", "Ona", "Nuona", "Turea", "Rea", "Nurea", "Kauh", "Sutah", "Tah" };
+ private static readonly string[] Gearknight = { "Tribunus", "Praefectus", "Optio", "Centurion", "Principes", "Legatus", "Consul", "Dux", "Secondus", "Primus" };
+ private static readonly string[] Lugian = { "Laigus", "Raigus", "Amploth", "Arintoth", "Obeloth", "Lithos", "Kantos", "Gigas", "Extas", "Tiatus" };
+ private static readonly string[] EmpyreanM = { "Ensign", "Corporal", "Lieutenant", "Commander", "Captain", "Commodore", "Admiral", "Warlord", "Ipharsin", "Aulin" };
+ private static readonly string[] EmpyreanF = { "Ensign", "Corporal", "Lieutenant", "Commander", "Captain", "Commodore", "Admiral", "Warlord", "Ipharsia", "Aulia" };
+ private static readonly string[] UndeadM = { "Neophyte", "Acolyte", "Adept", "Esquire", "Squire", "Knight", "Count", "Viscount", "Highness", "Annointed" };
+ private static readonly string[] UndeadF = { "Neophyte", "Acolyte", "Adept", "Esquire", "Squire", "Knight", "Countess", "Viscountess", "Highness", "Annointed" };
+
+ /// The allegiance rank's title (rank 1..10) for a sex (1 male, 2 female) and heritage, or null.
+ public static string? RankTitle(int gender, int heritage, int rank)
+ {
+ if (rank is < 1 or > 10 || gender is not (1 or 2)) return null;
+ bool f = gender == 2;
+ string[]? t = heritage switch
+ {
+ 1 => f ? AluvianF : AluvianM,
+ 2 => f ? GharuF : GharuM,
+ 3 => f ? ShoF : ShoM,
+ 4 => f ? ViaF : ViaM,
+ 5 or 10 => f ? ShadowF : ShadowM,
+ 6 => Gearknight,
+ 7 => Tumerok,
+ 8 => Lugian,
+ 9 => f ? EmpyreanF : EmpyreanM,
+ 11 => f ? UndeadF : UndeadM,
+ _ => null,
+ };
+ return t?[rank - 1];
+ }
+
+ /// The character title for CharacterTitleId (string table 0x2300000E), or "".
+ public static string Title(int titleId) => RetailData.Titles.TryGetValue(titleId, out string? t) ? t : "";
+
+ ///
+ /// How far through the current level the character is (0..1), for the red fill of the "XP for next
+ /// level" bar: DreamWeave's chart past 275. 0 when unknown, 1 at the chart's top.
+ ///
+ public static float LevelProgress(int level, long totalXp)
+ {
+ IReadOnlyList chart = DreamWeaveXp.Totals;
+ if (level < 1 || totalXp < 0 || level >= chart.Count) return 0f;
+ if (level + 1 >= chart.Count) return 1f;
+ ulong from = chart[level], to = chart[level + 1];
+ if (to <= from) return 1f;
+ ulong have = (ulong)totalXp;
+ if (have <= from) return 0f;
+ if (have >= to) return 1f;
+ return (float)((double)(have - from) / (to - from));
+ }
+
+ ///
+ /// How far a trained or specialized skill is through its current rank (0..1), for the blue fill of the
+ /// footer's "Experience To Raise" bar. Skills earn XP from use (the server's proficiency points: a
+ /// successful use adds a little to the skill, up to a full share every 15 minutes) and go up a rank by
+ /// themselves when it fills, until the last rank. 0 untrained, at the last rank, or unknown.
+ ///
+ public static float RankProgress(SkillLine s)
+ {
+ uint[] chart = s.Class switch
+ {
+ SkillClass.Specialized => RetailData.SpecializedSkillXp,
+ SkillClass.Trained => RetailData.TrainedSkillXp,
+ _ => System.Array.Empty(),
+ };
+ if (s.Ranks + 1 >= chart.Length || s.AtTop) return 0f;
+ uint from = chart[s.Ranks], to = chart[s.Ranks + 1];
+ if (to <= from || s.XpSpent <= from) return 0f;
+ if (s.XpSpent >= to) return 1f;
+ return (float)((double)(s.XpSpent - from) / (to - from));
+ }
+
+ /// Retail's header line two: "Male Aluvian Obviously Bored" (sex, heritage, title).
+ public static string Identity(int gender, int heritage, string? title)
+ {
+ var parts = new List(3);
+ string? g = gender switch { 1 => "Male", 2 => "Female", _ => null };
+ string? h = heritage switch
+ {
+ 1 => "Aluvian", 2 => "Gharu'ndim", 3 => "Sho", 4 => "Viamontian", 5 => "Umbraen", 6 => "Gearknight",
+ 7 => "Tumerok", 8 => "Lugian", 9 => "Empyrean", 10 => "Penumbraen", 11 => "Undead", 12 or 13 => "Olthoi",
+ _ => null,
+ };
+ if (g != null) parts.Add(g);
+ if (h != null) parts.Add(h);
+ if (!string.IsNullOrWhiteSpace(title)) parts.Add(title.Trim());
+ return string.Join(" ", parts);
+ }
+
+ /// Retail's header line three, from PlayerKillerStatus (0x04 PK, 0x40 PK Lite).
+ public static string PkStatus(int status)
+ => (status & 0x04) != 0 ? "Player Killer" : (status & 0x40) != 0 ? "Player Killer Lite" : "Non-Player Killer";
+}
diff --git a/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeavePlugin.cs b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeavePlugin.cs
new file mode 100644
index 0000000..94600a8
--- /dev/null
+++ b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeavePlugin.cs
@@ -0,0 +1,96 @@
+// DreamWeavePlugin.cs - RynthDreamWeave's own features, through the shared server plugin's hooks
+// (Plugins/Shared/ServerPack/ServerPackPlugin.cs): the every-minute bank check that gives Lum/hr its
+// luminance on DreamWeave (DreamWeave/DreamWeaveBank.cs, 2026-11-02), published as the profile value
+// "bankLuminance" for the session stats, and its Bank page (DreamWeave/DreamWeavePages.cs).
+using System;
+using RynthCore.Plugin.RynthDreamWeave;
+
+namespace RynthCore.Plugin.ServerPack;
+
+public sealed partial class ServerPackPlugin
+{
+ private readonly DreamWeaveBank _bank = new();
+
+ partial void ServerPages(System.Collections.Generic.List pages)
+ {
+ var bankPages = new DreamWeavePages(_bank, () => Active, RunOnTick, CheckBankNow, SaveDreamWeaveSettings);
+ pages.AddRange(bankPages.Pages());
+ AddCharacterPage(pages); // DreamWeaveSkills.cs: the Character panel's page
+ }
+
+ partial void ServerInitialize()
+ {
+ lock (_bank.Gate) _bank.LoadSettings(Settings);
+ }
+
+ private void SaveDreamWeaveSettings()
+ {
+ lock (_bank.Gate) _bank.SaveSettings(Settings);
+ }
+
+ partial void ServerLoginComplete()
+ {
+ lock (_bank.Gate) _bank.Login(Environment.TickCount64);
+ }
+
+ partial void ServerLogout()
+ {
+ lock (_bank.Gate) _bank.Logout();
+ }
+
+ partial void ServerShutdown() => SaveDreamWeaveSettings();
+
+ partial void ServerChatText(string text, int chatType, ref bool eat)
+ {
+ if (!Active) return;
+ bool ours;
+ long? value;
+ lock (_bank.Gate)
+ {
+ ours = _bank.OnChatLine(text, Environment.TickCount64);
+ value = _bank.Published;
+ }
+ if (value is long v) SetProfileValue(DreamWeaveBank.LuminanceKey, v);
+ if (ours) eat = true;
+ }
+
+ partial void ServerChatBar(string text)
+ {
+ // The player's own /b: its reply shows (DreamWeaveBank tells it from RynthDreamWeave's).
+ if (DreamWeaveBank.IsBalanceCommand(text)) _bank.NoteTypedCommand();
+ }
+
+ partial void ServerTick(bool active)
+ {
+ if (!active) return;
+ string? check;
+ lock (_bank.Gate)
+ {
+ _bank.Tick();
+ check = _bank.CheckDue(Environment.TickCount64);
+ }
+ if (check != null && !Send(check)) lock (_bank.Gate) _bank.NotSent();
+ }
+
+ /// The page's Check now (on the tick).
+ private void CheckBankNow()
+ {
+ if (!Active) return;
+ string command;
+ lock (_bank.Gate) command = _bank.Request(Environment.TickCount64);
+ if (!Send(command))
+ {
+ lock (_bank.Gate) _bank.NotSent();
+ ChatFail($"[{RynthPluginInfo.Name}] Couldn't send {command}.");
+ }
+ }
+
+ partial void ServerInfoLines(Action line)
+ {
+ lock (_bank.Gate)
+ {
+ string lum = _bank.Luminance is long l ? l.ToString("N0", System.Globalization.CultureInfo.InvariantCulture) : "not read yet";
+ line($"Bank check every minute {(_bank.CheckEveryMinute ? "on" : "off")}; banked luminance {lum}.");
+ }
+ }
+}
diff --git a/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeaveSkills.cs b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeaveSkills.cs
new file mode 100644
index 0000000..3488036
--- /dev/null
+++ b/Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeaveSkills.cs
@@ -0,0 +1,270 @@
+// DreamWeaveSkills.cs - RynthDreamWeave's Character panel (2026-11-07), through the shared server plugin's
+// hooks (Plugins/Shared/ServerPack/ServerPackPlugin.cs): retail's Character window, Attributes, Skills and
+// Titles, drawn 1:1 (DreamWeave/SkillsPanel.cs), whose "XP for next level" keeps reading past level 275 on
+// DreamWeave's own chart (DreamWeave/DreamWeaveXp.cs) where AC's panel goes negative.
+//
+// It is a window of its own on RynthCore's bar ("DreamWeave Skills", only on DreamWeave, frameless, drawn
+// under AC's own UI like a native window), also opened with "/rserver skills". With "Open this instead of
+// AC's Character window" (on by default; the panel's right-click menu, or /rserver skills replace on|off)
+// AC's own Character window (toolbar button or key) opens this one instead. AC's Character Information
+// window (the mini bar's backpack button) stays AC's own (2026-11-08), one of the main panels.
+//
+// Titles come from the server's game events 0x0029 (the list, at login) and 0x002B (one title), kept per
+// character in the plugin's settings so a hot reload still has them; "Set as Display Title" sends
+// "/rc title " (the engine calls AC's own sender).
+//
+// Hooks used: ServerWindows, ServerCommandVerbs, ServerChatCommand, ServerMessageInterest, ServerMessage,
+// ServerRender - none of the other DreamWeave features' (the bank check's), so they sit side by side.
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using RynthCore.Plugin.RynthDreamWeave;
+using RynthCore.PluginSdk;
+
+namespace RynthCore.Plugin.ServerPack;
+
+public sealed partial class ServerPackPlugin
+{
+ internal const string SkillsWindowId = "skills";
+ internal const string SkillsWindowTitle = "DreamWeave Skills";
+ private const string ReplaceAcSetting = "skillsReplaceAcCharacter";
+ private const string OnePanelSetting = "skillsOnePanelAtATime";
+ private const uint EventCharacterTitle = 0x0029, EventUpdateTitle = 0x002B;
+
+ private readonly SkillsReader _skillsReader = new();
+ private SkillsPanel? _skillsPanel;
+ private int _replaceAc = -1; // -1 not read yet (the settings are the pump's), 0 off, 1 on
+ private int _onePanel = 1; // one main panel at a time (OnePanelRule); read with _replaceAc
+ private readonly OnePanelRule _onePanelRule = new();
+ private bool _skillsStoreSet;
+
+ partial void ServerWindows(List windows)
+ {
+ int w = RynthCore.Plugin.RynthDreamWeave.SkillsPanel.PanelW + 2 * RynthCore.Plugin.RynthDreamWeave.SkillsPanel.Frame;
+ // fitHeight: the panel resizes itself from its bottom edge, as retail's Character window (SkillsPanel).
+ // underUi: AC's own windows cover it, as they cover each other.
+ // DrawScale: its size is its own (Ctrl+wheel, 30-250%), 100% = retail's pixels, not the text size.
+ // The minimums are small on purpose: the window is in RynthCore's DPI-scaled units, and the panel (retail's
+ // own pixels at 100%) fits it to itself; a 310 minimum held it 1.6x wide at 160% display scaling.
+ windows.Add(new ServerWindow(SkillsWindowId, SkillsWindowTitle, "", w, 610, 120, 120, Frameless: true, DrawSkills,
+ FitHeight: true, UnderUi: true, DrawScale: true));
+ }
+
+ private RynthCore.Plugin.RynthDreamWeave.SkillsPanel Panel()
+ {
+ if (!_skillsStoreSet)
+ {
+ _skillsStoreSet = true;
+ // Pump thread (the reader's tick and the server messages): the plugin's settings, one key per character.
+ _skillsReader.SetTitleStore(
+ id => Settings.GetString(TitlesKey(id), ""),
+ (id, saved) => { Settings.SetString(TitlesKey(id), saved); Settings.Save(); });
+ }
+ return _skillsPanel ??= new SkillsPanel(Host, _skillsReader, SkillsWindowTitle, RunOnTick, ChatLine,
+ () => Volatile.Read(ref _replaceAc) != 0, SetReplaceAc);
+ }
+
+ private static string TitlesKey(uint characterId) => "titles." + characterId.ToString("X8", CultureInfo.InvariantCulture);
+
+ private System.Numerics.Vector2 DrawSkills(bool popped) => Panel().Draw(popped);
+
+ // ── The DreamWeave window's Character page (open it, its setting: no chat commands needed) ──
+
+ ///
+ /// The bank check (DreamWeavePlugin.cs) implements ServerPages and calls this for the Character page.
+ ///
+ private void AddCharacterPage(List pages)
+ {
+ var page = new CharacterPage(
+ active: () => Active,
+ panelState: () => Host.HasSetPanelOpen ? Host.SetPanelOpen(SkillsWindowTitle, RynthPanelOpen.Ask) : -1,
+ open: tab =>
+ {
+ Panel().ShowPage(tab);
+ Host.SetPanelOpen(SkillsWindowTitle, RynthPanelOpen.Open);
+ },
+ close: () => Host.SetPanelOpen(SkillsWindowTitle, RynthPanelOpen.Close),
+ replacesAc: () => Volatile.Read(ref _replaceAc) != 0,
+ setReplacesAc: SetReplaceAc,
+ onePanel: () => Volatile.Read(ref _onePanel) != 0,
+ setOnePanel: SetOnePanel);
+ pages.Add(page.Page());
+ }
+
+ // ── Opening it instead of AC's Character window ─────────────────────
+
+ private void SetReplaceAc(bool on)
+ {
+ Volatile.Write(ref _replaceAc, on ? 1 : 0);
+ RunOnTick(() => { Settings.SetBool(ReplaceAcSetting, on); Settings.Save(); });
+ }
+
+ /// AC's main panels, the ones that share retail's panel frame (not the Character window: that is this panel).
+ /// The Character Information window (the mini bar's backpack button) stays AC's own and is one of them.
+ private static readonly RynthAcPanel[] MainAcPanels =
+ {
+ RynthAcPanel.Book, RynthAcPanel.HelpfulSpells, RynthAcPanel.HarmfulSpells, RynthAcPanel.Inventory,
+ RynthAcPanel.LinkStatus, RynthAcPanel.Options, RynthAcPanel.Social, RynthAcPanel.Spellbook,
+ RynthAcPanel.Help, RynthAcPanel.Vitae, RynthAcPanel.Map, RynthAcPanel.Quests, RynthAcPanel.CharacterInfo,
+ };
+
+ private void SetOnePanel(bool on)
+ {
+ Volatile.Write(ref _onePanel, on ? 1 : 0);
+ RunOnTick(() => { Settings.SetBool(OnePanelSetting, on); Settings.Save(); });
+ }
+
+ ///
+ /// Every frame (AC's thread): one main panel at a time, as retail - this panel opening closes AC's open main
+ /// panel (inventory, spellbook, social, options, map...), and one of those opening closes this panel.
+ ///
+ private void OnePanelAtATime()
+ {
+ if (Volatile.Read(ref _onePanel) == 0 || !Active || !Host.HasAcPanels || !Host.HasSetPanelOpen)
+ {
+ _onePanelRule.Reset();
+ return;
+ }
+ int ours = Host.SetPanelOpen(SkillsWindowTitle, RynthPanelOpen.Ask);
+ if (ours < 0) return; // the window isn't there (older engine)
+ uint ac = 0;
+ RynthAcPanel[] main = MainAcPanels;
+ for (int i = 0; i < main.Length; i++)
+ if (Host.IsAcPanelOpen(main[i]) == true) ac |= 1u << i;
+ OnePanelRule.Step step = _onePanelRule.Next(ours == 1, ac);
+ for (int i = 0; i < main.Length; i++)
+ if ((step.CloseAc & (1u << i)) != 0) Host.AcPanel(main[i], RynthAcPanelOp.Close);
+ if (step.CloseOurs) Host.SetPanelOpen(SkillsWindowTitle, RynthPanelOpen.Close);
+ }
+
+ // AC's own Character windows claimed (engine 2026-11-07, "/rc panels replace"): the engine holds back AC's
+ // open, so AC's window never shows, and runs these instead. Sent when the setting is read or changes; an
+ // engine reload reloads the plugins too, so a new engine hears it again.
+ private const string PressCharacter = "/rserver skills press character", PressTitles = "/rserver skills press titles";
+ private int _claimed = -1; // what was last sent: -1 nothing, 0 off, 1 on
+
+ private bool _infoReleased;
+
+ private void ClaimAcPanels(int replace)
+ {
+ bool on = replace == 1 && Active && Host.HasSetPanelOpen;
+ int want = on ? 1 : 0;
+ if (want == _claimed || (_claimed < 0 && !on) || !Host.HasInvokeChatParser) return; // never claimed: nothing to drop
+ _claimed = want;
+ string id = ((int)RynthAcPanel.Character).ToString(CultureInfo.InvariantCulture);
+ Host.InvokeChatParser($"/rc panels replace {id} {(on ? PressCharacter : "off")}");
+ // AC's Character Information window (the mini bar's backpack button) is AC's own again (2026-11-08, Tom:
+ // it "used to open up an information panel for the character, now it opens the titles panel"). It was
+ // claimed as a "Titles window"; an engine still holding that claim from the build before lets it go
+ // (quiet when it holds none).
+ if (!_infoReleased)
+ {
+ _infoReleased = true;
+ string info = ((int)RynthAcPanel.CharacterInfo).ToString(CultureInfo.InvariantCulture);
+ Host.InvokeChatParser($"/rc panels replace {info} off");
+ }
+ }
+
+ ///
+ /// AC's Character button or key ( 1), or its Character Titles window (2): as retail's
+ /// button, it toggles this panel; Titles turns an open panel to its Titles page first. AC's thread.
+ ///
+ private void PressAcButton(int page)
+ {
+ int ours = Host.SetPanelOpen(SkillsWindowTitle, RynthPanelOpen.Ask);
+ if (ours < 0) return; // the window isn't there (older engine)
+ RynthCore.Plugin.RynthDreamWeave.SkillsPanel panel = Panel();
+ if (ours == 1 && !(page == 2 && panel.CurrentPage != 2))
+ {
+ Host.SetPanelOpen(SkillsWindowTitle, RynthPanelOpen.Close);
+ return;
+ }
+ if (page == 2) panel.ShowPage(2);
+ Host.SetPanelOpen(SkillsWindowTitle, RynthPanelOpen.Open);
+ }
+
+ /// Every frame (AC's thread): AC's Character or Character Titles window opened -> this panel instead;
+ /// one main panel at a time.
+ partial void ServerRender()
+ {
+ int replace = Volatile.Read(ref _replaceAc);
+ if (replace < 0)
+ {
+ Volatile.Write(ref _replaceAc, 2); // asked for once
+ RunOnTick(() =>
+ {
+ Volatile.Write(ref _onePanel, Settings.GetBool(OnePanelSetting, true) ? 1 : 0);
+ Volatile.Write(ref _replaceAc, Settings.GetBool(ReplaceAcSetting, true) ? 1 : 0);
+ });
+ return;
+ }
+ if (replace == 2) return;
+ ClaimAcPanels(replace);
+ OnePanelAtATime();
+ // An engine without the claim (before 2026-11-07): AC's window opened, close it and open this one. It
+ // shows for a moment (AC's open state is read at most 5 times a second).
+ if (replace != 1 || !Active || !Host.HasAcPanels || !Host.HasSetPanelOpen) return;
+ if (Host.IsAcPanelOpen(RynthAcPanel.Character) != true) return;
+ // AC's close is queued: one swap per press.
+ long now = Environment.TickCount64;
+ bool fresh = now >= _replaceHoldUntil;
+ Host.AcPanel(RynthAcPanel.Character, RynthAcPanelOp.Close);
+ if (!fresh) return;
+ _replaceHoldUntil = now + 700;
+ PressAcButton(1);
+ }
+
+ private long _replaceHoldUntil;
+
+ // ── Titles from the server ──────────────────────────────────────────
+
+ partial void ServerMessageInterest(List gameEvents)
+ {
+ gameEvents.Add(EventCharacterTitle);
+ gameEvents.Add(EventUpdateTitle);
+ }
+
+ partial void ServerMessage(uint opcode, ReadOnlySpan body)
+ {
+ var msg = new RynthCore.PluginSdk.Net.ServerMessage(opcode, body);
+ if (!msg.IsGameEvent || (msg.EventType != EventCharacterTitle && msg.EventType != EventUpdateTitle)) return;
+ Panel(); // the title store is wired
+ _skillsReader.OnTitleEvent(msg.EventObjectId, msg.EventType, msg.EventBody);
+ }
+
+ // ── /rserver skills ─────────────────────────────────────────────────
+
+ partial void ServerCommandVerbs(List verbs) => verbs.Add("skills");
+
+ partial void ServerChatCommand(string[] parts, ref bool handled)
+ {
+ if (parts.Length < 2 || !parts[1].Equals("skills", StringComparison.OrdinalIgnoreCase)) return;
+ handled = true;
+ // "press character|titles": what AC's own Character button or Titles window does now (the engine runs it
+ // in their place, ClaimAcPanels). Quiet: it's a button, not a command.
+ if (parts.Length >= 4 && parts[2].Equals("press", StringComparison.OrdinalIgnoreCase))
+ {
+ if (Active && Host.HasSetPanelOpen)
+ PressAcButton(parts[3].Equals("titles", StringComparison.OrdinalIgnoreCase) ? 2 : 1);
+ return;
+ }
+ if (parts.Length >= 4 && parts[2].Equals("replace", StringComparison.OrdinalIgnoreCase))
+ {
+ bool on = parts[3].Equals("on", StringComparison.OrdinalIgnoreCase);
+ if (!on && !parts[3].Equals("off", StringComparison.OrdinalIgnoreCase)) { Reply.Fail("Usage: /rserver skills replace on|off"); return; }
+ SetReplaceAc(on);
+ Reply.Ok(on ? "AC's Character window now opens the DreamWeave panel." : "AC's Character window opens as usual.");
+ return;
+ }
+ if (!Host.HasSetPanelOpen || Host.SetPanelOpen(SkillsWindowTitle, RynthPanelOpen.Ask) < 0)
+ {
+ Reply.Fail(Active
+ ? "The Skills panel needs a RynthCore with plugin windows that draw their own frame (plugin API v90)."
+ : "The Skills panel is for DreamWeave only.");
+ return;
+ }
+ bool open = Host.SetPanelOpen(SkillsWindowTitle, RynthPanelOpen.Toggle) == 1;
+ Reply.Ok(open ? "Skills panel open." : "Skills panel closed.");
+ }
+}
diff --git a/Plugins/RynthCore.Plugin.RynthDreamWeave/RynthCore.Plugin.RynthDreamWeave.csproj b/Plugins/RynthCore.Plugin.RynthDreamWeave/RynthCore.Plugin.RynthDreamWeave.csproj
index 8b1faa3..a80a980 100644
--- a/Plugins/RynthCore.Plugin.RynthDreamWeave/RynthCore.Plugin.RynthDreamWeave.csproj
+++ b/Plugins/RynthCore.Plugin.RynthDreamWeave/RynthCore.Plugin.RynthDreamWeave.csproj
@@ -1,15 +1,16 @@
+ ServerData.cs holds what is known about the server. Its own feature (DreamWeavePlugin.cs, DreamWeave\,
+ 2026-11-02): the bank check every minute that gives Lum/hr its luminance there, and its Bank page. -->
RynthCore.Plugin.RynthDreamWeave
- 0.1.0
+ 0.2.0
dreamweave
DreamWeave
play.acdreamweave.com
DreamWeave|Dream Weave
- DreamWeave only: the server card (rules, server features, player commands, links, account setup) in the Mini Remote.
+ DreamWeave only: the server card (rules, server features, player commands, links, account setup) in its own window on the RynthCore bar, the retail Character panel whose XP for next level keeps reading past level 275, and the bank check every minute that gives Lum/hr its luminance.
diff --git a/Plugins/RynthCore.Plugin.RynthEversong/RynthCore.Plugin.RynthEversong.csproj b/Plugins/RynthCore.Plugin.RynthEversong/RynthCore.Plugin.RynthEversong.csproj
index b972d60..678198a 100644
--- a/Plugins/RynthCore.Plugin.RynthEversong/RynthCore.Plugin.RynthEversong.csproj
+++ b/Plugins/RynthCore.Plugin.RynthEversong/RynthCore.Plugin.RynthEversong.csproj
@@ -9,7 +9,7 @@
Eversong
eversong.abrdns.com
Eversong
- Eversong only: the server card (rules, account limits, botting policy, links, account setup) in the Mini Remote.
+ Eversong only: the server card (rules, account limits, botting policy, links, account setup) in its own window on the RynthCore bar.
diff --git a/Plugins/RynthCore.Plugin.RynthFrostACE/RynthCore.Plugin.RynthFrostACE.csproj b/Plugins/RynthCore.Plugin.RynthFrostACE/RynthCore.Plugin.RynthFrostACE.csproj
index 4baa0d6..836163e 100644
--- a/Plugins/RynthCore.Plugin.RynthFrostACE/RynthCore.Plugin.RynthFrostACE.csproj
+++ b/Plugins/RynthCore.Plugin.RynthFrostACE/RynthCore.Plugin.RynthFrostACE.csproj
@@ -9,7 +9,7 @@
FrostACE
172.111.230.127
FrostACE|FrostfACE
- FrostACE only: the server card (rules, account limits, botting policy, links, account setup) in the Mini Remote.
+ FrostACE only: the server card (rules, account limits, botting policy, links, account setup) in its own window on the RynthCore bar.
diff --git a/Plugins/RynthCore.Plugin.RynthFrostcull/RynthCore.Plugin.RynthFrostcull.csproj b/Plugins/RynthCore.Plugin.RynthFrostcull/RynthCore.Plugin.RynthFrostcull.csproj
index 04f81e2..b98dea3 100644
--- a/Plugins/RynthCore.Plugin.RynthFrostcull/RynthCore.Plugin.RynthFrostcull.csproj
+++ b/Plugins/RynthCore.Plugin.RynthFrostcull/RynthCore.Plugin.RynthFrostcull.csproj
@@ -9,7 +9,7 @@
Frostcull
frostcull.ddns.net
Frostcull
- Frostcull only: the server card (rules, account limits, botting policy, links, account setup) in the Mini Remote.
+ Frostcull only: the server card (rules, account limits, botting policy, links, account setup) in its own window on the RynthCore bar.
diff --git a/Plugins/RynthCore.Plugin.RynthLeafDawn/RynthCore.Plugin.RynthLeafDawn.csproj b/Plugins/RynthCore.Plugin.RynthLeafDawn/RynthCore.Plugin.RynthLeafDawn.csproj
index 7cba983..bfcf14b 100644
--- a/Plugins/RynthCore.Plugin.RynthLeafDawn/RynthCore.Plugin.RynthLeafDawn.csproj
+++ b/Plugins/RynthCore.Plugin.RynthLeafDawn/RynthCore.Plugin.RynthLeafDawn.csproj
@@ -9,7 +9,7 @@
LeafDawn
leafdawn.hopto.org
LeafDawn
- LeafDawn only: the server card (rules, account limits, botting policy, links, account setup) in the Mini Remote.
+ LeafDawn only: the server card (rules, account limits, botting policy, links, account setup) in its own window on the RynthCore bar.
diff --git a/Plugins/RynthCore.Plugin.RynthLeafdawning/RynthCore.Plugin.RynthLeafdawning.csproj b/Plugins/RynthCore.Plugin.RynthLeafdawning/RynthCore.Plugin.RynthLeafdawning.csproj
index 33d6188..7e08a61 100644
--- a/Plugins/RynthCore.Plugin.RynthLeafdawning/RynthCore.Plugin.RynthLeafdawning.csproj
+++ b/Plugins/RynthCore.Plugin.RynthLeafdawning/RynthCore.Plugin.RynthLeafdawning.csproj
@@ -9,7 +9,7 @@
Leafdawning
leafdawning.duckdns.org
Leafdawning
- Leafdawning only: the server card (rules, account limits, botting policy, links, account setup) in the Mini Remote.
+ Leafdawning only: the server card (rules, account limits, botting policy, links, account setup) in its own window on the RynthCore bar.
diff --git a/Plugins/RynthCore.Plugin.RynthLevistras/RynthCore.Plugin.RynthLevistras.csproj b/Plugins/RynthCore.Plugin.RynthLevistras/RynthCore.Plugin.RynthLevistras.csproj
index eb0db33..7fbd619 100644
--- a/Plugins/RynthCore.Plugin.RynthLevistras/RynthCore.Plugin.RynthLevistras.csproj
+++ b/Plugins/RynthCore.Plugin.RynthLevistras/RynthCore.Plugin.RynthLevistras.csproj
@@ -12,7 +12,7 @@
Levistras
levistras.acportalstorm.com
Levistras
- Levistras only: the server card (rules, account limits, botting policy, account setup) in the Mini Remote, and Levistras's quests in RynthOracle.
+ Levistras only: the server card (rules, account limits, botting policy, account setup) in its own window on the RynthCore bar, and Levistras's quests in RynthOracle.
diff --git a/Plugins/RynthCore.Plugin.RynthPortalStorm/RynthCore.Plugin.RynthPortalStorm.csproj b/Plugins/RynthCore.Plugin.RynthPortalStorm/RynthCore.Plugin.RynthPortalStorm.csproj
index e4e0182..cbdb8c2 100644
--- a/Plugins/RynthCore.Plugin.RynthPortalStorm/RynthCore.Plugin.RynthPortalStorm.csproj
+++ b/Plugins/RynthCore.Plugin.RynthPortalStorm/RynthCore.Plugin.RynthPortalStorm.csproj
@@ -9,7 +9,7 @@
PortalStorm
ac.portalstorm.us.com
PortalStorm|Portal Storm
- PortalStorm only: the server card (rules, account limits, botting policy, links, account setup) in the Mini Remote.
+ PortalStorm only: the server card (rules, account limits, botting policy, links, account setup) in its own window on the RynthCore bar.
diff --git a/Plugins/RynthCore.Plugin.RynthReefcull/RynthCore.Plugin.RynthReefcull.csproj b/Plugins/RynthCore.Plugin.RynthReefcull/RynthCore.Plugin.RynthReefcull.csproj
index 0c7e1ef..2a66c1f 100644
--- a/Plugins/RynthCore.Plugin.RynthReefcull/RynthCore.Plugin.RynthReefcull.csproj
+++ b/Plugins/RynthCore.Plugin.RynthReefcull/RynthCore.Plugin.RynthReefcull.csproj
@@ -9,7 +9,7 @@
Reefcull
reefcull.gdleac.com
Reefcull
- Reefcull only: the server card (rules, account limits, botting policy, links, account setup) in the Mini Remote.
+ Reefcull only: the server card (rules, account limits, botting policy, links, account setup) in its own window on the RynthCore bar.
diff --git a/Plugins/RynthCore.Plugin.RynthSundering/RynthCore.Plugin.RynthSundering.csproj b/Plugins/RynthCore.Plugin.RynthSundering/RynthCore.Plugin.RynthSundering.csproj
index e6a833d..abe65f1 100644
--- a/Plugins/RynthCore.Plugin.RynthSundering/RynthCore.Plugin.RynthSundering.csproj
+++ b/Plugins/RynthCore.Plugin.RynthSundering/RynthCore.Plugin.RynthSundering.csproj
@@ -9,7 +9,7 @@
Sundering
ace.sunderingac.com
Sundering|The Sundering
- Sundering only: the server card (rules, account limits, botting policy, links, account setup) in the Mini Remote.
+ Sundering only: the server card (rules, account limits, botting policy, links, account setup) in its own window on the RynthCore bar.
diff --git a/Plugins/RynthCore.Plugin.RynthThistlecrown/RynthCore.Plugin.RynthThistlecrown.csproj b/Plugins/RynthCore.Plugin.RynthThistlecrown/RynthCore.Plugin.RynthThistlecrown.csproj
index 1bbcd5f..3451811 100644
--- a/Plugins/RynthCore.Plugin.RynthThistlecrown/RynthCore.Plugin.RynthThistlecrown.csproj
+++ b/Plugins/RynthCore.Plugin.RynthThistlecrown/RynthCore.Plugin.RynthThistlecrown.csproj
@@ -9,7 +9,7 @@
Thistlecrown
thistlecrown.ddns.net
Thistlecrown
- Thistlecrown only: the server card (rules, account limits, botting policy, links, account setup) in the Mini Remote.
+ Thistlecrown only: the server card (rules, account limits, botting policy, links, account setup) in its own window on the RynthCore bar.
diff --git a/Plugins/Shared/ServerPack/ServerPackExports.cs b/Plugins/Shared/ServerPack/ServerPackExports.cs
index 5d5d420..cfbdbf5 100644
--- a/Plugins/Shared/ServerPack/ServerPackExports.cs
+++ b/Plugins/Shared/ServerPack/ServerPackExports.cs
@@ -20,6 +20,20 @@ public static unsafe class ServerPackExports
[UnmanagedCallersOnly(EntryPoint = "RynthPluginInit", CallConvs = new[] { typeof(CallConvCdecl) })]
private static int Init(RynthCoreApiNative* api) => Runtime.Init(api);
+ ///
+ /// Plugin API v78: a reassembled server message the server's code asked for (ServerMessageInterest,
+ /// 2026-11-07). is the message after its opcode, valid only during the call. Pump thread.
+ ///
+ [UnmanagedCallersOnly(EntryPoint = "RynthPluginOnServerMessage", CallConvs = new[] { typeof(CallConvCdecl) })]
+ private static void OnServerMessage(uint opcode, byte* data, int length)
+ {
+ try
+ {
+ Runtime.Plugin?.OnServerMessage(opcode, data != null && length > 0 ? new ReadOnlySpan(data, length) : ReadOnlySpan.Empty);
+ }
+ catch { /* never let a managed exception cross the native boundary */ }
+ }
+
///
/// Plugin API v68 plugin-to-plugin interfaces: "RynthServer.Profile" v1 (ServerPackInterface),
/// the server's settings for any plugin RynthCore's GetServerStateJson points at this one, and
@@ -80,6 +94,18 @@ public static unsafe class ServerPackExports
catch { /* an exception crossing UnmanagedCallersOnly would fail-fast the client */ }
}
+ ///
+ /// The same while RynthCore's ImGui shell is off (the bar UI: the engine calls this instead of
+ /// RynthPluginRender). Without it the per-frame ServerRender hook never ran there (2026-11-07:
+ /// RynthDreamWeave's "open this instead of AC's Character window" didn't). Render thread.
+ ///
+ [UnmanagedCallersOnly(EntryPoint = "RynthPluginRenderOverlay", CallConvs = new[] { typeof(CallConvCdecl) })]
+ public static void RenderOverlay()
+ {
+ try { Runtime.OnRender(); }
+ catch { /* an exception crossing UnmanagedCallersOnly would fail-fast the client */ }
+ }
+
///
/// The engine's plugin-command broker: "servermenu" from RynthCore (2026.10.5.48+). The ANSI
/// strings are copied before returning (the caller frees them); the payload is only parsed, so
@@ -112,11 +138,18 @@ public static unsafe class ServerPackExports
{
if (surface == null) return 0;
string name = Marshal.PtrToStringUTF8((IntPtr)surface) ?? string.Empty;
- if (name.EndsWith(":popout", StringComparison.Ordinal)) name = name[..^":popout".Length];
+ bool popped = name.EndsWith(":popout", StringComparison.Ordinal);
+ if (popped) name = name[..^":popout".Length];
var plugin = Runtime.Plugin;
if (plugin == null) return 0;
- float wantH;
- if (name.Equals(ServerPackModel.WindowSurface, StringComparison.Ordinal))
+ float wantH, wantW = 0;
+ string? ownWindow = ServerPackWindows.IdOf(name);
+ if (ownWindow != null)
+ {
+ // One of the server's own windows (ServerWindows, 2026-11-07); it may size its width too.
+ if (!plugin.RenderServerWindow(ownWindow, popped, out wantH, out wantW)) return 0;
+ }
+ else if (name.Equals(ServerPackModel.WindowSurface, StringComparison.Ordinal))
{
if (!plugin.RenderEmbeddedWindow(out wantH)) return 0;
}
@@ -129,7 +162,7 @@ public static unsafe class ServerPackExports
string? page = ServerPackPages.PageIdOf(name, RynthPluginInfo.ServerId);
if (page == null || !plugin.RenderEmbeddedPage(page, out wantH)) return 0;
}
- if (wantWidth != null) *wantWidth = width;
+ if (wantWidth != null) *wantWidth = wantW > 0 ? wantW : width;
if (wantHeight != null) *wantHeight = wantH;
return 1;
}
diff --git a/Plugins/Shared/ServerPack/ServerPackModel.cs b/Plugins/Shared/ServerPack/ServerPackModel.cs
index 9386f52..da1e059 100644
--- a/Plugins/Shared/ServerPack/ServerPackModel.cs
+++ b/Plugins/Shared/ServerPack/ServerPackModel.cs
@@ -169,7 +169,8 @@ internal sealed class ServerPackModel
/// is easy to find, not mixed in with the rest; until then the card and pages were sub-tabs of a
/// shared "Server" section of the Mini Remote.
///
- public static string BuildSectionsJson(ServerPackInfo info, string pluginName, IReadOnlyList? pages = null)
+ public static string BuildSectionsJson(ServerPackInfo info, string pluginName, IReadOnlyList? pages = null,
+ IReadOnlyList? windows = null, bool frameless = false)
{
var sb = new StringBuilder(512);
sb.Append("{\"version\":1,\"servers\":[{\"id\":").Append(Q(info.Id)).Append(",\"name\":").Append(Q(info.Name));
@@ -184,7 +185,10 @@ internal sealed class ServerPackModel
sb.Append(",\"icon\":").Append(Q(WindowIcon));
sb.Append(",\"width\":").Append(tabs ? ServerPackPages.Width : 460).Append(",\"height\":").Append(ServerPackPages.Height);
sb.Append(",\"minWidth\":320,\"minHeight\":200,\"bar\":true,\"server\":").Append(Q(info.Id));
- sb.Append("}]}");
+ sb.Append('}');
+ // The server's own windows (ServerWindows, ServerPackWindows.cs, 2026-11-07).
+ if (windows != null) sb.Append(ServerPackWindows.Json(windows, info.Id, frameless));
+ sb.Append("]}");
return sb.ToString();
}
diff --git a/Plugins/Shared/ServerPack/ServerPackPlugin.cs b/Plugins/Shared/ServerPack/ServerPackPlugin.cs
index 37eb77e..f1f30c3 100644
--- a/Plugins/Shared/ServerPack/ServerPackPlugin.cs
+++ b/Plugins/Shared/ServerPack/ServerPackPlugin.cs
@@ -20,6 +20,9 @@
// ServerPages(list) pages of its own (ServerPackPages.cs): sub-tabs of the Mini Remote's
// Server section, only while its server is active, and tabs of the
// /rserver window. Draw runs on the render thread.
+// ServerWindows(list) windows of its own on RynthCore's bar (ServerPackWindows.cs, 2026-11-07:
+// RynthDreamWeave's Skills panel), only while its server is active;
+// "frameless" ones draw their own frame (engines with v90 windows).
// ServerChatText(...) every incoming chat line (pump thread), to read the server's replies
// and hide the ones answering the plugin's own requests (eat).
// ServerChatBar(text) every line sent through the chat bar (AC's thread: note it only),
@@ -66,9 +69,11 @@ public sealed partial class ServerPackPlugin : RynthPluginBase
private readonly ServerPackModel _model;
private readonly ServerPackUi _ui;
- private readonly string _sectionsJson;
+ private string? _sectionsJson;
// The server's own pages (ServerPages), validated; what was left out is logged at Initialize.
private readonly List _pages;
+ // The server's own windows (ServerWindows), validated the same way.
+ private readonly List _windows;
private readonly List _pageNotes = new();
private readonly ServerPackSettings _settings = new(ServerPackSettings.DefaultPath(RynthPluginInfo.Name));
private readonly ServerProfileValues _profileValues = new();
@@ -91,11 +96,13 @@ public sealed partial class ServerPackPlugin : RynthPluginBase
var pages = new List();
ServerPages(pages);
_pages = ServerPackPages.Validate(pages, _pageNotes.Add);
+ var windows = new List();
+ ServerWindows(windows);
+ _windows = ServerPackWindows.Validate(windows, _pageNotes.Add);
var verbs = new List();
ServerCommandVerbs(verbs);
foreach (string v in verbs) if (!string.IsNullOrWhiteSpace(v)) _serverVerbs.Add(v.Trim());
_ui = new ServerPackUi(_model, RynthPluginInfo.Name + " " + Marshal.PtrToStringAnsi(VersionPointer), () => _world, _pages);
- _sectionsJson = ServerPackModel.BuildSectionsJson(info, RynthPluginInfo.Name, _pages);
}
internal ServerPackInfo Info => _model.Info;
@@ -130,6 +137,15 @@ public sealed partial class ServerPackPlugin : RynthPluginBase
partial void ServerInfoLines(Action line);
/// The server's own pages (ServerPackPages.cs). Called once, from the constructor (no Host yet).
partial void ServerPages(List pages);
+ /// The server's own windows on RynthCore's bar (ServerPackWindows.cs). Called once, from the constructor (no Host yet).
+ partial void ServerWindows(List windows);
+ /// Game event types (0xF7B0 events) the server's code wants on . Called once, at Initialize.
+ partial void ServerMessageInterest(List gameEvents);
+ /// A server message asked for in ServerMessageInterest (pump thread; is the bytes after
+ /// the opcode, valid only during the call: RynthCore.PluginSdk.Net.ServerMessage reads it).
+ partial void ServerMessage(uint opcode, ReadOnlySpan body);
+ /// Every frame while logged in (render thread, AC's main thread; the engine's ImGui context current).
+ partial void ServerRender();
///
/// An incoming chat line (pump thread, logged in only): set to keep it out of
/// the chat window (it comes in true when an earlier plugin already ate it).
@@ -180,9 +196,20 @@ public sealed partial class ServerPackPlugin : RynthPluginBase
_settings.Load();
if (_settings.LastError.Length > 0) LogTagged($"Settings ({_settings.FilePath}) not read: {_settings.LastError}; using defaults.");
ServerInitialize();
+ // The server's own server-message wishes (ServerMessageInterest, 2026-11-07), streamed to ServerMessage.
+ var events = new List();
+ ServerMessageInterest(events);
+ if (events.Count > 0 && Host.HasServerMessages)
+ {
+ int r = Host.SetServerMessageInterest(ReadOnlySpan.Empty, events.ToArray());
+ if (r != 1) LogTagged($"Server messages not streamed (SetServerMessageInterest answered {r}).");
+ }
return 0;
}
+ /// RynthPluginOnServerMessage (pump thread): a server message the server's code asked for.
+ internal void OnServerMessage(uint opcode, ReadOnlySpan body) => ServerMessage(opcode, body);
+
// Also called on a freshly (re)loaded plugin while already in game.
public override void OnLoginComplete()
{
@@ -251,18 +278,55 @@ public sealed partial class ServerPackPlugin : RynthPluginBase
/// (the manifest is static): the engine only collects it once in game, and keeping it across
/// logout and character switches stops the server dropping out of Options > Diagnostics.
///
- internal string? BuildSectionsJson() => _sectionsJson;
+ internal string? BuildSectionsJson()
+ => _sectionsJson ??= ServerPackModel.BuildSectionsJson(Info, RynthPluginInfo.Name, _pages, _windows,
+ frameless: _windows.Count > 0 && Host.HasFramelessWindows);
+
+ ///
+ /// RynthPluginRenderEmbed "window:<id>": one of the server's own windows (ServerWindows), into the
+ /// host's window. False for an id this plugin doesn't have, or before login. Render thread.
+ ///
+ internal bool RenderServerWindow(string id, bool popped, out float wantHeight, out float wantWidth)
+ {
+ wantHeight = 0;
+ wantWidth = 0;
+ ServerWindow? window = _windows.Find(w => w.Id == id);
+ if (window == null || !_loginComplete) return false;
+ IntPtr previous = ImGui.GetCurrentContext();
+ IntPtr context = previous != IntPtr.Zero ? previous : Host.ImGuiContext;
+ if (context == IntPtr.Zero) return false;
+ ImGui.SetCurrentContext(context);
+ try
+ {
+ System.Numerics.Vector2 want = window.Draw(popped);
+ wantHeight = want.Y;
+ wantWidth = want.X;
+ return true;
+ }
+ catch (Exception ex)
+ {
+ Host.Log($"[{RynthPluginInfo.Name}] Window {window.Title} failed: {ex.Message}");
+ return false;
+ }
+ finally { ImGui.SetCurrentContext(previous); }
+ }
// ── Drawing ──────────────────────────────────────────────────────────
/// The standalone card window. Render thread.
public override void OnRender()
{
- if (!_loginComplete || !_ui.WindowOpen || Host.ImGuiContext == IntPtr.Zero) return;
+ if (!_loginComplete || Host.ImGuiContext == IntPtr.Zero) return;
IntPtr previous = ImGui.GetCurrentContext();
ImGui.SetCurrentContext(Host.ImGuiContext);
- try { _ui.RenderWindow(); }
- catch (Exception ex) { Host.Log($"[{RynthPluginInfo.Name}] Server window failed: {ex.Message}"); _ui.WindowOpen = false; }
+ try
+ {
+ try { ServerRender(); }
+ catch (Exception ex) { LogTagged($"Render hook failed: {ex.GetType().Name}: {ex.Message}"); }
+ if (!_ui.WindowOpen) return;
+ try { _ui.RenderWindow(); }
+ catch (Exception ex) { Host.Log($"[{RynthPluginInfo.Name}] Server window failed: {ex.Message}"); _ui.WindowOpen = false; }
+ }
finally { ImGui.SetCurrentContext(previous); }
}
diff --git a/Plugins/Shared/ServerPack/ServerPackWindows.cs b/Plugins/Shared/ServerPack/ServerPackWindows.cs
new file mode 100644
index 0000000..c7bb398
--- /dev/null
+++ b/Plugins/Shared/ServerPack/ServerPackWindows.cs
@@ -0,0 +1,81 @@
+// ServerPackWindows.cs - Windows of its own a server plugin adds to RynthCore's bar, beside the server's
+// window (2026-11-07: RynthDreamWeave's Skills panel, the retail Character panel drawn by the plugin).
+//
+// The ServerPackPlugin.ServerWindows hook lists them once, at construction. Each is declared in the
+// sections manifest's "windows" (plugin windows, API v89; "chrome": "none" for one that draws its own
+// frame, v90), only while the server is active, and drawn through RynthPluginRenderEmbed "window:"
+// on the render thread. A frameless window is declared only on engines with frameless windows (an older
+// engine would wrap it in its own frame), so it simply isn't there on those.
+// Pure (no ImGui, no host calls): RynthServerPack.Tests covers it.
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace RynthCore.Plugin.ServerPack;
+
+///
+/// One window a server plugin adds. is 1-16 of a-z, 0-9 and '-' (its surface is
+/// "window:<id>"); is its panel key (bar tooltip, saved place, /rc commands).
+/// draws the body (popped out or not) and returns the size it wants: the height it used and, for a window that sizes its width too, that width (0: the width it was given). Render thread.
+///
+internal sealed record ServerWindow(string Id, string Title, string Icon, int Width, int Height, int MinWidth, int MinHeight,
+ bool Frameless, Func Draw, bool FitHeight = false, bool UnderUi = false, bool DrawScale = false);
+
+internal static class ServerPackWindows
+{
+ /// At most this many windows besides the server's own.
+ public const int MaxWindows = 3;
+
+ public static string SurfaceFor(string id) => "window:" + id;
+
+ /// The window id a surface names ("window:skills" -> "skills"), or null. ":popout" is the caller's to strip.
+ public static string? IdOf(string? surface)
+ {
+ if (surface == null || !surface.StartsWith("window:", StringComparison.Ordinal)) return null;
+ string id = surface["window:".Length..];
+ return ServerPackPages.IsValidId(id) && id != ServerPackModel.WindowId ? id : null;
+ }
+
+ /// The windows that can be declared: a valid id that isn't the server window's, a title, each id once.
+ public static List Validate(List windows, Action note)
+ {
+ var ok = new List();
+ var ids = new HashSet(StringComparer.Ordinal);
+ foreach (ServerWindow w in windows)
+ {
+ if (w == null) continue;
+ if (!ServerPackPages.IsValidId(w.Id) || w.Id == ServerPackModel.WindowId) { note($"Window \"{w.Id}\" left out: its id must be 1-16 of a-z, 0-9 and '-', not \"server\"."); continue; }
+ if (string.IsNullOrWhiteSpace(w.Title)) { note($"Window \"{w.Id}\" left out: it has no title."); continue; }
+ if (!ids.Add(w.Id)) { note($"Window \"{w.Id}\" left out: the id is used twice."); continue; }
+ if (ok.Count >= MaxWindows) { note($"Window \"{w.Id}\" left out: at most {MaxWindows} windows."); continue; }
+ ok.Add(w);
+ }
+ return ok;
+ }
+
+ /// The manifest entries (",{...}" each) for ; frameless ones only when .
+ public static string Json(IReadOnlyList windows, string serverId, bool frameless)
+ {
+ var sb = new StringBuilder();
+ foreach (ServerWindow w in windows)
+ {
+ if (w.Frameless && !frameless) continue;
+ sb.Append(",{\"id\":").Append(ServerPackModel.Q(w.Id));
+ sb.Append(",\"title\":").Append(ServerPackModel.Q(w.Title.Trim()));
+ sb.Append(",\"surface\":").Append(ServerPackModel.Q(SurfaceFor(w.Id)));
+ sb.Append(",\"icon\":").Append(ServerPackModel.Q(w.Icon));
+ sb.Append(",\"width\":").Append(w.Width).Append(",\"height\":").Append(w.Height);
+ sb.Append(",\"minWidth\":").Append(w.MinWidth).Append(",\"minHeight\":").Append(w.MinHeight);
+ sb.Append(",\"bar\":true,\"server\":").Append(ServerPackModel.Q(serverId));
+ if (w.Frameless) sb.Append(",\"chrome\":\"none\"");
+ // The window is as tall as the height the draw reports (the plugin sizes it itself, v90).
+ if (w.FitHeight && w.Frameless) sb.Append(",\"fitHeight\":true");
+ // Drawn under AC's own UI, like a native AC window (engines from 2026-11-07; older ones ignore it).
+ if (w.UnderUi && w.Frameless) sb.Append(",\"layer\":\"underUi\"");
+ // It draws itself at any size: Ctrl+wheel steps its own draw size (PanelScale, 30-250%), not its text.
+ if (w.DrawScale && w.Frameless) sb.Append(",\"scale\":\"draw\"");
+ sb.Append('}');
+ }
+ return sb.ToString();
+ }
+}
diff --git a/Plugins/Shared/ServerPack/ServerPlugin.props b/Plugins/Shared/ServerPack/ServerPlugin.props
index bc3452e..9e8606b 100644
--- a/Plugins/Shared/ServerPack/ServerPlugin.props
+++ b/Plugins/Shared/ServerPack/ServerPlugin.props
@@ -49,6 +49,8 @@
+
+
diff --git a/README.md b/README.md
index 419f3c9..f6555bc 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ Plugins for particular Asheron's Call emulator servers, for [RynthCore](https://
| RynthILT | Infinite Leaftide (pets, Vaulted Dungeons, T11, banking, Dynamic Stamps, ...) |
| RynthThreads | DreamWeave's Threads |
| RynthAelrynth, RynthConquest, RynthLevistras | their server's card, quest pack and own pages |
-| RynthAChard, RynthColdeve, RynthDerptide, RynthDreamWeave, RynthEversong, RynthFrostACE, RynthFrostcull, RynthLeafDawn, RynthLeafdawning, RynthPortalStorm, RynthReefcull, RynthSundering, RynthThistlecrown | their server's card in the Mini Remote |
+| RynthAChard, RynthColdeve, RynthDerptide, RynthDreamWeave, RynthEversong, RynthFrostACE, RynthFrostcull, RynthLeafDawn, RynthLeafdawning, RynthPortalStorm, RynthReefcull, RynthSundering, RynthThistlecrown | their server's card in its own window on the RynthCore bar |
The shared server-plugin build is `Plugins/Shared/ServerPack`.
diff --git a/Tools/RetailDataGen/gen_retail_data.py b/Tools/RetailDataGen/gen_retail_data.py
new file mode 100644
index 0000000..0861b06
--- /dev/null
+++ b/Tools/RetailDataGen/gen_retail_data.py
@@ -0,0 +1,336 @@
+#!/usr/bin/env python3
+"""Writes RynthDreamWeave's DreamWeave/RetailData.g.cs from a retail client_portal.dat.
+
+The DreamWeave Skills panel draws the retail Character panel's Skills page 1:1, so it carries the
+numbers and glyph tables the retail client reads from portal.dat:
+
+ 0x0E000018 XpTable the level chart (total XP for levels 0..275) and the skill-credit levels
+ 0x0E000004 SkillTable each skill's name, icon, whether it is usable untrained (MinLevel 1), its
+ formula and description (the hover tooltip)
+ 0x2300000E (local dat) the character titles, keyed by AC's string hash of "ID_CharacterTitle_"
+ 0x400000xx Font the glyph tables of the five faces the page uses (Palatino_Linotype_14/16/18,
+ Chat_PalatinoLinotype_Large = 20, Stonehenge_36), ASCII and Latin-1 only;
+ the engine draws their glyph sheets (GetIconTexture kind FontSheet)
+
+Run it again only if the dat changes (it hasn't since end of retail):
+
+ python gen_retail_data.py [client_portal.dat] [client_local_English.dat] [ACE CharacterTitle.cs] >..\\..\\Plugins\\RynthCore.Plugin.RynthDreamWeave\\DreamWeave\\RetailData.g.cs
+
+No dependencies; the dat reader is the minimal B-tree walk the AC dat format needs.
+"""
+import struct
+import sys
+
+PORTAL = sys.argv[1] if len(sys.argv) > 1 else r"C:\Games\ACE\Dats\client_portal.dat"
+LOCAL = sys.argv[2] if len(sys.argv) > 2 else r"C:\Games\ACE\Dats\client_local_English.dat"
+# The CharacterTitle names (ACE.Entity/Enum/CharacterTitle.cs of any ACE checkout): only the names are read.
+ENUM = sys.argv[3] if len(sys.argv) > 3 else r"C:\Projects\_dwsrc\ACE-DreamWeave\Source\ACE.Entity\Enum\CharacterTitle.cs"
+
+
+def cs(s):
+ """A C# string literal."""
+ return '"' + s.replace('\\', '\\\\').replace('"', '\\"').replace('\n', '\\n').replace('\r', '') + '"'
+
+HDR = 0x140
+BRANCHES = 0x3E
+MAX_ENTRIES = 0x3D
+ENTRY_SIZE = 24
+
+
+class Dat:
+ def __init__(self, path):
+ self.f = open(path, 'rb')
+ self.f.seek(HDR)
+ (_ft, self.block_size, _fs, _ds, _dss, _fh, _ftl, _fc, self.root) = struct.unpack('<9I', self.f.read(36))
+ self.entries = {}
+ self._walk(self.root)
+
+ def _chain(self, offset, size):
+ out = bytearray()
+ nxt = offset
+ while len(out) < size and nxt:
+ self.f.seek(nxt)
+ n = struct.unpack(' 1 else '')
+
+
+def ac_hash(s):
+ """AC's string-id hash (PStringBase): what string table entries are keyed by."""
+ h = 0
+ for ch in s:
+ h = ((h << 4) + ord(ch)) & 0xFFFFFFFF
+ hi = h & 0xF0000000
+ if hi:
+ h ^= hi >> 24
+ h &= 0x0FFFFFFF
+ return h
+
+
+def string_table(dat, fid):
+ """A type-0x23 string table: id -> first string (AcClientReborn Dat/AcStringTable.cs has the format)."""
+ b = dat.read(fid)
+ o = [9]
+
+ def cu32():
+ b0 = b[o[0]]
+ if not b0 & 0x80:
+ o[0] += 1
+ return b0
+ if not b0 & 0x40:
+ v = struct.unpack_from('>H', b, o[0])[0] & 0x3FFF
+ o[0] += 2
+ return v
+ v = struct.unpack_from('>I', b, o[0])[0] & 0x3FFFFFFF
+ o[0] += 4
+ return v
+
+ def ustr():
+ n = cu32()
+ s = b[o[0]:o[0] + 2 * n].decode('utf-16-le', 'replace')
+ o[0] += 2 * n
+ return s
+
+ def u16():
+ v = struct.unpack_from(' name."""
+ import re
+ names, n, inside = {}, 0, False
+ for line in open(path, encoding='utf-8'):
+ line = line.split('//')[0].strip()
+ if line.startswith('public enum'):
+ inside = True
+ continue
+ if not inside or not line or line in ('{',):
+ continue
+ if line.startswith('}'):
+ break
+ m = re.match(r'^(\w+)\s*(?:=\s*(\w+))?\s*,?$', line)
+ if not m:
+ continue
+ if m.group(2):
+ n = int(m.group(2), 0)
+ names[n] = m.group(1)
+ n += 1
+ return names
+
+
+def titles(local, enum_path):
+ """CharacterTitleId -> the title's text, from string table 0x2300000E keyed by
+ hash("ID_CharacterTitle_" + its original name). The names come from ACE's CharacterTitle enum
+ (names only, no code), whose spellings drop the original's underscores: each is tried as written,
+ then with underscores between its words, then matched by its letters alone."""
+ import re
+ table = string_table(local, 0x2300000E)
+ by_letters = {}
+ for text in table.values():
+ by_letters.setdefault(re.sub(r'[^a-z0-9]', '', text.lower()), []).append(text)
+ out, missing = {}, []
+ for tid, name in sorted(enum_names(enum_path).items()):
+ if tid == 0 or name.upper().startswith('UNKNOWN'):
+ continue
+ words = re.sub(r'(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])', '_', name)
+ text = None
+ for cand in (name, words):
+ k = ac_hash('ID_CharacterTitle_' + cand)
+ if k in table:
+ text = table[k]
+ break
+ if text is None:
+ hits = by_letters.get(re.sub(r'[^a-z0-9]', '', name.lower()), [])
+ if len(hits) == 1:
+ text = hits[0]
+ if text is None:
+ missing.append(name)
+ else:
+ out[tid] = text
+ sys.stderr.write('titles: %d named, %d not found (%s)\n' % (len(out), len(missing), ', '.join(missing[:12])))
+ return out
+
+
+FONTS = [
+ ('Pal14', 0x40000002, False),
+ ('Pal16', 0x40000000, False),
+ ('Pal18', 0x40000001, False),
+ ('Pal20', 0x40000004, False),
+ ('Stone36', 0x40000010, True),
+]
+
+
+def font(dat, did):
+ b = dat.read(did)
+ o = 4
+ max_h, _max_w, n = struct.unpack_from(' by Tools/RetailDataGen/gen_retail_data.py from a retail client_portal.dat.\n')
+ w('// The numbers the retail client reads to draw its Character panel: do not edit by hand.\n')
+ w('namespace RynthCore.Plugin.RynthDreamWeave;\n\n')
+ w('internal static partial class RetailData\n{\n')
+ w(' /// XpTable 0x0E000018: total experience to reach each level, 0..%d.\n' % (len(totals) - 1))
+ w(' public static readonly ulong[] LevelTotals =\n {\n')
+ for i in range(0, len(totals), 6):
+ w(' ' + ', '.join('%dUL' % v for v in totals[i:i + 6]) + ',\n')
+ w(' };\n\n')
+ w(' /// XpTable 0x0E000018: skill credits granted on reaching each level, 0..%d.\n' % (len(credits) - 1))
+ w(' public static readonly byte[] LevelCredits =\n {\n')
+ for i in range(0, len(credits), 30):
+ w(' ' + ', '.join(str(v) for v in credits[i:i + 30]) + ',\n')
+ w(' };\n\n')
+ for field, chart, what in (('TrainedSkillXp', trained, 'a trained skill'), ('SpecializedSkillXp', special, 'a specialized skill'),
+ ('AttributeXp', attrs, 'an attribute'), ('VitalXp', vitals, 'a vital\'s maximum')):
+ w(' /// XpTable 0x0E000018: total XP to reach each rank of %s, 0..%d.\n'
+ % (what, len(chart) - 1))
+ w(' public static readonly uint[] %s =\n {\n' % field)
+ for i in range(0, len(chart), 8):
+ w(' ' + ', '.join('%dU' % v for v in chart[i:i + 8]) + ',\n')
+ w(' };\n\n')
+ w(' /// SkillTable 0x0E000004: id, name, icon, usable untrained (MinLevel 1), and the hover\n')
+ w(' /// tooltip\'s formula line and description.\n')
+ w(' public static readonly RetailSkill[] Skills =\n {\n')
+ for sid, name, icon, usable, desc, fx, fz, a1, a2 in skills:
+ w(' new(%d, %s, 0x%08Xu, %s, %s, %s),\n' % (sid, cs(name), icon, 'true' if usable else 'false',
+ cs(formula(fx, fz, a1, a2)), cs(desc)))
+ w(' };\n\n')
+ names = titles(Dat(LOCAL), ENUM)
+ w(' /// String table 0x2300000E: CharacterTitleId -> the title (the header\'s second line).\n')
+ w(' public static readonly System.Collections.Generic.Dictionary Titles = new()\n {\n')
+ for tid, text in sorted(names.items()):
+ w(' [%d] = %s,\n' % (tid, cs(text)))
+ w(' };\n\n')
+ for field, did, outline in FONTS:
+ max_h, bx, by, base, fg, bg, sheets, glyphs = font(dat, did)
+ chars = [c for c in sorted(glyphs) if 0x20 <= c <= 0x7E or 0xA0 <= c <= 0xFF]
+ w(' /// Font 0x%08X: glyphs as char, sheet x, y, w, h, before, after, top.\n' % did)
+ w(' public static readonly RetailFont %s = new(0x%08Xu, %d, %d, %d, %d, 0x%08Xu, %d, %d, 0x%08Xu, %d, %d, new short[]\n {\n'
+ % (field, did, max_h, base, bx, by, fg, sheets[0][0], sheets[0][1], bg if outline else 0,
+ sheets[1][0] if outline else 0, sheets[1][1] if outline else 0))
+ for i in range(0, len(chars), 4):
+ parts = []
+ for c in chars[i:i + 4]:
+ ox, oy, gw, gh, hb, ha, vb = glyphs[c]
+ parts.append('%d,%d,%d,%d,%d,%d,%d,%d' % (c, ox, oy, gw, gh, hb, ha, vb))
+ w(' ' + ', '.join(parts) + ',\n')
+ w(' });\n\n')
+ w('}\n')
+
+
+if __name__ == '__main__':
+ main()
diff --git a/Tools/RynthServerPack.Tests/DreamWeaveSkillsTests.cs b/Tools/RynthServerPack.Tests/DreamWeaveSkillsTests.cs
new file mode 100644
index 0000000..d039210
--- /dev/null
+++ b/Tools/RynthServerPack.Tests/DreamWeaveSkillsTests.cs
@@ -0,0 +1,315 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using RynthCore.Engine.UI.Sections;
+using RynthCore.Plugin.RynthDreamWeave;
+using RynthCore.Plugin.ServerPack;
+using RynthCore.RynthAiTests.Harness;
+
+namespace RynthServerPack.Tests;
+
+// RynthDreamWeave's Skills panel (2026-11-07): DreamWeave's level chart past 275 (the reason for the panel:
+// AC's own panel reads a negative "XP for next level" there), the retail data it carries, the list's
+// sections and footer, and the shared ServerWindows hook it is declared through.
+internal static class DreamWeaveSkillsTests
+{
+ public static void Register(Runner r)
+ {
+ r.Add("dreamweave skills: the retail chart is portal.dat's, levels 0..275", RetailChart);
+ r.Add("dreamweave skills: the chart past 275 follows the server's rule", ExtendedChart);
+ r.Add("dreamweave skills: XP for next level past 275 (the reported level-344 character)", NextLevelPast275);
+ r.Add("dreamweave skills: XP for next level at the edges", NextLevelEdges);
+ r.Add("dreamweave skills: sections, order and what shows in each", Sections);
+ r.Add("dreamweave skills: the footer reads as retail's", Footer);
+ r.Add("dreamweave skills: raise arrows only when affordable", RaiseGates);
+ r.Add("dreamweave skills: header words (rank title, character title)", Header);
+ r.Add("dreamweave skills: the XP bar fills with the way through the level", LevelBar);
+ r.Add("dreamweave skills: tooltips (formula, description, wrapped as retail)", Tooltips);
+ r.Add("dreamweave skills: fonts and skill table", RetailTables);
+ r.Add("hooks: server windows are validated and declared frameless only when the engine can", Windows);
+ r.Add("dreamweave skills: the Attributes page (rows, values, footer, bar)", Attributes);
+ r.Add("dreamweave skills: the Titles page (the server's list, updates, saving)", Titles);
+ r.Add("dreamweave skills: one main panel at a time, as retail", OnePanel);
+ }
+
+ private static void Attributes()
+ {
+ Check.Eq(string.Join(",", AttributesPage.Rows.Select(r => r.Name)), "Strength,Endurance,Coordination,Quickness,Focus,Self,Health,Stamina,Mana", "retail's order");
+ var str = new AttributeLine(1, 1, "Strength", 0, 200, 250, 1000, 12000, true, false, 50, RetailData.AttributeXp[50] + (RetailData.AttributeXp[51] - RetailData.AttributeXp[50]) / 2);
+ Check.Eq(str.ValueText, "250", "an attribute shows its buffed value");
+ Check.Eq(AttributesPage.FooterTitle(str), ("Strength: 250", " (+50)"), "footer title");
+ Check.Eq(AttributesPage.FooterTitle(null).Text, "Select an Attribute to Improve", "retail's prompt");
+ var sheet = SkillsSheet.Empty with { UnassignedXp = 5000, SkillCredits = 2 };
+ Check.Eq(AttributesPage.FooterLines(sheet, str).One, ("Experience To Raise:", "1,000"), "cost");
+ Check.Eq(AttributesPage.FooterLines(sheet, null).One, ("Skill Credits Available:", "2"), "nothing selected");
+ Check.True(AttributesPage.CanRaiseOne(sheet, str) && !AttributesPage.CanRaiseTen(sheet, str), "one affordable, ten not");
+ Check.Near(AttributesPage.RankProgress(str), 0.5, 0.01, "half way through rank 50");
+ var health = new AttributeLine(2, 1, "Health", 0, 300, 350, -1, -1, false, true, 196, 0, Current: 280);
+ Check.Eq(health.ValueText, "280/350", "a vital shows current/maximum, as retail");
+ Check.Eq(AttributesPage.FooterLines(sheet, health).One, ("Experience To Raise:", "Infinity!"), "at the top");
+ Check.Eq(AttributesPage.RankProgress(health), 0f, "the last rank: empty");
+ Check.True(AttributesPage.Tip(health).StartsWith("(Endurance/2)"), "health's hover text");
+ }
+
+ private static void Titles()
+ {
+ // Game event 0x0029: u32 1, u32 displayed (433), u32 count (3), ids 1, 433, 7.
+ byte[] table = new byte[12 + 12];
+ void U32(int at, uint v) => System.Buffers.Binary.BinaryPrimitives.WriteUInt32LittleEndian(table.AsSpan(at), v);
+ U32(0, 1); U32(4, 433); U32(8, 3); U32(12, 1); U32(16, 433); U32(20, 7);
+ Check.True(TitleList.TryParseTable(table, out TitleList list), "parses");
+ Check.Eq(list.Displayed, 433U, "displayed");
+ Check.Eq(list.Earned.Count, 3, "three earned");
+ Check.Eq(list.Sorted()[0].Text, "Adventurer", "sorted by text (retail's list)");
+ Check.False(TitleList.TryParseTable(table.AsSpan(0, 18), out _), "a short list is refused");
+
+ byte[] update = new byte[8];
+ System.Buffers.Binary.BinaryPrimitives.WriteUInt32LittleEndian(update, 2);
+ System.Buffers.Binary.BinaryPrimitives.WriteUInt32LittleEndian(update.AsSpan(4), 1);
+ TitleList after = list.WithUpdate(update);
+ Check.True(after.Earned.Contains(2U) && after.Displayed == 2, "0x002B adds a title and can make it the displayed one");
+ Check.Eq(list.WithDisplayed(1).Displayed, 1U, "CharacterTitleId moves the displayed one");
+
+ string saved = after.Save();
+ TitleList back = TitleList.Load(saved);
+ Check.Eq(back.Save(), saved, "saved and loaded per character");
+ Check.False(TitleList.Load("").Known, "nothing saved: not known yet");
+ Check.False(TitleList.Load("garbage").Known, "a broken save is nothing");
+ }
+
+ private static void RetailChart()
+ {
+ Check.Eq(RetailData.LevelTotals.Length, 276, "levels 0..275");
+ Check.Eq(RetailData.LevelTotals[2], 1000UL, "level 2");
+ Check.Eq(RetailData.LevelTotals[275], 191_226_310_247UL, "level 275 (AC's panel subtracts from this past 275)");
+ Check.Eq(RetailData.LevelCredits[275], (byte)1, "a credit at 275");
+ }
+
+ private static void ExtendedChart()
+ {
+ IReadOnlyList t = DreamWeaveXp.Totals;
+ for (int i = 0; i <= 275; i++) Check.Eq(t[i], RetailData.LevelTotals[i], "retail levels kept, " + i);
+ // The step past 275 grows by 3,390,451,400 / 3,342,189,670 (the chart's last two steps).
+ ulong s275 = t[275] - t[274], s274 = t[274] - t[273];
+ Check.Eq(t[276] - t[275], (ulong)((UInt128)s275 * s275 / s274), "the first synthesized step");
+ for (int i = 277; i < t.Count; i++) Check.True(t[i] - t[i - 1] >= t[i - 1] - t[i - 2], "steps never shrink, " + i);
+ Check.True(t[^1] <= DreamWeaveXp.TotalCap, "the top stays under long.MaxValue / 2");
+ Check.True(DreamWeaveXp.MaxLevel > 1000, "a thousand-odd levels: " + DreamWeaveXp.MaxLevel);
+ // A flat or shrinking chart repeats its last step; too short a chart is left alone.
+ Check.Eq(string.Join(",", DreamWeaveXp.Extend(new ulong[] { 0, 10, 20 }, 50)), "0,10,20,30,40,50", "flat tail");
+ Check.Eq(string.Join(",", DreamWeaveXp.Extend(new ulong[] { 0, 10 }, 50)), "0,10", "too short");
+ }
+
+ private static void NextLevelPast275()
+ {
+ // The report's character: level 344, 600,303,541,190 total XP. AC's panel read -409,077,230,943.
+ const long total = 600_303_541_190;
+ IReadOnlyList t = DreamWeaveXp.Totals;
+ Check.True(t[344] <= (ulong)total && (ulong)total < t[345], "the total is level 344 on DreamWeave's chart, as the server says");
+ Check.Eq(t[344], 593_567_252_692UL, "level 344");
+ Check.Eq(t[345], 602_816_527_434UL, "level 345");
+ Check.Eq(DreamWeaveXp.ToNextLevel(344, total), 2_512_986_244L, "XP for next level");
+ var sheet = SkillsSheet.Empty with { Level = 344, TotalXp = total };
+ Check.Eq(sheet.NextLevelText, "2,512,986,244", "as the panel prints it");
+ Check.Eq((long)RetailData.LevelTotals[275] - total, -409_077_230_943L, "what AC's own panel showed (for the record)");
+ }
+
+ private static void NextLevelEdges()
+ {
+ Check.Eq(DreamWeaveXp.ToNextLevel(1, 0), 1000L, "level 1");
+ Check.Eq(DreamWeaveXp.ToNextLevel(275, (long)RetailData.LevelTotals[275]), (long)(DreamWeaveXp.Totals[276] - DreamWeaveXp.Totals[275]), "at 275 it goes on");
+ Check.Eq(DreamWeaveXp.ToNextLevel(10, long.MaxValue / 4), 0L, "already past the next level: 0, not negative");
+ Check.Null(DreamWeaveXp.ToNextLevel(DreamWeaveXp.MaxLevel, 0), "the chart's top");
+ Check.Eq((SkillsSheet.Empty with { Level = DreamWeaveXp.MaxLevel, TotalXp = 1 }).NextLevelText, "Infinity!", "retail's word at the top");
+ Check.Null(DreamWeaveXp.ToNextLevel(0, 5), "no level");
+ Check.Eq(SkillsSheet.Empty.NextLevelText, "", "nothing read yet");
+ }
+
+ private static SkillLine Skill(uint id, SkillClass c, bool usable = true, int b = 100, int buffed = 100,
+ long one = 1000, long ten = 12000, int credits = 0, bool raisable = true, bool trainable = false)
+ => new(id, RetailData.Skill(id)?.Name ?? "?", RetailData.Skill(id)?.Icon ?? 0, c, usable, b, buffed, one, ten, credits, raisable, trainable, false);
+
+ private static void Sections()
+ {
+ var skills = new List
+ {
+ Skill(46, SkillClass.Specialized), Skill(38, SkillClass.Specialized), // Finesse Weapons, Alchemy
+ Skill(14, SkillClass.Trained), // Arcane Lore
+ Skill(40, SkillClass.Untrained, usable: true), // Salvaging
+ Skill(33, SkillClass.Untrained, usable: false), // Life Magic
+ };
+ List rows = SkillsLayout.Rows(skills);
+ string text = string.Join(" | ", rows.Select(r => r.IsBanner ? "[" + SkillsLayout.Title(r.Section) + "]" : r.Skill!.Name));
+ Check.Eq(text, "[Specialized Skills] | Alchemy | Finesse Weapons | [Trained Skills] | Arcane Lore | [Untrained Skills] | Salvaging | [Unusable Skills] | Life Magic",
+ "sections in retail's order, names sorted");
+ Check.Eq(SkillsLayout.Rows(new[] { Skill(14, SkillClass.Trained) }).Count, 2, "empty sections are left out");
+ }
+
+ private static void Footer()
+ {
+ var sheet = SkillsSheet.Empty with { UnassignedXp = 275_586_157_349, SkillCredits = 3 };
+ var (none1, none2) = SkillsLayout.FooterLines(sheet, null);
+ Check.Eq(SkillsLayout.FooterTitle(null).Text, "Select a Skill to Improve", "nothing selected");
+ Check.Eq(none1, ("Skill Credits Available:", "3"), "credits");
+ Check.Eq(none2, ("Unassigned Experience:", "275,586,157,349"), "unassigned");
+
+ // The reported footer: "Salvaging: 303 (+45)", "Experience To Raise: Infinity!" at the top rank.
+ SkillLine salvaging = Skill(40, SkillClass.Specialized, b: 258, buffed: 303, one: -1, ten: -1, raisable: false);
+ Check.Eq(SkillsLayout.FooterTitle(salvaging), ("Salvaging: 303", " (+45)"), "title and buff part");
+ var (s1, s2) = SkillsLayout.FooterLines(sheet, salvaging);
+ Check.Eq(s1, ("Experience To Raise:", "Infinity!"), "maxed");
+ Check.Eq(s2, ("Unassigned Experience:", "275,586,157,349"), "unassigned");
+ Check.Eq(SkillsLayout.FooterTitle(Skill(40, SkillClass.Trained, b: 300, buffed: 290)).Delta, " (-10)", "a debuff");
+
+ SkillLine untrained = Skill(23, SkillClass.Untrained, usable: false, credits: 6, trainable: true);
+ Check.Eq(SkillsLayout.FooterTitle(untrained), ("Lockpick", ""), "untrained: the name alone");
+ var (u1, u2) = SkillsLayout.FooterLines(sheet, untrained);
+ Check.Eq(u1, ("Skill Credits To Raise:", "6"), "credits to train");
+ Check.Eq(u2, ("Skill Credits Available:", "3"), "credits on hand");
+ }
+
+ private static void RaiseGates()
+ {
+ var rich = SkillsSheet.Empty with { UnassignedXp = 50_000, SkillCredits = 10 };
+ Check.True(SkillsLayout.CanRaiseOne(rich, Skill(14, SkillClass.Trained, one: 1000)), "affordable");
+ Check.True(SkillsLayout.CanRaiseTen(rich, Skill(14, SkillClass.Trained, ten: 12000)), "ten affordable");
+ Check.False(SkillsLayout.CanRaiseTen(rich, Skill(14, SkillClass.Trained, ten: 90_000)), "ten too dear");
+ Check.False(SkillsLayout.CanRaiseOne(rich, Skill(14, SkillClass.Trained, one: -1, raisable: false)), "at the top");
+ Check.False(SkillsLayout.CanRaiseOne(rich with { Busy = true }, Skill(14, SkillClass.Trained)), "an earlier raise still pending");
+ Check.True(SkillsLayout.CanRaiseOne(rich, Skill(23, SkillClass.Untrained, credits: 6, trainable: true)), "train with credits");
+ Check.False(SkillsLayout.CanRaiseOne(rich with { SkillCredits = 5 }, Skill(23, SkillClass.Untrained, credits: 6, trainable: true)), "not enough credits");
+ Check.False(SkillsLayout.CanRaiseTen(rich, Skill(23, SkillClass.Untrained, credits: 6, trainable: true)), "no +10 for untrained");
+ }
+
+ private static void Header()
+ {
+ Check.Eq(SkillsLayout.Identity(1, 1, "Obviously Bored"), "Male Aluvian Obviously Bored", "the reported line");
+ Check.Eq(SkillsLayout.Identity(2, 2, ""), "Female Gharu'ndim", "no title");
+ Check.Eq(SkillsLayout.Identity(0, 0, null), "", "nothing known");
+ Check.Eq(SkillsLayout.PkStatus(0x02), "Non-Player Killer", "NPK");
+ Check.Eq(SkillsLayout.PkStatus(0x04), "Player Killer", "PK");
+ Check.Eq(SkillsLayout.PkStatus(0x40), "Player Killer Lite", "PK lite");
+
+ // The reported retail header: "Yeoman Drakkon" / "Male Aluvian Obviously Bored".
+ Check.Eq(SkillsLayout.NameLine("Drakkon", 1, 1, 1), "Yeoman Drakkon", "Aluvian rank 1");
+ Check.Eq(SkillsLayout.NameLine("Drakkon", 1, 1, 0), "Drakkon", "no allegiance rank");
+ Check.Eq(SkillsLayout.NameLine("Lucy", 2, 4, 9), "Queen Lucy", "a Viamontian queen");
+ Check.Eq(SkillsLayout.NameLine("Kor", 1, 6, 3), "Optio Kor", "Gearknight titles are the same for both");
+ Check.Eq(SkillsLayout.Title(433), "Obviously Bored", "CharacterTitleId 433");
+ Check.Eq(SkillsLayout.Title(1), "Adventurer", "title 1");
+ Check.Eq(SkillsLayout.Title(0), "", "no title");
+ Check.True(RetailData.Titles.Count > 800, "the title table: " + RetailData.Titles.Count);
+ }
+
+ private static void LevelBar()
+ {
+ IReadOnlyList t = DreamWeaveXp.Totals;
+ Check.Eq(SkillsLayout.LevelProgress(345, (long)t[345]), 0f, "just levelled");
+ Check.Near(SkillsLayout.LevelProgress(345, (long)(t[345] + (t[346] - t[345]) / 4)), 0.25, 1e-6, "a quarter of the way");
+ // The reported level-345 character (605,149,503,805 XP) is about a quarter through 345.
+ float p = SkillsLayout.LevelProgress(345, 605_149_503_805);
+ Check.True(p > 0.2f && p < 0.3f, "the reported character: " + p);
+ Check.Eq(SkillsLayout.LevelProgress(DreamWeaveXp.MaxLevel, 1), 1f, "the top");
+ Check.Eq(SkillsLayout.LevelProgress(0, 5), 0f, "unknown");
+
+ // The footer's blue bar: a skill's way through its rank (it fills from use).
+ uint[] tr = RetailData.TrainedSkillXp, sp = RetailData.SpecializedSkillXp;
+ Check.Eq(tr.Length, 209, "trained ranks 0..208");
+ Check.Eq(sp.Length, 227, "specialized ranks 0..226");
+ Check.Eq(sp[^1], 4_100_490_438U, "the specialized cap");
+ SkillLine Spec(uint ranks, uint xp, bool top = false) => new(38, "Alchemy", 0, SkillClass.Specialized, true, 1, 1, 1, 1, 0, !top, false, top, ranks, xp);
+ Check.Near(SkillsLayout.RankProgress(Spec(100, sp[100] + (sp[101] - sp[100]) / 2)), 0.5, 1e-3, "half way through rank 100");
+ Check.Eq(SkillsLayout.RankProgress(Spec(100, sp[100])), 0f, "just ranked up");
+ Check.Eq(SkillsLayout.RankProgress(Spec(226, sp[226], top: true)), 0f, "the last rank: empty, as retail's maxed Salvaging");
+ Check.Eq(SkillsLayout.RankProgress(new SkillLine(23, "Lockpick", 0, SkillClass.Untrained, false, 0, 0, -1, -1, 6, false, true, false, 0, 0)), 0f, "untrained");
+ Check.Near(SkillsLayout.RankProgress(new SkillLine(14, "Arcane Lore", 0, SkillClass.Trained, true, 1, 1, 1, 1, 0, true, false, false, 10, tr[10] + (tr[11] - tr[10]) / 4)), 0.25, 0.01, "trained uses its own chart");
+ }
+
+ private static void Tooltips()
+ {
+ RetailSkill ie = RetailData.Skill(32)!;
+ Check.Eq(ie.Formula, "( Focus + Self ) / 4", "Item Enchantment's formula, as retail's tooltip writes it");
+ Check.Eq(ie.Description, "Allows you to cast spells that affect an item's properties.", "its description");
+ Check.Eq(RetailData.Skill(24)!.Formula, "( Quickness )", "one attribute, no divisor");
+ Check.Eq(RetailData.Skill(19)!.Formula, "", "no attribute part: no formula line");
+ // Retail breaks that description after "item's" (the reported tooltip).
+ Check.Eq(string.Join("|", RetailData.Pal14.Wrap(ie.Description, 230)), "Allows you to cast spells that affect an item's|properties.", "wrapped as retail");
+ Check.Eq(RetailData.Pal14.Wrap("", 230).Count, 0, "nothing to wrap");
+ }
+
+ private static void RetailTables()
+ {
+ Check.Eq(RetailData.Skills.Length, 38, "the 38 skills of end-of-retail's table");
+ Check.Eq(RetailData.Skill(40)?.Name, "Salvaging", "by id");
+ Check.True(RetailData.Skill(40)!.UsableUntrained && !RetailData.Skill(33)!.UsableUntrained, "usable untrained");
+ Check.True(RetailData.Skills.All(s => (s.Icon >> 24) == 0x06), "icons are 0x06 textures");
+ foreach (RetailFont f in new[] { RetailData.Pal14, RetailData.Pal16, RetailData.Pal18, RetailData.Pal20, RetailData.Stone36 })
+ {
+ Check.True(f.TryGlyph('0', out RetailGlyph zero) && zero.Width > 0, $"0x{f.Id:X8} has digits");
+ Check.True(f.Sheet >> 24 == 0x06 && f.SheetWidth <= 2048, $"0x{f.Id:X8} sheet fits the engine's font-sheet kind");
+ }
+ Check.True(RetailData.Pal16.Measure("Alchemy") > RetailData.Pal16.Measure("Jump"), "widths add up");
+ Check.Eq(RetailData.Pal16.Measure(""), 0, "empty");
+ Check.True(RetailData.Stone36.OutlineSheet != 0 && RetailData.Pal16.OutlineSheet == 0, "only the level number is outlined");
+ }
+
+ private static void Windows()
+ {
+ Func draw = _ => default;
+ var notes = new List();
+ var ok = ServerPackWindows.Validate(new List
+ {
+ new("skills", "DreamWeave Skills", "", 310, 610, 120, 120, true, draw, FitHeight: true, UnderUi: true, DrawScale: true),
+ new("skills", "Again", "", 1, 1, 1, 1, false, draw),
+ new("server", "Taken", "", 1, 1, 1, 1, false, draw),
+ new("Bad", "Bad", "", 1, 1, 1, 1, false, draw),
+ new("blank", " ", "", 1, 1, 1, 1, false, draw),
+ }, notes.Add);
+ Check.Eq(ok.Count, 1, "one good window");
+ Check.Eq(notes.Count, 4, "four notes: " + string.Join("; ", notes));
+ Check.Eq(ServerPackWindows.IdOf("window:skills"), "skills", "surface to id");
+ Check.Null(ServerPackWindows.IdOf("window:server"), "the server window is the shared code's");
+ Check.Null(ServerPackWindows.IdOf("section:server-dreamweave"), "not a window");
+
+ var info = new ServerPackInfo("dreamweave", "DreamWeave", new[] { "play.acdreamweave.com" }, new[] { "DreamWeave" });
+ foreach (bool frameless in new[] { true, false })
+ {
+ string json = ServerPackModel.BuildSectionsJson(info, "RynthDreamWeave", null, ok, frameless);
+ SectionManifest? m = SectionManifestParser.Parse("RynthDreamWeave", json, out string error);
+ Check.NotNull(m, "parses: " + error);
+ SectionWindowDecl? skills = m!.Windows.FirstOrDefault(w => w.Id == "skills");
+ if (!frameless) { Check.Null(skills, "an engine without frameless windows doesn't get it"); continue; }
+ Check.NotNull(skills, "declared");
+ Check.Eq(skills!.Surface, "window:skills", "surface");
+ Check.Eq(skills.Server, "dreamweave", "DreamWeave only");
+ Check.True(skills.Frameless && skills.Bar, "frameless, on the bar");
+ Check.True(skills.FitHeight, "sized by the panel (retail's bottom-edge resize)");
+ Check.True(skills.UnderUi, "drawn under AC's own UI (\"layer\": \"underUi\")");
+ Check.True(skills.DrawScale, "its own draw size, 100% = retail's pixels (\"scale\": \"draw\"), not the text size");
+ Check.True(m.Windows.Any(w => w.Id == ServerPackModel.WindowId), "the server window is still there");
+ }
+ }
+
+ private static void OnePanel()
+ {
+ const uint Inventory = 1u << 3, Spellbook = 1u << 7, Map = 1u << 10;
+ var rule = new OnePanelRule();
+ Check.Eq(rule.Next(false, Inventory), default(OnePanelRule.Step), "the first frame only learns");
+ Check.Eq(rule.Next(false, Inventory), default(OnePanelRule.Step), "nothing changed");
+ // The Character panel opens with the inventory up: the inventory goes.
+ Check.Eq(rule.Next(true, Inventory), new OnePanelRule.Step(Inventory, false), "opening it closes AC's open panel");
+ // AC still reads the inventory open for a moment: not an opening.
+ Check.Eq(rule.Next(true, Inventory), default(OnePanelRule.Step), "a panel on its way out isn't an opening");
+ Check.Eq(rule.Next(true, 0), default(OnePanelRule.Step), "the inventory closed");
+ // The spellbook opens while it's up: it goes.
+ Check.Eq(rule.Next(true, Spellbook), new OnePanelRule.Step(0, true), "an AC panel opening closes it");
+ Check.Eq(rule.Next(true, Spellbook), default(OnePanelRule.Step), "asked once, not every frame while it closes");
+ Check.Eq(rule.Next(false, Spellbook), default(OnePanelRule.Step), "closed");
+ // AC switching between its own panels with it closed: none of its business.
+ Check.Eq(rule.Next(false, Map), default(OnePanelRule.Step), "AC's own switch");
+ // Opened again with two up (an engine without retail's own rule): both go.
+ Check.Eq(rule.Next(true, Map | Spellbook), new OnePanelRule.Step(Map | Spellbook, false), "closes every open one");
+ rule.Reset();
+ Check.Eq(rule.Next(true, Map), default(OnePanelRule.Step), "after a reset the first frame only learns again");
+ }
+}
diff --git a/Tools/RynthServerPack.Tests/DreamWeaveTests.cs b/Tools/RynthServerPack.Tests/DreamWeaveTests.cs
new file mode 100644
index 0000000..5a32ae7
--- /dev/null
+++ b/Tools/RynthServerPack.Tests/DreamWeaveTests.cs
@@ -0,0 +1,183 @@
+using System;
+using System.IO;
+using RynthCore.Plugin.RynthDreamWeave;
+using RynthCore.Plugin.ServerPack;
+using RynthCore.Plugin.Shared;
+using RynthCore.RynthAiTests.Harness;
+
+namespace RynthServerPack.Tests;
+
+// RynthDreamWeave's bank check (Plugins\RynthCore.Plugin.RynthDreamWeave\DreamWeave, 2026-11-02): "/b"
+// every minute after the first 20 s, "[BANK] Luminance: N" read into the "bankLuminance" profile value
+// for Lum/hr, deposits taken out, its own replies marked for hiding while a typed /b shows, and the
+// setting (on by default).
+internal static class DreamWeaveTests
+{
+ // The /b reply as DreamWeave's ShowBankBalances sends it.
+ private static readonly string[] Reply =
+ {
+ "[BANK] Your balances:",
+ "[BANK] Pyreals (shared by every character on this account): 12,345,678",
+ "[BANK] Luminance: 8,904,758",
+ "[BANK] Legendary Keys: 3",
+ "[BANK] Promissory Notes: 0",
+ "[BANK] Offline Bonus Time: 1h 20m",
+ "[BANK] Alternate Character Bonus +25% until Enl 2, Level 150",
+ "[BANK] Type /bank for the full list of commands.",
+ };
+
+ public static void Register(Runner r)
+ {
+ r.Add("dreamweave: /b every minute while logged in, not in the first 20 s, not when turned off", Timing);
+ r.Add("dreamweave: the /b reply's luminance is read, and every line of it is ours to hide", ReplyRead);
+ r.Add("dreamweave: a /b the player types updates the value and its reply shows", TypedShows);
+ r.Add("dreamweave: deposits are taken out of the published value", Deposits);
+ r.Add("dreamweave: a pasted or quoted bank line is ignored", Pasted);
+ r.Add("dreamweave: the setting is on by default and saved", Setting);
+ r.Add("dreamweave: the profile value key is the shared bankLuminance", Key);
+ }
+
+ private static void Timing()
+ {
+ var b = new DreamWeaveBank();
+ Check.Null(b.CheckDue(0), "nothing before login");
+ long t = 1_000_000;
+ b.Login(t);
+ Check.Null(b.CheckDue(t + 19_000), "not in the first 20 s");
+ Check.Eq(b.CheckDue(t + 20_000), "/b", "the first check 20 s after login");
+ Check.Null(b.CheckDue(t + 50_000), "not again within the minute");
+ Check.Eq(b.CheckDue(t + 80_000), "/b", "a minute later");
+ b.OnChatLine("[BANK] Luminance: 10", t + 100_000);
+ Check.Null(b.CheckDue(t + 140_000), "a reading starts the minute again");
+ Check.Eq(b.CheckDue(t + 160_000), "/b", "a minute after the reading");
+ b.CheckEveryMinute = false;
+ Check.Null(b.CheckDue(t + 400_000), "off: no checks");
+ b.CheckEveryMinute = true;
+ Check.Eq(b.CheckDue(t + 400_000), "/b", "on again");
+ b.Logout();
+ Check.Null(b.CheckDue(t + 900_000), "nothing after logout");
+ Check.True(DreamWeaveBank.IsBalanceCommand(" /B ") && DreamWeaveBank.IsBalanceCommand("/bank"), "/b and /bank are the balance command");
+ Check.False(DreamWeaveBank.IsBalanceCommand("/b d") || DreamWeaveBank.IsBalanceCommand("/bank deposit"), "a deposit isn't");
+ }
+
+ private static void ReplyRead()
+ {
+ var b = new DreamWeaveBank();
+ long t = 1_000_000;
+ b.Login(t);
+ Check.Null(b.Published, "no value before a reading");
+ b.CheckDue(t + 20_000);
+ b.NoteTypedCommand(); // our own /b through the chat bar
+ b.Tick();
+ long now = t + 20_500;
+ foreach (string line in Reply)
+ Check.True(b.OnChatLine(line, now += 100), "ours: " + line);
+ Check.Eq(b.Luminance, (long?)8_904_758, "luminance with commas");
+ Check.Eq(b.Published, (long?)8_904_758, "published as read");
+ Check.False(b.OnChatLine("You say, \"hello\"", now), "other chat isn't ours");
+ Check.False(b.OnChatLine("[BANK] Luminance: 8,904,800", now + 30_000), "a reply long after the request isn't ours");
+ Check.Eq(b.Luminance, (long?)8_904_800, "but it is read");
+ Check.True(b.OnChatLine("[12:01:02] [BANK] Luminance: 8,904,900\r\n", now + 30_100) == false && b.Luminance == 8_904_900,
+ "a chat timestamp in front is fine");
+ b.Logout();
+ Check.Null(b.Published, "logout forgets the reading");
+ }
+
+ private static void TypedShows()
+ {
+ var b = new DreamWeaveBank();
+ long t = 1_000_000;
+ b.Login(t);
+ // The player types /b with no request of ours out: read, and shown.
+ b.NoteTypedCommand();
+ b.Tick();
+ Check.False(b.OnChatLine("[BANK] Your balances:", t + 5_000), "typed: the heading shows");
+ Check.False(b.OnChatLine("[BANK] Luminance: 1,000", t + 5_100), "typed: the luminance shows");
+ Check.Eq(b.Published, (long?)1_000, "typed: the value updates");
+
+ // Our check goes out, then the player types /b too: the reply is theirs and shows.
+ b.CheckDue(t + 80_000);
+ b.NoteTypedCommand(); // ours, through the chat bar
+ b.NoteTypedCommand(); // the player's
+ b.Tick();
+ Check.False(b.OnChatLine("[BANK] Luminance: 1,500", t + 80_300), "both asked: the reply shows");
+ Check.Eq(b.Published, (long?)1_500, "and is read");
+
+ // Our check, and the chat bar never sees our send: still ours.
+ b.CheckDue(t + 200_000);
+ b.Tick();
+ Check.True(b.OnChatLine("[BANK] Luminance: 1,600", t + 200_300), "ours without the chat bar echo");
+ // A failed send leaves nothing waiting.
+ b.Request(t + 300_000);
+ b.NotSent();
+ Check.False(b.OnChatLine("[BANK] Luminance: 1,700", t + 300_100), "a failed send: the reply isn't ours");
+ }
+
+ private static void Deposits()
+ {
+ var b = new DreamWeaveBank();
+ long t = 1_000_000;
+ b.Login(t);
+ b.OnChatLine("[BANK] Luminance: 100,000", t);
+ b.OnChatLine("[BANK] Luminance: 150,000", t + 60_000);
+ Check.Eq(b.Published, (long?)150_000, "earned: the value rises");
+ Check.False(b.OnChatLine("[BANK] Deposited 20,000 luminance. Balance: 170,000", t + 70_000), "a deposit line shows");
+ Check.Eq(b.Luminance, (long?)170_000, "the deposit's balance is a reading");
+ Check.Eq(b.Published, (long?)150_000, "the deposit isn't earned");
+ b.OnChatLine("[BANK] Luminance: 180,000", t + 130_000);
+ Check.Eq(b.Published, (long?)160_000, "earned after it counts");
+ b.OnChatLine("[BANK] Deposited all. Pyreals: 1,000 | Luminance: 230,000 | Keys: 1 | Promissory Notes: 0", t + 140_000);
+ Check.Eq(b.MovedIn, 70_000L, "deposit all: what the bank gained since the reading moved in");
+ Check.Eq(b.Published, (long?)160_000, "deposit all isn't earned");
+ b.OnChatLine("[BANK] Luminance: 30,000", t + 200_000);
+ Check.Eq(b.Published, (long?)0, "spending from the bank is a drop (readers don't count drops), never below 0");
+ b.OnChatLine("[BANK] Luminance: 35,000", t + 260_000);
+ Check.Eq(b.Published, (long?)5_000, "and what comes after it counts");
+ }
+
+ private static void Pasted()
+ {
+ var b = new DreamWeaveBank();
+ b.Login(0);
+ b.Request(1_000);
+ Check.False(b.OnChatLine("Someone tells you, \"[BANK] Luminance: 999,999,999\"", 1_100), "a tell");
+ Check.False(b.OnChatLine("[General] Someone says, \"[BANK] Luminance: 999\"", 1_200), "a channel");
+ b.OnChatLine("[BANK] Luminance: lots", 1_300);
+ Check.Null(b.Luminance, "nothing read");
+ }
+
+ private static void Setting()
+ {
+ string dir = Path.Combine(Path.GetTempPath(), "RynthServerPack.Tests", "dreamweave-" + Guid.NewGuid().ToString("N"));
+ try
+ {
+ var s = new ServerPackSettings(Path.Combine(dir, "rynthdreamweave.json"));
+ s.Load();
+ var b = new DreamWeaveBank();
+ b.LoadSettings(s);
+ Check.True(b.CheckEveryMinute, "on by default");
+ b.CheckEveryMinute = false;
+ b.SaveSettings(s);
+ var s2 = new ServerPackSettings(s.FilePath);
+ s2.Load();
+ var b2 = new DreamWeaveBank();
+ b2.LoadSettings(s2);
+ Check.False(b2.CheckEveryMinute, "off is saved");
+ }
+ finally
+ {
+ try { if (Directory.Exists(dir)) Directory.Delete(dir, recursive: true); } catch { }
+ }
+ }
+
+ private static void Key()
+ {
+ Check.Eq(DreamWeaveBank.LuminanceKey, RynthServerProfile.ValueBankLuminance, "the shared key");
+ Check.True(ServerProfileValues.IsValidKey(DreamWeaveBank.LuminanceKey), "a valid profile value key");
+ var values = new ServerProfileValues();
+ values.Set(DreamWeaveBank.LuminanceKey, 8_904_758);
+ string json = ServerPackProfile.BuildJson(new ServerPackInfo("dreamweave", "DreamWeave", new[] { "play.example.test" }, new[] { "DreamWeave" }), "RynthDreamWeave", "0.1.0", true,
+ "DreamWeave", values.Snapshot(out _));
+ Check.Eq(ServerProfileView.Value(json, RynthServerProfile.ValueBankLuminance, -1), 8_904_758.0, "readers get it from the profile");
+ }
+}
diff --git a/Tools/RynthServerPack.Tests/Program.cs b/Tools/RynthServerPack.Tests/Program.cs
index 939ffbc..0bf26e2 100644
--- a/Tools/RynthServerPack.Tests/Program.cs
+++ b/Tools/RynthServerPack.Tests/Program.cs
@@ -20,6 +20,8 @@ internal static class Program
QuestPackTests.Register(runner);
LevistrasTests.Register(runner);
ServerPackCommandsTests.Register(runner);
+ DreamWeaveSkillsTests.Register(runner);
+ DreamWeaveTests.Register(runner);
return runner.Run("RynthServerPack tests", args.Length > 0 ? args[0] : null);
}
}
diff --git a/Tools/RynthServerPack.Tests/RynthServerPack.Tests.csproj b/Tools/RynthServerPack.Tests/RynthServerPack.Tests.csproj
index 8ddde72..cd4e37a 100644
--- a/Tools/RynthServerPack.Tests/RynthServerPack.Tests.csproj
+++ b/Tools/RynthServerPack.Tests/RynthServerPack.Tests.csproj
@@ -44,6 +44,8 @@
+
+
@@ -62,6 +64,14 @@
+
+
+
+
+
+
+
+