Left4Dead *.vpk Extraction Tools, now with UI

A newer build of my VPK tool that now includes a UI. It also fixes handling of the ‘small data’ in the directory file that most *.vmt files were using instead of real files in one of the other package files. Please report any issues in comments, thanks. Edit: See this newer post for a newer build of tools.

The code for this is also now available on SVN.

Tags: , , ,

77 Responses to “Left4Dead *.vpk Extraction Tools, now with UI”

  1. Mystfit says:

    I’ve been searching for something like this since the demo arrived. Thanks so much for this!

    I used it on my freshly downloaded preload files today, and everything seemed to work fine. Do you think that Valve is moving towards using .vpk files rather than gcf files now?

  2. Rick says:

    I assume they are using their *.vpk format since it’s probably faster and available for use on consoles where Steam isn’t available for use.

    Preload files for the full game will work, sort of. Some of the *.vpk files are unencrypted where some are encrypted.

  3. Irfy says:

    I love you!!!

    Lol Thanks.

  4. James says:

    Hey, just extracted the files but when i try to open the mdl files in hammer or hlmv they appear blank, I’ve got everything placed in the right folders, whats wrong?

  5. Rick says:

    I don’t know, it could be that the MDL files are too new of a version for the SDK tools to load.

  6. Kickdix says:

    it’s only Ep2 Engine

  7. Mystfit says:

    I managed to open Zoey up in hlmv. You need to copy the .vtx file of the model 3 times and rename them with .sw.vtx, .dx80.vtx and .dx90.vtx on the end.

    Do you think it would be possible to add a renaming option in the extractor for copying and renaming .vtx files? It’s mainly useful for us to play around with the models in Garry’s Mod.

  8. dash says:

    Hey thanks man!
    Cant wait to get my hands on the vtf files and do some retexturing!

  9. dash says:

    Hey Mystfit, thanks for the tip, its worlking!
    http://img80.imageshack.us/img80/9086/49332314xg4.jpg

  10. stealthgerbil says:

    LOL GOOD WORK GOON SIR!!!

    BUTTES

  11. Ferdam says:

    You can create a Batch file with this code for the copying and renaming vtx files part :

    copy *.vtx *.dx80.vtx
    copy *.vtx *.dx90.vtx
    copy *.vtx *.sw.vtx
    del *.dx80.dx90.sw.vtx
    del *.dx80.dx90.vtx
    del *.dx80.sw.vtx
    del *.dx90.sw.vtx

    then run the bat file

    Note : You’ll have to add this bat to all models folder and run it..

  12. synthiac says:

    Oooh, Rick has a blog now.

    Gonna be watching this one.

  13. synthiac says:

    ^ omg read my blog

  14. Steve says:

    Just would like to say that using Ferdam’s vtx fix and Rick’s wonderful extractor, you are able to use the models in other source games, although, they won’t all work exactly how they are supposed to.
    Proof for GMOD users, http://img.photobucket.com/albums/v200/PrinceofZen/gm_ps_hugeflatconstruct_svn0007.jpg

  15. asdsd says:

    It’s a pity there isnt already a decent model decompiler that could decompile those player models 🙁 If i try to decompile with all sorts of different methods and versions of cannonfoddersmdl decompiler, it either crashes or complains that it cant decompile it 🙁

  16. Shiftey says:

    I’m making a batch file for my personal use that will extract all of my steam games content to a single directory. I don’t have much experience with this so this might be a simple question to answer. How would I execute your program from a bat?

  17. […] sourcecstrike] They then should work in Hammer! Gibbed’s VPK Extractor Updates Download Gibbed’s VPK Extractor __________________ PC – – – – – Pentium D 820 2.8GHz 1GB DDR2 […]

  18. Rick says:

    Shiftey – there isn’t currently functionality for providing arguments to the extractor for automation like that. Something for a new build, perhaps.

  19. […] You can extract the models and textures to set it up in hammer, here is the link to the extractor. Rick’s Game Stuff Blog Archive Left4Dead *.vpk Extraction Tools, now with UI __________________ —><> ><> BracketFish! *<0>< […]

  20. Help me says:

    The application failed to initialize properly (0xc0000135). Click on OK to terminate the application.

    ^ That is the only message I get when trying to use the extractor. I’m running 32 bit XP, service pack 2. I tried restarting too, same problem 🙁

  21. Help me says:

    Doh, guess I need .net framework. Just reformatted > <

  22. Tim says:

    anyone know how once extracted i can view the models in XSI? i know they used xsi, but i’d like to be able to actually see the animations and models in xsi? or even exporting as an .obj would work too. anyone know how i would go about doing that?

  23. Brett says:

    The vtf files that are extracted look corrupted. Has anyone else had this problem?

  24. hoboking says:

    Rick, I’ve got a question. What program did you use to come up with this extractor software? As in how did you create this extractor?

  25. Rick says:

    I wrote it in C#. The sources are available on my SVN repository, see the ‘Valve SVN’ link on the main blog page.

  26. […] while. Let it do it’s job. Done? Awesome let’s get ready for second step: Second Step Download program from this link. Link to the .zip will come up when you press the link called A newer build of my VPK tool that now […]

  27. Hurah says:

    Hi i was just wondering why the extraction exe won’t start..??? =s thanks

  28. vlees91 says:

    Hey Rick, you also have a tool that creates the vpk files since just changing them with a hexeditor makes them corrupted?
    If yes, please contact me on the provided emailaddress

  29. Anonymous says:

    When trying to run the exe file, I get an error of:

    “The application failed to initialize properly (0xc0000135).”

  30. Rick says:

    You need .NET 3.5 installed.

  31. Randommer says:

    I used it on the VPK in a Left 4 Dead skin, only as soon as I opened the VPK it gave me an error

    Details are as follows

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
    at System.IO.FileStream.Read(Byte[] array, Int32 offset, Int32 count)
    at Gibbed.Valve.Helpers.StreamHelpers.ReadASCIIZ(Stream stream)
    at Gibbed.Valve.Package.PackageFile.Read(Stream stream)
    at Gibbed.Valve.ExtractPackage.Extractor.OnOpen(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    —————————————-
    Gibbed.Valve.ExtractPackage
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Administrator/My%20Documents/left%204%20dead%20mods/extractpackage2/Gibbed.Valve.ExtractPackage.exe
    —————————————-
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    —————————————-
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    —————————————-
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    —————————————-
    Gibbed.Valve.Package
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Administrator/My%20Documents/left%204%20dead%20mods/extractpackage2/Gibbed.Valve.Package.DLL
    —————————————-
    Gibbed.Valve.Helpers
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Administrator/My%20Documents/left%204%20dead%20mods/extractpackage2/Gibbed.Valve.Helpers.DLL
    —————————————-

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

    http://www.fpsbanana.com/skins/55300

    Is the skin it keeps failing on

  32. Rick says:

    Whoever edited that file did it in an incredibly stupid way and produced a broken pak01_dir.vpk. I have no reason to compensate for the crappy editing. I’m surprised L4D even loads it (and apparently it doesn’t for everyone, according to the comments on that page).

  33. Randommer says:

    I’m not blaming you Rick, was just wondering if you had an idea why it didn’t work for me (didn’t work for my friend either, we’re both just unlucky I suppose)

    Your tool could be useful though once I learn more about modding, easy to use and good simple interface

  34. Rick says:

    It doesn’t work because it was incorrectly edited.

  35. Randommer says:

    Thanks Rick

  36. Alexwebmaster says:

    Hello webmaster
    I would like to share with you a link to your site
    write me here preonrelt@mail.ru

  37. Draco18s says:

    I can’t run the tool. I get an error about the program failing to initialize properly.

    I have been forced to use a Virtual Machine to attempt any modding, due to the Source SDK being completely incompatible with a 64 bit OS. I can get the SDK to run here, though not games (I’m guessing its the video driver, which I am unable to update due to the fact that the video adapter is virtual hardware).

  38. Rick says:

    Install .NET 3.5.

  39. Matt says:

    Were is the vpk extractor download?

  40. Matt says:

    Oh i found it never mind

  41. Matt says:

    Hope fully this framework thing will work

  42. Matt says:

    Could You Please Help Me?

    Ok i was trying to extract the pak dir 01 file to make a l4d mod and this error mesage came up.
    Exception of type ‘givved.Valve.Package.PackageFileException’was thrown.
    Then under details it says this

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    Gibbed.Valve.Package.PackageFileException: Exception of type ‘Gibbed.Valve.Package.PackageFileException’ was thrown.
    at Gibbed.Valve.Package.PackageFile.Read(Stream stream)
    at Gibbed.Valve.ExtractPackage.Extractor.OnOpen(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///c:/WINDOWSS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    —————————————-
    Gibbed.Valve.ExtractPackage
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Documents%20and%20Settings/Matthew/Desktop/vpk%20extractor/Gibbed.Valve.ExtractPackage.exe
    —————————————-
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWSS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    —————————————-
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWSS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    —————————————-
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWSS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    —————————————-
    Gibbed.Valve.Package
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Documents%20and%20Settings/Matthew/Desktop/vpk%20extractor/Gibbed.Valve.Package.DLL
    —————————————-
    Gibbed.Valve.Helpers
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Documents%20and%20Settings/Matthew/Desktop/vpk%20extractor/Gibbed.Valve.Helpers.DLL
    —————————————-

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

  43. Matt says:

    Hey See That Comment Above /\/\/\/\/\/\ Well That is the wrong email sorry this is the right one.
    Please Help Me With This.

  44. Matt says:

    Btw i am trying to do this http://www.fpsbanana.com/tuts/7416

  45. Yakuto says:

    Where is the VPK extractor download?

  46. Yakuto says:

    I mean, when I press “A newer build of my VPK tool that now includes a UI” all that appears is a new page with a lot of encrypted codes and stuff…

  47. Eric says:

    Hi, when i extract the files i only get .mdl files and no other formats. i only want the survivors and the infected. please help 🙁

  48. CadoAngelus says:

    i’ve downloaded the extractor tool and following tutorials i’ve placed the 3 files from the zip into the ‘\steamapps\common\left 4 dead\left4dead\’ folder. I’ve run the program and tried to extract the pak1.dir file but it keeps saying “0 files in package. Done, 0 succeeded, 0 failed, 0 total.”

    is there a problem with the program? everyone that publishes these tutorials seems to claim it should work everytime…

  49. RabbiVole says:

    Having the same problem as CadoAngelus. This worked like 3 weeks ago, I have no idea why it’s not working now.