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

HedgeArcPack - Broken Lost World PAC Generation #80

Open Sonen10 opened 1 year ago

Sonen10 commented 1 year ago

While HedgeArcPack in its current forms appears to work fine with most games, generating PAC files using the Lost World option causes the generation of broken PAC files. It can currently unpack files from the source games fine, but trying to use PAC files generated by the latest version of HedgeArcPack causes the game to refuse to load them. For instance, unpacking and repacking Sonic's archive causes his model to not load on the world map and crashing the game when loading into a zone. HedgeArcPack is fully able to extract these broken PACs too.

Attached are two zip files for reference. One contains the original Sonic PAC files from Lost World, the other contains PAC files with the same contents but repacked via the latest HedgeArcPack. Sonic - Ripped from sonic2013_patch_0.cpk.zip Sonic - Generated via Latest HedgeArcPack.zip

Radfordhound commented 1 year ago

Thanks very much for reporting this, and especially for providing samples! I'm currently finishing up a rewrite of the packfile handling code in HedgeLib, which should also fix this issue. I'll look into this and try to discover its root cause to make sure it's fixed.