feedback5 WX: the 39 summon models no web dump carries come from the local client (extract.py TOKEN_SPINES) and are drawn instead of the avatar diamond when data/local-assets.json lists them
- tools/local-extract/extract.py TOKEN_SPINES (`--only spine/token`): each token's battle prefab in the battle token packs (pkgrps/btl_pfb_tokens_*.ab; the Windows build has all 39, the iOS build lacks btl_pfb_tokens_0), the skeleton of its Front (or only) Spine renderer, written to public/assets/local/spine/token/<id>/ like the enemy models (sized pma atlas, premultiplied pages; the newer RGBA pages keep their own alpha). The enemy writer is shared (write_spine; the two enemy models re-extract byte for byte). The skinpack job of 乌尔比安's block is gone: it extracted nothing, and that token draws no model in the game (nor do 圣聆初雪's, 酒神's, 贝洛内's and 予愿安洁莉娜's hidden tokens: no Spine renderer, no avatar in either install). - tools/assets/local-token-spines.json (committed, `fetch-assets --local-spines`) → data/assets.json tokens[id].spineLocal for 35 自选 summons, 凯瑟琳's 爬行号·防护单元 and 凛御银灰's three 风雪之眼; the manifest is the same with or without the extraction (JSON diff: only the 39 spineLocal entries and the hash). spine.mjs LOCAL_SPINE_ROLES maps clips the resolver cannot read (电弧's 戴乌 C_Skill1_*, 酒神's 本能的召唤 Loop / End, 白铁's platforms End, 战术锚点 on its Default pose) [ASSUMED where named]. - assets.js spineEntry: a token resolves its spineLocal like an enemy (no web model behind it: the diamond stays when it is not listed or fails to load). Scale as the web tokens (UNIT.modelScale). - setup reports an extraction without the summon models; docs: ASSETS.md "Token models from the local client", DEPLOY.md §6, DESIGN §13 (design/client.md), README. - Tests: test/local-token-models.test.js (new), test/local-extract.test.js (job table, prefab walk, alpha merge), test/assets.test.js (the local token models load like the client does), test/package.test.js (the full zip ships them), test/static-local-art.test.js. Golden unchanged.
This commit is contained in:
1 parent
83d76e507d
commit
575333137c
17 files changed
+2738
-111
No files matched your search
+3
-3
@@ -2,7 +2,7 @@
|
||||
// data/assets.json. The pure helpers (animation-role resolver, atlas
|
||||
// normalizer, PNG/WOFF2/audio helpers, plan id sets) are always tested; the
|
||||
// on-disk checks run only when public/assets exists (it is git-ignored and
|
||||
// produced by `npm run assets`); the optional local-client enemy models
|
||||
// produced by `npm run assets`); the optional local-client enemy and token models
|
||||
// (spineLocal, tools/local-extract) only when data/local-assets.json lists them.
|
||||
|
||||
import { test, describe } from 'node:test';
|
||||
@@ -661,10 +661,10 @@ describe('generated manifest data/assets.json', () => {
|
||||
for (const e of Object.values(manifest.enemies)) if (e.spine) models.set(e.spine.skel, e.spine);
|
||||
for (const t of Object.values(manifest.tokens)) if (t.spine) models.set(t.spine.skel, t.spine);
|
||||
assert.ok(models.size > 400);
|
||||
// the official enemy models of the local client, as the client resolves them (DESIGN §13: only when listed)
|
||||
// the official enemy and token models of the local client, as the client resolves them (DESIGN §13: only when listed)
|
||||
const localPath = join(ROOT, 'data', 'local-assets.json');
|
||||
const local = existsSync(localPath) ? JSON.parse(readFileSync(localPath, 'utf8')) : null;
|
||||
for (const id of Object.keys(manifest.enemies)) {
|
||||
for (const id of [...Object.keys(manifest.enemies), ...Object.keys(manifest.tokens)]) {
|
||||
const s = local ? spineEntry(manifest, id, { local }) : null;
|
||||
if (s?.local && [s.skel, s.atlas, ...s.textures].every((u) => existsSync(join(PUBLIC, u)))) models.set(s.skel, s);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user