These tools open, decrypt, and extract data from Star Citizen .p4k files.
| Tool | Windows | Linux | macOS |
|---|---|---|---|
unp4k |
Supported | Supported | Supported |
unforge.cli |
Supported | Supported | Supported |
unp4k.fs |
Supported | Not supported | Not supported |
unp4k.fs uses Dokan, so it remains Windows-only.
- .NET SDK 8.0 or newer (10.0 recommended for publish artifacts).
- For Linux/macOS runtime extraction of ZSTD-compressed entries:
- Linux: install
libzstd(sudo apt-get install -y libzstd1on Debian/Ubuntu). - macOS: install
zstd(brew install zstd).
- Linux: install
dotnet restore
dotnet build src/unp4k/unp4k.csproj -c Release -f net10.0
dotnet build src/unforge.cli/unforge.cli.csproj -c Release -f net10.0Examples:
dotnet publish src/unp4k/unp4k.csproj -c Release -f net10.0 -r win-x64
dotnet publish src/unp4k/unp4k.csproj -c Release -f net10.0 -r linux-x64
dotnet publish src/unp4k/unp4k.csproj -c Release -f net10.0 -r osx-arm64
dotnet publish src/unforge.cli/unforge.cli.csproj -c Release -f net10.0 -r win-x64
dotnet publish src/unforge.cli/unforge.cli.csproj -c Release -f net10.0 -r linux-x64
dotnet publish src/unforge.cli/unforge.cli.csproj -c Release -f net10.0 -r osx-arm64unp4k.fs publish remains Windows-only:
dotnet publish src/unp4k.fs/unp4k.fs.csproj -c Release -f net10.0 -r win-x64Build the local builder image:
docker build --no-cache -f Dockerfile.build -t unp4k-builder .Run the build and write artifacts to ./artifacts:
mkdir -p artifacts
docker run --rm -v "$PWD/artifacts:/artifacts" unp4k-builderOverride target RIDs if needed:
docker run --rm \
-e RIDS="linux-x64 osx-arm64" \
-v "$PWD/artifacts:/artifacts" \
unp4k-builder- Windows GUI style: drag
Data.p4kfrom theStarCitizen\LIVEfolder ontounp4k.exe. - CLI: run
unp4k <path-to-Data.p4k> [filter].
Example:
unp4k /path/to/Data.p4k "*.xml"The filter does not fully support wildcards. *.ext works for extension filtering, but broader glob behavior is limited.
p4k files used by Star Citizen are Zip archives.
Star Citizen uses multiple archive modes, including STORE, DEFLATE, and custom ZSTD handling.
Some archive data is additionally encrypted; these tools use the known CryEngine-compatible key to decrypt supported entries.
Inside .p4k, XML files are often stored as CryXML rather than raw XML.
unforge.cli can deserialize CryXML and DataForge (.dcb) formats into XML output.