Register

Version 10 Manifest Migration

We have overhauled the Manifest definition to reduce user errors and allow for more powerful definitions. With the new relationships field, we have a powerful framework for future relationship types.

Deprecation Period: V13

The new Version 10 manifest represents a slight restructuring of the existing manifest fields, including changes to support the new relationships schema.

These deprecation period for these changes will last until V13.

Migration 1: name to id

A common user mistake was to treat the name field as a human-readable field, rather than as a unique machine-readable one. We have clarified this by renaming it id.

V9

{
  "name": "1000-fish",
  "title": "1000 Fish"
}

V10

{
  "id": "1000-fish",
  "title": "1000 Fish"
}

Migration 2: compatibility

The current way of denoting compatibility was fairly mixed - core compatibility used minimumCoreVersion and compatibleCoreVersion, and we supported an unclear minimumSystemVersion as well for Packages that relied on a single System.

We have consolidated this concept into a single Compatibility field that is used top level for denoting Core compatibility, and in relationships.systems (more on that later) for denoting related Package compatibility. While we were here, we also added a maximum

As a refresher, when defining Core compatibility, the following forms are valid:

V9

{
  "minimumCoreVersion": 9,
  "compatibleCoreVersion": "9.120"
}

V10

{
  "compatibility": {
    "minimum": 9,
    "verified": "9.120"
  }
}

Example 1: Compatible with only V10

{
  "compatibility": {
    "minimum": 10, // Can't be installed before V10
    "verified": 10, // Verified compatible with all of V10
    "maximum": 10 // Can't be installed after V10
  }
}

Example 2: Compatible from V10 to V11, verified up to 10.120

{
  "compatibility": {
    "minimum": 10, // Can't be installed before V10
    "verified": "10.120", // Verified compatible up to build 10.120
    "maximum": 11 // Can't be installed after V11
  }
}

Example 3: Compatible from V9 to V10, verified up to 10.120

{
  "minimumCoreVersion": 9, // V9 compatible minimum field
  "compatibleCoreVersion": "10.120", // V9 compatible verified field
  "compatibility": {
    "minimum": 9, // Can't be installed before V9
    "verified": "10.120", // Verified compatible up to build 10.120
    "maximum": 10 // Can't be installed after V10
  }
}

Migration 3: dependencies and systems to relationships

Our previous dependencies field is treated as a "hard dependency", but we want to expand in the future to things like optional dependencies. The new relationships field offers us a framework to do this, and offered us a chance to improve how we define System relationships as well.

While we were doing this, we took advantage of the new Compatibility field to add more clarity to how a Package relates to another Package.

V9

{
  "systems": [ "archmage" ],
  "dependencies": [{
    "name": "_chatcommands",
    "type": "module",
    "manifest": "https://github.com/League-of-Foundry-Developers/Chat-Commands-Lib/releases/download/1.2.0/module.json",
    "version": "1.2.0"
  }]
}

V10

{
  "relationships": {
    "systems": [{
      "id": "archmage",
      "type": "system",
      "manifest": "https://gitlab.com/asacolips-projects/foundry-mods/archmage/-/raw/1.5.0/system.json",
      "compatibility": {
        "verified": "1.5.0"
      }
    }],
    "requires": [{
      "id": "_chatcommands",
      "type": "module",
      "manifest": "https://github.com/League-of-Foundry-Developers/Chat-Commands-Lib/releases/download/1.2.0/module.json",
      "compatibility": {
        "verified": "1.2.0"
      }
    }]
  }
}

How Package Relationships install

When a Package is installed, Foundry checks to see if the related Packages are installed. If they are not installed:

Staying V9 Compatible

A Package manifest is a bit different than code when migrating - if your Package exists in V9, then the manifest that is located at the manifest field for a V9 package, such as /latest/manifest.json, will need to retain V9 compatibility.

The easiest way to do this is to just do nothing - V10 will automigrate this format, then when you make a V11 package you can swap to the V10 format by default.

Alternatively, you can leave behind the critical fields needed by V9 - name and, if your package is only compatible in V10, minimumCoreVersion

Example Full V10+ Manifest

{
  "id": "vue-encounter-builder",
  "title": "🌑 Dungeon Moon Encounter Builder",
  "description": "A fair encounter builder for Foundry",
  "version": "1.0.0",
  "compatibility": {
    "minimum": 10,
    "verified": 10.120,
    "maximum": 10
  },
  "authors": [
    {
      "name": "Cody Swendrowski",
      "url": "https://swendrowski.us",
      "email": "cody@swendrowski.us",
      "discord": "cswendrowski#9701"
    }
  ],
  "relationships": {
    "systems": [
      {
        "id": "toolkit13",
        "manifest": "https://github.com/Mageflame/Toolkit13/releases/download/latest/system.json",
        "compatibility": {
          "minimum": "1.11.0",
          "verified": "1.14.0",
          "maximum": "1.15.0"
        }
      }
    ],
    "requires": [
      {
        "id": "dlopen",
        "type": "module",
        "manifest": "https://raw.githubusercontent.com/ForgeVTT/fvtt-module-dlopen/master/module.json",
        "compatibility": {
          "minimum": "1.2.0",
          "verified": "1.4.0",
          "maximum": "2.0.0"
        }
      },
      {
        "id": "vueport",
        "type": "module",
        "manifest": "https://raw.githubusercontent.com/ForgeVTT/fvtt-module-vueport/master/module.json"
      }
    ]
  },
  "esmodules": [
    "/scripts/dugeonmoon.js"
  ],
  "styles": [
    "/css/dugeonmoon.css"
  ],
  "languages": [
    {
      "lang": "en",
      "name": "English",
      "path": "languages/en.json"
    }
  ],
  "url": "https://github.com/cswendrowski/FoundryVTT-Encounter-Builder",
  "manifest": "https://github.com/cswendrowski/FoundryVTT-Encounter-Builder/releases/latest/module.json",
  "download": "https://github.com/cswendrowski/FoundryVTT-Encounter-Builder/releases/download/1.0.0/module.zip"
}