Files
docs/link/SHARD_PREREQS.md
wtclaude 08bb8c42ba docs(link): the Asset Bridge needs no libgdiplus (#39, 2 of 2)
servuo-plugins #39 PR 2 moved item and land art off System.Drawing, so the whole
Asset Bridge now decodes every picture with its own managed readers and needs no
libgdiplus on any host. Retire the prerequisite and the NO_IMAGING wire status
from the spec and the operator notes.

- link/v8.md §4.4: the migration note now records both PRs as shipped and states
  the bridge needs no libgdiplus at all; NO_IMAGING is retired from the wire and
  assets.sources no longer carries an imaging field.
- link/SHARD_PREREQS.md: the libgdiplus host prerequisite is marked retired, with
  the original Protocol 8 text kept for history.
- link/INTEGRATION.md: the assets.sources example drops the imaging field, the
  gate bullet says NO_IMAGING is retired, and the 503 row drops its NO_IMAGING
  cause.
- website/UPGRADE_NOTES.md, website/SPAWN_ATLAS.md: the operator-facing "install
  libgdiplus / NO_IMAGING" statements are corrected to the new reality.

The installer doctor libgdiplus row and INSTALL.md's description of it are left
to the installer follow-up, since that code is unchanged here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014HJEmcaKvWQ8LsnXHKha5y
2026-11-26 02:14:08 -06:00

7.9 KiB

Shard prerequisites

Repairs the target shard (<servuo>, ServUO 57.4) required before the bridge could load. These are deletions and edits of existing files, so they cannot be expressed as an overlay copy. They are recorded here, and where practical as diffs under patches/.

Applied 2026-07-10. Backups on the Desktop: servuo_saves_backup_2026-07-10_032608, servuo_bin_backup_2026-07-10_032608, servuo_removed_files_2026-07-10.


The symptom

Scripts.dll had not been rebuilt since 2026-05-30 17:01. Every script change after that — including all of Scripts/Custom/Named/, MyStats.cs, and SearchAdd.cs — had never executed.

ScriptCompiler.Compile() (Server/ScriptCompiler.cs:38-58) shells out to dotnet build, prints the output, ignores the exit code, then Assembly.LoadFrom("Scripts.dll") and returns true. A failing script build is invisible: the stale DLL simply reloads. The retry loop at Main.cs:525 never trips.

Four independent breakages, all introduced between 17:14 and 21:55 on 2026-05-30.


1. Stray Server/Gumps/Gumps.cs

A byte-identical copy of Scripts/Services/Pet Training/Gumps.cs (75,468 bytes), sitting in the Server project. It declares namespace Server.Mobiles and extends BaseGump, referencing BaseCreature, PlayerMobile, TrainingPoint — all defined in Scripts. Server cannot reference Scripts, so Server.csproj failed with 35 errors.

Action: deleted. The canonical copy under Scripts/Services/Pet Training/ was edited 10 minutes later and is the one that matters.

2. Eleven duplicate creature classes

Scripts/Custom/{Named,Legendary}/ redefined classes already present in Scripts/Mobiles/Normal/, producing CS0111 / CS0579.

Named — Eowmu, SkeletalCat, Windrunner. The stock files each define two types: the mount and an ICreatureStatuette item (EowmuStatue, …) that Scripts/Services/UltimaStore/UltimaStore.cs references. Deleting the stock files outright would have re-broken the build.

Action: removed only the duplicate mount class from each stock file; kept the statues.

Legendary — FireSteed, Kirin, Nightmare, OsseinRam, Phoenix, PolarBear, ShadowWyrm, TsukiWolf. Clean 1:1 pairs. All custom versions sit in namespace Server.Mobiles, so the serialized type name is unchanged, and each Deserialize guards on version and migrates from 0 (ShadowWyrm: if (version >= 1); FireSteed: if (version < 1) skill-cap migration; Kirin: if (version == 0) AI fixup).

Action: deleted the eight stock files. Custom wins.

3. PolarBear — a base-class change, not a version bump

Custom PolarBear : BaseMount; stock PolarBear : BaseCreature. The saved world contained a bear serialized through the BaseCreature chain, so loading it as a BaseMount misaligned the stream. World load aborted at Server.Mobiles.PolarBear serial 0x00000412 with Delete the object? (y/n).

Changing a saved type's base class is not version-migratable. The custom class also carried [TypeAlias("Server.Mobiles.Polarbear")], which would have hijacked the same records.

Action: restored stock PolarBear : BaseCreature; renamed the custom mount to LegendaryPolarBear and dropped the TypeAlias. Stock scripts referencing typeof(PolarBear) (TalismanSlayer, SpeedInfo, RoyalZooDonationBox, SummonCreature, PetTrainingHelper) continue to resolve to the BaseCreature.

Note: Scripts/Custom/Legendary/PolarBear.cs was renamed to LegendaryPolarBear.cs.

4. AnimalLore.cs referenced a package that does not exist

Scripts/Skills/AnimalLore.cs had using ShrinkSystem; and two IShrinkItem branches. No ShrinkSystem namespace exists anywhere in the repo, and IShrinkItem appears nowhere in the stale Scripts.dll — the code had never compiled or run. (Scripts/Misc/ShrinkTable.cs is unrelated stock: namespace Server, class ShrinkTable.)

Action: removed the using and collapsed the shrink branches back to the BaseCreature path. This restores exactly the behavior the shard was already running.


Verification

After the repairs, dotnet build Scripts/Scripts.csproj -c Release -p:Platform=x64 succeeded with 0 warnings, 0 errors. Rebuilding ServUO.exe and Ultima.dll from current source produced byte-identical binaries (same SHA-256), confirming the core was never stale in content — only Scripts.dll was.

With Phase 0 applied, a plain boot shows:

Core: Compiling scripts...
Build succeeded.
Core: Verified 6023 item and 1385 mobile types
World: Loading...
...done (206208 items, 42771 mobiles, 0 customs)

Unrelated, still open

DllNotFoundException: zlibwapi64 crashed this shard once (Crash 6-5-2026-22-38-3.log) while sending a packed gump. zlibwapi64.dll is present in the repo root, so this is a working-directory / native-load-path problem. It will bite the bridge if the bridge ever triggers a gump send. Resolve before load testing.


Host prerequisite: libgdiplus on Linux — retired (servuo-plugins #39)

No longer a prerequisite. As of servuo-plugins #39 the Asset Bridge decodes every picture it serves — the body catalogue (PR 1) and item/land art (PR 2) — into ARGB1555 with its own readers (BridgeMul, BridgeArtMul, BridgeUop, BridgeHue, BridgePng) and no System.Drawing, so a Linux/Mono shard serves art whether or not libgdiplus is installed. Installing it is harmless but buys nothing. The source gate no longer reports an imaging state and the NO_IMAGING status is retired from the wire, because there is no longer a decode that libgdiplus gates. The section below is the original Protocol 8 requirement, kept for history.

The Asset Bridge (v8.md §4.4) has the shard read art out of the operator's own UO client files. ServUO targets net48, so on Linux it runs under Mono, and Mono's System.Drawing was a thin layer over libgdiplus — which the phase-2 decode path put in the decode itself and not merely the encode: Ultima.Frame, Art.LoadStatic and LoadLand write ARGB1555 through a LockBits pointer into a 16bpp Bitmap libgdiplus 6.1 cannot even create. Until #39 a Linux shard without that library could not read a sprite at all; #39 replaced those vendored decoders with managed ones and removed the dependency.

Upstream https://github.com/mono/libgdiplus was archived in March 2025 and is read-only — the strongest argument for the migration #39 completed. Clilocs and the ServUO tree files never touched a pixel and were never affected.


Host prerequisite: the shard account can read the client files (Linux)

Also a host requirement, also Linux-only, and the same shape as libgdiplus — but about permission, not a missing library. Both the Asset Bridge and the cliloc table have the shard read the operator's own UO client files (Cliloc.enu, art*.mul, anim*.mul, …) and serve them over the bridge, so the account ServUO runs as must be able to read them.

On most hosts this is automatic: ServUO owns its own tree. It bites only when Windows → Linux habits meet Linux's real file permissions — the client files owned by a different account, ServUO running under a locked-down service user, a systemd ProtectSystem / ReadOnlyPaths sandbox, or a parent directory the account cannot traverse. (On Windows a single account and permissive, case-insensitive ACLs hide all of this.)

Fix: run ServUO as the user that owns the client files, or grant that user read + traverse access to the client data directory — chmod / setfacl for read, and the traverse (+x) bit on every parent directory down to the files. The failure is quiet: a cliloc or art import comes back not found or empty even though the file is present and intact, because the shard's own open of it is what was denied.

Windows shard hosts need nothing — one account, permissive and case-insensitive.