hhyyrylainen / GodotPckTool

Standalone tool for extracting and creating Godot .pck files
MIT License
383 stars 31 forks source link

Embedded pck files #26

Open KANAjetzt opened 1 year ago

KANAjetzt commented 1 year ago

Hi, first of all thanks for this great tool!

Is it possible to access the pck file if it is embedded in to the .exe?

I'm co creating a mod loader and as ithinkandicode mentioned in #25 we are using it with great success to add the mod loader autoload at the right spot to the project.binary.

Now we have the issue that some games embed the pck and it looks like we cant access that with the PckTool.

ithinkandicode commented 1 year ago

I second that this tool is great 🤗

For reference, extracting the PCK from the EXE is possible with GodotPCKExplorer. We'd like to limit our dependencies if possible, and if you think this would be a helpful/viable feature to add to PckTool.

hhyyrylainen commented 1 year ago

This sounds like a pretty doable feature. One tricky part is that I assume the executable layouts are different enough that separate code for finding the start of the embedded pck will be needed for Linux, Windows and mac.

KANAjetzt commented 1 year ago

Great news!

Can you give us an estimate on how long this might take to implement? Totally understandable if you don't have the time right now. I might be able to find someone to create a PR for this issue.

hhyyrylainen commented 1 year ago

Well, so far I've only implemented features I need myself for this tool so... I don't really plan on working on this feature myself but I'll accept a pull request adding this feature. The game I need to use this tool on, Thrive, is one I'm part of developing so there's no foreseeable need to have embedded pck support for my use case.

KANAjetzt commented 1 year ago

Makes a lot of sense. Thanks for the quick response 👍

nikitalita commented 1 year ago

You can steal the implementation that I have here for this: https://github.com/bruvzg/gdsdecomp/blob/master/utility/gdre_packed_source.cpp#L140