Skip to content

Creating private modpacks

Hayden Schiff edited this page Jun 21, 2014 · 2 revisions

This is a feature of SKCraft Launcher (and by extension, craftboot-launcher); however, it does not appear to be documented on the SKCraft Launcher wiki, so I am writing a quick guide to using this feature. This requires that your web server have some flavor of server-side pre-processing (i.e. PHP, ASP.NET, whatever).

In the Advanced tab of the options dialog in the launcher, there is a field where you can enter a game key. The value of this field will be included in the URL of the packageListUrl when the launcher checks for updates; specifically, it will replace any occurrence of "%s" in that URL. So if you set your packageListUrl to "http://example.com/modpack/packages.json?key=%s", and enter "topsecret" as your game key, the launcher will connect to "http://example.com/modpack/packages.json?key=topsecret" when it checks for updates.

This allows you to have hidden or private modpacks that are only visible when the user enters a certain game key. Here's an example of how you might accomplish this using PHP to generate packages.json (note that you'd probably need to make the file "packages.json.php" or something similar to make your web server execute the file):

{
  "minimumVersion": 1, 
  "packages": [
    {
      "name": "publicpack", 
      "title": "Public Pack", 
      "version": "1.0.0", 
      "location": "publicpack/manifest.json", 
      "priority": 2
    }<?php if ($_GET['key'] == "password123") { ?>,
    {
      "name": "secretpack", 
      "title": "Top Secret Modpack!", 
      "version": "1.2.3", 
      "location": "secretpack/manifest.json", 
      "priority": 1
    }<?php } ?>
  ]
}

If you actually wanted to keep a modpack secret, you would probably want to use better password than "password123" (though, even with a strong password, this method is not meant to provide impenetrable security; it's more useful for keeping your players from accidentally downloading untested versions of your modpack), but this gives you a taste of how this would work.

Clone this wiki locally