1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2024-11-21 11:47:03 +01:00
49 Creating Modpacks
Henry edited this page 2021-12-02 20:49:59 +00:00

Get the latest Modpack Creator tools: https://github.com/SKCraft/Launcher/wiki/Initial-Steps#what-was-just-created

Create a Workspace

Click "New Workspace" in the starting screen.

Welcome Dialog

Let's start creating modpacks!

Pack Manager

Create a New Modpack

  1. Click "New Pack"
  2. Enter a folder name for your modpack in "Name".
  3. Enter an optional title that shows instead of the folder name.
  4. Enter a Minecraft version such as 1.7.10 or 1.8.1.

Explanation of Tabs

  • Launch: Add additional launch-time Java flags, one per line.
  • User Files: List files that the launcher will not redownload or replace if they already exist on the client.
  • Optional Features: Configure sets of files that can be turned on or off by the user. This is further explained in Optional Features.

Adding Mods

Modpacks are structured like Minecraft's folder, so you have a config folder, a mods folder, a resourcepacks folder, and so on.

  1. Click "Open" to reveal the folder for your modpack.
  2. Put Forge and LiteLoader installers (NOT universal .jars) or Fabric Loader into the loaders/ folder.
  3. Anything you want downloaded to the client, like configuration and mods, goes into the src/ folder. Everything inside the src/ folder will be placed in the instance's .minecraft folder.

If you ever need examples, check the sample-files folder from the launcher download to see example (but fake) modpacks.

Here's an example of loaders:

Loaders

For further details on loaders, see Using Loaders.

Marking Files Client or Server-Only

Whenever you want to make a mod or file client-only:

  1. Make a new _CLIENT folder in the same folder.
  2. Move the desired folders or files into _CLIENT.

The _CLIENT folder will not exist in the final output. For server files, use "_SERVER". Check the sample-files folder from the launcher download to see examples.

_CLIENT and _SERVER Example

Download from a Custom URL

You can have select mods be downloaded from a URL other than your website where you will host the modpack.

As of 67f3fc1, the target file no longer has to be present at build time - the builder will automatically download the file from the specified URL if missing.

  1. Create a ".url.txt" file alongside the .jar, as illustrated below.

    Custom URL

  2. In the file, put the URL:

    URL

You may want to do this if the mod author asks you to redirect downloads to their own site, as it may record statistics.

Note: You need to make sure that the .jar that you have is the exact same version as the one at the URL, otherwise the launcher may keep redownloading the file because it thinks the downloaded file has been corrupted since last update.

You can add a SHA1 hash on the second line of the file, which will cause the builder to redownload the file if it doesn't match:

Hash example

If no hash is present, the builder assumes the file is correct. You can delete the corresponding target file before building to force a redownload at any time.

Optional Features

There are two ways to mark files as optional:

  • Via the "Edit" dialog that you saw when you created the modpack
  • By adding special text files alongside files you want to make optional

See Optional Features for an explanation of each method.

Pre-Flight

Use "Check" to spot some mistakes that people sometimes make:

Potential Problems Report

Test Run

Use the "Test" button to play your modpack. You may be asked to enter your Minecraft account to verify that you own the game.

You can adjust the test launcher's options under the "Test" menu.

When you test your modpack, it does not affect your modpack source files. Any new configs go into the test launcher's folder (found within the .modpacks folder in your workspace folder).

Build

After you're satisfied with your modpack, you will have to run your modpack through the build tool so it can generate the files that you upload to your website.

(You can also build your modpacks via Command Line Tools, which is the preferred way for "more professional" setups.)

To use the GUI, click "Build" and you should see:

Build Dialog

  • Version: Every time you make a new release, change the version to anything that you've never used before. It can be a number or it can be text.
  • Manifest Filename: You can use the same manifest filename for every version for your pack, or you can use a different one every time. It does not matter, although the latter lets you go through old versions more easily.
  • Output Directory: If this is your first time doing this, you should not change this.

Everything will go into the _upload folder that's in your workspace folder. You can re-open this folder at any time conveniently from the "Build" menu.

Generate a Package Listing

A package listing file lists all the modpacks that the user can download.

  1. Under "Build", choose "Generate packages.json"

    Generate Package Listing

  2. Choose the listing type:

    • If you have PHP support, choose the packages.php version.
    • If you don't, pick the static version.
    • The PHP version lets you set "game keys" on specific modpacks, requiring that users know the secret code (put into the launcher's options) to see certain modpacks.
  3. Choose the modpacks that you want to show up. The options that are available are based on:

    • The .json files found in the _upload folder (these appear after you use "Build" on a modpack, so make sure you build first)
    • Modpacks that you previously selected, even if their .json file in _upload has been deleted
  4. Click "Generate"

Upload Everything

Upload the contents of the _upload folder to your website, replacing the sample files that you previously uploaded.

If you are using FTP to upload, remember to switch your client to "binary mode."

Skip re-uploading files that already exist.

Test in the Launcher

Finally, make sure to test your modpacks in the actual launcher.

Run the launcher (the .jar in launcher/build/libs) and see if your newly created modpack works.

Making Updates

To do updates:

  1. Change the files.
  2. Click "Build"
  3. Generate a new package listing.
  4. Upload again.

You do not need to delete the old upload folder — just upload the new files on top of the old files, without replacing existing files in content/ and libraries/ so you don't waste time re-uploading them.

And remember to upload in binary mode if you use FTP.

Next Steps

At this point,

  • You may want to replace all the images in launcher/src/main/resources/com/skcraft/launcher/ if you have not done so yet.
  • You may want to change the name of the launcher in launcher/src/main/resources/com/skcraft/launcher/lang/Launcher.properties if you have not done so yet.

You can now release the launcher (the .jar in launcher/build/libs), but you likely want to use the bootstrapper instead which can handle self-updating of the launcher. See Configuring-Self-Update.