This page contains information on the general use of Wolvenkit's command line interface. For more specific information, please see the corresponding sub-pages:
As of January 2024, Wolvenkit.CLI does not work under Linux. You can run it though qemu and virtofs.
Display general help/list all commands: --help
Display help for a specific command: archive -h
You can now install and update the Wolvenkit Command Line Tools (wolvenkit.cli) as a dotnet global tool. The console can be used anywhere directly from the command line, with no custom installation, and easy update.
Open command prompt/powershell and type in:
dotnet tool install -g wolvenkit.cli
WolvenKit Console can now be run from anywhere using CMD/Powershell:
wolvenkit.cli uncook -p "D:\SteamLibrary\steamapps\common\Cyberpunk 2077\archive\pc\content\basegame_1_engine.archive"
For updates to WolvenKit console, open CMD/Powershell and type:
dotnet tool update --global wolvenkit.cli
To process multiple .archive files (for e.g. extracting duplicate textures), write yourself a batch file:
How to unbundle, uncook, rebuild and pack texture files
Extract the textures with uncook -p
into a folder of your choice. TGA is recommended for CLI version 1.5.1 (latest).
Edit the TGA file with software such as Photoshop or Krita.
Choose the textures you wish to repack and copy them to another folder (e.g. MODDED
), keeping the subfolder structure (the \base folder needs to be the first folder inside the MODDED folder)
Both .tga and .xbm files are required in the MODDED folder
e.g. judy_body_wet.xbm
AND judy_body_wet.tga
Do not replace existing vanilla archives
Import
Run import -p "MODDED FOLDER PATH" -k
this will apply the new TGA texture to the XBM.
Pack
Run pack -p "MODDED FOLDER PATH"
, this will create a new .archive file.
Install
Copy the packed .archive file into the mod folder of your game: Cyberpunk 2077\archive\pc\mod
(create this folder if necessary)
Extracting and playing from archives
This page is about the command line interface. For the Wolvenkit GUI, check Video and Audio
Required files are contained within these archives
audio_1_general.archive
audio_2_soundbanks.archive
basegame_5_video.archive
lang_en_voice.archive
Using the tool, decompress basegame_5_video.archive located at: <gamedir>\Cyberpunk 2077\archive\pc\content
.
Once extracted, they can be viewed via RADTools as Bink Videos and converted to other formats.
ww2ogg can be used to convert decompressed archive audio to .ogg through command line, as well as Revorb (both of these tools have Linux versions that can be found here) to get smaller and cleaner files that can be played via other media players such as VLC. ffmpeg can be used for more convenient playback.
To execute conversion:
.\ww2ogg.exe "<!AudioFilePath!>.wem" --pcb packed_codebooks_aoTuV_603.bin
Make sure to include the --pcb
argument – you will only get gibberish if you don't.
The files are optimized for people with audio dampener. If you don't pack any, turn down your volume. You have been warned!
A combination of these tools can be found at the Wwise Audio Tools repository which has a command line tool that can be downloaded from the repository or installed through the AUR. It has Linux and Windows support and converts WEM files to OGG without the hassle of the external PCB file or having to run through multiple programs for a clean output.
./wwtools
converts all WEMs in the current directory to OGG files
./wwtools wem [input.wem] (--info)
will convert the specified WEM to OGG and if the optional info flag is used it will print the information about the file and exit.
Playback through ffmpeg:
ffplay.exe <!AudioFilePath!>.ogg
Foobar2000 can also be used along with its vgmstream plugin.
How to configure Wolvenkit Console
You edit the settings for Wolvenkit.CLI by editing appsettings.json
in a text editor.
Runnning Wolvenkit.CLI settings
will open that for you.
As a rule of thumb, the settings correspond to their names in the Wolvenkit UI in CamelCase.
TODO: Need much better documentation here. How do I set the depot path again?
An example file (as of PL) can look like this:
The supported arguments can be found in the Wolvenkit repository for both Import and Export.
Display help for a specific command: e.g. unbundle -h
For a way to configure Wolvenkit CLI, see the Settings page.
unbundle -p "PATH TO ARCHIVE" -o "OUTPUT PATH" -w *.mesh
Extracts all files from archive
-w
Use optional search pattern (e.g. *.ink), if both regex and pattern is defined, pattern will be prioritized.
-r
Use optional regex pattern
--hash
: Extract single file with a given hash. If a path is supplied, all hashes will be extracted
The unbundle
command also takes folder paths as input (will recursively extract all .archives in a folder), or a list of paths (e.g. unbundle -p "C:\MODDING\archives\basegame_4_gamedata.archive" "C:\MODDING\archives\basegame_1_engine.archive"
You can filter the files to extract from an archive with the -w
(Wildcard) or the -r
(Regex) filters: unbundle -p "PATH TO ARCHIVE" -w *.mesh
e.g. will only extract files with the extension .mesh.
uncook --uext png -p "PATH TO ARCHIVE" -o "OUTPUT PATH" -or "RAW FOLDER OUTPUT PATH"
Extract all textures from archive, common formats (tga, bmp, jpg, png, dds) supported
-w
Use optional search pattern (e.g. *.ink), if both regex and pattern is defined, pattern will be prioritized.
-r
Use optional regex pattern
-hash
: Extract single file with a given hash. If a path is supplied, all hashes will be extracted
--flip
Use boolean option (e.g. 'true' or 'false') : Flip textures vertically (can help with legibility if there's text)
--forcebuffers
: Force uncooking to buffers for given extension. e.g. mesh
The REDengine extension for textures is XBM
There are a number of files that support Uncook, including mesh, csv, xbm, and mlmask.
Cyberpunk textures use DDS format, but WolvenKit Console supports conversions to the most common image formats such as TGA, PNG, etc.
For example, textures can be converted to PNG using:
uncook -p "PATH TO ARCHIVE" --uext png
The same options apply here as well: When using
uncook -p "PATH TO ARCHIVE" -w *.xbm
Only files with the XBM extension will be uncooked.
import -p "INPUT PATH" -o "OUTPUT PATH" --keep
Convert raw files to REDengine files
-p can be a folder or file
-o (optional) is the output path where the REDengine files are created
-k (optional) use this parameter if you have already existing REDengine files in your output folder
When using -k you need both .dds/.buffer and .xbm/.mesh files
e.g. judy_body_wet.xbm AND judy_body_wet.dds
When using -o, then the REDengine files need to be located in that folder, while the raw files have to be in the folder specified with -p.
export --uext png -p "PATH TO FILE"
Convert REDengine file (mesh, xbm) to the corresponding raw files (gltf/glb, dds)
You can specify a folder to export, or multiple files pack -p "FILE 1" "FILE 2"
There are a number of files that support exporting: .mesh, .csv, .xbm, .mlmask and many more.
The in-game textures have .dds fileformat, but WolvenKit Console supports conversions to the most common image formats (png, jpg, tga). E.g. to convert the game textures to png use: export -p "PATH TO FILE" --uext png
pack -p "MODDED FOLDER PATH"
Pack a folder of REDengine files: this will create a new .archive file.
You can specify multiple folders to pack: pack -p "FOLDER 1" "FOLDER 2"
Do not replace existing vanilla archives
Convert a REDengine file into human readable form: cr2w -s "<PATH TO FILE>"
Convert a json file into a REDengine file: cr2w -d "<PATH TO JSON>"
Convert .tweak files (in YAML format) to a TweakDB .bin file that can be loaded with TweakDBext
tweak -p "<input directory>" -o "<output directory>"
Defaults to current directory if -p
or -o
are not specified.
The .tweak file must be in the following format, with either flats
or groups
declared:
Flats for the groups (also called records) are automatically created by appending the member's name to the end of the record's name. Using the example above, the following flats would be created:
A group's type
(Vehicle
in the example above) should exist in CP2077 for it to be useful. The compiler will not warn you if the type doesn't exist, but TweakDBext will let you know upon loading it (watch for messages in red4ext\logs\tweakdb.log
). Generally a TweakDB type is the RTTI type without gamedata
or _Record
(a full list can be see here, where the gamedata
is already omitted from the filenames) - as an example, the a Vehicle
's RTTI type is gamedataVehicle_Record
.
Flats and group members must have one of the following as a base type
:
Types can be prepended with array:
to create an array, like array:String
in the example. Arrays can be formatted with hyphens & newlines as in the example, or specified with square brackets and commas. The same array could look like this:
Strings can left unenclosed, and optionally enclosed in double quotes, but if you're using paths with raRef:CResource
, you'll need to double-up the \
, like this:
raRef:CResource
also accepts integers (ones that you might pull from a tweakdb output) in place of the path, like this:
TweakDBID types can be the full path of the flat/group:
Or the shorthand that uses the hash & length, both in hexadecimal:
Vector3
are declared like this, using a capital XYZ
: