addonscript-spec/docs/schema/file.md
Timo Ley bc24466b0c
All checks were successful
continuous-integration/drone/pr Build is passing
Change file ID to qualifier
2022-08-22 21:24:34 +02:00

1.8 KiB

File Object

{
  "qualifier": "modfile",
  "link": ["https://example.com/mymod.jar", "./mymod.jar"],
  "flags": [],
  "install": [],
  "hashes": {
    "sha1": "somesha1checksum"
  }
}

Required properties

qualifier

This is the qualifier of this file. It should be written in the kebab-case format, meaning lowercase only and using - instead of spaces. The qualifier has to be unique to this addon version. The namespace, addon ID, version and qualifier can together be used to uniquely identify a file.

This is an array of links, which are pointing to the actual file. All of these links must have the same file type. Since AddonScript treats directories and zip files equally, they can be mixed in the same link array. When downloading the file, the first link in this array should be used with the other links as fallback, if the first doesn't work. If none of the specified links works, the file should be downloaded by it's Maven specifier from one of the specified repository, but only, if a sha1 hash is specified, so that it can be verified, that the downloaded file is correct.

Optional properties

install

This is an array of install objects. They describe how the file should be installed to the game. The order in the array corresponds to the order in which the installation steps should be applied.

flags

This is an array of flags for this file. If this property is not present in a file object, the file will inherit the side flags from the version and have the required flag set by default.

hashes

This is an object with checksums for this file. The object contains key-value-pairs where the key is the hash algorithm and the value is the checksum.

Supported hash algorithms:

  • sha1