Jump to content

OS X Tools - Decompression


Elodran

Recommended Posts

I've seen a thread from a while back about OS X tools, but it's kind of fizzled and I cannot find any information elsewhere about it, so I thought I'd ask about some of the details to get some of my own versions of them rolling.

 

First question I have is about decompressing the UPK files. I've gather that they use LZO compression, but I'm not sure which portions of the file are compressed. Also, looking at part of the XComStrategyGame.upk, there are lots of strings that are clearly not compressed, but if I uncompress the UPK on Windows, I see that contents surely get uncompressed.

 

Does anyone have any guidance on how the compression works for UPK files?

 

Otherwise, I'll have to start poking around at the differences between the compressed and uncompressed files to see if I can reverse engineer enough information to make it work.

 

Thanks!

Link to comment
Share on other sites

http://www.gildor.org/smf/index.php/topic,297.msg2873.html#msg2873 has some information on it. There's a lot more on Google, UE Explorer also knows its structure but I disabled it as it keeps throwing math overflow errors so I must have done something wrong, but I never bothered investigating it and just went with Gildor's tool instead (I could give my work but it might be partially wrong).

Edited by EliotVU
Link to comment
Share on other sites

Ah... thanks for the pointer. I was wondering what all of these extra bits in the header were. They seem to correspond to the following structures:

 

struct FCompressedChunkHeader
{
    int  Tag;         // equals to PACKAGE_FILE_TAG (0x9E2A83C1)
    int  BlockSize;   // maximal size of uncompressed block, always the same
    int  CompressedSize;
    int  UncompressedSize;
    TArray<FCompressedChunkBlock> Blocks;
};

The package tag being the same is what really threw me in a loop. Now I have somewhere to start. Thanks for the help!

Edited by Elodran
Link to comment
Share on other sites

We would really be interested in your results, including differences between platform implementations. The lack of info for Mac users here is not on purpose. We just don't seem to get many contributions on that platform. I'd be happy to put up an entire page devoted to the Mac if we had enough data to make it worthwhile.

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

I'm just happy that there is SOME information about getting the Mac mods working; gives me some incentive to actually try and power through it. I'm an old-time XCOM fan and used to do this stuff to the original game. Time to dust-off those reverse engineering skills again!

 

If I actually start making progress to getting things up and running, I'll put my project on github so it's easy to get to.

Link to comment
Share on other sites

Some other good news for you is that the new UPKmodder tool that XMTS and I are working on is coded 100% in Java so should be very portable to OS X.

 

I'm not designing it as a replacement for UE Explorer to help find the stuff to mod but it will hopefully be of some help once it gets to working.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...