Page 1 of 5

TitanFall (.vpk) archives

Posted: Sat Feb 15, 2014 11:02 am
by cra0
Image

TitanFall

.VPK archives hold the game assets

Code: Select all

struct VPKDirHeader_t
{
	int32 m_nHeaderMarker;
	int32 m_nVersion;
	int32 m_nDirectorySize;
	int32 m_nEmbeddedChunkSize;
	int32 m_nChunkHashesSize;
	int32 m_nSelfHashesSize;
	int32 m_nSignatureSize;

	VPKDirHeader_t( void )
	{
		m_nHeaderMarker = VPK_HEADER_MARKER;
		m_nVersion = VPK_CURRENT_VERSION;
		m_nDirectorySize = 0;
		m_nEmbeddedChunkSize = 0;
		m_nChunkHashesSize = 0;
		m_nSelfHashesSize = 0;
		m_nSignatureSize = 0;
	}

};

The _dir.vpk files seem to have no compression however the contents do.


Tool Release
Image

Image
Image

Re: TitanFall (.vpk) archives

Posted: Sat Feb 15, 2014 1:23 pm
by Ekey
Share link for download client.

Re: TitanFall (.vpk) archives

Posted: Sat Feb 15, 2014 10:08 pm
by Pepper
after installing (running through the audio decompression phase) the 8gb vpk holds the sounds as raw big endian riff data. that's as much as I can figure out.

Re: TitanFall (.vpk) archives

Posted: Sun Feb 16, 2014 3:44 am
by Zench
I did some digging and found that the compression it uses is lzham Alpha 8 (you need to get it from svn). Set the dictionary size to 20. Some files aren't compressed (e.g. audio tracks).

Re: TitanFall (.vpk) archives

Posted: Mon Feb 17, 2014 6:01 am
by kalleoskar
So nice that op and other ones are lookin into this game ! I tried your program just to look around, if we are lucky depinding on your extract/pack/unpack additions we can change scripts, modify models, change the ai, many other things :D
Its built on the source engine, heavly modified but that means models, and script will work

Re: TitanFall (.vpk) archives

Posted: Mon Feb 17, 2014 10:49 am
by cra0
Zench wrote:I did some digging and found that the compression it uses is lzham Alpha 8 (you need to get it from svn). Set the dictionary size to 20. Some files aren't compressed (e.g. audio tracks).
Hey I tried using

Code: Select all

lzham_decompress_memory
Image
with the uncompressed size/compressed size/dictionary size and it returns 4 as the error. Could you explain how you tried it

Re: TitanFall (.vpk) archives

Posted: Tue Feb 18, 2014 5:16 am
by Zench
I actually just modified lzhamtest as a quick hack to make sure it was working. The function you're using should work just fine. Error code 4 means it failed to initialize the decompressor state, and it looks like the only way this can happen is if the params struct (called options in your screenshot) is wrong. I would check that.

Re: TitanFall (.vpk) archives

Posted: Tue Feb 18, 2014 6:24 am
by kalleoskar
Zench wrote:I actually just modified lzhamtest as a quick hack to make sure it was working. The function you're using should work just fine. Error code 4 means it failed to initialize the decompressor state, and it looks like the only way this can happen is if the params struct (called options in your screenshot) is wrong. I would check that.
Zench do you mean you are able to extract files from the packages with that hack ? :

Re: TitanFall (.vpk) archives

Posted: Tue Feb 18, 2014 6:35 am
by Zench
kalleoskar wrote:Zench do you mean you are able to extract files from the packages with that hack ? :
Yes, I tested it out on a couple files. It's not really automated; instead of making it myself I figured cra0 could add it to his nice looking tool. Repacking is technically possible but probably wouldn't let you play online.

Re: TitanFall (.vpk) archives

Posted: Tue Feb 18, 2014 7:18 am
by kalleoskar
Unexpected good newsa :) I was thinking about porting the mechs cockpits to kerbal space program haha, been modding that game for a while, i think they would fit, esp with an robot parts mod that exits.
Cheers for trying things out =)

Re: TitanFall (.vpk) archives

Posted: Tue Feb 18, 2014 11:20 am
by cra0
-EDIT-

Ok all fixed actually :mrgreen:

will update tool in a day or so sit tight!

Image

Re: TitanFall (.vpk) archives

Posted: Tue Feb 18, 2014 10:53 pm
by kalleoskar
Cool man!!!

Re: TitanFall (.vpk) archives

Posted: Wed Feb 19, 2014 4:29 am
by alientech
You awesome cra0. So, This program can extract all files in one click? Because I hate to select one-by-one for extract.

Re: TitanFall (.vpk) archives

Posted: Wed Feb 19, 2014 6:06 am
by sh0ck1
Woot! Great job cra0!

Re: TitanFall (.vpk) archives

Posted: Wed Feb 19, 2014 5:06 pm
by kalleoskar
Look forward of trying the upcoming update, thank you :!: