Author Topic: New PIGG unpacker  (Read 4166 times)

System Bridger

  • Underling
  • *
  • Posts: 6
  • Software Engineer
New PIGG unpacker
« on: August 08, 2016, 01:06:20 AM »
So, my first contribution is a few command-line tools (written in Python) to read PIGG files. With them, you should be able to fairly easily unpack everything that's inside the CoH PIGG files (including music, textures, text, and so on). Sadly, I don't currently know the .geo format, but everything else should be possible to do stuff with.

They're available at https://github.com/ovekaaven/cohtools

There are some usage instructions in the README.txt on there. The currently available tools are

readpigg.py: works a lot like unzip. It will unpack whatever's inside a PIGG, and preserves the original directory structure. (Note: if you unpack all the PIGGs from Issue 24, it'll take more than 8GB...)

readtexture.py: can convert .texture files to .dds files. You can then use other freely available tools to convert dds to png, jpg, or whatever you like.

readbin.py: attempts to parse .bin files. Unlike the old PiggViewer, it can read the full contents of all I24 .bin files without errors, but I haven't spent much time trying to determine the exact meaning of the values found inside those files, only their structure and data types. But perhaps that's already useful. Some notes if you want to experiment with it:

- The sources for texWords.bin actually exist in the PIGGs, so I've made readbin.py's output format match the format of the texWords sources. Unfortunately, no other sources have been left in the PIGG files, so for all other .bin files, I've mostly labeled everything as "unknown", until I or someone else can be bothered to guess what all those fields probably are.

- if you see a string of the form "P<number>", e.g. "P3100147361", that's a localized string ID, which you can usually look up in clientmessages-en.bin or something. So, to find that string in there, for example, you can do:
Code: [Select]
readbin.py bin/clientmessages-en.bin P3100147361It will then search for that ID and print out the string:
Code: [Select]
--- P3100147361
You receive your powers from a magical source. These abilities might come from a mystical artifact bestowed upon you, the mastery of numerous magical spells, or pacts made with powerful dimensional entities. <BR><BR>This origin will give you access to Apprentice Charm. This item has a very short range and deals minor Energy damage, as well as lowering the target's resistance to further damage.
(If you don't specify an ID, it will list all the strings inside. There are quite many of them, but you could probably redirect the output to a text file for later reference. You can also use the -l option to get a list of all IDs.)

- if you feel inspired to improve the output of readbin.py, it should be fairly straightforward to edit the Python code to give labels (other than "unknown") to any data field you think you know what is. Alternatively, you can probably just tell me what you think the output should look like for a particular .bin, and I can then probably make the necessary changes (when I get around to it)...

saipaman

  • Elite Boss
  • *****
  • Posts: 771
Re: New PIGG unpacker
« Reply #1 on: August 29, 2016, 08:53:03 PM »
Thanks for the tools.

I've unpacked all the PIGG files for future reference.

bearpounder

  • Minion
  • **
  • Posts: 22
Re: New PIGG unpacker
« Reply #2 on: March 10, 2017, 08:18:29 PM »

- The sources for texWords.bin actually exist in the PIGGs, so I've made readbin.py's output format match the format of the texWords sources. Unfortunately, no other sources have been left in the PIGG files, so for all other .bin files, I've mostly labeled everything as "unknown", until I or someone else can be bothered to guess what all those fields probably are.



Do you recall WHERE in the PIGGs you found the sources?

Deerslayer

  • Underling
  • *
  • Posts: 1
Re: New PIGG unpacker
« Reply #3 on: March 19, 2017, 09:29:00 PM »
Hey.
Excuse me, could you unzip this file?
http://www.mediafire.com/file/b97szopzb3qqmmo/Ship.pig.7z
(Ship.pig file size is 414 MB)
This file from the game "Pirates of the burning sea" has the same format as the game "City of Heroes".

I will be very grateful if you can unpack this file.


P.S. I apologize for my English, I use an interpreter.

downix

  • Phoenix Project Technical Lead
  • Elite Boss
  • *****
  • Posts: 1,964
Re: New PIGG unpacker
« Reply #4 on: November 11, 2017, 11:53:32 PM »
Hey.
Excuse me, could you unzip this file?
http://www.mediafire.com/file/b97szopzb3qqmmo/Ship.pig.7z
(Ship.pig file size is 414 MB)
This file from the game "Pirates of the burning sea" has the same format as the game "City of Heroes".

I will be very grateful if you can unpack this file.


P.S. I apologize for my English, I use an interpreter.
No it does not. They have the same file extension, but they are not the same file format.

impiousimp

  • Lieutenant
  • ***
  • Posts: 87
Re: New PIGG unpacker
« Reply #5 on: March 04, 2018, 07:16:46 AM »
Its not very user friendly.  Can anyone get me the building textures?

doc7924

  • Elite Boss
  • *****
  • Posts: 1,192
Re: New PIGG unpacker
« Reply #6 on: July 12, 2018, 05:04:41 PM »
I unzipped the sound effects and music files a couple of years ago - still listen to some of them at least once a week.