Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Installation policy

Janrupf edited this page Oct 11, 2021 · 3 revisions

About

The installation policy describes certain properties which apply when installing the mod. It also allows to describe that a mod is optional and may be select as a single mod or in a group of mods.

Usage

The installation policy is contained in the installationPolicy key:

{
    "url": "https://my-mod.com/download/mod.jar",
    "installationPolicy": {
       "continueOnFailedDownload": false,
       "optionalKey": "$",
       "selectedByDefault": true,
       "name": "My Mod",
       "description": "My Mod is an optional mod in this modpack to demonstrate mod director functionality"
    }
}

Supported keys:

continueOnFailedDownload

Usually ModDirector aborts the game launch process when a mod fails to download. If this keys is set to true, the launch process continues even on failed downloads. ModDirector will attempt to download the mod on the next start. The default value is false.

optionalKey

Mods may be made optional. If the optional key is "$", a mod may be selected for installation on the first start.

Any value other than "$" will form an optional group. In optional groups only one of the mods may be selected by the user. Example for a group named Performance:

optifine.url.json (simplified for demonstration purpose):

{
    "url": "https://link-to/optifine",
    "installationPolicy": {
        "optionalKey": "Performance"
    }
}

sodium.url.json (simplified for demonstration purpose):

{
    "url": "https://link-to/sodium",
    "installationPolicy": {
        "optionalKey": "Performance"
    }
}

With the above example the user would be asked whether he wants to install OptiFine or Sodium on the first start.

selectedByDefault

This key determines whether an entry is selected already when asking the user whether he wants to install the mods. For groups, this determines which mod is the default mod of a group.

For mods not in a group, the default value is true.

name

When allowing the user to select mods, the name of the mod is displayed. ModDirector tries to determine the name automatically, however, it is recommended to set this key in order to provide a proper display name.

description

A small description is displayed when allowing the user to select which mods to install. In this description you should make clear what the mod is and why the user might want to install it.

This feature is supported in version 1.5+

Clone this wiki locally