foscail: convert UI-art EPFs (setoa/Legend/national) instead of raw-only - #20
Merged
Conversation
Unknown-family EPFs (UI/interface art) were left as raw extractions. Their
palettes ship in the archives; a probe of the 7.41 setoa/Legend/national art
identified the convention, so ConvertEpf now resolves it in priority order:
1. a same-name .pal beside the EPF (field001.epf -> field001.pal, f*, ...)
2. setoa GUI chrome -> gui00.pal
3. legend.pal -> this archive's, or a sibling Legend.dat (national ships
none of its own and borrows Legend's, like khan uses khanpal.dat)
This intentionally reverses the old "modern archive keeps unknown families
raw" stance now that the palette convention is known (probe-confirmed for
chrome, emotes, town-maps, paper, name-matched field art). Known families
still route to their own tables before reaching this path.
Corpus effect (7.41): setoa 771 -> 2,673 images, Legend +~15k, national
77 -> 129; the ~410 previously-raw EPFs now convert. Palettes are empirically
grounded, not binary-traced.
Adds 4 AssetConverter tests (gui00, name-match precedence, sibling legend.pal,
legend.pal with family tables present) and rewrites the now-obsolete
"never falls back" test to the new contract.
Co-Authored-By: Imbas <imbas@eris.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Converts the UI / interface EPFs that Foscail previously left as raw extractions, so tooling (Brigid theming) can consume old-client UI art as PNG.
Background
EPF is a palettized format; the converter routes each EPF to a palette by filename family (efct/mefc → effpal, item → itempal, khan → khanpal). Everything else — UI / interface art — had no known palette convention and was left raw. A census found this is 410 of 28,797 EPFs (1.4%), all in three archives:
setoa(286),Legend(83),national(41).A probe of that art showed the palettes ship in the archives; identifying which was the whole job (no reverse-engineering needed).
Change
ConvertEpf's unknown-family fallthrough now resolves the UI palette in priority order:.palbeside the EPF (field001.epf → field001.pal;f*,Backpal*, …)gui00.pal— setoa GUI chrome shares itlegend.pal— this archive's, or a siblingLegend.dat(national ships none of its own and borrows Legend's, the same cross-archive pattern khan uses forkhanpal.dat)This intentionally reverses the prior "modern archive keeps unknown families raw" stance, now that the convention is known. Known families still route to their own tables before reaching this path.
Verification
Corpus effect (7.41):
setoa771 → 2,673 images,Legend→ 15,289,national77 → 129 — the ~410 previously-raw families now convert. Eyeballed the major clusters (setoa chrome, Legend emotes, name-matchedfield, national town-maps/paper) — all render correctly, not plausible-but-wrong.4 new
AssetConverterTestscover each rule and the precedence; the obsolete "never falls back" test is rewritten to the new contract. Full suite green: Foscail 20, DALib 947.Caveat
The
gui00/legend.palconventions are empirically confirmed (probe of 7.41 art), not binary-traced. Fine for extraction; a rung-1 trace could confirm later if needed. The.tblsiblings (emo*.tbl,story*.tbl) are not palettes and are out of scope — per-variant recoloring would be a separate layer.Generated with Imbas imbas@eris.co