TitanFall (.vpk) archives

The Original Forum. Game archives, full of resources. How to open them? Get help here.
User avatar
cra0
ultra-veteran
ultra-veteran
Posts: 431
Joined: Fri Apr 27, 2012 9:37 am
Has thanked: 29 times
Been thanked: 183 times
Contact:

Re: TitanFall (.vpk) archives

Post by cra0 » Sun Jun 22, 2014 7:43 am

BioLife wrote:Hello,

Thank you cra0 for this awesome tool!

Repacker seem to repack ALL the VPK into one VPK (~22gb). Is there any way to repack only the originaly unpacked VPK?

Thank you
tick compress checkbox should produce the same sized vpk

BioLife
ultra-n00b
Posts: 8
Joined: Tue Oct 23, 2012 7:54 pm
Has thanked: 9 times
Been thanked: 5 times

Re: TitanFall (.vpk) archives

Post by BioLife » Sat Jul 12, 2014 6:13 pm

cra0 wrote: tick compress checkbox should produce the same sized vpk
I've tried that, but its doesn't work as expected...

How the extraction and repack are working? If we select for extraction a _dir.vpk file, how can we repack that same _dir.vpk file with some mod? because actually the repack tool repack everything listed in _dir.vpk file, right?

User avatar
cra0
ultra-veteran
ultra-veteran
Posts: 431
Joined: Fri Apr 27, 2012 9:37 am
Has thanked: 29 times
Been thanked: 183 times
Contact:

Re: TitanFall (.vpk) archives

Post by cra0 » Sat Jul 12, 2014 7:56 pm

BioLife wrote:
cra0 wrote: tick compress checkbox should produce the same sized vpk
I've tried that, but its doesn't work as expected...

How the extraction and repack are working? If we select for extraction a _dir.vpk file, how can we repack that same _dir.vpk file with some mod? because actually the repack tool repack everything listed in _dir.vpk file, right?
Yes that is correct. The next version of the vpk tool will support .bpk archives from the xbox360 version of the game along with a new tool called the ROM Repacker

Basically what the ROM repacker does is firstly ask for a vpk you wish to repack than you supply files which you would like packed into that existing vpk and it will override the vpk if the folder you supply contains files already present in the vpk. If the files are not present it will just append to the vpk. This makes modding a lot easier because you dont have to repack e entire archive to mod the game. Additionally there will be an option to revert changes from a vpk so no need to backup the vpk your modding especially the main one which is like 12gb. Look forward to the update! :keke:

BioLife
ultra-n00b
Posts: 8
Joined: Tue Oct 23, 2012 7:54 pm
Has thanked: 9 times
Been thanked: 5 times

Re: TitanFall (.vpk) archives

Post by BioLife » Sat Jul 12, 2014 10:13 pm

cra0 wrote: ..... Look forward to the update! :keke:
Oh nice! I'll look forward! :D

User avatar
cra0
ultra-veteran
ultra-veteran
Posts: 431
Joined: Fri Apr 27, 2012 9:37 am
Has thanked: 29 times
Been thanked: 183 times
Contact:

Re: TitanFall (.vpk) archives

Post by cra0 » Sat Aug 02, 2014 5:52 pm

BioLife wrote:
cra0 wrote: ..... Look forward to the update! :keke:
Oh nice! I'll look forward! :D
Quick update before that fixes all those audio problems people had :wink:

Code: Select all

3.3
-Fixed extract all dialog window saving incorrect folder path location.
-Fixed issue with application settings save
-Removed debug SelectedPath/InitialDirectory constants
-Implemented additional audio patcher (fixes extraction errors for good!)
http://dev.cra0kalo.com/?p=137

ThaWhiteMexicant
ultra-n00b
Posts: 1
Joined: Sun Dec 07, 2014 10:32 am

Re: TitanFall (.vpk) archives

Post by ThaWhiteMexicant » Sun Dec 07, 2014 10:37 am

so im getting this error (got the same one for Intel gpa) and i cannot find the fix. Any suggestions?
You do not have the required permissions to view the files attached to this post.

User avatar
cra0
ultra-veteran
ultra-veteran
Posts: 431
Joined: Fri Apr 27, 2012 9:37 am
Has thanked: 29 times
Been thanked: 183 times
Contact:

Re: TitanFall (.vpk) archives

Post by cra0 » Sun Dec 07, 2014 12:35 pm

ThaWhiteMexicant wrote:so im getting this error (got the same one for Intel gpa) and i cannot find the fix. Any suggestions?
Make sure you have the latest NET frameworks installed (4.5)

Also let me update and ask if ANYONE wishes to help me decipher the BSP lumps present in Titanfall feel free to contact me

Here is what I've been working on
Image
Image
Image

User avatar
tschumann
beginner
Posts: 22
Joined: Sat Jun 03, 2017 9:35 am
Location: Australia
Has thanked: 2 times
Contact:

Re: TitanFall (.vpk) archives

Post by tschumann » Sat Jun 03, 2017 10:22 am

So I've been trying to extract one of these .vpk files but am having some trouble.
This is what I have as the directory entry format.

Code: Select all

struct vpkDirectoryEntry
	{
		unsigned __int32 iCRC32;
		unsigned __int16 iUnknown2;
		unsigned __int16 iArchiveIndex;
		unsigned __int16 iUnknown3;
		unsigned __int32 iUnknown4;
		unsigned __int32 iEntryOffset;
		unsigned __int32 iUnknown6;
		unsigned __int32 iEntryLength;
		unsigned __int32 iUnknown7;
		unsigned __int32 iFileSize; // uncompressed
		unsigned __int32 iUnknown8;
	};
iArchiveIndex is which _00x.vpk archive file the data is in, iEntryOffset is the offset into the archive, iEntryLength is the compressed data size and iFileSize is the uncompressed data size.
Some seem to have some extra data at the end which I haven't investigated yet.

My params for decompression are:

Code: Select all

lzham_decompress_params decomp_params;
memset(&decomp_params, 0, sizeof(decomp_params));
decomp_params.m_struct_size = sizeof(decomp_params);
decomp_params.m_dict_size_log2 = 20;
I'm calling lzham::lzham_lib_decompress_memory (lzham_decompress_memory just passes through to it) - dest buf is iFileSize, src buf is iEntryLength.
I'm getting 3 as the return value (LZHAM_DECOMP_STATUS_SUCCESS) but the dest buf is just full of 0xCD (freshly malloced memory). Is there something wrong with what I'm doing? Is dest buf where the uncompressed data gets returned?

User avatar
tschumann
beginner
Posts: 22
Joined: Sat Jun 03, 2017 9:35 am
Location: Australia
Has thanked: 2 times
Contact:

Re: TitanFall (.vpk) archives

Post by tschumann » Thu Feb 07, 2019 12:14 pm

Anyone tryed using lzham as a .dll or otherwise?

User avatar
tschumann
beginner
Posts: 22
Joined: Sat Jun 03, 2017 9:35 am
Location: Australia
Has thanked: 2 times
Contact:

Re: TitanFall (.vpk) archives

Post by tschumann » Fri Feb 08, 2019 2:01 pm

Alright I got a bit further - the trick was to use an outdated version of lzham (https://code.google.com/archive/p/lzham ... ult/source), not the latest version on GitHub.
So now I've mostly got stuff working but there are a few files that return errors 7, 9 and 14.

User avatar
tschumann
beginner
Posts: 22
Joined: Sat Jun 03, 2017 9:35 am
Location: Australia
Has thanked: 2 times
Contact:

Re: TitanFall (.vpk) archives

Post by tschumann » Sat Feb 09, 2019 6:06 am

And I think I've figured out the last problem - most but not all of the files are compressed - those with compressed size equal to uncompressed size are just raw data.

Post Reply