Champollion

October 3, 2023 ยท View on GitHub

Champollion is a decompiler for the Papyrus script language used in Skyrim, Fallout 4, Fallout 76, and Starfield. It aims to produce a Papyrus Script file (.psc) from a .pex binary file. The decompiled script should recompile to a functionally equivalent PEX binary.

Usage

Champollion is a CLI-only program.

Parameters

Champollion <files or directories> [-p <output directory>] [-a [<assembly directory>]] [-c] [-t]

ShortLongDescription
-p output directory--psc output directorySet the output directory, where Champollion will write the decompiled files
-a [assembly directory]--asm [assembly directory]Champollion will write an assembly version of the PEX file in the given directory, if one. The assembly file is an human readable version of the content of the PEX file
-c--commentThe decompiled file will be annotated with the assembly instruction corresponding to the decompiled code lines.
-t--threadedChampollion will parallelize the decompilation. It is useful when decompiling a directory containing many PEX files.
-r--recursiveRecursively scan specified directory(s) for pex files to decompile
-s--recreate-subdirsRecreates directory structure for script in root of output directory (Fallout 4 only, default false)
-e--headerWrite header to decompiled psc file
-g--traceTrace the decompilation and output results to rebuild log
--no-dump-treeDo not dump tree for each node during decompilation tracing (requires --trace)
--debug-funcsDecompile inoperative debug and compiler-generated functions (default false)
--no-debug-lineDo not comment with debug info line numbers on script lines (default false)
-i--print-infoPrint header info from the specified PEX file(s) and exit
--print-compile-timePrint the compile time of the script in format of {filename}: {time_integer} and exit
-v--verboseVerbose output
-V--versionOutput version number
-h--helpPrint help message

Build Dependencies

  • Boost (installable through vcpkg)
  • CMake
  • A C++17 compiler (for Windows you need at least Visual Studio 2019)

Copyright (c) 2022 Nikita Lita

Copyright (c) 2015 Orvid King

Copyright (c) 2013 Paul-Henry Perrin

See LICENSE for the LGPL V3 license.