# How to backup, extract & repack

## How to backup & extract VPK's properly?

When you extract [VPK ](https://noskill.gitbook.io/titanfall2/documentation/file-format/vpk-valve-pak-file)archives, you need a directory where the files will be extracted to. This folder **should not** be inside your game directory. Before we start modding, you should create a folder to keep track of your modding files. It is recommended for you to create a folder with an easy name like `Titanfall 2 modding` on your desktop or another place you can access it easily. In this example we will use the path `C:\Users\<username>\Documents`.

```
C:\Users\<username>\Documents\Titanfall 2 modding
```

{% hint style="info" %}
It is recommended to follow the modding environment setup as well
{% endhint %}

{% content-ref url="modding-enviroment" %}
[modding-enviroment](https://noskill.gitbook.io/titanfall2/intro/duction/modding-enviroment)
{% endcontent-ref %}

Once you have created this folder I recommend creating a sub-folder called `"Backup"` dedicated for, you guessed it: backups. (Yay!)

```
C:\Users\<username>\Documents\Titanfall 2 Modding\backup
```

At the beginning of each guide, it will tell you what files you should backup. As an example, we will use the [crosshair modding](https://noskill.gitbook.io/titanfall2/modding/weapon-config-info/crosshair-modding) guide. At the beginning, it tells us to backup `englishclient_mp_common.bsp.pak000_dir.vpk` and `client_mp_common.bsp.pak000_000.vpk`. Copy these VPKs and paste them into your backup folder.

{% hint style="info" %}
The next step uses the Titanfall VPK Tool. If you haven't done so already, download the VPK Tool from the [Modding tools](https://noskill.gitbook.io/titanfall2/intro/duction/tools) page. Make sure you have version 3.3 or 3.4. You may have unwanted behavior by using an older version.
{% endhint %}

The VPK Tool looks like this:

![](https://3680263823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPXG6BIVWwbrvVSOiBw-887967055%2Fuploads%2Fgit-blob-83c2ce74d7420b42194be4862630112fbea9b87b%2Fimage.png?alt=media)

Click on the 1st icon or press `CTRL + O`.

![](https://3680263823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPXG6BIVWwbrvVSOiBw-887967055%2Fuploads%2Fgit-blob-007562e3f38ac9bf24ad46a42e8965f945cfb525%2FvpkTool_open.png?alt=media)

Navigate to your game folder and open the VPK that is mentioned in the guide you are referring to.

{% hint style="info" %}
Note you can ONLY extract `_dir` version of vpks with VPK Tool.
{% endhint %}

{% hint style="warning" %}
**Only extract VPK archive from the game directory. If you don't, make sure to have in the same folder all the subsequent VPK archive as shown in the next screenshot.**
{% endhint %}

![](https://3680263823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPXG6BIVWwbrvVSOiBw-887967055%2Fuploads%2Fgit-blob-a725894542a1a35da754112c6fdb7937a2e0ed5a%2FvpkArchive_subsequent.png?alt=media)

Once the VPK archive is loaded in the VPK tool, extract all the files using the icon shown in the next screenshot.

![](https://3680263823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPXG6BIVWwbrvVSOiBw-887967055%2Fuploads%2Fgit-blob-0754d237d36f5b5ae3ec5cf6bc0276e9d93d2f12%2FvpkTool_extractAll.png?alt=media)

It is recommended to put each extracted [VPK](https://noskill.gitbook.io/titanfall2/documentation/file-format/vpk-valve-pak-file) in a folder with the same the [VPK](https://noskill.gitbook.io/titanfall2/documentation/file-format/vpk-valve-pak-file). This makes it easier to manage when you extract files from different VPK's. We will use a folder named `englishclient_mp_common`.

After you have extracted the VPK, open the folder where you extracted your files to and delete the *`extracted_logs`* folder. You can now follow the guide to start modding.

## **How to repack VPK files properly?**

Open the repacking tool inside the Titanfall VPK Tool. You have 2 ways to do that, click on the 6th icon, or go to *`Tools > Repacker`*. The repacking window looks like this:

![](https://3680263823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPXG6BIVWwbrvVSOiBw-887967055%2Fuploads%2Fgit-blob-35e462136aee3a4834c3dc6f30485a1c5e5cec59%2Fvpk%20repack.png?alt=media)

Once we are done with modding our crosshairs, select `Browse` next to the first box. Navigate to and select the extracted folder. Next, select `Browse` next to the second box and select your modding folder.

> C:\Users\\\Documents\Titanfall 2 modding\Repack\\

Then, deselect `Debug log` from the options menu, and click `Build VPK`. Once the VPK file has been built, navigate to the location you selected as the second directory. You will find two files named *`pak000_000.vpk`* *`pack000_dir.vpk`*. Before moving those 2 files into your game directory, they have to be renamed. At the end of each guide, it it will tell you how to how to rename each file:

Rename `pak000_000.vpk` *to* `client_mp_common.bsp.pak000_000.vpk`

Rename `pak000_dir.vpk` *to* `englishclient_mp_common.bsp.pak000_dir.vpk`

After that is done, you can delete the debug log .txt file and move the VPKs back to your game directory. If you get a message saying the files already exist, you can replace them,

## **VPK rename / move batch script**

{% hint style="success" %}
Bored of renaming / moving VPK files back to your game directory?
{% endhint %}

Here is a little batch script you can use!

```bash
ren "pak000_000.vpk" "client_mp_common.bsp.pak000_000.vpk"
ren "pak000_dir.vpk" "englishclient_mp_common.bsp.pak000_dir.vpk"
move "client_mp_common.bsp.pak000_000.vpk" "<ORIGINGAMES>\Titanfall2\vpk\client_mp_common.bsp.pak000_000.vpk"
move "englishclient_mp_common.bsp.pak000_dir.vpk" "<ORIGINGAMES>\Titanfall2\vpk\englishclient_mp_common.bsp.pak000_dir.vpk"
```

That's the script for renaming for *`englishclient_mp_common.bsp.pak000_dir.vpk`*, it can be adapted to any other VPKs you edit quite often. Just paste that in a blank notepad file and save it with a `.bat` extension.

**Don't forget to add the correct game directory by replacing** *`<ORIGINGAMES>`* **with the location of you game install.** You can also replace *`<ORIGINGAMES>`* with your steam directory or wherever your Steam game library is (`Steam\steamapps\common`).

{% hint style="danger" %}
Make sure to close the VPK tool before executing this script, as it will cause an error.
{% endhint %}

{% content-ref url="tools" %}
[tools](https://noskill.gitbook.io/titanfall2/intro/duction/tools)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://noskill.gitbook.io/titanfall2/intro/duction/vpk-packpack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
