The Witcher wiki now has a light themed alternative for the wiki skin. To check it out, go to Special:Preferences, then choose the "Appearance" tab and click on the radio button next to "Hydra".

Uncooking The Witcher 3

From Witcher Wiki
Jump to: navigation, search

The initial step of modding many game assets is getting at them. Since many assets are packed/cooked, you'll need to unpack/uncook them. MODkit gives a commandline utility wcc_lite.exe that will do this. Other community tools that wrap wcc_lite.exe, such as ModKitchen exist, that make using it much easier.

Keep in mind that uncooking the entire game will take a while.

Using wcc_lite.exe to Uncook[edit | edit source]

Uncooking with wcc_lite.exe

After installing MODkit, open a cmd window and navigate to the directory ("\Witcher 3 Mod Tools\bin\x64"). An example invocation of wcc_lite would be:

wcc_lite.exe uncook -indir="D:\Games\The Witcher 3 Wild Hunt\content" -outdir="D:\Uncooked" -imgfmt=png -skiperrors

The -skiperrors option is important here, as wcc_lite will stop on the first error that it experiences and you will generally experience some errors (such as collisions files not existing).

Note: Clicking in the window will pause the process (even accidentally!), hit enter to resume.

Using ModKitchen to Uncook[edit | edit source]

Uncooking with ModKitchen

Start ModKitchen and select your wcc_lite.exe location, and where you'd like the uncooked files to appear. Make sure to select "Skip errors" and hit "Uncook!".

Useful Batch Script For Uncooking[edit | edit source]

This batch scripts uncooks base game, 16 DLCs and 2 expansions to different folders. Just make a new txt file in modkit\bin\x64 folder, paste it there, set your GamePath and UncookedPath, then save it, change file extension to .bat and run it.

set GamePath="C:\Games\The Witcher 3 Wild Hunt"
set UncookedPath="C:\The Witcher 3 Uncooked"
wcc_lite uncook -indir=%GamePath%\Content -outdir=%UncookedPath%\vanilla -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\DLC1\Content -outdir=%UncookedPath%\DLC\DLC1 -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\DLC2\Content -outdir=%UncookedPath%\DLC\DLC2 -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\DLC3\Content -outdir=%UncookedPath%\DLC\DLC3 -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\DLC4\Content -outdir=%UncookedPath%\DLC\DLC4 -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\DLC5\Content -outdir=%UncookedPath%\DLC\DLC5 -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\DLC6\Content -outdir=%UncookedPath%\DLC\DLC6 -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\DLC7\Content -outdir=%UncookedPath%\DLC\DLC7 -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\DLC8\Content -outdir=%UncookedPath%\DLC\DLC8 -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\DLC9\Content -outdir=%UncookedPath%\DLC\DLC9 -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\DLC10\Content -outdir=%UncookedPath%\DLC\DLC10 -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\DLC11\Content -outdir=%UncookedPath%\DLC\DLC11 -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\DLC12\Content -outdir=%UncookedPath%\DLC\DLC12 -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\DLC13\Content -outdir=%UncookedPath%\DLC\DLC13 -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\DLC14\Content -outdir=%UncookedPath%\DLC\DLC14 -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\DLC15\Content -outdir=%UncookedPath%\DLC\DLC15 -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\DLC16\Content -outdir=%UncookedPath%\DLC\DLC16 -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\bob\Content -outdir=%UncookedPath%\bob -imgfmt=png -skiperrors
wcc_lite uncook -indir=%GamePath%\DLC\ep1\Content -outdir=%UncookedPath%\ep1 -imgfmt=png -skiperrors
pause

Using wcc_lite.exe to uncook The Witcher 3 resources on Linux[edit | edit source]

Linux users can use wcc_lite.exe through Wine. First, make sure to install ModKit. For convenience, install it into the same Wine prefix as your game installation.

For example, if your game's Wine prefix is $HOME/games/wine/the_witcher_3/prefix do the following from your terminal (using setup.exe from the ModKit):

export WINEPREFIX=$HOME/games/wine/the_witcher_3/prefix
wine setup.exe

Let's say you selected to install ModKit into C:\modkit. In your regular terminal, navigate to the location of the ModKit binary, assuming you run the previous command, including exporting the WINEPREFIX variable:

cd $WINEPREFIX/drive_c/modkit/bin/x64

Now you can run ModKit, for example to see all its commands like this:

wine wcc_lite.exe

Let's say the actual game is installed in your prefix under C:\the_witcher_3. You can uncook something like this (where <output-dir> is some directory where to place the result):

wine wcc_lite.exe uncook -indir=C:/the_witcher_3/content/content0/bundles -outdir=<output-dir> -infile=C:/the_witcher_3/content/content0/bundles/xml.bundle

See other example above for using wcc_lite.exe. Make sure to reference it as wcc_lite.exe when running from Linux terminal, since Wine binary itself is expecting exact file names.

It's better to unset WINEPREFIX variable after you are done (or just close that terminal session), to avoid messing up your prefix by mistake with further wine invocations.

Uncooking item codes[edit | edit source]

if you want to discover various item codes, you'd need to uncook XML files with item definitons for the main game and expansions.

  • Main game bundle: content/content0/bundles/xml.bundle
  • Hearts of Stone bundle: dlc/EP1/content/bundles/blob.bundle
  • Blood and Wine bundle: dlc/bob/content/bundles/blob.bundle

Uncook the bundles:

wcc_lite.exe uncook -indir=<game_path>/content/content0/bundles -outdir=<out-dir-main> -infile=<game_path>content/content0/bundles/xml.bundle
wcc_lite.exe uncook -indir=<game_path>/dlc/EP1/content/bundles -outdir=<out-dir-hos> -infile=<game_path>/dlc/EP1/content/bundles/blob.bundle
wcc_lite.exe uncook -indir=<game_path>/dlc/bob/content/bundles -outdir=<out-dir-baw> -infile=<game_path>/dlc/bob/content/bundles/blob.bundle

After that, items' XML definitions will be found in

<out-dir-main>/gameplay/items
<out-dir-main>/gameplay/items_plus

<out-dir-hos>/dlc/ep1/data/gameplay/items
<out-dir-hos>/dlc/ep1/data/gameplay/items_plus

<out-dir-baw>/dlc/bob/data/gameplay/items
<out-dir-baw>/dlc/bob/data/gameplay/items_plus

You can search through the resulting XMLs using something that understands UTF-16, for example ripgrep (rg).