Extracting The Witcher 2 files

There are several useful files in the  folder such as "..." these files contain all of the text, journal, dialogue, quest, character, attribute, skill entries. The first 2 letters of the filenames indicate the language version.

To extract the information, first off use '''[http://www.nexusmods.com/witcher2/mods/52/? Red Tools] to decode them then view/edit them with a editor such as Notepad++'''. It's easy, but the file structure is a little different than a simple file.

For images, the extracted files are mostly in the folder, in  format, so a program which can open this format and convert them to  is useful. One such free program is GIMP.

Step by step guide
 Written by JPulowski First off let's take a look at basic file types:

Requirements

 * Red Tools
 * Text editor (Notepad, Notepad++)
 * Image editor (GIMP, Adobe Photoshop)
 * NVIDIA Texture Tools for Adobe Photoshop
 * GIMP DDS Plugin
 * Windows Texture Viewer
 * QuickBMS
 * The Witcher 2 Texture Converter

Unpacking .dzip files
In order to unpack .dzip files, first off all make sure you've downloaded [http://www.nexusmods.com/witcher2/mods/52/? Red Tools]. In this tutorial, we are going to unpack  file which contains all of the game files in itself.

You should see something like this on Command Prompt: Usage: Gibbed.RED.Unpack.exe [OPTIONS]+ input_dzip [output_dir]
 * Open up Command Prompt. (Start › Run... › Open:  › OK / ⊞ Win + R › Open:   › OK)
 * Locate   which is usually located in  (32-bit) or   (64-bit).
 * Drag   to Command Prompt or write  (32-bit) /   (64-bit) to Command Prompt.
 * If you hit ENTER, you'll see options:

Options: -o, --overwrite           overwrite existing files --cdkey=VALUE         cdkey for use with DLC archives (in format #####-#####-#####-#####) -e, --extension=VALUE     only extract files of this extension -h, --help                show this message and exit
 * Locate   which is located in  folder in The Witcher 2 game directory.
 * Drag   to Command Prompt but make sure there is a space between two directories or you'll get an error message. For instance:
 * WRONG: Note how there is no space between the first directory in double quotes and the second
 * "C:\Program Files (x86)\Gibbed's RED Tools\Gibbed.RED.Unpack.exe""C:\Games\GOG.com\The Witcher 2\CookedPC\pack0.dzip"
 * TRUE: Here, there is clearly a space between the first and second directories
 * "C:\Program Files (x86)\Gibbed's RED Tools\Gibbed.RED.Unpack.exe" "C:\Games\GOG.com\The Witcher 2\CookedPC\pack0.dzip"


 * Locate your output directory which must be located outside of the game directory or you may have some issues when playing the game. For instance I've created a folder named  outside of the game directory. Create a new folder, name it as you wish. Then drag the folder to Command Prompt. And make sure there are spaces between three directories. So the final result must be something like this:
 * "C:\Program Files (x86)\Gibbed's RED Tools\Gibbed.RED.Unpack.exe" "C:\Games\GOG.com\The Witcher 2\CookedPC\pack0.dzip" "F:\Witcher2Output"


 * Hit ENTER and wait until all of the files has been extracted it may take several minutes depending on your computer and numbers of the files that it is getting extracted.
 * After all of the files has been extracted, you may close Command Prompt.
 * Now if you open up your output directory, you may see all of the files that has been extracted from  .

Editing/Viewing texture files
There are two types of textures:
 *   — DirectDraw Surface
 *   — X BitMap graphic file

DirectDraw Surface files usually contain 2D textures such as icons but also some of them contained in   files, the ones that contained   files contains model textures.

X BitMap graphic files contain model   texture files and   files which is needed to convert back   files to   files.

Let's start with simple   files. For viewing purposes only you may use Windows Texture Viewer. It's a simple program designed for viewing DirectDraw Surface files. After downloading the   file, extract its contents to any folder you wish. For making things easier, you may associate   files with Windows Texture Viewer.

You may find   files at these locations:

Now let's try to open a   file with Windows Texture Viewer. Locate folder:  then try to open one of the texture files. I chose to open  which is Geralt's in-game journal image. If you've already associated   files with Windows Texture Viewer then double click to any   file. If you didn't associate them with Windows Texture Viewer then open up Windows Texture Viewer and drag one of the files to Windows Texture Viewer. Now you may see   file. Pink areas show transparent areas in image. If you don't see any pink areas, press A to see alpha channel.



If you'd like to edit textures, you need to have an image editor such as GIMP or Adobe Photoshop with DDS plugin.  (See requirements section.) 

Editing/Viewing .w2strings files
  can be found in  folder.   files contain all of the in-game text files such as journal entries, character names, item names, item descriptions etc.

In order to view them, first they must be decoded using Red Tools.

Languages:

In this tutorial, we are going to decode  file.

You should see something like this on Command Prompt: Usage: Gibbed.RED.Strings.exe [OPTIONS]+ input [output]
 * Open up Command Prompt. (Start › Run... › Open:  › OK / ⊞ Win + R › Open:   › OK)
 * Locate   which is usually located in  (32-bit) or   (64-bit).
 * Drag   to Command Prompt or write  (32-bit) /   (64-bit) to Command Prompt.
 * If you hit ENTER, you'll see options:

Options: -d, --decode              decode strings file -e, --encode              encode strings file -h, --help                show this message and exit
 * Locate   which is located in  folder in The Witcher 2 game directory.
 * Press SPACE and write  then press SPACE again.
 * Drag   to Command Prompt and press ENTER.
 * If everything is gone perfectly, you will find a file named  in   folder which is located in your game directory.
 * Now you may open the file with your favorite text editor, in this tutorial we're going to use Notepad++.

After you've opened the file, you will notice lots of texts. There are two types of text in strings files:
 * — You may think it as an ID of the text.
 * — Description, text, entry etc.

For instance, I want to find Geralt's character journal entries, then search using the keyword Geralt. Continue to search until you find these lines: 99817    99818

We can use this method for any character in the game. Now, let's examine these lines.

, usually the first line is a key for the character's name. If we make another search using the keyword 99817, we'll find the line below: Geralt of Rivia

So that means  corresponds to.

If we use the same method for second line, we'll find the line below which is the journal entry about Geralt of Rivia: Behold our hero: subjected to mutations and rigorous sword and sorcery training as a child, he has become a superhuman monster slayer. Always penniless and often disdained by those whom he protects, he wanders the world seeking work. Fate has little mercy for him, piling obstacles in his way, yet he trudges on. He has more scruples than a beggaring bum has fleas. Doubts haunt him even when a band of ruffians, knives drawn, approaches him on the highway. Is he a good man? I do not think so. Does he try to maintain his humanity? I believe he does.&lt;br&gt;You must know that Geralt of Rivia died once already, or at least everyone thought him dead. During a massacre in Rivia, he sought to defend non-humans and fell to overwhelming odds. Placed in a boat, he floated into the mist, into a realm where he finally found peace. Not for long. Because of forces to be mentioned later, Geralt returned just in time to defend the witchers’ ancient home fortress, and then embarked on a mission to recover the secrets stolen from it. Along the way he took part in a Scoia’tael uprising, shattered a powerful criminal organization, and killed the Grand Master of the Order of the Flaming Rose. All the while his fame as a lover grew. Well, that’s Geralt for you. As if all this wasn't enough, he then foiled the attempted assassination of King Foltest of Temeria and became one of the monarch's most trusted men.

We may use this simple method to find in-game text.

''This guide is a WIP and will be expanded very soon. If you have any questions about game files you may ask them on .''