Giter VIP home page Giter VIP logo

extractbsptofolderforvpk's Introduction

ExtractBSPToFolderForVPK

This is a script made to work around a bug in Source Engine which does not allow it to read assets embedded in .bsp files when they are inside a .vpk

Run it with the GUI

To run it with user interface, run the file "gui.py" with the Python interpreter (python3 on Linux, python on Windows.) A new window will open, choose an input and output folder and click "start process". Wait a while, it may take long, but it will inform you if there is an error. The folders are:

  • Output: Should be an empty folder where the result of the process is. You can drag this folder directly to VPK.exe
  • Input: The folder where you downloaded the maps where that you want to extract. Should have at least a maps/ subfolder.

After running the program, use VPK.exe to transform it to a vpk file (instructions here). If the filesize of the output folder is more than 200MB, run VPK.exe in multichunk mode (described in the website).

Run it with the command line

Run "cli.py" using the python interpreter (python3 on Linux, python on Windows), the script will prompt you to indicate the input and output folders respectively

  • Output: Should be an empty folder where the result of the process is. You can drag this folder directly to VPK.exe
  • Input: The folder where you downloaded the maps where that you want to extract. Should have at least a maps/ subfolder.

After running the program, use VPK.exe to transform it to a vpk file (instructions here). If the filesize of the output folder is more than 200MB, run VPK.exe in multichunk mode (described in the website).

Command line parameters

The program supports various parameters:

  • -i | --input can be used to specify the input folder before running.
  • -o | --output can be used to specify the output folder before running.
  • -s | --singlethread makes the program only use a single thread for computing, which may slow down the process significantly.

Why?

There is currently a bug in Source Engine (which I know exists in Team Fortress 2, don't know about other games) that prevents the game from loading asset files embedded in a map file (.bsp file) while the map file is inside a .vpk file.

What does the script do?

It grabs all the asset files inside the map files (the assets which wouldn't be read if the map was in a vpk) and puts them directly in its appropriate folder so that the game can read it even if the map is in a vpk. For example, it transforms this folder structure:

  • Root dir
    • maps
      • cp_example
        • materials
          • texture.vmt (this file wouldn't be read if root dir was a vpk)

Into this:

  • Root dir
    • maps
      • cp_example
        • materials
          • texture.vmt (this file still wouldn't be read if this was a vpk)
    • materials
      • texture.vmt (this file would be read by the game and the map would use it instead)

extractbsptofolderforvpk's People

Contributors

bernardogomesnegri avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.