Skip to content

Sharing a modlist (metapackages)

Willhelm Rendahl edited this page Feb 18, 2016 · 8 revisions

One of the many things CKAN can do is share your list of installed mods with another user by using metapackages. As a standard CKAN generates a metapackage of all your installed mods in .../<KSP root directory>/CKAN/installed-default.ckan

If you want to share your currently modlist with someone or take a snapshot of the stuff you have installed right now for a given KSP installation you can just copy that file and share/keep it.

Creating a custom metapackage

The easy way (recommended)

*Install the mods you want your metapackage to contain

*In the CKAN client click File->Export installed mods->Joy and happyness for all

The custom handcrafted way

Metapackages are much like normal .ckan files but have an added

"kind": "metapackage",

Metapackages depend on other mods rather than defining the installation of a specific mod from a specific place.

An example of an empty metapackage is:

{
"spec_version": "v1.6",
"identifier": "YourMetapackageName",
"version": "1",
"license": "unknown",
"name": "User friendly name of your metapackage",
"abstract": "A short description of the metapackage",
"kind": "metapackage",
"depends": []
}

NOTE: Metapackage support was added in CKAN 1.6.0 so "spec_version" must always be at least v1.6!

And an example of a metapackage that installs FAR,KER and KAC would look like this:

{
"spec_version": "v1.6",
"identifier": "YourMetapackageName",
"version": "1",
"license": "unknown",
"name": "User friendly name of your metapackage",
"abstract": "A short description of the metapackage",
"kind": "metapackage",
"depends": [
    {
        "name": "FerramAerospaceResearch",
    },
	{
        "name": "KerbalEngineerRedux",
    },
    {
        "name": "KerbalAlarmClock",
    }
]
}

Metapackages will solve dependencies for mods within them. The above example also installs ModuleManager since FAR depends on it.

Metapackages will not show suggestions and recommendations from the mods within them.

Expanding your custom metapackage

Apart from doing a blunt install of a list of mods you can add choices using the "recommends" and "suggests" keywords. Keeping the earlier example we add in recommendations for Deadly Reentry and Intake Build aid as well as suggestions for B9 and Firespitter. The metapackage would then look like this:

{
"spec_version": "v1.6",
"identifier": "YourMetapackageName",
"version": "1",
"license": "unknown",
"name": "User friendly name of your metapackage",
"abstract": "A short description of the metapackage",
"kind": "metapackage",
"depends": [
    {
        "name": "FerramAerospaceResearch",
    },
	{
        "name": "KerbalEngineerRedux",
    },
    {
        "name": "KerbalAlarmClock",
    }
],
"recommends": [
		{
		"name": "DeadlyReentry"
		},
		{
		"name": "IntakeBuildAid"
		}
		],
"suggests":[
		{
		"name": "B9"
		},
		{
		"name": "Firespitter"
		}
		]
}

When adding "recommends" and "suggests"the Identifier of your metapackage will be seen in the CKAN gui like this:

Recommends window

Suggests window

Note: Recommends come pre-chosen and the user will have to un-tick those they don't want. Suggests start un-ticked and the user must tick those they want

Installing a metapackage

GUI

You start by clicking "File"->"Install from .ckan"

Install from .ckan

This will open up a dialog window where you select your .ckan and then click "Open"

metapkg selection

After selecting the file installation will ensue just like when installing other mods through CKAN.

Command line

Installing a metapackage through the command line is done via the following command

ckan install -c path/to/metapackage.ckan