Skip to content

Sharing a modlist (metapackages)

Piotr Stankowski edited this page May 15, 2016 · 8 revisions

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

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 Factorio 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 CFAN client click File->Export installed mods->Joy and happyness for all

The custom handcrafted way

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

"type": "META",

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:

{
  "modInfo": {
    "name": "ShadowComboPack",
    "version": "0.1.3",
    "title": "ShadowComboPack",
    "author": "Shadows",
    "contact": null,
    "homepage": null,
    "description": "This is a meta-package that will install all mods from the modpack ShadowComboPack by Shadows.",
    "dependencies": [
      "base",
      "air-filtering",
      "Aircraft",
      "Bio_Farm",
      "bobassembly",
      "bobconfig",
      "bobelectronics",
      "bobenemies",
      "boblibrary",
      "boblogistics",
      "bobmining",
      "bobmodules",
      "bobores",
      "bobplates",
      "bobpower",
      "bobtech",
      "bobwarfare",
      "BurnTheWood",
      "Crafted Artifacts",
      "dark-matter-replicators",
      "eco-trees",
      "Electric Furnaces",
      "EMP Biters",
      "Equalizer_Chests",
      "EvoGUI",
      "Explosive Termites",
      "FARL",
      "Flow Control",
      "Fluid Void",
      "Force Fields",
      "Landfill",
      "Logistic-Gun-Turret",
      "LogisticsMining",
      "Misanthrope",
      "mocombat",
      "moindustry",
      "mopower",
      "motrans",
      "Squeak Through",
      "Terraforming",
      "Treefarm-Lite",
      "underground-mining",
      "Warehousing",
      "yi_engines",
      "yi_pfw",
      "yi_railway",
      "Yuoki"
    ]
  },
  "authors": [
    "Shadows"
  ],
  "categories": [

  ],
  "tags": [

  ],
  "suggests": [

  ],
  "recommends": [

  ],
  "conflicts": [

  ],
  "downloadUrls": [

  ],
  "downloadSize": 0,
  "type": "META",
  "releasedAt": null,
  "aggregatorData": {
  }
}

And an example of a metapackage that installs boblogistics and bobmining looks like this:

{
  "modInfo": {
    "name": "ShadowComboPack",
    "version": "0.1.3",
    "title": "ShadowComboPack",
    "author": "Shadows",
    "contact": null,
    "homepage": null,
    "description": "This is a meta-package that will install all mods from the modpack ShadowComboPack by Shadows.",
    "dependencies": [
      "boblogistics",
      "bobmining",
    ]
  },
  "authors": [
    "Shadows"
  ],
  "categories": [

  ],
  "tags": [

  ],
  "suggests": [

  ],
  "recommends": [

  ],
  "conflicts": [

  ],
  "downloadUrls": [

  ],
  "downloadSize": 0,
  "type": "META",
  "releasedAt": null,
  "aggregatorData": {
  }
}

Metapackages will solve dependencies for mods within them. The above example also installs boblibrary since bobmining 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 suggestions. Keeping the earlier example we add in suggestion for FARL. The metapackage would then look like this:

{
  "modInfo": {
    "name": "ShadowComboPack",
    "version": "0.1.3",
    "title": "ShadowComboPack",
    "author": "Shadows",
    "contact": null,
    "homepage": null,
    "description": "This is a meta-package that will install all mods from the modpack ShadowComboPack by Shadows.",
    "dependencies": [
      "boblogistics",
      "bobmining",
      "? FARL"
    ]
  },
  "authors": [
    "Shadows"
  ],
  "categories": [

  ],
  "tags": [

  ],
  "suggests": [

  ],
  "recommends": [

  ],
  "conflicts": [

  ],
  "downloadUrls": [

  ],
  "downloadSize": 0,
  "type": "META",
  "releasedAt": null,
  "aggregatorData": {
  }
}

When adding suggestions the identifier of your metapackage will be seen in the CFAN gui like this:

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 .cfan"

Install from .cfan

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

metapkg selection

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

Command line

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

cfan install -c path/to/metapackage.cfan