xboxscene.org forums

OG Xbox Forums => Game Hacking => Xbox Game Forums => Half Life 2 => Topic started by: hbrdXΣr0 on March 07, 2006, 05:08:00 PM

Title: Xzp Extractor Progress
Post by: hbrdXΣr0 on March 07, 2006, 05:08:00 PM
Thanks to a forum member, whom I assume wishes to remain unnamed, I have the structure to the XZP format. First I tried writing a C++ program, and got it to display stuff like the header info, etc.. but I couldn't work with strings or anything because I'm apparently not that smart.
So, I went with what I know: PHP.
After a good few hours work, I can now extract files from XZP files. I've only actually extracted one file, it was a VMT, but the contents "LightmappedGeneric" show that I did my work just fine.
I need to do a paper, but I'll work on getting it to extract the entire contents in a little bit.

P.S.  For those of you without the CLI version of PHP, once I finish coding it I'll compile it with the excellent Phalanger and release it. It'll probably be in steps, the first release simply extracting everything from a specified XZP file to a folder.

This post has been edited by hÿbrîdXΣr0: Mar 8 2006, 01:14 AM
Title: Xzp Extractor Progress
Post by: hbrdXΣr0 on March 07, 2006, 06:51:00 PM
Okay! I have most of the bugs worked out. If there are any problems with the code, please post in this thread, PM me, or something. I've tested this with a couple XZP files from the game cache, so I know it works.
Please let me know right away if you can't run the program, I haven't tried it from a clean machine myself. Requires the .NET 1.1 runtime. I'm not responsible for your xbox exploding, etc. etc.

Download here.
Title: Xzp Extractor Progress
Post by: ash_link on March 07, 2006, 11:23:00 PM
Everything is going fine. Now we just need a importer.
Title: Xzp Extractor Progress
Post by: SuB-Zer0 on March 08, 2006, 07:35:00 AM
Sounds very good hÿbrîdXΣr0 wink.gif
I will try it out later this day.
Does this mean we can later import things too ?
Title: Xzp Extractor Progress
Post by: hbrdXΣr0 on March 08, 2006, 11:31:00 AM
QUOTE(SuB-Zer0 @ Mar 8 2006, 09:06 AM) View Post

Sounds very good hÿbrîdXΣr0 wink.gif
I will try it out later this day.
Does this mean we can later import things too ?


Maybe. I don't know the file format well enough (I went off someone else's work for the decompiling) to import back. There's also a lot I don't understand about binary file formats, so it probably won't be me that'll write the importer.
I have contacted Nem of GCFScape and he said it should be pretty easy to add to HLlib and GCFscape. I will try and work with him to get it in, but we're just at the discussion stage right now. If we do that I will certainly release the source code to my own PHP script and we'll have a much better extraction program to work with. With the existing notes, and my completed reader code, as well as possibly HLlib in the future, maybe we can work out a method of writing back to the files. We will also have to figure out how to get them back into xz_ format (I believe they're just zipped, with code avaliable in the Source SDK, according to the person who also sent me the layout for the XZP files) so they can be replaced on the hard drive when you launch the game.

On a side note, I will release the source to the PHP code eventually, but I'm not exactly sure how the DCMA works and stuff so I don't know if I really need to right away tongue.gif
Title: Xzp Extractor Progress
Post by: entens on March 08, 2006, 03:46:00 PM
QUOTE(hÿbrîdXΣr0 @ Mar 8 2006, 12:38 PM) *

Maybe. I don't know the file format well enough (I went off someone else's work for the decompiling) to import back. There's also a lot I don't understand about binary file formats, so it probably won't be me that'll write the importer.
I have contacted Nem of GCFScape and he said it should be pretty easy to add to HLlib and GCFscape. I will try and work with him to get it in, but we're just at the discussion stage right now. If we do that I will certainly release the source code to my own PHP script and we'll have a much better extraction program to work with. With the existing notes, and my completed reader code, as well as possibly HLlib in the future, maybe we can work out a method of writing back to the files. We will also have to figure out how to get them back into xz_ format (I believe they're just zipped, with code avaliable in the Source SDK, according to the person who also sent me the layout for the XZP files) so they can be replaced on the hard drive when you launch the game.

On a side note, I will release the source to the PHP code eventually, but I'm not exactly sure how the DCMA works and stuff so I don't know if I really need to right away (IMG:style_emoticons/default/tongue.gif)


*cough* the usual place is good *cough*
Title: Xzp Extractor Progress
Post by: hbrdXΣr0 on March 08, 2006, 03:15:00 PM
QUOTE(entens @ Mar 8 2006, 05:17 PM) View Post

*cough* the usual place is good *cough*


That's really unnessicary, seeing as most projects release their source publically but not the binaries. I'm already distributing the binary, I'm just waiting to do the source. Shouldn't be much longer.
Title: Xzp Extractor Progress
Post by: ash_link on March 08, 2006, 06:23:00 PM
If only We could import
Title: Xzp Extractor Progress
Post by: Infinite_Matrix on March 08, 2006, 06:27:00 PM
QUOTE(ash_link @ Mar 8 2006, 06:54 PM) View Post

If only We could import


Compression?

Anybody need me?
MSN:[email protected]
AIM:LNFLNLTE MATRIX

heh, just got a channel for it as well.

irc.dynastynet.net, #XHL2M
Title: Xzp Extractor Progress
Post by: hbrdXΣr0 on March 08, 2006, 07:14:00 PM
Not compression. I believe the person who sent me the specs said there were checksums inside, too.
Title: Xzp Extractor Progress
Post by: ash_link on March 08, 2006, 09:07:00 PM
QUOTE(hÿbrîdXΣr0 @ Mar 9 2006, 02:45 AM) View Post

Not compression. I believe the person who sent me the specs said there were checksums inside, too.


He told me to tell you that's timestamps
Title: Xzp Extractor Progress
Post by: Infinite_Matrix on March 09, 2006, 03:15:00 AM
join the irc channel for some more discussion about this stuff. I'll setup a file serve on there as well for anybody who needs some mods quick and fast.

DynastyNet, #XHL2M

already got a couple people in the channel literally 3 minutes after it was made.(IMG:style_emoticons/default/happy.gif)

This post has been edited by Infinite_Matrix: Mar 9 2006, 11:16 AM
Title: Xzp Extractor Progress
Post by: hbrdXΣr0 on March 09, 2006, 05:44:00 AM
I think forums work just fine. Anyway, Nem send me a test version of GCFscape that extracts from XZP files just fine, so we might be seeing a public release in a couple days.
Title: Xzp Extractor Progress
Post by: hbrdXΣr0 on March 09, 2006, 07:25:00 PM
I've released the source of the PHP script I used to write my extractor, in case anyone wants to see technical details on how the extraction works.

Source here