A GDExtension for Godot 4.4+ that enables loading patch PCK files early during game startup.
Godot 4.4 introduced creating patch PCK files, but doesn't provide an built-in way to load them. This extension solves that problem by loading patches at MODULE_INITIALIZATION_LEVEL_CORE, allowing patches to properly override GDScript files, .NET Assemblies*, Scenes, and Resources.
- Automatically creates a
patchesdirectory beside your game executable - Loads PCK patch files in a specified order based on filename
- Handles errors with customizable alerts
- Download the latest release for your platform
- Add the extension to your project
- Export your game
- Export a patch PCK file from your Godot project containing the updated files Make sure you include your base PCK and all existing patches in the "Patches" tab to reduce patch file size and avoid unexpected behaviour!
- Name the PCK file following this pattern:
patch_<order>.pckorpatch_<order>_additionalInfo.pck<order>is a number that determines loading priority (lower numbers load first)- Example:
patch_1.pckloads beforepatch_2.pck - Example with description:
patch_1_fixSomeBug.pck
- Place the PCK file in the
patchesdirectory beside your game executable Note: Patches will only be applied once at game startup.
The extension adds the following project settings:
-
patch_loader/settings/alert/show_on_error: Show an alert dialog on error
(default: true) -
patch_loader/settings/alert/title: Title for the error alert
(default: "Launch Error") -
patch_loader/settings/alert/message: Message for the error alert
(default: "An unexpected error during loading has occurred and the game cannot start.") -
patch_loader/settings/crash_on_error: Whether to crash on error
(default: true)
If your project uses C#, you must enable dotnet/embed_build_outputs when exporting your project to ensure .NET assemblies can be overridden by patches.
- GDExtension library files (.dll, .so, .dylib) cannot be patched with this method
PL-1: Lacking permissions to create patches directoryPL-2: Patches directory not foundPL-3: Invalid patch filenamePL-4: Invalid patch orderPL-5: Patch file not foundPL-6: Patch load error
MIT