Skip to content

Easier way to download mods from third-party sources #3631

@brawaru

Description

@brawaru

Please confirm the following.

  • I checked the existing issues for duplicate feature requests
  • I have checked that this feature request is not on our roadmap

What parts of Modrinth is your feature request related too?

App

Is your suggested feature related to a problem? Please describe.

FTB. I bet many people who installed or created content modpacks on Modrinth shake when they hear these three letters. This is because FTB's policy explicitly forbids embedding into modpacks on platforms other than their own and CurseForge.

Because of that, you have to manually go through links in modpack description, download files, and drop them in an appropriate mods folder. This takes some effort and prone to mistakes.

But mods by FTB aren't the only ones that require that. There are other mods with such policy, too. So the question is: can this be made easier?

The answer is that it's complicated. Let's remember that Modrinth cannot do much about the requirement to manually download mods:

  • Automating downloads would probably be against terms of service of the third-party platforms. It's also complicated, and prone to errors.

  • Modrinth cannot integrate with third-party services either, because some of them, like CurseForge, are Modrinth's competitors. They won't allow the use of their APIs to Modrinth, or if they do, it would be under a contract with terms that might make experience worse for Modrinth users.

So are we out of luck?

Describe the solution you'd like

While there is no perfect solution to this, there are still ways to significantly improve experience for the user. To see how this can be done, we don't have to look far, as there's a good example of this already: Prism Launcher.

When Prism Launcher encounters CurseForge mods that cannot be automatically downloaded using API, it will create a download link for every such mod, and then display a window listing mods you'd need to download manually. As you go, it will detect the mods in your Downloads folder and copy them to the appropriate location.

I believe Modrinth App should do the same, but perhaps improve even further on that. That is, instead of displaying a big list full of links, it can utilise cards with structured information.

How can this be done?

Modpack specification changes

To allow for such functionality, Modrinth App should know which mods need to be downloaded manually. For this, we can introduce a new field externalFiles to the index file. It would be very similar to the existing files field, but with a few notable differences:

  • It will have a new optional field name containing the name of the mod (for example, ‘FTB Quests’). This would probably be inferred from the mod file itself. If it's missing, we can display the file name itself.

  • A new optional field version would contain the version of the mod (for example, ‘2001.4.12’). Once again, most likely inferred from the JAR itself.

  • A new description field will contain description written by the modpack creator. It should let user know the purpose of the mod in the modpack (for example, ‘Provides in-game quests’).

  • Previous downloads field will be repurposed as an array of download links.

    The first item would be the primary link, whereas all others serve as mirrors, in case the mod can be download from multiple sources, like GitHub releases.

    When multiple links provided, the creator must make sure that the files on other platforms have matching hash, otherwise the mod file will not be detected correctly

    Launchers must prefer displaying the primary link, secondary links can be put in a dropdown menu. With some domain detection, they can have friendly names like ‘Download on GitHub’.

Because this would be a new field, launchers that do not support this won't download anything, ensuring backwards compatibility. It still would be worth for the modpack creators to keep the missing mods detection (if any).

The App: modpack installation experience

Now that the new data exists, it can be used in the app. As described above, whenever user installs a modpack, a popup window will show up. It will list all the mods that should be downloaded manually.

Using the information in the modpack we can present it as a nice list of cards:

A drawn concept of the ‘Manual downloads’ popup. It starts with message: ‘Due to the license requirements, a few files need to be downloaded manually before you can play. just download them like you normally would—we'll handle the rest.’. Followed by the list of cards. First card shows ‘FTB Quests’ mod of a certain version, its description says ‘Adds in-game quests’. On the right of it is a download button option with an open dropdown menu. This menu includes options to ‘Copy link’, ‘Open destination folder’, and the file name, visually separated from the above actions. On the second filled card is the mod ‘FTB Library’, its description says ‘Required by FTB mods.’, and the button says ‘Downloaded’. At the bottom of the popup, aligned left is a button ‘Open all’ with a dropdown menu that has options ‘Scanned folders’ and ‘Learn more’. Aligned to the right there is a primary ‘Next’ button.

The App: creator experience

For the creator, things are just as easy.

For every mod that is loaded from a custom file, we automatically infer its name, authors, and version (if they have one). Not only this just makes things nice too look at in the mod list, it will also be useful later.

A screenshot of three cards: ‘Fabric API’ by modmuss50 (has mod icon); ‘FTB Quests’ by FTB Team that doesn't have a mod icon, but has an chain icon after its name that shows tooltip ‘Manually downloaded. Click to configure’; FTB Library by FTB Team that also doesn't have mod icon, but also has a chain icon. FTB Quests has its overflow menu open, which has two options: ‘Show file’ and ‘Change source link’.

Mods that have download links set will have indication of that with a new icon after their name. Clicking this name, or using a menu option will allow to set, change or delete a source / download link.

A drawn concept of the ‘Manual download’ popup. It starts with text ‘If this file can't be bundled with your modpack, you can add a link hre to help users download it manually.’. Then it has a field ‘Source link’ that is—in this example—is set to FTB Quests CurseForge link, however, it gives an error below saying ‘Please provide a direct download link.’ with link ‘Need help?’. The last field is ‘Description’ with the placeholder ‘What this file does in the modpack’. The buttons at the bottom are ‘Save’ and ‘Delete link’.

The App: export experience

Exporting would work the same way as before, but files that have source links set won't be included as overrides, and instead exported into the externalFiles field of the index file.

The export window might perhaps show a notice that some files would need to be downloaded manually.

Security considerations

Having such functionality can create some potential for abuse. To prevent it, I think it would be wise to have a list of sites allowed to be used as sources when publishing on Modrinth.

Having such list, Modrinth can also add some link templates to ensure that the best possible source link is provided. For example, a direct link for a CurseForge should match the following regular expression:

https:\/\/www\.curseforge\.com\/minecraft\/mc-mods\/[a-z0-9_-]+\/download\/\d+

To help users know about this restriction, a support article listing allowed websites, and link requirements, would be immensely helpful.

The list itself can be hosted online, to avoid shipping updates, and ensure consistency between the official Modrinth App and third-party launchers.

When user manually imports a modpack from mrpack file, and one of the links includes a website that is not in allow list, a popup with a warning can be shown:

A drawn concept of the ‘External website’ popup. It says ‘Heads up! You are about to open a link outside of Modrinth.’, ‘Modrinth cannot guarantee it's safe, so proceed with caution.’. The box below shows the full link, with domain being highlighted in bold. The buttons are inversed, with the first button being ‘Cancel’, and second one ‘Continue’.

But for modpacks directly downloaded through app, links that are not in allow list should be discarded. Backend should probably reject them on the upload stage.

Conclusion

All in all, this solution simply tries to improve user experience when it comes to off-platform downloads. There is no fun in having to launch your game only to see that you are missing 7 mods and now have to manually download them and drag to the mods folder.

With this solution, Modrinth App will let you know beforehand what is missing, and let you easily download these files, while handling all the moving for you.

As an additional benefit, it can make older versions of modpacks more reliable (because descriptions on the website are always for the most up-to-date version), and improve transparency with the moderation team about the contents included in the modpack.

Describe alternatives you've considered

  • Plugins were suggested in Consider a plugin for the Modrinth app. #1021. However, I do not see this being implemented any time soon, nor would it help alleviate the issue at hand. For example, with CurseForge, some mods will still have to be downloaded manually because they are not available through API. Such plugin is also likely going to be in violation of CurseForge's API terms of service.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions