Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to sync mods from instance.json #824

Open
2 tasks done
unnecessarymb opened this issue Oct 1, 2023 · 2 comments
Open
2 tasks done

Add option to sync mods from instance.json #824

unnecessarymb opened this issue Oct 1, 2023 · 2 comments
Labels
enhancement Feature requests. low-priority Low priority to be addressed.

Comments

@unnecessarymb
Copy link

The Problem

Currently, when the modlist of an instance differs from the instance.json, instance.json is modified to match the mod list. There is no configuration option to do the opposite.

The Solution

A configuration option to allow mods to be downloaded or removed in compliance with an instance.json file. Allowing this config option would allow collaborative modpack development to be very seamless, as collaborators could use their version control of choice to sync the instance.json and configuration folders to allow collaboration with no additional helpers.

Additional Information

As this does not seam to be a major change looking at the code base, I am willing to attempt to add the feature myself if given the go ahead and preferred implementation specifics.

Have you checked this issue doesn't already exist?

  • I am sure this issue doesn't exist already

Code of Conduct

  • I agree to follow this project's Code of Conduct
@unnecessarymb unnecessarymb added enhancement Feature requests. triage Issue has not been looked at to classify and validate. labels Oct 1, 2023
@unnecessarymb
Copy link
Author

Perhaps the option can be labeled "Lock Mods to Configuration", with a tool text explaining it's use for modpack dev.

@RyanTheAllmighty
Copy link
Member

Having this work without a config option would be ideal.

When the user either exports the pack or opens the edit mods dialog, the launcher does 2 things, it first checks for any mods in the filesystem but not in the instance.json and then adds them, any mods that are in instance.json but no longer on disk and removes those from the mods.

It's not really going to be possible for us to know if a file doesn't exist in the filesystem because the user manually deleted it, or the instance.json was synced and the mod added during that.

We could place file system watches on the instances directories, but that's honestly way too overkill and doesn't work when the launcher is closed without going down some hacky system process.

I think there's 2 options realistically here:

  • Create a config option that just switches the behaviour to make the instance.json the source of truth rather than the filesystem (defaulted to the filesystem as it is now)
  • When exporting a pack or opening edit mods, ask the user what they want to do with the changed mods, if they want to redownload missing mods or update the instance

I would lean towards the config option as the dialog may be confusing and cause users to hit the wrong option and redownload all the mods they manually deleted.

@RyanTheAllmighty RyanTheAllmighty added low-priority Low priority to be addressed. and removed triage Issue has not been looked at to classify and validate. labels Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests. low-priority Low priority to be addressed.
Development

No branches or pull requests

2 participants