Mod Packaging Methods
Estimated reading time: 2 minutesThere are three ways to package Mod files into .mod.zip: manual, Node.js automation, and Docker.
Manual Packaging
Simplest method: use a Zip-capable tool (e.g. 7-Zip).
Steps
1. Edit boot.json with your preferred editor.
2. In the directory containing boot.json, use the compression tool to pack boot.json and all referenced files into a zip.
3. Set options:
- Format: Zip
- Algorithm: Deflate
- Compression level: Higher is better
- Password: None
4. Run the compression.
5. Inspect the zip:
boot.jsonis at the root- Paths in
boot.jsonmatch the zip layout - Compression is Store or Deflate only
6. (Optional) Rename to ModName.mod.zip.
7. Load the Mod in the Mod manager.
Besides .mod.zip, ModLoader supports .modpack binary format. See ModPack Format.
:::danger Common mistakes
boot.jsonis not at zip root (nested in a folder)- Paths in
boot.jsondon't match zip layout - Using an unsupported compression algorithm :::
Automated Packaging (Node.js)
Requires Node.js and Yarn.
Build the packaging script
Run packaging
From the Mod directory (where boot.json lives):
Example:
Output is a zip named from the Mod name in boot.json:
Automated Packaging (Docker)
Requires Docker and access to ghcr.io.
Pull the image
Run packaging
From the Mod directory (where boot.json lives):
Output is a zip in the current directory:
Environment Setup
If Node.js is not installed:
- Download and install Node.js from nodejs.org
- Run
corepack enablein the terminal - Done
