Repository navigation
Mod Packers
Mod Packers are .gd files you can use to pack your mod into a pck. MoDot ships a default packer.
You can manually run it in the editor under Project Settings -> Pack Mod.
MoDot also supports running mod packers via the command line. Use --pack-mod followed by the packer name and output file.
--pack-mod <packer> <output.pck> [-- args for the packer]
The template uses this to pack the project and copy it to its destination after the Publish target is done.
Instead of packing the entire project, the default packer deviates in the following ways:
-
Scope: Only packs
res://<mod name>/, the.csand.cs.uidfiles ofres://<mod name>Code/, and folders passed as arguments after--. - Dependencies: Files your mod needs from elsewhere in the project are packed.
-
Game Files: Never packed! Any file whose context is
mountedis skipped. - project.godot: Not packed, the game has its own.
Additional Notes:
-
Everything in
res://<mod name>/is packed. This includes files such as.psdor.kra. - Scenes and GDScripts are packed as is, no converting like Godot usually does. This slightly increases pack size but makes it easier for others to inspect your mod.
The standard packer might be enough for your needs, but you can also write and reuse your own packer if you want to customize the packing process.
Mod packers are stored in the mod_packers folder next to the MoDot.exe. You can add your own packers by creating a new folder and placing your compiled dll inside it. Similar to pre-patches, MoDot finds packers not through scanning for dlls, but through the mod_packer_manifest.json files. Make sure you add this file next to your dll.
Here is the content of the mod_packer_manifest.json file for the default packer:
{
"id": "modot.default",
"name": "MoDot default",
"script": "pack_mod.gd",
"author": "Quipsol",
"version": "v1.0.0",
"description": "Packs res://<mod name>/ with its imported files, the .uid files of res://<mod name>Code/, and the project files they depend on, never the game's.\nArguments after \"--\" on the command line are extra folders to pack, e.g. addons/my_addon."
}id must be unique and script must match the file name of your script (including the -gdextension this time).
This wiki is still under construction, thank you for your patience