Skip to content

IoStore package id index ignores ReadOrder #392

Description

@wondercrash

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions