Metal Heart, .pkg format, and file table encoding?
Posted: Sun Nov 27, 2005 4:38 am
Hey. I'm new here. I'll try not to troll. 
So... the problem. A friend of mine (no, really, it's not me) has a copy of Metal Heart that he'd like to mod a little, so we've been trying to crack the .pkg format.
The wiki here was invaluable for the first part of the process. I've got my little perl script unpacking archives made by the pkg.exe that comes with the game. The problem I'm up against is the .pkg files that come with the game. They have the same structure, but the file table, and maybe file data, seems to be encoded.
Best way I have to explain it is this image:
(For image see attachment to post (free registration needed))
The top window is the file table of an archive made with pkg.exe, and the bottom window is from a pkg that came with the game. Both packages had only one file in them, and the hex in the view is the complete isolated file table from each package. The top one should be fairly easy to read once you're familiar with the wiki.
As you can see, the file in the second window doesn't make near as much sense. I marked out where are the important values should be, as well as the decimal values that should be there, as figured out with a little math.
It's not anything simple. Bit shifting would leave more 0x00 values, bit masks would leave the same values behind them where the 0x00's are supposed to be at. It's not anything easy and mathematic that I could find.
So, I've come here hoping for help. What have they done to my file indices?
TIA,
- head
So... the problem. A friend of mine (no, really, it's not me) has a copy of Metal Heart that he'd like to mod a little, so we've been trying to crack the .pkg format.
The wiki here was invaluable for the first part of the process. I've got my little perl script unpacking archives made by the pkg.exe that comes with the game. The problem I'm up against is the .pkg files that come with the game. They have the same structure, but the file table, and maybe file data, seems to be encoded.
Best way I have to explain it is this image:
(For image see attachment to post (free registration needed))
The top window is the file table of an archive made with pkg.exe, and the bottom window is from a pkg that came with the game. Both packages had only one file in them, and the hex in the view is the complete isolated file table from each package. The top one should be fairly easy to read once you're familiar with the wiki.
As you can see, the file in the second window doesn't make near as much sense. I marked out where are the important values should be, as well as the decimal values that should be there, as figured out with a little math.
It's not anything simple. Bit shifting would leave more 0x00 values, bit masks would leave the same values behind them where the 0x00's are supposed to be at. It's not anything easy and mathematic that I could find.
So, I've come here hoping for help. What have they done to my file indices?
TIA,
- head