hhyyrylainen / GodotPckTool

Standalone tool for extracting and creating Godot .pck files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for Godot 4 PCK files

aaronfranke opened this issue · comments

I tried to use this tool to extract a PCK file from a Godot 4 project on Linux, and I got an error that the version is unsupported:

$ ../install/bin/godotpcktool mirror-client.pck 
ERROR: pck is unsupported version: 2
ERROR: couldn't load pck file: mirror-client.pck

Please add support for extracting PCK files from Godot 4.

You can use GDRE tools as a reference for this: https://github.com/bruvzg/gdsdecomp/blob/master/utility/gdre_packed_source.cpp#L226

basically, in format version 2, they added a couple of additional fields to the header (changing the header length; they didn’t bother to use the reserved fields for some reason) and an additional flags field to every file entry.

they also added encryption support, which is here as well.

At the latest I'll add support for this when Thrive is moving to Godot 4 (relevant issue for that: Revolutionary-Games/Thrive#2998).

Does anyone have a Godot 4 .pck file to test with? A PR was just opened but Thrive is not on Godot 4 yet so I don't have a file to really verify things work.

I just put out a new version of this tool that now supports reading Godot 4 .pck files: https://github.com/hhyyrylainen/GodotPckTool/releases/tag/v1.9