Advertisement
KishgalYS

A Comprehensive? Titanfall Modding Guide

Aug 11th, 2014
2,910
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.89 KB | None | 0 0
  1. A Comprehensive? Titanfall Modding Guide
  2.  
  3. 1. Things You'll Need
  4. 2. Unpacking
  5. 3. Sound Replacement
  6. 4. Texture Replacement
  7. 5. Repacking
  8. 6. Afterword
  9. 7. spcl thx
  10. 8. Mod Resources
  11.  
  12. 1. Things You'll Need:
  13. - In general
  14. Titanfall - http://www.titanfall.com/buy
  15. Cra0kalo's Titanfall VPK tool - http://dev.cra0kalo.com/?p=137
  16. - For sound
  17. Audacity or Your Preferred Audio Editing Tool - http://audacity.sourceforge.net/
  18. HxD or Your Preferred Hex Editing Tool - http://mh-nexus.de/en/hxd/
  19. - For textures
  20. Paint.NET - http://www.getpaint.net/
  21. Nemesis' VTF Tools for PDN - http://nemesis.thewavelength.net/index.php?c=225
  22.  
  23. Note: The tutorial is being written with these tools in mind as they're what I use. Whatever you use hopefully shouldn't be too different, so use your head in adapting.
  24. I can't guarantee this will work for you. I can't even guarantee it'll work for me, sometimes a built VPK's sounds are all static then another try comes out perfect. When starting on this, be prepared to leave your computer alone for at least half an hour, give or take depending on your PC's power.
  25.  
  26. - ! IMPORTANT ! -
  27. Before proceeding, navigate to ..\Origin Games\Titanfall\vpk and back up Client_mp_common.bsp.pak000_000.vpk AND englishclient_mp_common.bsp.pak000_dir.vpk
  28. These are the files you'll be accessing and modifying.
  29.  
  30. 2. Unpacking
  31. I'm going to assume you already own Titanfall. If you don't, I'm not here to walk you through Origin's checkout process, sorry bud. Head to Cra0kalo's website linked above and download the VPK tool. Put it somewhere nice and cozy, then start up TitanFall VPK Tool.exe. Click the "I Acknowledge" button, be scolded unnecessarily, scroll all the way through the agreement, click "I Acknowledge" again. Under "File" menu hit "Open" and navigate to the VPK folder mentioned above, ..\Origin Games\Titanfall\vpk. For the most part you'll want to open englishclient_mp_common.bsp.pak000_dir.vpk, but there are exceptions such as replacing map skyboxes or, of course, not using the English client. If you don't use the English client, find the client that matches the language that copy of Titanfall launches it, and open that. If you try to open a different file, not that the VPK tool will only open files ending in _dir; those are indeed directory files that tell the game where the resources actually are.
  32. Having now opened the VPK, you will be presented with the game's filesystem. Feel free to preemptively poke around a little bit, but before we can actually unpack the thing, click "Tools" and then select "Settings." Uncheck both "Patch VTF textures on export" and "Patch WAV." Respawn did Some Shit with the files here that makes them normally not quite usable and these apply Cra0kalo's fixes to the modified files. However, repacking with the fixed files will modify the VPK and break things. This way you're unpacking the raw unmodified game files.
  33. X out of this window (I know it's tempting to hit the big button at the bottom, but don't, it will clear the program's cache). Now that you've configured the program, hit the second-from-the-left button, a folder with an arrow heading up and out. This is the "unpack all" button. Find where you want to dump all of Titanfall's guts; make sure you have ~23GB free where you want to put them, and I recommend making the folder obvious so you don't lose track of it. Hit OK, and go cook yourself a nice meal or something.
  34.  
  35. Welcome back. Your files are now all set to go, so now it's time to start messing with them.
  36. ! SYKE ! There's one more thing to do. You might have noticed during the unpack process that the log warns you about a file of 0 bytes. For whatever reason, the frag grenade script doesn't like to come out right. Navigate to ..\scripts\vscripts\weapons within your extracted files and open up mp_projectile_frag_grenade.nut with your preferred text editor, most easily notepad. Paste the following and NOTHING ELSE into the empty file:
  37. "function OnProjectileCollision( collisionParams )
  38.  
  39. {
  40.  
  41. }"
  42. You of course don't want the quotation marks, of course, they're to make sure you see exactly what goes in there. No other line breaks, no extraneous characters, no spaces, nothing else. It's not quite Lua, but Squirrel is touchy and the game will be mad if there are script inconsistencies. Save it, making sure that it's still a .NUT. Okay, NOW you're good to go.
  43.  
  44. 3. Sound Replacement
  45. Normally in game modding sound replacement is one of the most simple things you could do, but Respawn has made this a bit more of a challenge for us all. To see what I mean, head to the ../sound folder in your extracted files. Open anything with whatever you like. It won't play. The reason I recommend using Audacity is this: The sound files are uncompressed headerless .WAVs, lacking the part of the file that identifies them as .WAVs. Audacity a feature, found under "File > Import > Raw Data..." to import such files. Congrats, now you've got the file open. You might notice the file has a slight pop at the start and/or end of the file, which is a side effect of the garbage that has replaced the file's header.
  46. Once you've found the file that you want to replace, I recommend backing it up somewhere. Both for normal backing up reasons, and also because you'll want to use it as a reference in a moment for something else.
  47. Replace your Smart Pistol firing sound with an air horn or whatever. Make sure that you save it as a .WAV. Congrats, you've replaced the file... or have you? This is where Respawn starts messing with us. You can go ahead and skip ahead to the repacking section now, but do so at your own risk. There is a more or less random chance that your sound either will not play or will produce a terrifying screeching noise when played. If you want to take that chance, go for it, I wish you the best of luck. Some sounds seem to work fine for whatever reason, and you might get lucky.
  48. However, if you've either experience those horrifying screeching sound or are simply of the more cautious amongst us, follow along for some of the most annoying bullshit I've ever had to figure out for sound modding.
  49. Remember that sound backup you made? Now's when it's time to make it your reference. Open it and your modded sound up in HxD or whatever your hex editor is, unlike with Audacity it shouldn't make any difference here. See something different? In your backed up file, the first few bytes are full of mostly Ë's and a few other mysterious characters, while your modified file (should) look more like a normal file, starting with "RIFFd.$.WAVEfmt" or something very similar in the first few bytes, some more normal file shit, and ending that with "data" followed by the actual file contents. What you're looking at are Respawn's experiment babies gone wrong on one side and a normal healthy .WAV on the other. Guess which one we want?
  50. Select all of the Ë's in your back up file. Assuming you're in HxD, go to your modified file, place your cursor at the start of the file, and hit CTRL+B. It may warn you that this will change the filesize, but no biggie. This will overwrite the header with the original bullshit that Respawn had in there, which ~should~ make the game work with it. I've yet to encounter any problem with this method, but it'll probably happen at some point to somebody.
  51. If these past two paragraphs are absolute nonsense to you, here's a visual aid: http://puu.sh/aEA2W/0bd0aa59e9.png
  52. Your file is on the left. Your backup is on the right. Copy paste what's selected on the right over what's selected on the left, wowzers, you did it.
  53. Rinse and repeat as many times as you need for your files, you're ready to move on.
  54.  
  55. 4. Texture Replacement
  56. Want your gun to be made of gold? Want to put Chaika.png on a Marvin's belly? Dicks on buildings? You're in luck, the process of texture replacement in Titanfall is still as simple as it should be with any other game. However, for whatever reason, normal maps don't seem to be accessible. This isn't really a problem, though.
  57. Download and install Paint.NET. Once you've done so, download the .VTF tools, navigate to ..\paint.net\FileTypes and deposit the trio of .DLLs there.
  58. Head back your extracted VPK and open the .../materials folder. Find whatever you want to modify. If it's a UI element or something of that sort, just find the .VTF that you want and open it with PDN. Ignore .VMTs, they're what tell Source what files to consider a single surface. However, if you want to modify a model's texture, know this: A model has 3-4 textures, ending in _col _ilm _nml and _spc. There might not be an _ilm file depending on what you're working on.
  59. _col: Colour, it's the basic visual appearance of the model. It's what you'll be focusing on.
  60. _ilm: Illumination, the glowing part of a model. They glow in the dark and whatnot, but note that they do not actual produce light or anything within the game world. There can be advantages to modifying this; approach at your own risk.
  61. _nml: Normals. If you correctly disabled .VTF patching during unpacking, you won't be able to open these. For the sake of information, normal maps simulate fine details in the physical surface of an object, and are also called "bump maps."
  62. _spc: Specularity, which can be described as how much "shine" there is on a particular part of a model, as well has how clear a reflection map will be on the model. More transparent is more light reception. I think. Don't quote me on it.
  63. I'll be assuming we're working with a model here, but if not you can proceed as normal and just ignore everything about the specularity .VTFs. Open up the _col and _spc files in PDN. The _col file will look like the normal unwrapped texture, while the _spc will have a checkered grid behind it, PDN's way of representing that it's mostly transparent. You can probably make out the ghost of the texture. In _col file, make a new layer. Perform whatever modifications you want to, but know that if your editing spills off one section of the map onto another it might not be pretty. Once you've finished editing, hit CTRL+A to select the whole layer, CTRL+C to copy that. Return to the specularity map and hit CTRL+SHIFT+V to paste what you've just copied into a new layer. You'll immediately see, of course, that it stands out quite a bit. In the bottom right window labled "Layers," making sure that "Layer 2" is selected, click the tag with a pencil on the far right to open up the layer properties. Lower the opacity to what you think looks best, though I usually just use 20 to save myself a moment of thinking. Hit CTRL+SHIFT+F to flatten the layers together into one layer, and go do the same with the _col texture. Save them, ignore the all the settings you're presented with as they /most likely/ don't matter. Again, I've yet to encounter any problems, but someone might. If you do, Google around, or take a look here: https://developer.valvesoftware.com/wiki/Materials_for_models
  64. You don't need to do any other bullshit here, once the material is saved you're all done.
  65.  
  66. 5. Repacking
  67. You did it! Probably! Only one way to find out, and it takes twenty minutes for every try!
  68. Do one last check on your files to make sure you did everything right, maybe back anything else up that you want to if you're paranoid. Delete the "extracted_logs" file from your unpacking and/or the "pack_logs" from any previous repackings. Open up the VPK tool, and click on "Tools > Repacker." Hit the first "Browse" button, and navigate and select the extracted and modified folder that you want to repack. Make sure you select the ACTUAL folder of the entire extracted VPK, not its containing folder or a folder within it. Confirm that, then click the second "Browse" button. Find where you want to deposit the repacked VPK; the tool will automatically select the folder you first selected, and there's not really any reason not to go with that unless you want to deposit the repacked VPK directly in Titanfall's resources. I don't recommend this because it makes finding and renaming the VPK a bit of a pain, but do what you want as long as you know where you're putting it. Finally, you can set the file name for your repacked VPK. This doesn't really matter, as you'll actually be producing two files that will be given different filenames.
  69.  
  70. Game time. Hit "Build VPK" and go eat some ice cream.
  71.  
  72. Alright, you did it! Probably. We aren't done just yet. The packer will have produced two .VPKs, ending in _000 and _dir. Rename the _000 file Client_mp_common.bsp.pak000_000 and the _dir should be englishclient_mp_common.bsp.pak000_dir (or whatever language your client is, you know the drill). Cut those files, the _000 is big and you don't want to waste time or spaaace copying it. Head over back to Titanfall's VPK directory and deposit them there.
  73. IF WINDOWS WARNS YOU OF ALREADY PRESENT FILES, cancel the paste, move the originals somewhere safe, then proceed.
  74. Trust me, you don't want to fuck the originals. In the off chance you did, head to Origin, right click Titanfall, and select "Repair Game." Origin will perform a filecheck and redownload what's missing/modified. Try again, and make a back up this time.
  75. Okay, now you're done! This is the moment of truth. Start Titanfall.
  76. a. The game doesn't launch. You didn't name something right, double check your filenames.
  77. b. The game launches. Hey, good job, you didn't break everything. If the menu audio/music if you have it enabled is playing and sounds fine, you didn't totally botch the audio either. You WILL notice that some menu elements seem brighter or faded. This is normal, and for now nothing can be done about it as a side effect of repacking the VPK, sorry. You'll get used to it, or at least I have.
  78. So, the game's launched. Hell, that's a good sign. Congrats, you're literate. Now you'll need to play the game. If you replaced a sound, when that sound plays properly, congrats! You did it! Your Smart Pistol is now a rapper's dream! You can carry on safely modding the game without any concerns, though check the next section for some extra advice. If the sound doesn't play/your ears are assault with hellish screeching from the abyss, something went wrong. Most likely a header issue, or the file is just not quite right. Repeat the basic steps of replacing the file and try again, sorry friend.
  79. If you replaced a texture, you're probably going to encounter no trouble. You should see it just fine. Digging the Chaika digs, dude.
  80.  
  81. 6. Afterword
  82. Wow, that's a lot of words. I spent way too much time on this, for something that was just on a whim cuz some folks asked. Oh well, it's for a good cause.
  83. As general advice, you should back up EVERYTHING after EVERY STEP of this process. It might be lengthy, and it will take up some serious disk spaaace, but it beats completely breaking the game, I think.
  84. If you've successfully modded the game, you should know that the VPK tool may struggle to extract files from your modded VPK. If you need to extract any original files from the game, move your modded VPK files to your desktop or whatever temporarily and put the originals back in place. Once you've retrieved whatever you needed, put everything back where you wanted them.
  85. Finally, I should note that you can so far only modify sounds, textures, and models. I didn't go into models here because I've honestly been too scared to mess with them so far, but it seems that it's fully possible (see: https://www.youtube.com/watch?v=L1pPMkOwu7M). Google around for general Source engine modding guides and you should be able to get yourself on that track. If you try and modify the scripts or anything like that, the game will notice as you're connecting to a server and boot you. There don't seem to be any real repercussions, but you will have wasted twenty minutes.
  86.  
  87. 7. spcl thx
  88. Respawn - Bringing us this based ass game, making my life a hell for about thirty hours before I figured out the header shit.
  89. /tfg/ - Being a nice community to go fast and share this with, big thanks to everyone supporting my retarded modding endeavors.
  90. Cra0kalo - Bringing us this based ass tool, being a really swood grommet in answering my questions over Twitter.
  91. gmzorz - Wrote this guide which taught me the basics of unpacking and repacking: http://cfgfactory.com/tutorial/56
  92. Tiluxe - The stupidest mod idea on Earth that I couldn't resist including here.
  93. Amadeous - Expanding my Dragon Install sound mod further
  94. You - Why not? You read this fucking thing, you deserve thanks for that. And hey, thanks for the interest in bringing more content to this game. I hope you make it good.
  95.  
  96. 8. Mod Resources
  97. Here are some little diddlies that some people have asked me for. Feel free to use them or change them up to your liking.
  98. Chaika exploitable - http://switchdraw.deviantart.com/art/CHAIKA-s-Face-456893291
  99. Chaika Marvins - http://puu.sh/db3mu/3c15e05ba1.vtf
  100. (in-game preview: http://puu.sh/bnBB6/f6bc635116.png | image preview: http://puu.sh/db3gA/4fe533bf50.png)
  101. Moe Spectres - http://analblaze.com/downloads/moe_spectres.zip (yes, it is supposed to be "spactre" in the materials)
  102. (preview them at: http://analblaze.com/audio/moe_spectre_demo.mp3)
  103. Rap Air Horn - http://analblaze.com/audio/airhorn.wav
  104. True Victory Theme - http://analblaze.com/audio/VICTORY.mp3
  105. (credit to https://soundbutt.com/moistegg/victory)
  106. Miku C.A.R. - http://analblaze.com/downloads/miku_CAR.zip
  107. (preview at: http://puu.sh/aNAiG/6277afd234.png)
  108. Airhorn Smart Pistol - http://analblaze.com/downloads/honkpistol.zip
  109. (preview thanks to Tiluxe at: http://a.pomf.se/krbanj.mp4)
  110. Sniperwaifu Panties - http://analblaze.com/downloads/designated_marksman_imc_female_pilot.zip
  111. (dev preview: http://puu.sh/bemNK/c52d4d3bd8.png | in-game preview: http://puu.sh/beCaa/7e9fe68a1e.png)
  112. "Ride The Fire" Core Theme - http://analblaze.com/downloads/dragoncore.zip
  113. (thanks to my sister's boyfriend for the idea and song, preview at: http://puu.sh/db2UH/85d30cce23.wav)
  114.  
  115. Coming soon: Vocaloid Titan OS voice. They're coming, Tiluxe, I swear!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement