This package provides a number of objects that can be used to work with Hybrasyl Server's world data (maps, items, NPCs, warps, etc).
It can be found on Nuget
XML schemas for Hybrasyl XML data can be found in
XSD. We use
XmlSchemaClassGenerator
(dotnet-xscgen) to generate C# classes from this collection of schema,
which are kept in the
Objects
directory. All of the generated classes are partial classes.
Extensions to these classes, which augment / add XML object functionality used by Hybrasyl Server can be found in Extensions.
Generation runs headless on any platform:
dotnet tool install -g dotnet-xscgen
tools/regenerate.shregenerate.sh runs xscgen over every schema and then
tools/patch-flags-enums.py, which applies the wire-format fixups
XmlSerializer needs but xscgen cannot express from the schema alone
(space-separated xs:list members, and the child objects whose XSD
defaults carry game semantics). The patch script is strict: if the
generator's output shape changes, it fails loudly and writes nothing
rather than emitting a subtly wrong model.
Some types are maintained by hand and are not generated: the flags enums
in Enums,
HybrasylEntity and its per-type bases file. Each says so in its header.
Open a PR! If it involves XSD changes, regenerate with the steps above
and include the regenerated Objects in your PR.