Jump to content

PZ Unpacker


Minic90

Recommended Posts

I wrote a tiny tool, for Un/Packing .pack files.

 

.pack Format

The .pack files contain all used textures in PZ.

The structure is the following:

 

2pslwck.jpg
 

 

Features:

1. Unpack: .pack files into seperated .png files (extra info is saved in a .xml file)

2. Pack: .pack file is (re)pack with the .xml file and all .png files

3. Split: all seperated .png files get split up in their containing (sub-texture) .png files

4. Merge: merge (sub-texture) png files to one huge png.

4. XMLview : view the resulting .xml file and edit its content

 

Coming features:

Split and Merge for Character.pack ?

 

Download:

https://www.mediafire.com/folder/8a37ath7zayyd/Project%20Zomboid

ChangeLog:29-Dec-2013-fixed some 'cleanup' problems (thanks Aardman55 for complaining ^^)28-Dec-2013-managed to unpack the Characters.pack file; Had fun with the new DDS format that is used for the character textures .-. -Added merge function for splitted .png files This function does (currently) not work for the .dds files24-Nov-2013-Changed the 'viewXML'-option again -.-; Now i wrote it all myself and didn't just use foreign code.                                                                 (And it looks better now ^^)-Added 'Save'-option to the XMLView, now you can easily edit the .xml file23-Nov-2013-Added 'viewXML'-option for better reading of the .xml file
Edited by Minic90
Link to comment
Share on other sites

Great work! Gonna check the new XML :P

 

-edit:

XML viewer seems to be working great.

One thing though, when you open the program, choose a file like Tiles.pack and click Run then it unpacks the file and you get a message Ok or such. Intuitively i clicked ViewXml after that but that didnt work (program locked up), turns out you need to select the generated XML file with Choose File first. This might be a bit confusing to a user, besides that awesome job.

 

Another thing im wondering, would it be easy for you to implement a way to view the individual sprites with this program? That way it would also function as a sprite catalogue so people can conveniently look up information as name tags on existing sprites.

 

Regards,

Turbo

Link to comment
Share on other sites

@turbotutone

Hmmm, good point.(XML)

I'll include this in my //TODO

I'm currently working on the merging function,(when finished, all basic functions are implemented) and then I could create some kind of 'Sprite-Browser'. But I dont know if this will work for the bigger .pack files (well, the tool has problems with Characters.pack)

We'll see ^^

Link to comment
Share on other sites

  • 3 weeks later...

That's one of the problems I'm currently working on, but I already know what the problem is:

The tool is using to much RAM right now and I just need to reduce the RAM usage in the next version.

 

But thank you that you replied, I started to thought that nobody is using my tool. -.-

Link to comment
Share on other sites

Sooo, it took some time, but now there it is ^^

I had some trouble with the new DDS format for the character part.

Especially when i wanted to split the huge texture in several little subtextures, maybe I will just split them in small png files (easier to edit, I think) and later merge them back to one big dds file.

 

Hope you guys have some fun with the new version

Link to comment
Share on other sites

  • 3 weeks later...

I dont know what you mean :

you can unpack the Characters.pack file and get .dds files which you can edit.

 

And yes i know that the resulting files do not contain any female sprites, but I myself dont know why

I'm waiting for the next update and then we'll see, maybe the female sprites were not added to the .dds files.

 

Conclusion:

I just don't know what went wrong.

Link to comment
Share on other sites

  • 2 months later...

Nice work, I noticed the output is DDS, but the diagram (and wiki) mention PNG.

Am I right by saying it was once PNG but is now DDS? [update, blah, just read your change log!]

 

Does anyone know of a Mac DDS viewer / editor?

 

Oh, and a very small bug (probably only Mac or other Unix systems).

When you unpack "Characters" for example, you get a new directory named "Characters" and the XML file is in it, but all of the extracted DDS files are in the base directory, with names like: "Characters\AllFrames_0.dds"

 

I'm guessing you joined a path with string concatenation, instead of something like "new File(directory_name, filename)".

No biggie, just thought you would like to know.

 

Thanks for the tool, saved me some work!

Do you plan to release the source?

Link to comment
Share on other sites

I actually made a half-implemented version of this tool once, :P

 

Yep I've used it I think...

 

Thanks for both to take some time creating those ones.

 

I guess what's missing is an import/export script for blender now isn't it ? 

Link to comment
Share on other sites

 

I actually made a half-implemented version of this tool once, :P

 

Yep I've used it I think...

 

Thanks for both to take some time creating those ones.

 

I guess what's missing is an import/export script for blender now isn't it ? 

 

a script like that would be legendary, i wonder how hard it is to code

Link to comment
Share on other sites

Here you go !

 

Blender Import/Export script for PZ Models (WIP)

 

Click here to see a screenshot.  

 

Download

 

[ Edited: 03-may 2014] Removed the download because I will put that script on github very soon.

 

 

Features/Known bugs:

 

Import

- Only mesh, no UVs, no bones nor animation yet (WIP)

 

Export

- not implemented yet (WIP)

 

Should be compatible with latest Blender.

 

Enjoy !

 

PS: Don't worry, I will be working on importing the more interesting stuff (bones, anims) over the next few days :)

Link to comment
Share on other sites

I might create a new thread for this actually.

 

Got the export working now (only vertices)

 

Had to consider the 3 different file formats (normal mesh, animated and skinned)...

 

Got the UV import working today, check this out here

 

http://pbrd.co/1hm8mIt

 

and in render mode :

 

http://pbrd.co/1hm8APC

We can only hope the devs will soon get around to releasing the tools and save you the trouble of recreating them :)

Link to comment
Share on other sites

  • 7 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...