Skip to content

Modpack

ACGaming edited this page Mar 16, 2023 · 5 revisions

Modpack configuration

The special file modpack.json contains metadata about the modpack itself. For aesthetic purposes, you can provide a name and optionally an icon:

{
	"packName": "My Modpack",
	"icon":
	{
		"path": "my-logo.png",
		"width": 64,
		"height": 64
	}
}

Both icon and name will be displayed in the installation window, they however have no further effects.

Icon

The icon can be a path like: my-pack-icon.png (the path of the icon file is relative to the minecraft root directory, so config/mod-director/logo.png would load the logo from the ModDirector config directory). Alternatively, if you want to store your icon online, you may use an url like: https://modpacks.com/my-pack-icon.png. width and height are optional, if not set the image own dimensions will be used.

The supported formats depend on the JVM, however, png will usually be safe to use everywhere.

This feature is supported in version 1.4+

Versioning

Modpacks can be versioned by two keys: localVersion and remoteVersion.

The modpack version can either be directly specified in the config file by using localVersion:

{
	"packName": "My Modpack",
	"icon":
	{
		"path": "my-logo.png",
		"width": 64,
		"height": 64
	}
	"localVersion": "1.2.4"
}

Or it can be specified remotely by using remoteVersion, which needs to link to a single-line text file containing the modpack version:

{
	"packName": "My Modpack",
	"icon":
	{
		"path": "my-logo.png",
		"width": 64,
		"height": 64
	}
	"remoteVersion": "https://gist.githubusercontent.com/ACGaming/24f9fae4e87ffe55fccbd4bd38347339/raw/0cd99def858c9cc22d087057f3efc5e8e24cd72f/version_test.txt"
}

For specific modpack update use cases, you might want to compare the local version with the remote version to avoid corruption. The refuseLaunch key is utilised to prevent the game from launching when a version mismatch is detected:

{
	"packName": "My Modpack",
	"icon":
	{
		"path": "my-logo.png",
		"width": 64,
		"height": 64
	}
	"localVersion": "1.2.4",
	"remoteVersion": "https://gist.githubusercontent.com/ACGaming/24f9fae4e87ffe55fccbd4bd38347339/raw/0cd99def858c9cc22d087057f3efc5e8e24cd72f/version_test.txt",
	"refuseLaunch": true
}
Clone this wiki locally