Exportieren von Packs, Patches und Mods


Oft möchte man seinem Spiel nach dem deploy noch Funktionalität hinzufügen.

Beispiele hierfür sind ...

  • Herunterladbare Inhalte: die Möglichkeit, Funktionen und Inhalte zu seinem Spiel hinzuzufügen.
  • Patches: die Fähigkeit, einen Fehler zu beheben, der in einem ausgelieferten Produkt vorhanden ist.
  • Mods: anderen Personen die Möglichkeit geben, Inhalte für das eigene Spiel zu erstellen.

Diese Tools helfen Entwicklern, ihre Entwicklung über die ursprüngliche Version hinaus zu erweitern.

Übersicht der PCK-Dateien

Godot ermöglicht dies über eine Funktion namens Resource Packs (PCK-Dateien, mit der Erweiterung .pck).


  • Inkrementelle Aktualisierungen/Patches
  • DLCs anbieten
  • Mod-Unterstützung anbieten
  • Keine Quellcode-Offenlegung für Mods erforderlich
  • modularere Projektstruktur
  • Benutzer müssen nicht das gesamte Spiel ersetzen

The first part of using them involves exporting and delivering the project to players. Then, when one wants to add functionality or content later on, they just deliver the updates via PCK files to the users.

PCK-Dateien enthalten in der Regel, sind aber nicht darauf beschränkt:

  • Skripte
  • Szenen
  • Shader
  • Modelle
  • Texturen
  • Sound-Effekte
  • Musik
  • jeder andere zur Einfuhr in das Spiel geeignete Nutzerinhalt

Die PCK-Dateien können sogar ein völlig anderes Godot-Projekt sein, welches das Originalspiel zur Laufzeit lädt.

Erzeugen von PCK-Dateien

In order to pack all resources of a project into a PCK file open the project and go to Project/Export and click on “Export PCK/Zip”. Also make sure to have an export template selected while doing so.


Another method would be to export from the command line. If the output file ends with a PCK or ZIP file extension, then the export process will build that type of file for the chosen platform.


If one wishes to support mods for their game, they will need their users to create similarly exported files. Assuming the original game expects a certain structure for the PCK's resources and/or a certain interface for its scripts, then either...

  1. The developer must publicize documentation of these expected structures/ interfaces, expect modders to install Godot Engine, and then also expect those modders to conform to the documentation's defined API when building mod content for the game (so that it will work). Users would then use Godot's built in exporting tools to create a PCK file, as detailed above.
  2. The developer uses Godot to build a GUI tool for adding their exact API content to a project. This Godot tool must either run on a tools-enabled build of the engine or have access to one (distributed alongside or perhaps in the original game's files). The tool can then use the Godot executable to export a PCK file from the command line with OS.execute(). It makes the most sense for the game to not use a tool-build though (for security) and for the modding tools to do use a tool-enabled engine build.

Opening PCK files at runtime

To import a PCK file, one uses a one-liner. Keep in mind, there is no error or exception if the import fails. Instead, one might have to create some validation code as a layer on top. The following example expects a “mod.pck” file in the directory of the games executable. The PCK file contains a “mod_scene.tscn” test scene in its root.

func _your_function():
    # Now one can use the assets as if they had them in the project from the start
    var imported_scene = load("res://mod_scene.tscn")
private void YourFunction()
    // Now one can use the assets as if they had them in the project from the start
    var importedScene = (PackedScene)ResourceLoader.Load("res://mod_scene.tscn");


By default, if you import a file with the same file path/name as one you already have in your project, the imported one will replace it. This is something to watch out for when creating DLC or mods (solved easily with a tool isolating mods to a specific mods subfolder). However, it is also a way of creating patches for one's own game. A PCK file of this kind can fix the content of a previously loaded PCK.

To opt out of this behavior, pass false as the second argument to ProjectSettings.load_resource_pack().


For a C# project, you need to build the DLL and place it in the project directory first. Then, before loading the resource pack, you need to load its DLL as follows: Assembly.LoadFile("mod.dll")


This tutorial should illustrate how easy adding mods, patches or DLC to a game is. The most important thing is to identify how one plans to distribute future content for their game and develop a workflow that is customized for that purpose. Godot should make that process smooth regardless of which route a developer pursues.