fix(patcher): support regional.vromfs.bin decal and skin indexes on cache import
Modern online War Thunder clients (verified on 2.61.0.58) ship their decal and skin indexes (dldata/downloadable_decals.blk and dldata/downloadable_skins.blk) inside cache/binary.<ver>/regional.vromfs.bin rather than downloading downloadable_decals.<hash>.blk into cache/content/. Requiring downloadable_decals.<hash>.blk rejected every live 2.61 cache/content folder. - Accept modern online caches containing cached .ddsx textures alongside a sibling binary.<ver>/regional.vromfs.bin (as well as selecting the parent cache folder or legacy downloadable_decals.<hash>.blk caches). - Extract both dldata/downloadable_decals.blk and dldata/downloadable_skins.blk into a self-contained .wto-index snapshot on launcher import (excluded from the copied game cache/content folder) and embed them into char.vromfs.bin during copy build so webdlcontent::init mounts cache/content and resolves cached real decals and downloadable skins natively without client patches. - Log the specific rejection reason in launcher decal import and clarify the en/zh-CN prompts. Verified with root and launcher npm run typecheck, launcher electron-vite build, and an end-to-end temporary import + char.vromfs.bin build against a read-only 2.61.0.58 online cache (4,080 decals / 1,930 skins embedded). In-game acceptance pending on an isolated 2.61.0.58 client copy.
This commit is contained in:
1 parent
deffcd6dde
commit
662e837ab2
9 files changed
+218
-42
No files matched your search
@@ -30,6 +30,7 @@ import {
|
||||
copyPlayerDecalCache,
|
||||
NETWORK_HOOK_LIBRARY,
|
||||
playerDecalCacheProblem,
|
||||
readPlayerDecalIndexFiles,
|
||||
readStockGameFiles,
|
||||
writeGameCopy,
|
||||
type GameCopyBuild,
|
||||
@@ -72,6 +73,7 @@ function main(): number {
|
||||
return 1;
|
||||
}
|
||||
|
||||
const decalIndexFiles = decalCache === undefined ? undefined : readPlayerDecalIndexFiles(decalCache);
|
||||
const build = buildGameCopy({
|
||||
stock: readStockGameFiles(values.game),
|
||||
port: Number(values.port),
|
||||
@@ -79,6 +81,7 @@ function main(): number {
|
||||
networkHookLibrary: readFileSync(hookLibraryPath),
|
||||
multiVehiclePackIds: multiVehiclePackIds(values.data, (line) => console.log(line)),
|
||||
placeholderDecals: decalCache === undefined,
|
||||
...(decalIndexFiles ? { decalIndexFiles } : {}),
|
||||
});
|
||||
report(build, values.verbose);
|
||||
|
||||
|
||||
Reference in new issue
Block a user