1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2024-11-21 11:47:03 +01:00
6 Optional Features
sk89q edited this page 2015-07-24 01:32:40 -07:00

You can make certain files optional that the user may opt into installing.

Optional Features

There are two ways to make files optional:

Via the "Edit Config" Dialog

You can use the Modpack Creator to adjust optional features.

  1. Use "Edit modpack.json" option under the "Edit" menu.
  2. Go to the "Optional Features" tab.
  3. Add features using the "New" button.

The feature configuration dialog will look like:

Feature Configuration

  • Feature Name: This will appear for the user as the feature name. You can put any valid character here.
  • Recommendation: Optionally pick a tag that gets displayed next to the feature (either "starred" or "avoid").
  • Selected by Default: Sets whether the feature is enabled by default the first time it appears.
  • Description: The user can read the description to consider whether he or she wants to use it.
  • Include Patterns: A list of paths (wildcard accepted) that will be included as part of this feature.
  • Exclude Patterns: Undoes anything that was included using "Include Patterns."

Via info.json files

These files are placed alongside the file to make them optional.

In them, they contain:

{
  "feature": {
    "name": "SomeMinimap",
    "description": "SomeMinimap gives you a cool minimap.",
    "recommendation": "starred",
    "selected": true
  }
}

Naming the Files

If the .jar is named CoolGrass-1.0.jar, you can name the .info.json file one of many choices:

  • CoolGrass-1.0.jar.info.json
  • CoolGrass-1.0.info.json
  • CoolGrass-1.info.json
  • CoolGrass.info.json
  • CoolGra.info.json
  • CoOlGRa.info.json

As you see, you can simply use the prefix of the file that you want to make optional.