In Halo 4 it seems to check the packages Display Name from the package headers to identify certain DLCs, at least for the War Games/Spartan Ops DLCs that are installed from Disc 2.
For example you could have the Spartan Ops DLC extracted into content\4D530919\00000002\E25A9996DBF25D25C7C6235FFD30BAF4E5D543044D based on the filename of the package, but as the display name gets taken from the folder name the game will fail to recognise it.
Renaming the folder to "War Games" / "Spartan Ops Season 1.0" does let the game recognise them, but since it symlinks based on the folder name it'll then create a "Spartan Ops Season 1.0:" symlink, eg. accessing files like "Spartan Ops Season 1.0:\ff81_courtyard.map", this appears to work fine for now, but IMO isn't that optimal.
We should probably allow reading the display name from the StfsHeader struct, and maybe let extracted packages contain a headers.bin file or similar with that header inside (or something like a [foldername].headers file in the parent dir, so that games don't accidentally try reading from it)
Supporting full non-extracted packages is also an option, Xenia already has pretty good support for STFS etc, and one of my older PRs did add support for loading from non-extracted packages too (I should probably split that away into a seperate PR...)
Is this display name actually required to be these values (the display name), or is this perhaps an issue where the content ID is simply too long for the game?
IE: for War Games would naming the directory wg work or any other nonsense (that isn't War Games) work?
Looks like some games save systems also check against the display name of the save package, eg. Kameo seems to require the display name to equal the character name inside the save, and Halo 3 requires the display name to equal the signed in profiles gamertag.
Unfortunately doesn't seem that renaming folders works for these, so I guess they probably rely on the package file name remaining the same too.
@gibbed Need to double check, but I believe it checks the whole string against ones stored inside the XEX, though I'm not sure how localised display names would come into play like this, guess the XEX must also store those somewhere too.
Take look at src/xenia/kernel/util/xdbf_utils.h which is used for branding the game
Most helpful comment
Looks like some games save systems also check against the display name of the save package, eg. Kameo seems to require the display name to equal the character name inside the save, and Halo 3 requires the display name to equal the signed in profiles gamertag.
Unfortunately doesn't seem that renaming folders works for these, so I guess they probably rely on the package file name remaining the same too.
@gibbed Need to double check, but I believe it checks the whole string against ones stored inside the XEX, though I'm not sure how localised display names would come into play like this, guess the XEX must also store those somewhere too.