TitanFall VPKTool 3.3 Update

Posted on Aug 3, 2014
3.3 Update

My Plans

Well it’s been a while since I last touched Titanfall, the hype had ended for me and I didn’t really play the game anymore. The fact that it didn’t even run after the first dlc patch caused me to uninstall it and forget. However recently seeing the maps in the latest dlc has sort of sparked my interest into playing it again and attempting to mod the game. If I can recall the VPKRepacker which comes with the VPKTool works however it’s a pain in the ass to use because you have to extract everything edit stuff and then repack it all again which takes like an hour in total for both operations so I made plans for making a new repacker which operates in a different way which should be easier and more feasible to use. That brings me to my next idea, a MOD manager for Titanfall. Respawn haven’t really said anything regarding mods after Vincent posted on twitter they would “evaluate” the possibility for modding the game after release, well the sad truth is they don’t wish to support modding. Aw well doesn’t mean I can’t write tools to mod the game now which is why I’m going to write a mod manager that people can use to make mods for the game and then ship them around in tfm files (titanfall mod) for everyone else to use. The doritos mod isn’t dead ok 😀

What else is to come?

dlc_attract

Dam those new maps look sexy in TitanFall. I plan to finish up the bpk section of the vpk tool which will allow you to open up the xbox360 version of Titanfall ported over by bluepoint games. Not sure what we will find in there but I’m mainly doing it for the maps since I believe the bsps are close to what Portal2 had. Speaking of BSPs I plan on writing something for those too collaborating info with ata4 the author of bspsrc. More info about this in a later post.

The 3.3 Update

As for this update version 3.3 the main highlight would be the audio patcher upgrade. Since Respawn ship vpks with headerless audio files previously the tool would do a sort of hacky way of detecting the bitrate/samplerate and channels each audio wav used. That method isn’t exactly great because it relies on the sounds being present in the cache file. However I took another look at this problem and came up with a better solution which I believe is the right one.

CAM

So these CAM files seemed interesting that were in the same directory as the vpks and the audio_installer executable which seemed to run on every update/install. After taking a look at the audio_installer’s executable I managed to reverse engineer the process used to install audio for titanfall. Long story short they basically ship compressed audio files which come inside the vpks and once the audio_installer runs it takes these audio files strips the header off them unpacks the raw audio and places it back into the vpks. The audio headers are read from these CAM files which i believe stands for Compressed Audio Map whilst the audio content is read directly from the vpks. I haven’t reversed the cam entries entirely as I don’t need the other info but here is what the structure looks like.

//CAM
//Compressed Audio Map

//stride 32 bytes
struct entry
{
uint32		sigMagic;	//00 1A DE C4
uint32		unknownVar;
uint32		unknownVar2;
byte		bitrate[3];
byte		channels[1];
uint32		unknownVar3;
const		unknownVar4;
uint64		offsetinVPKContent;
}

Changelog for 3.3

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!)

Update

If you have the application currently installed it should prompt a new version if available for update if not you can manually check for updates through the Help menu.

ckupdate

Download:

Titanfall_VPKTool3.3_Portable.zip