RynthCore as of 2026-10-05 (internal 0d3c210): dashboard slide-outs on the left (Ranges with the selected monster, Files, Patrol), fixed draggable vital bar, click an item to add a loot rule, loot rules by WCID, chat and loot editor typing no longer leaks into the game, title-bar text size, plugin API v76 (close container), plugin exception traces, plates drawn under the game UI (in testing), launcher account passwords encrypted with Windows DPAPI (in testing), release 2026.10.5.1

This commit is contained in:
Tom Bohar 2026-10-05 08:03:08 -04:00
commit c3e15480e5
50 changed files with 3315 additions and 490 deletions

View file

@ -43,6 +43,8 @@ internal sealed class LootEditStateDto
public int Focus { get; set; } = -1;
public List<LootEditFileDto> Files { get; set; } = new();
public List<LootEditRowDto> Rules { get; set; } = new();
/// <summary>"Add to loot profile" popup's rule (added 2026-10); null from an older RynthAi.</summary>
public LootEditItemDraftDto? ItemDraft { get; set; }
}
internal sealed class LootEditFileDto
@ -119,6 +121,53 @@ internal sealed class LootEditCmd
public string? Expect { get; set; }
public bool Force { get; set; }
public LootEditRuleDto? Rule { get; set; }
/// <summary>item_preview / item_add (added 2026-10).</summary>
public LootEditItemRequestDto? Item { get; set; }
}
/// <summary>"Add to loot profile": the popup's ask (LootEditWire's LootEditItemRequest).</summary>
internal sealed class LootEditItemRequestDto
{
/// <summary>0 = the item selected in the game.</summary>
public uint ItemId { get; set; }
/// <summary>0 name + class, 1 name only, 2 items like this.</summary>
public int Match { get; set; }
/// <summary>VTank action code; 0 = the item's default.</summary>
public int Action { get; set; }
/// <summary>-1 = default (one full stack).</summary>
public int KeepCount { get; set; } = -1;
public string RuleName { get; set; } = string.Empty;
/// <summary>True: the profile open in the Loot Editor; false: the one RynthAi loots with.</summary>
public bool ToOpenProfile { get; set; }
public int Seq { get; set; }
}
/// <summary>The rule an item makes and what an add did (LootEditWire's LootEditItemDraft).</summary>
internal sealed class LootEditItemDraftDto
{
public int Seq { get; set; }
public bool Ok { get; set; }
public string Error { get; set; } = string.Empty;
public uint ItemId { get; set; }
public string ItemName { get; set; } = string.Empty;
public string ClassName { get; set; } = string.Empty;
public bool Stackable { get; set; }
public string TargetPath { get; set; } = string.Empty;
public string TargetFile { get; set; } = string.Empty;
public bool TargetInUse { get; set; }
public string Format { get; set; } = string.Empty;
public int Match { get; set; }
public int Action { get; set; }
public int KeepCount { get; set; }
public string RuleName { get; set; } = string.Empty;
public string DefaultRuleName { get; set; } = string.Empty;
public List<string> Preview { get; set; } = new();
public int InsertAt { get; set; } = -1;
public int RuleCount { get; set; }
public string OrderNote { get; set; } = string.Empty;
public List<string> Notes { get; set; } = new();
public bool Added { get; set; }
public string Message { get; set; } = string.Empty;
}
internal sealed class LootEditVocabDto

View file

@ -299,6 +299,29 @@ internal static class SettingsSchema
"Follow/Nav Min Distance (metas: FollowNavMin, or VTank's NavCloseStopRange). Follow stops this " +
"close to its leader, and the nav marker ring shows it. Dungeon doorways use at most 1 yd.";
// Also shown by the dashboard's Ranges slide-out (ImGui/Panels/RangesSlideOut.cs), which
// edits these same rows (found by label with Find).
public const string MonsterRangeTip =
"How far away a monster can be for the bot to attack it, in yards. Monsters inside it also\n" +
"count as \"in combat\" for buffing and the In Combat heal/stamina/mana thresholds.";
public const string RingRangeTip =
"Ring spells replace a monster's other shape when at least Min Ring Targets monsters are\n" +
"within this many yards (the monster's rule needs Ring on).";
public const string ApproachRangeTip =
"VTank's Approach Distance, in yards (metas: ApproachRange or ApproachDistance). Saved with\n" +
"the profile for metas; RynthAi's own combat doesn't use it at the moment.";
public const string CorpseMaxTip =
"Corpses within this many yards are walked to and looted (Looting on). Further ones are left.";
/// <summary>The first row with <paramref name="label"/> on any tab (null if none). Not for per-frame use.</summary>
public static SettingRow? Find(string label)
{
foreach (SettingsTab tab in Tabs)
foreach (SettingRow row in tab.Rows)
if (row.Label == label) return row;
return null;
}
public static readonly string[] AttackHeights = { "Low", "Medium", "High" };
public static readonly string[] LootOwnershipModes = { "My Kills Only", "Fellowship Kills", "All Corpses" };
@ -559,13 +582,14 @@ internal static class SettingsSchema
new("Ranges", new[]
{
Section("Standard Ranges (Yards)"),
Int("Monster Range", s => s.MonsterRange, (s, v) => s.MonsterRange = v, 1, 200, 1),
Int("Ring Range", s => s.RingRange, (s, v) => s.RingRange = v, 1, 50, 1),
Int("Approach Range", s => s.ApproachRange, (s, v) => s.ApproachRange = v, 1, 50, 1),
Int("Monster Range", s => s.MonsterRange, (s, v) => s.MonsterRange = v, 1, 200, 1, MonsterRangeTip),
Int("Ring Range", s => s.RingRange, (s, v) => s.RingRange = v, 1, 50, 1, RingRangeTip),
Int("Approach Range", s => s.ApproachRange, (s, v) => s.ApproachRange = v, 1, 50, 1, ApproachRangeTip),
Spacer(),
Section("Corpse Acquisition (Yards)"),
Double("Corpse Max (yd)", s => s.CorpseApproachRangeMax, (s, v) => s.CorpseApproachRangeMax = v, 0.5, 50.0, 0.5),
Double("Corpse Min (yd)", s => s.CorpseApproachRangeMin, (s, v) => s.CorpseApproachRangeMin = v, 0.5, 20.0, 0.5),
Double("Corpse Max (yd)", s => s.CorpseApproachRangeMax, (s, v) => s.CorpseApproachRangeMax = v, 0.5, 50.0, 0.5, CorpseMaxTip),
Double("Corpse Min (yd)", s => s.CorpseApproachRangeMin, (s, v) => s.CorpseApproachRangeMin = v, 0.5, 20.0, 0.5,
"How close to walk to a corpse before opening it, in yards (never more than Corpse Max)."),
}),
new("Navigation", new[]

View file

@ -4,9 +4,15 @@
// faces, and the ImGui face's target bar and player vitals toggles,
// persisted to %AppData%\RynthCore\rynthai_avalonia.cache (line 1
// minimized|expanded, line 2 unused, line 3 target|notarget, line 4
// vitals|novitals). Line 2 was the Monsters button's Simple/Advanced mode,
// retired 2026-10-01 with the basic Monsters panel: it is still written
// ("advanced") so the lines after it keep their places, and ignored on read.
// vitals|novitals; line 5 filesopen|nofiles, the Loaded files drawer; line 9
// ranges|noranges, the Ranges drawer; line 10 patrol|nopatrol, the Patrol
// drawer: the left-edge drawers, ImGui/Panels/DashboardDrawers.cs). Line 2
// was the Monsters button's Simple/Advanced mode, retired 2026-10-01 with the
// basic Monsters panel: it is still written ("advanced") so the lines after
// it keep their places, and ignored on read. Lines 7 and 8 (the dashboard's
// size with the files block folded / open) are unused since the files moved
// to a drawer (2026-10-05); kept as read so the lines after them keep their
// places.
//
// Deliberately NOT on RynthAiPanel: the engine loads this before
// AvaloniaOverlay.Start(), and touching RynthAiPanel there runs its static
@ -26,11 +32,13 @@ internal static class RynthAiDashboardState
private static volatile bool _minimized;
private static volatile bool _showTargetBar = true;
private static volatile bool _showVitals = true;
private static volatile bool _showFiles; // the Profile/Nav/Loot/Meta block (folded by default)
private static volatile bool _filesOpen; // the Loaded files drawer (Profile/Nav/Loot/Meta pickers); a popped-out
// dashboard shows the same block inline instead
private static volatile bool _barCollapsed; // the RynthCore bar shows only its grip + expand
// The dashboard's size (logical units) with the files folded and open, so flipping
// between them brings back each one's own size. Zero = not set yet (fit to content).
private static float _foldedW, _foldedH, _openW, _openH;
private static volatile bool _rangesOpen; // the Ranges drawer beside the dashboard is open
private static volatile bool _patrolOpen; // the Patrol drawer beside the dashboard is open
// Lines 7 and 8, unused since 2026-10-05: written back as read.
private static string _line7 = "-", _line8 = "-";
private static bool _loaded;
private static readonly object LoadSync = new();
@ -77,16 +85,19 @@ internal static class RynthAiDashboardState
UiBackgroundWriter.Enqueue("rynthai dashboard state", Save);
}
/// <summary>The dashboard shows the loaded-files block (Profile/Nav/Loot/Meta pickers, meta state). Any thread.</summary>
public static bool ShowFiles
/// <summary>
/// The loaded-files block (Profile/Nav/Loot/Meta pickers, meta state) is open: the Loaded files drawer
/// beside the dashboard, or the block inline on a popped-out dashboard. Any thread.
/// </summary>
public static bool FilesOpen
{
get { EnsureLoaded(); return _showFiles; }
get { EnsureLoaded(); return _filesOpen; }
}
public static void SetShowFiles(bool show)
public static void SetFilesOpen(bool open)
{
EnsureLoaded();
_showFiles = show;
_filesOpen = open;
UiBackgroundWriter.Enqueue("rynthai dashboard state", Save);
}
@ -103,37 +114,31 @@ internal static class RynthAiDashboardState
UiBackgroundWriter.Enqueue("rynthai dashboard state", Save);
}
/// <summary>The size the dashboard had last time with the files folded (open). False if never set.</summary>
public static bool TryGetFilesModeSize(bool open, out float width, out float height)
/// <summary>The Ranges drawer (ImGui/Panels/RangesSlideOut.cs) is open beside the dashboard. Any thread.</summary>
public static bool RangesOpen
{
EnsureLoaded();
width = open ? _openW : _foldedW;
height = open ? _openH : _foldedH;
return width > 0 && height > 0;
get { EnsureLoaded(); return _rangesOpen; }
}
public static void SetFilesModeSize(bool open, float width, float height)
public static void SetRangesOpen(bool open)
{
EnsureLoaded();
if (width <= 0 || height <= 0) return;
if (open) { _openW = width; _openH = height; } else { _foldedW = width; _foldedH = height; }
_rangesOpen = open;
UiBackgroundWriter.Enqueue("rynthai dashboard state", Save);
}
private static void ParseSize(string line, out float w, out float h)
/// <summary>The Patrol drawer (routes and recorded hazards) is open beside the dashboard. Any thread.</summary>
public static bool PatrolOpen
{
w = h = 0;
string[] parts = line.Split(',');
if (parts.Length == 2
&& float.TryParse(parts[0], System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out float pw)
&& float.TryParse(parts[1], System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out float ph))
{
w = pw; h = ph;
}
get { EnsureLoaded(); return _patrolOpen; }
}
private static string SizeText(float w, float h) =>
w > 0 && h > 0 ? FormattableString.Invariant($"{w:0.#},{h:0.#}") : "-";
public static void SetPatrolOpen(bool open)
{
EnsureLoaded();
_patrolOpen = open;
UiBackgroundWriter.Enqueue("rynthai dashboard state", Save);
}
/// <summary>Reads the file if it hasn't been read yet. Engine init calls this so AC's thread never does.</summary>
public static void EnsureLoaded()
@ -152,10 +157,12 @@ internal static class RynthAiDashboardState
_showTargetBar = lines.Length < 3 || !lines[2].Trim().Equals("notarget", StringComparison.OrdinalIgnoreCase);
_showVitals = lines.Length < 4 || !lines[3].Trim().Equals("novitals", StringComparison.OrdinalIgnoreCase);
// "filesopen" only once the player opened them; the old "files" default reads as folded.
_showFiles = lines.Length >= 5 && lines[4].Trim().Equals("filesopen", StringComparison.OrdinalIgnoreCase);
_filesOpen = lines.Length >= 5 && lines[4].Trim().Equals("filesopen", StringComparison.OrdinalIgnoreCase);
_barCollapsed = lines.Length >= 6 && lines[5].Trim().Equals("barcollapsed", StringComparison.OrdinalIgnoreCase);
if (lines.Length >= 7) ParseSize(lines[6].Trim(), out _foldedW, out _foldedH);
if (lines.Length >= 8) ParseSize(lines[7].Trim(), out _openW, out _openH);
if (lines.Length >= 7 && lines[6].Trim().Length > 0) _line7 = lines[6].Trim();
if (lines.Length >= 8 && lines[7].Trim().Length > 0) _line8 = lines[7].Trim();
_rangesOpen = lines.Length >= 9 && lines[8].Trim().Equals("ranges", StringComparison.OrdinalIgnoreCase);
_patrolOpen = lines.Length >= 10 && lines[9].Trim().Equals("patrol", StringComparison.OrdinalIgnoreCase);
}
}
catch { /* corrupt cache: start expanded */ }
@ -171,8 +178,9 @@ internal static class RynthAiDashboardState
Directory.CreateDirectory(Path.GetDirectoryName(path)!);
File.WriteAllText(path, (_minimized ? "minimized" : "expanded") + "\nadvanced\n"
+ (_showTargetBar ? "target" : "notarget") + "\n" + (_showVitals ? "vitals" : "novitals") + "\n"
+ (_showFiles ? "filesopen" : "nofiles") + "\n" + (_barCollapsed ? "barcollapsed" : "bar") + "\n"
+ SizeText(_foldedW, _foldedH) + "\n" + SizeText(_openW, _openH) + "\n");
+ (_filesOpen ? "filesopen" : "nofiles") + "\n" + (_barCollapsed ? "barcollapsed" : "bar") + "\n"
+ _line7 + "\n" + _line8 + "\n"
+ (_rangesOpen ? "ranges" : "noranges") + "\n" + (_patrolOpen ? "patrol" : "nopatrol") + "\n");
}
catch { /* best-effort */ }
}