Skip to content
This repository has been archived by the owner on Nov 29, 2020. It is now read-only.

List of JSON Types

Mathis Rech edited this page Sep 4, 2018 · 3 revisions

List of JSON Types
    ExportTemplate
    ModExportTemplate
    ModpackExportTemplate
    Export Mode Constants


ExportTemplate

  • Version, Type: Integer
    Currently valid values are 1 or 2. Unspecified is interpreted as 1.

  • Mods, Type: Array of ModExportTemplate
    A complete list of all exported mods, unsorted.

  • Modpacks, Type: Array of ModpackExportTemplate
    A complete list of all exported modpacks, sorted topologically.
    Topological sorting based on modpack dependencies is required for this array.

ModExportTemplate

  • Uid, Type: Integer
    The ID of this mod. The ID must be unique among all exported mods, but is otherwise arbitrary.

  • Name, Type: String
    The mods unique name found in the info.json file.
    Note that this name does not have to be unique in the exported list if the same mod has been exported twice with different settings.

  • ExportMode, Type: Integer
    This is always one or a combination of the predefined export mode constants.
    Depending on the value of this property some of the following properties will be present.

  • Version, Type: Version
    Only present if ExportMode is set to SpecificVersion.
    The version of the mod to download.

  • FactorioVersion, Type: Version
    Only present if ExportMode is set to FactorioVersion.
    Specifies the targeted version of Factorio. Download the newest version of the mod that is compatible with this Factorio version.

ModpackExportTemplate

  • Uid, Type: Integer
    The ID of this modpack. The ID must be unique among all exported modpacks, but is otherwise arbitrary.

  • Name, Type: String
    Name of the modpack.
    The name is not required to be unique in the format specification, but MMF only allows unique names and will make sure all imported modpacks end up with unique names.

  • ModIds, Type: Array of Integer
    All mods inside this modpack, specified by their IDs.

  • ModpackIds, Type: Array of Integer
    All modpacks inside this modpack, specified by their IDs.
    Topological sorting needs to be based on these references to ensure modpacks are loaded in the correct order.

Export Mode Constants

The following values are exclusive and can be extracted by applying the bitwise mask 0x0000FFFF to the value:

  • Version1 = 0
    Indicates revision 1 behaviour. Deprecated.
    If the export mode is not specified it is assumed to be this value.

  • NewestVersion = 1
    Indicates the newest version of the mod should be downloaded.

  • SpecificVersion = 2
    Indicates a specific version of the mod should be downloaded.

  • FactorioVersion = 3
    Indicates the newest version of the mod that is compatible with a specific version of Factorio should be downloaded.

The following values are flags and can be specified in addition to any one of the above:

  • Included = 0x00010000
    Indicates that the mod file is already included and doesn't need to be downloaded.
    This flag is only valid in an FMPA file.

  • DownloadNewer = 0x00020000
    Only has meaning if Included is also specified and the base value is either NewestVersion or FactorioVersion.
    Indicates that a newer version should be downloaded if available instead of using the included file. Which version is downloaded depends on the base value.