ModAssistant icon indicating copy to clipboard operation
ModAssistant copied to clipboard

modpack support

Open zivoy opened this issue 4 years ago • 8 comments

can you add a feature that lets you import and export the currently selected mods as a json file or something

zivoy avatar Jul 08 '20 22:07 zivoy

I'll give it a shot.

OnSive avatar Aug 31 '20 07:08 OnSive

@zivoy do you mean with "selected mods" "installed mods", or how do you imagine the feature?

OnSive avatar Aug 31 '20 08:08 OnSive

what I was thinking, was to let a user export a json file that just contains all the mods with checkmarks so that another user can import it into their mod assistant and it will change the selected mods to that of the json file. so they will just have to click install without going through the list and manually checking all the items.

zivoy avatar Aug 31 '20 13:08 zivoy

So basicly not the ones which are actually installed but rather the selected ones.

I like the idea :) gimme a few more days then I'll  send you a test version.

The main problem is how to load the imported mods, but I think I got an easy solution for that. 31.08.2020 15:13:23 Ziv Shalit [email protected]:

what I was thinking, was to let a user export a json file that just contains all the mods with checkmarks so that another user can import it into their mod assistant and it will change the selected mods to that of the json file. so they will just have to click install without going through the list and manually checking all the items.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub[https://github.com/Assistant/ModAssistant/issues/214#issuecomment-683768736], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ANF5QYQCPJIGZ5TMX47EPM3SDOOXDANCNFSM4OVAJZ5A]. [https://github.com/notifications/beacon/ANF5QYS4ENRLHOL3FKJ7GMLSDOOXDA5CNFSM4OVAJZ5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFDAXXIA.gif]

OnSive avatar Aug 31 '20 16:08 OnSive

@zivoy sorry, I completly forgot about that feature request.

I've got a test version ready: https://cloud.onsive.net/s/3ee23kAn2qwnpcF Source code: https://github.com/OnSive/ModAssistant/tree/feature-modlistexport

We probably need to warn if there is a mod not available in the current version, but I'll do that tomorrow, I swear ;)

OnSive avatar Oct 08 '20 21:10 OnSive

@OnSive no problem :) I checked what you did, and I like it. This should make it easier to make modpacks and share mod setups. But I don't really like that the import/export menu is hidden behind the right click on the top bar (took me a bit to find it). It might be better to add a file menu or add buttons or a dropdown on the side or at the bottom near the progress bar.

Also, I saw that it doesn't do anything when I try importing an invalid json file. It just says it's successful without changing anything. You might want to add a check and tell the user if it's a bad or invalid file. and I also tried to import a random file (image), and it does throw an error, so maybe add a filter to make import only accept json files, and if they do select something that is not a json, then tell them. (users are dumb)

And for additional features to consider, probably sharing the settings for the mods, but for that, you mould have to know how the config is structured for different mods (most seem to be in the UserData folder or a subfolder), so it would probably be harder (because some mods like CustomSaber require additional files).

zivoy avatar Oct 12 '20 05:10 zivoy

@zivoy thank you very much for testing!

Idk if I were drunk while I wrote the original code, but now it's hopefully all fixed ;)


About the hidden option There are two new buttons on the mod page on the top right for ex-/import. I don't know if the maintainer would like to have a menu bar in their application so I build in the buttons.


About unsuccessful imports There are now checks if the import was possible and successful.


About persistent data export As you already wrote, exporting the settings would be a whole load of work. I took a look and found that there is no common rule to how to manage persistent data. So basically if someone can get me a table with all mods and where they save their data, it could be easily implemented. The export would then be a zip file instead of a single json file.


About warning if a mod is not availible Idk if it's even needed. The users can't do a thing if it's not available yet or never to come available again.


New test version: https://cloud.onsive.net/s/48zwK9NQBW6wdBp Latest commit: https://github.com/OnSive/ModAssistant/commit/9e9cb6cd960cec3dc04609d85a06734871ce6601

@Assistant maybe you would like to take a look at it, too. Is it valid to use buttons or should I hide it back to the table context menu or somewhere else?

OnSive avatar Oct 14 '20 18:10 OnSive

@OnSive, sorry about the delay. It's almost been a year since your message. Do you want to open a pull request? If you still have the repo, it doesn't seem to be public anymore.

Also, there is a spelling mistake. It says The mod list could not be importet! instead of The mod list could not be imported!. And I'm not too sure about the position of the buttons. It's adding a big blank area at the top by being the only thing up there. What about having 2 small square buttons next to the Mod Info button, with the import and export icons.

image

zivoy avatar Oct 12 '21 03:10 zivoy