Additional Keys - TerraFirmaCraft-The-Final-Frontier/FileDirector GitHub Wiki
Curse/Modrinth mods
fileName specifies a custom file name for Curse/Modrinth mods just like for raw downloads.
Curse example:
{
"addonId": 123456,
"fileId": 654321,
"fileName": "custom_name.jar"
}
Raw downloads
folder specifies the modpack subfolder the file gets downloaded to. Defaults to mods if unspecified. Included in the original mod, but undocumented.
Example:
{
"url": "https://my-mod-script.com/download/script.zs",
"folder": "scripts"
}
Installation policies
extract
extract specifies if the downloaded file should be extracted after the download process. No additional subfolders get created, it works the same way as the ‚Extract Here‘ option in common archiving software. Defaults to false if unspecified.
Example:
{
"url": "https://my-mod-archive.com/download/archive.zip",
"installationPolicy":
{
"extract": true
}
}
If you wish to delete the archive after extraction, you can provide the key deleteAfterExtract. Keep in mind that this will result in behavior similar to downloadAlways as the archive is no longer present.
Example:
{
"url": "https://my-mod-archive.com/download/archive.zip",
"installationPolicy":
{
"extract": true,
"deleteAfterExtract": true
}
}
downloadAlways
downloadAlways specifies if the file should be re-downloaded even if it exists locally. Only takes effect if no hash values are supplied. Defaults to false if unspecified.
Example:
{
"url": "https://my-mod.com/download/mod.jar",
"installationPolicy":
{
"downloadAlways": true
}
}
supersede
supersede specifies an existing file which gets superseded by the new file. In terms of mod updates, this would be the file name of the old mod.
Example:
{
"addonId": 637540,
"fileId": 4398759,
"fileName": "DramaticTrees-1.12.2-0.13.2.jar",
"installationPolicy":
{
"supersede": "DramaticTrees-1.12.2-0.13.1.jar"
}
}
DramaticTrees-1.12.2-0.13.2.jar supersedes DramaticTrees-1.12.2-0.13.1.jar. The superseded file gets disabled by adding .disabled-by-mod-director to the file name.
modpackVersion
modpackVersion specifies a required modpack version. The file only gets downloaded if it matches either the localVersion or remoteVersion key in the modpack.json config file.
Example:
{
"url": "https://my-mod.com/download/mod.jar",
"installationPolicy":
{
"modpackVersion": "1.2.4"
}
}
Metadata
Server vs Client mods
- Specifying whether a file is to be downloaded to the Server-side or the Client-side (This does not have to be a mod file)
Clientside example of a mod downloaded from CurseForge
{
"curse":
[
{
"addonId": 000000,
"fileId": 000000,
"metadata": {
"side": "CLIENT"
}
}
]
}
Serverside example of a file being downloaded via an URL
{
"url":
[
{
"url": "https://example.com/YOUR_URL_HERE.jar",
"metadata": {
"side": "SERVER"
}
}
]
}
Example of CurseForge, Modrinth & URL downloads (via Config Type: Bundles)
{
"url":
[
{
"url": "https://example.com/YOUR_URL_HERE.jar",
"metadata": {
"side": "SERVER"
}
}
],
"curse":
[
{
"addonId": 000000,
"fileId": 000000,
"metadata": {
"side": "SERVER"
}
}
],
"modrinth":
[
{
"addonId": 000000,
"fileId": 000000,
"metadata": {
"side": "CLIENT"
}
}
]
}