From b415c3add086b606f2cfde86e371091d5c871c00 Mon Sep 17 00:00:00 2001 From: Tom Bohar Date: Mon, 23 Nov 2026 11:13:54 -0500 Subject: [PATCH] RynthServers as of 2026-11-23 (internal 1f7af0d): release 2026.11.23.1 --- .../ServerData.cs | 11 +++++ Plugins/Shared/ServerPack/ServerPackInfo.cs | 13 +++++ .../Shared/ServerPack/ServerPackProfile.cs | 20 ++++++++ .../ServerPackModelTests.cs | 48 +++++++++++++++++++ 4 files changed, 92 insertions(+) diff --git a/Plugins/RynthCore.Plugin.RynthDreamWeave/ServerData.cs b/Plugins/RynthCore.Plugin.RynthDreamWeave/ServerData.cs index 65f287b..931e6f7 100644 --- a/Plugins/RynthCore.Plugin.RynthDreamWeave/ServerData.cs +++ b/Plugins/RynthCore.Plugin.RynthDreamWeave/ServerData.cs @@ -73,6 +73,17 @@ internal static class ServerData new ServerCommand("/charsheet", "publish a web character sheet (off, rotate)"), new ServerCommand("/fi", "resend nearby monsters and NPCs (invisible creatures), once a minute"), }, + // The Duo Summon Gem (ACE-DreamWeave Custom Summons, wcid 1007741: Entity/DuoSummonGem.cs). + // A PetDevice bought blank that absorbs two combat summoning items; once it holds both it + // summons the first one's pet (and the second's too with Summon 2x) from one pool of 50 + // charges. Its LongDesc (SummonItemDescription.ComposeDuo) names them "Summon 1: ", + // "Summon 2: "; its UiEffects carries the second item's element bits only. A blank or + // half-full gem has no charges and summons nothing. The client is sent neither its + // DuoSummonGem flag nor the stored slots, so the description is what RynthAi reads. + Summons = new[] + { + new ServerSummon(1007741, "Duo Summon Gem", "Summon ", Slots: 2, ElementIsLast: true), + }, Discord = "https://discord.gg/p2h3yca4BD", Wiki = "https://wiki.acdreamweave.com", Source = "public AC server list (acresources/serverslist), checked 2026-10-13; features and commands from " + diff --git a/Plugins/Shared/ServerPack/ServerPackInfo.cs b/Plugins/Shared/ServerPack/ServerPackInfo.cs index b7a6d8f..f6d3eb4 100644 --- a/Plugins/Shared/ServerPack/ServerPackInfo.cs +++ b/Plugins/Shared/ServerPack/ServerPackInfo.cs @@ -45,6 +45,17 @@ internal sealed record ServerSalvage(string Bench, int Material, string Effect, bool Prepared = false, int Order = 0, bool AfterCap = false, string StackGroup = "", int StackCap = 0); +/// +/// One summon item of the server's own that holds other summoning items (a "holder"), for RynthAi's +/// combat summoner (its profile's "summons" list; RynthSuite's ServerSummonView reads it). +/// +/// The item's wcid (0 = told by name only). +/// The item's name holds this ("" with a wcid = by wcid only). +/// Its appraisal description names each held item on a line "<prefix><n>: <name>". +/// It summons nothing until it holds this many. +/// Its own element (UiEffects) is the last held item's. +internal sealed record ServerSummon(uint Wcid, string NameMatch, string SlotPrefix, int Slots = 2, bool ElementIsLast = false); + internal sealed class ServerPackInfo { public ServerPackInfo(string id, string name, string[] hosts, string[] worldNames) @@ -85,6 +96,8 @@ internal sealed class ServerPackInfo /// public string[] TrinketNames { get; init; } = Array.Empty(); public string[] TrinketExcept { get; init; } = Array.Empty(); + /// The server's own summon items that hold other summoning items; empty = none. + public ServerSummon[] Summons { get; init; } = Array.Empty(); /// "3 accounts", "3 active characters", ...; empty when not published. public string AccountLimit { get; init; } = string.Empty; public BottingPolicy Botting { get; init; } = BottingPolicy.Unknown; diff --git a/Plugins/Shared/ServerPack/ServerPackProfile.cs b/Plugins/Shared/ServerPack/ServerPackProfile.cs index 700c431..27a8705 100644 --- a/Plugins/Shared/ServerPack/ServerPackProfile.cs +++ b/Plugins/Shared/ServerPack/ServerPackProfile.cs @@ -185,6 +185,26 @@ internal static class ServerPackProfile for (int i = 0; i < info.TrinketExcept.Length; i++) { if (i > 0) sb.Append(','); Str(sb, info.TrinketExcept[i]); } sb.Append("]}"); } + // Added within schema 1 (2026-11-22), only when the server has them: summon items that hold + // other summoning items (RynthAi's combat summoner reads each one's held items and elements). + if (info.Summons.Length > 0) + { + sb.Append(",\"summons\":["); + for (int i = 0; i < info.Summons.Length; i++) + { + ServerSummon m = info.Summons[i]; + if (i > 0) sb.Append(','); + sb.Append("{\"wcid\":").Append(m.Wcid); + sb.Append(",\"nameMatch\":"); + Str(sb, m.NameMatch); + sb.Append(",\"slotPrefix\":"); + Str(sb, m.SlotPrefix); + sb.Append(",\"slots\":").Append(m.Slots); + sb.Append(",\"elementIsLast\":").Append(m.ElementIsLast ? "true" : "false"); + sb.Append('}'); + } + sb.Append(']'); + } Field(sb, "discord", info.Discord); Field(sb, "website", info.Website); Field(sb, "wiki", info.Wiki); diff --git a/Tools/RynthServerPack.Tests/ServerPackModelTests.cs b/Tools/RynthServerPack.Tests/ServerPackModelTests.cs index 7339d87..9074059 100644 --- a/Tools/RynthServerPack.Tests/ServerPackModelTests.cs +++ b/Tools/RynthServerPack.Tests/ServerPackModelTests.cs @@ -1,6 +1,7 @@ using System; using System.Linq; using System.Collections.Generic; +using System.IO; using System.Text.Json; using RynthCore.Engine.UI.Sections; using RynthCore.Plugin.ServerPack; @@ -27,6 +28,8 @@ internal static class ServerPackModelTests r.Add("server pack: the card's botting line and address", InfoText); r.Add("server pack: the RynthServer.Profile JSON carries the server's settings", ProfileJson); r.Add("server pack: the profile JSON is plain ASCII and escaped", ProfileJsonAscii); + r.Add("server pack: the profile's summons rows reach RynthAi's reader; none written without any", ProfileSummons); + r.Add("server pack: DreamWeave names its Duo Summon Gem as a holder of two summons", DreamWeaveDuoGem); } private static void ProfileJson() @@ -124,6 +127,51 @@ internal static class ServerPackModelTests Check.Eq(ServerPackProfile.BottingName(BottingPolicy.Unknown), "unknown", "unknown botting"); } + private static void ProfileSummons() + { + ServerPackInfo none = new("x", "X", new[] { "x.example" }, new[] { "X" }); + string plain = ServerPackProfile.BuildJson(none, "RynthX", "1", true, "X"); + Check.False(plain.Contains("\"summons\""), "no holders: no summons key"); + Check.Eq(RynthCore.Plugin.Shared.ServerSummonView.ParseList(plain).Count, 0, "and the reader reads none"); + + ServerPackInfo with = new("x", "X", new[] { "x.example" }, new[] { "X" }) + { + Summons = new[] + { + new ServerSummon(1007741, "Duo \"Gem\"", "Summon ", Slots: 2, ElementIsLast: true), + new ServerSummon(0, "Trio Bauble", "Held ", Slots: 3), + }, + }; + string json = ServerPackProfile.BuildJson(with, "RynthX", "1", true, "X"); + using (JsonDocument doc = JsonDocument.Parse(json)) Check.Eq(doc.RootElement.GetProperty("summons").GetArrayLength(), 2, "two rows written"); + var rows = RynthCore.Plugin.Shared.ServerSummonView.ParseList(json); + Check.Eq(rows.Count, 2, "two rows read"); + Check.Eq(rows[0].Wcid, 1007741u, "wcid"); + Check.Eq(rows[0].NameMatch, "Duo \"Gem\"", "name, escaped and read back"); + Check.Eq(rows[0].SlotPrefix, "Summon ", "slot prefix keeps its space"); + Check.True(rows[0].Slots == 2 && rows[0].ElementIsLast, "slots and elementIsLast"); + Check.True(rows[1].Wcid == 0 && rows[1].Slots == 3 && !rows[1].ElementIsLast, "a by-name row"); + Check.True(rows[0].Matches(1007741, "anything") && !rows[0].Matches(1007740, "Duo \"Gem\""), "told by wcid when known"); + Check.True(rows[1].Matches(0, "A Trio Bauble"), "a by-name row by name"); + } + + /// The Duo Summon Gem row in DreamWeave's ServerData.cs (ACE-DreamWeave wcid 1007741). + private static void DreamWeaveDuoGem() + { + string dir = AppContext.BaseDirectory; + string? file = null; + for (var d = new DirectoryInfo(dir); d != null && file == null; d = d.Parent) + { + string f = Path.Combine(d.FullName, "Plugins", "RynthCore.Plugin.RynthDreamWeave", "ServerData.cs"); + if (File.Exists(f)) file = f; + } + Check.True(file != null, "DreamWeave's ServerData.cs is found"); + if (file == null) return; + string src = File.ReadAllText(file); + Check.True(src.Contains("new ServerSummon(1007741, \"Duo Summon Gem\", \"Summon \", Slots: 2, ElementIsLast: true)"), + "the gem's row: wcid 1007741, by its name too, \"Summon N:\" lines, two slots, its element the second's"); + } + private static void ProfileJsonAscii() { ServerPackInfo info = new("x", "Caf\u00e9 \"Q\"\n", Array.Empty(), Array.Empty()) { Summary = "a\\b\tc \u2014 d" };