Radfordhound / HedgeLib

A C++ library and collection of tools that aims to make modding games in the Sonic the Hedgehog franchise easier.
MIT License
88 stars 24 forks source link

HedgeLib - Some unpacked PACx403L archives do not repack correctly #77

Open AdelQue opened 1 year ago

AdelQue commented 1 year ago

An example archive I ran into was NeedleShader.pac in Sonic Frontiers. Unpacking appears to work fine, but repacking those unmodified files results in a .pac archive that's about 25% larger than the original and crashes the game upon trying to read them. Tried repacking as both the Frontiers .pac and Origins .pac.

I can unpack that newly made .pac archive and the files are the exact same as what was unpacked from the original archive

Radfordhound commented 1 year ago

Hey, apologies for the late response, things have been crazy lately.

I'm currently aware of two bugs with my .pac generation code which sometimes cause corrupted .pac files to be generated. I believe this issue is caused by one of these two bugs.

I'm actually in the process of rewriting the .pac handling code completely to improve how I'm handling things. I plan to fix these two bugs as part of this rewrite process. I'll leave updates here as this rewrite progresses.

Radfordhound commented 1 year ago

The rewrite process is still underway, but in the meantime, 8ac3dc47396a64b5c4ae4eb3cd73f36766fc37b4 should fix the first bug. The second bug is still a bit of a mystery. I'll continue to look into it and try to fix it as part of the rewrite.