Coder Social home page Coder Social logo

Comments (4)

hhyyrylainen avatar hhyyrylainen commented on June 30, 2024 1

Ty, that makes sense. I think I misunderstood how PckTool was working. I'm used to GDRETools which outputs files like project.godot rather than project.binary. So I assumed that the file in the PCK was already project.godot and that PckTool was encrypting it or something. But actually, GDRETools decompiles those files for you, whereas PckTool just works with the files in the PCK as they are.

That's correct. I have not used any Godot reverse engineering tools but from what I've heard second hand is that they include various tools to decode Godot format images back to png files etc. so they are useful for a variety of tasks.

GodotPckTool is meant to be just a really lightweight tool to work with the Godot .pck file format by extracting, modifying and creating .pck files, which is enough if you have all of the right data but it isn't in the right .pck file.

The build scripts I've written for Thrive can extract and remove large files from a .pck and store those separately, then the Thrive Launcher can download those separate files (and cache them, this saves a ton on download bandwidth) and use this tool to put those extracted files back into the .pck file to get it back to the original state.


I'll close this issue now unless you think there's a bug in overwriting existing files in a .pck file.

from godotpcktool.

ithinkandicode avatar ithinkandicode commented on June 30, 2024

Edit: I was mistaken. I didn't realise that when you replace project.godot, you actually have to provide an binary version (project.binary). I was trying to provide the non-binary version (project.godot).

Is there a way to add a file without needing to use the binary version?

Or alternatively, how does one go about making a binary version that would be compatible with GodotPckTool? My current workflow is to export a PCK then unpack it with GodotPckTool to get the project binary, but I'm sure there's an easier way!

from godotpcktool.

hhyyrylainen avatar hhyyrylainen commented on June 30, 2024

Is there a way to add a file without needing to use the binary version?

This tool is designed for simplicity (it is used by https://github.com/Revolutionary-Games/Thrive-Launcher to be able to save on download size by reusing already downloaded content files). As such the tool doesn't understand any of the Godot internal formats so it isn't possible for it to generate a project file.

Or alternatively, how does one go about making a binary version that would be compatible with GodotPckTool? My current workflow is to export a PCK then unpack it with GodotPckTool to get the project binary, but I'm sure there's an easier way!

I think that's the easiest way. At least that's what I'd do if I needed to for example get an image converted to a Godot binary format. I'd create a new project where I import that image, then export that and extract it from the .pck file and copy it to the pack.

Overwriting files should be as simple as specifying a .pck file to repack and then specifying additional files on the command line. The tool shouldn't care if something already exists in the .pck file when adding new content and it should just replace anything that already exists.

from godotpcktool.

ithinkandicode avatar ithinkandicode commented on June 30, 2024

Thank you, that's incredibly helpful.

The modding team I'm working with found a good way to get the project.binary: we run a dumper script via the --script arg, which modifies the project settings with various ProjectSettings methods (.get_property_list, .get_setting, .set_setting) until they match what we need, then we use ProjectSetting.save_custom("project.binary") to save a customised version of the binary file. Ofc this only works for this specific file, but I'm mentioning it in case someone else has this very specific requirement too.

As such the tool doesn't understand any of the Godot internal formats so it isn't possible for it to generate a project file.

Ty, that makes sense. I think I misunderstood how PckTool was working. I'm used to GDRETools which outputs files like project.godot rather than project.binary. So I assumed that the file in the PCK was already project.godot and that PckTool was encrypting it or something. But actually, GDRETools decompiles those files for you, whereas PckTool just works with the files in the PCK as they are.

from godotpcktool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.