Community > City of Heroes

New PIGG unpacker

(1/2) > >>

System Bridger:
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: ---readbin.py bin/clientmessages-en.bin P3100147361
--- End code ---
It will then search for that ID and print out the string:

--- Code: ------ 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.

--- End code ---
(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:
Thanks for the tools.

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

bearpounder:

--- Quote from: System Bridger on August 08, 2016, 01:06:20 AM ---
- 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.



--- End quote ---

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

Deerslayer:
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:

--- Quote from: Deerslayer 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.

--- End quote ---
No it does not. They have the same file extension, but they are not the same file format.

Navigation

[0] Message Index

[#] Next page

Go to full version