RynthServers as of 2026-11-23 (internal 1f7af0d): release 2026.11.23.1
This commit is contained in:
parent
4b09478f12
commit
b415c3add0
4 changed files with 92 additions and 0 deletions
|
|
@ -73,6 +73,17 @@ internal static class ServerData
|
||||||
new ServerCommand("/charsheet", "publish a web character sheet (off, rotate)"),
|
new ServerCommand("/charsheet", "publish a web character sheet (off, rotate)"),
|
||||||
new ServerCommand("/fi", "resend nearby monsters and NPCs (invisible creatures), once a minute"),
|
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: <item>",
|
||||||
|
// "Summon 2: <item>"; 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",
|
Discord = "https://discord.gg/p2h3yca4BD",
|
||||||
Wiki = "https://wiki.acdreamweave.com",
|
Wiki = "https://wiki.acdreamweave.com",
|
||||||
Source = "public AC server list (acresources/serverslist), checked 2026-10-13; features and commands from " +
|
Source = "public AC server list (acresources/serverslist), checked 2026-10-13; features and commands from " +
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,17 @@ internal sealed record ServerSalvage(string Bench, int Material, string Effect,
|
||||||
bool Prepared = false, int Order = 0, bool AfterCap = false,
|
bool Prepared = false, int Order = 0, bool AfterCap = false,
|
||||||
string StackGroup = "", int StackCap = 0);
|
string StackGroup = "", int StackCap = 0);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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).
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Wcid">The item's wcid (0 = told by name only).</param>
|
||||||
|
/// <param name="NameMatch">The item's name holds this ("" with a wcid = by wcid only).</param>
|
||||||
|
/// <param name="SlotPrefix">Its appraisal description names each held item on a line "<prefix><n>: <name>".</param>
|
||||||
|
/// <param name="Slots">It summons nothing until it holds this many.</param>
|
||||||
|
/// <param name="ElementIsLast">Its own element (UiEffects) is the last held item's.</param>
|
||||||
|
internal sealed record ServerSummon(uint Wcid, string NameMatch, string SlotPrefix, int Slots = 2, bool ElementIsLast = false);
|
||||||
|
|
||||||
internal sealed class ServerPackInfo
|
internal sealed class ServerPackInfo
|
||||||
{
|
{
|
||||||
public ServerPackInfo(string id, string name, string[] hosts, string[] worldNames)
|
public ServerPackInfo(string id, string name, string[] hosts, string[] worldNames)
|
||||||
|
|
@ -85,6 +96,8 @@ internal sealed class ServerPackInfo
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string[] TrinketNames { get; init; } = Array.Empty<string>();
|
public string[] TrinketNames { get; init; } = Array.Empty<string>();
|
||||||
public string[] TrinketExcept { get; init; } = Array.Empty<string>();
|
public string[] TrinketExcept { get; init; } = Array.Empty<string>();
|
||||||
|
/// <summary>The server's own summon items that hold other summoning items; empty = none.</summary>
|
||||||
|
public ServerSummon[] Summons { get; init; } = Array.Empty<ServerSummon>();
|
||||||
/// <summary>"3 accounts", "3 active characters", ...; empty when not published.</summary>
|
/// <summary>"3 accounts", "3 active characters", ...; empty when not published.</summary>
|
||||||
public string AccountLimit { get; init; } = string.Empty;
|
public string AccountLimit { get; init; } = string.Empty;
|
||||||
public BottingPolicy Botting { get; init; } = BottingPolicy.Unknown;
|
public BottingPolicy Botting { get; init; } = BottingPolicy.Unknown;
|
||||||
|
|
|
||||||
|
|
@ -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]); }
|
for (int i = 0; i < info.TrinketExcept.Length; i++) { if (i > 0) sb.Append(','); Str(sb, info.TrinketExcept[i]); }
|
||||||
sb.Append("]}");
|
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, "discord", info.Discord);
|
||||||
Field(sb, "website", info.Website);
|
Field(sb, "website", info.Website);
|
||||||
Field(sb, "wiki", info.Wiki);
|
Field(sb, "wiki", info.Wiki);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using RynthCore.Engine.UI.Sections;
|
using RynthCore.Engine.UI.Sections;
|
||||||
using RynthCore.Plugin.ServerPack;
|
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 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 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 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()
|
private static void ProfileJson()
|
||||||
|
|
@ -124,6 +127,51 @@ internal static class ServerPackModelTests
|
||||||
Check.Eq(ServerPackProfile.BottingName(BottingPolicy.Unknown), "unknown", "unknown botting");
|
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");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>The Duo Summon Gem row in DreamWeave's ServerData.cs (ACE-DreamWeave wcid 1007741).</summary>
|
||||||
|
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()
|
private static void ProfileJsonAscii()
|
||||||
{
|
{
|
||||||
ServerPackInfo info = new("x", "Caf\u00e9 \"Q\"\n", Array.Empty<string>(), Array.Empty<string>()) { Summary = "a\\b\tc \u2014 d" };
|
ServerPackInfo info = new("x", "Caf\u00e9 \"Q\"\n", Array.Empty<string>(), Array.Empty<string>()) { Summary = "a\\b\tc \u2014 d" };
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue