When a patch pak overrides a package, looking that package up by path gives you the patched one, but
looking it up by package id can give you the old one.
pakchunk0: A.uasset
pakchunk0_P: A.uasset // higher ReadOrder
by path -> patched pak
by id -> either one (whichever pak was mounted last)
Path lookups sort by ReadOrder on every lookup, but the id index just overwrites as paks are mounted.
|
if (file is FIoStoreEntry { IsPackageData: true, IsOptionalPackage: false } ioEntry) |
|
{ |
|
(packageIndex ??= GetPackageIndex())[ioEntry.ChunkId.AsPackageId()] = file; |
|
} |
I encountered this issue through FModel on the game Neverness to Everness. I exported an AnimMontage which only existed in the patch pak. But because the montage's Skeleton is an import, it resolved by id to the pre-patch skeleton which has a different bone list, so the animation got mapped onto the wrong bones.
I have a patch that works for my use case, but I'm not too familiar with UE and how this would affect other games so I opened an issue first.
wondercrash@c81ed0a
This issue was written with AI assistance.
When a patch pak overrides a package, looking that package up by path gives you the patched one, but
looking it up by package id can give you the old one.
Path lookups sort by
ReadOrderon every lookup, but the id index just overwrites as paks are mounted.CUE4Parse/CUE4Parse/FileProvider/Vfs/FileProviderDictionary.cs
Lines 109 to 112 in 46729b7
I encountered this issue through FModel on the game Neverness to Everness. I exported an
AnimMontagewhich only existed in the patch pak. But because the montage'sSkeletonis an import, it resolved by id to the pre-patch skeleton which has a different bone list, so the animation got mapped onto the wrong bones.I have a patch that works for my use case, but I'm not too familiar with UE and how this would affect other games so I opened an issue first.
wondercrash@c81ed0a
This issue was written with AI assistance.