Page 1 of 1

Deadly Premonition file archive types.

Posted: Sun Mar 11, 2012 8:58 pm
by Gauze
Recently I decided to try and extract textures and models from the xbox360 game Deadly Premonition. On the disc there was a folder called pack which had a lot of .pkg files. I managed to find a way to extract data from these file types with offzip. After I extracted these files i got a bunch of new file types (.xpc .xmd and .xam) I used a hex editor to look inside, and they appear to be archive files also. I personally have no experience hex editing files, so I've been researching but I'm stuck. I've included a sample of each file type. So if somebody could take a look and give some advice about getting the data I would be very appreciative. Thanks in advance.

Re: Deadly Premonition file archive types.

Posted: Sun Mar 11, 2012 9:39 pm
by finale00
xpc is a texture archive. It is pretty simple to parse, but will need files with different number of textures to verify a couple values (like number of textures, and whether some values are actually offsets or not)

xmd files contain model. You can see an index buffer and vertex buffer. Sounds like a good start.

xam probably just animation.

Upload some pkg's
I am usually never interested in offzip dumps except that now we know what compression it uses...

Image

Re: Deadly Premonition file archive types.

Posted: Sun Mar 11, 2012 10:35 pm
by Gauze
I'll post a few more if needed.

Could you explain the process of how you got the texture by any chance?

Re: Deadly Premonition file archive types.

Posted: Sun Mar 11, 2012 11:31 pm
by finale00
Looks like chrrox already write an importer.

Textures I just wrote a plugin for noesis.

http://db.tt/hVmq82OB

Re: Deadly Premonition file archive types.

Posted: Sun Mar 11, 2012 11:43 pm
by Gauze
Sweet. Thank you! I've been trying to figure out getting the textures for days.
After using the plugin for a bit, some textures get an error. But I'm guessing its because the files contained in those xpc files are structured slightly differently. Maybe I can figure it out. having at least some textures that work is awesome still.

Re: Deadly Premonition file archive types.

Posted: Thu Mar 29, 2012 3:48 am
by finale00
BMS script to unpack with names would be nice.
This game doesn't store filenames anywhere?

I don't see any names unfortunately so this pretty much doing what offzip is doing.

Code: Select all

#deadly premonition pkg unpacker

findloc IDX string "XZP1"
do
	goto IDX
	get idstring long
	get FILES long
	get SIZE long
	get ZSIZE long
	savepos OFFSET
	clog OFFSET OFFSET SIZE ZSIZE
	math NEXT = IDX
	math NEXT += 1
	goto NEXT
	findloc IDX string "XZP1"
while IDX > -1

Re: Deadly Premonition file archive types.

Posted: Thu Mar 29, 2012 4:04 am
by chrrox
your better off doing clog "" OFFSET SIZE ZSIZE instead of clog OFFSET OFFSET SIZE ZSIZE then it will attempt to identify the extension.

Re: Deadly Premonition file archive types.

Posted: Sun Apr 15, 2012 2:47 pm
by RuffalowMan
Thank you Finale00 & Chrrox, I really appreciate you both spending time on this overlooked gem, however is there a way to fix the error in line 67? I've attached a screenshot just in case you don't know what I'm referring to.

Re: Deadly Premonition file archive types.

Posted: Sun Apr 15, 2012 2:55 pm
by finale00
No, because I don't have any files to see what the issue is.

Re: Deadly Premonition file archive types.

Posted: Sun Apr 15, 2012 3:10 pm
by RuffalowMan
Thanks all the same :)

Re: Deadly Premonition file archive types.

Posted: Tue May 22, 2012 12:23 pm
by simkas
I'm currently trying to get textured character models from DP and chrrox's plugin works perfectly for models, but the noesis plugin that finale00 posted doesn't seem to work, I just get the same error as RuffalowMan posted for every file I tried. It seems like finale was actually able to get the textures so I'm assuming the plugin should work, so what might be the problem here?

Re: Deadly Premonition file archive types.

Posted: Tue Aug 14, 2012 5:56 pm
by Gauze
Tis been a long time since I checked here, my comp crashed so I was set back awhile.
Here are three files with the error described by RuffalowMan

http://www.mediafire.com/?u11jwobuh2eu6tx

If there is any interest still about these files.

Re: Deadly Premonition file archive types.

Posted: Fri Jan 17, 2014 12:46 pm
by Dean
Sorry to bump this very old thread, but has anybody looked into recompressing the XPC texture packages for the PC version of DP? Chrrox made a Noesis script for importing the models + textures. I'm really interested in adding new content to Deadly Premonition. As it stands, creating new addons for the DLC picker is incredibly easy. It's just not very useful right now if texture editing isn't possible. Technically you can use Durante's DPFix texture override system to overwrite specific hashes, but this is not nearly as powerful as editing the texture packages in the game for new costumes/scripts. Anyone want to take a look if they have some free time?