Snapshot for release 2026.10.11.1 (internal 4eca83a)

This commit is contained in:
Tom Bohar 2026-10-11 15:00:53 -04:00
commit 08b80eed86
94 changed files with 11103 additions and 567 deletions

View file

@ -0,0 +1,27 @@
using System.Globalization;
using System.Text;
using ACE.DatLoader;
using ACE.DatLoader.FileTypes;
// args: <dat dir> <setups.json> <out.json>
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
string datDir = args[0];
string[] ids = System.Text.Json.JsonSerializer.Deserialize<string[]>(
"[" + string.Join(",", System.Text.Json.JsonSerializer.Deserialize<uint[]>(File.ReadAllText(args[1]))!.Select(u => "\"" + u + "\"")) + "]")!;
DatManager.Initialize(datDir, keepOpen: true, loadCell: false);
var sb = new StringBuilder("{");
int ok = 0, bad = 0; bool first = true;
foreach (string s in ids)
{
uint id = uint.Parse(s);
SetupModel m = DatManager.PortalDat.ReadFromDat<SetupModel>(id);
if (m == null) { bad++; continue; }
if (!first) sb.Append(',');
first = false;
string F(float v) => v.ToString("0.####", CultureInfo.InvariantCulture);
sb.Append($"\"{id}\":[{F(m.Height)},{F(m.Radius)},{F(m.SelectionSphere.Origin.Z)},{F(m.SelectionSphere.Radius)},{F(m.SortingSphere.Origin.Z)},{F(m.SortingSphere.Radius)}]");
ok++;
}
sb.Append('}');
File.WriteAllText(args[2], sb.ToString());
Console.WriteLine($"read {ok} setups, {bad} missing");

View file

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- Step 2 of the creature size table (see ..\README.md): reads each Setup (model) from client_portal.dat
with ACE's own dat reader. Needs a built ACE server; point AcBin at its bin folder if it is elsewhere. -->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<PlatformTarget>x64</PlatformTarget>
<AcBin Condition="'$(AcBin)' == ''">C:\Projects\ACE\Source\ACE.Server\bin\x64\Release\net10.0</AcBin>
</PropertyGroup>
<ItemGroup>
<Reference Include="ACE.DatLoader"><HintPath>$(AcBin)\ACE.DatLoader.dll</HintPath></Reference>
<Reference Include="ACE.Common"><HintPath>$(AcBin)\ACE.Common.dll</HintPath></Reference>
<Reference Include="ACE.Entity"><HintPath>$(AcBin)\ACE.Entity.dll</HintPath></Reference>
<Reference Include="log4net"><HintPath>$(AcBin)\log4net.dll</HintPath></Reference>
</ItemGroup>
</Project>