Easy Package (Mod) Management?

tl;dr: Wouldn’t it be cool to have a simple way for users/developers to manage their modpack dependencies much like existing package managers?

Just a heads up that I have no prior experience in the modding community on the dev side, so I may not be aware of the tool I’m trying to describe and I’ve also not played modded minecraft for a while either (but getting back into it) - but a brief look online didn’t turn it up, so I could simply be looking in the wrong direction

THE DREAM

What if there was some package manager (let’s call it patch or some other play on Quilt) that allowed me (as a developer) to install dependencies just as easily as I can install Node or Python packages? Let’s say I create a mod that depends on some other mod, ores_galore (which hypothetically provides the MC world with a whole new stack of ores) by simply installing the dependency: patch install ores_galore, much like npm or pip. Installing the dependency should then add it to what would be the equivalent of the package.json for npm and the dependencies/dependents could then be reported on the mod’s page (e.g. stats on modrinth). Now when users try to use this mod, I (as a developer) can have an expectation that they will have my required dependencies installed (I swear launching Forge modpack servers just always creates a sea of red error text, and I always wondered if this was a compatibility/dependency thing…).

In theory, for a modpack creator, they would only need to create and manage a package-lock.json-esque file. This would allow them to manage their dependencies to try and ensure they’re providing a stable modpack for the users. Alternatively, a bleeding edge package.json may be subject to breaking changes within the dependencies, but would be providing the most up-to-date experience.

For a user, you would be looking for the most streamlined experience possible. If I really like what’s in some particular modpack, I should be able to just click on a marketplace entry - but this also shouldn’t stop me from being able to add more mods either, mixing and matching to my heart’s content (e.g. the VS Code marketplace experience). With this, I wouldn’t need to dive into downloading mods from unknown sources or be required to know what to do with them.

THE UPSIDES

With anything, these are the potential benefits:

  • A lower barrier for prospective mod authors (get all ages interested in authoring mods, outside of the seemingly quite feature restricted MC: BE add-ons)
  • Easier mod development for teams
  • Incentive to write good and reusable mods
  • Easier maintenance of modpacks and curated experiences
  • Potential for future expansion into code security checking (duty of care towards the average user)

THE DOWNSIDES

  • Potential for breaking changes in mod dependencies (problem exists in npm)
  • Centralised mod/modpack hosting (unless some mechanism like ppa)
  • Some UI required for user to manage their installations (frontend for CLI?)

I feel like you’re mixing mod development and modpack development here quite a bit.

For mod development, people use Gradle to manage their mod dependencies. They still need to manually copy them to the mod.json later, but autogenerating that should be possible (and I’m sure has been done before).

For modpack development, packwiz seems to be what you’re looking for. At least the file format, a GUI would probably be good to have.

Don’t get me wrong, there’s still stuff that can be done to improve the status quo, but I just wanted to mention some prior art

2 Likes

There’s also Ferium, which I use to manage my personal assortment of mods and it works well, but Packwhiz sounds closer to what you want, and as Cheater said, Gradle is what developers use already.

Wowee, I didn’t expect an admin response :smiley:

I feel like you’re mixing mod development and modpack development here quite a bit.

I hope I’m not getting them too mixed up in my head (sorry), but I was trying to get across three different potential viewpoints: a developer, a curator, and a user. I think the best example I can give for this is from VS Code: a developer might create a “mod” (aka. extension) such as “Remote - SSH” which provides additional features; a curator might deem these mods worth including in their “modpack” (aka. an extension pack) such as “Remote Development”; a user might want to remotely develop on some machine and install that modpack which will enhance their experience in addition to any other mods they fancy such as “GitLens”. Completely agree from my incomplete knowledge of modding that they are different, but it seems like a strong dependency system could make modpack curation easier - or is that not really a feasible approach with regards to Minecraft modding?

For mod development, people use Gradle to manage their mod dependencies. They still need to manually copy them to the mod.json later, but autogenerating that should be possible (and I’m sure has been done before).

Unfortunately, I haven’t had much exposure to Gradle, and even more so in the context of Minecraft modding. Are people able to download/version-control their dependencies through Gradle? My understanding of Gradle was more closely aligned to CMake/Bazel than to a CLI package manager like npm or pip - but I could be completely mistaken! Either way though, if there’s already some indication of what dependencies exist then a dev CLI or client GUI could use that information to fetch them from a centralised repo. I think the best way of imagining the process, is just thinking how easy it is to literally do anything you want in Python if you first get the right packages and everything “just works”.

For modpack development, packwiz seems to be what you’re looking for. At least the file format, a GUI would probably be good to have.

Thanks! I’ll check this out to see what it is and see how it compares to what I’m trying to get across :smiley:

Don’t get me wrong, there’s still stuff that can be done to improve the status quo, but I just wanted to mention some prior art

Nah it’s all good stuff - ultimately, I think what I’m trying to suggest is a picture of how a mod dependency system built for developers translates to a better user experience and vice versa. Thanks for getting back so quickly!

Yep, you can check out something like the quilt example mod, you declare a module and version (and sometimes a repository/maven to download it from), and gradle pulls it in and adds it to your dev environment. The specifics here are a bit complex but thats the core of what happens.