Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: [1] 2 3 ... 5

Author Topic: MOSS (Mod Organiser for StarSector): A standalone utility for managing mods  (Read 46521 times)

AtlanticAccent

  • Lieutenant
  • **
  • Posts: 73
    • View Profile

MOSS: Mod Organiser for StarSector
Formerly known as Starsector Mod Manager



Features:
  • Mod installation from archives and existing mod folders.
    • This also includes the ability to install multiple mods at once. When using the `Install from Archive` function, you can select more than one archive/zip - all of the archives you select will be installed. This can be really helpful when setting up a Starsector install for the first time, as it removes the need to click constantly click through different files and folders to install them all.
    • The mod installing process is also automated, meaning that you don't need to worry about folder nesting or any other business - the app will find the correct folder containing your new mod and put it in the right place.
    • This is somewhat platform dependent (archive formats are complicated). All platforms support the same formats now, including 7z, tar, and both rar4 and rar5!
    • When installing a mod, the program will check that you don't have a mod already installed to a folder with the same name, or with the same mod ID - this effectively allows you to perform mod upgrades (though actual version checking isn't performed for this aspect - look for it in the future). If you're using symlinks (you know who you are) those are supported and preserved too!
  • Auto-updating for supported mods.
    • Thanks to the efforts of Timid and Histidine, auto-update support is now available for Iron Shell and Nexerelin.
    • This means that once you install these mods, from then onwards the Mod Manager will be able to download and apply updates to those mods at the press of a button, with no further intervention required
    • Hopefully, the list of supported mods will grow over time!
    • WARNING: UPDATING MODS IS ALREADY HAZARDOUS FOR YOUR SAVES. USING THE AUTO-UPDATE FEATURE MAY BREAK YOUR SAVE. YOUR WARRANTY WAS ALREADY NULL AND VOID BUT NOW IT'S NULLER AND VOIDER. NEITHER THE AUTHOR NOR ANY MOD AUTHORS TAKE RESPONSIBILITY FOR SAVES BROKEN BY USING THIS FEATURE. ANY BUG REPORTS ABOUT SAVES BROKEN BY THIS FEATURE WILL BE IGNORED.
    • Welcome to a bright new future of mod update management!
  • View currently installed mods.
  • Enable or disable mods, just as you would in the Starsector launcher.
  • Version Checking!
    • Perform version checking on mods that support it outside of Starsector. This means that you can check which of your mods are up to date without having to boot up Starsector. There's still some improvements that can be done here, which I hope to get out sooner rather than later.
  • Base game compatibility checking.
    • The manager can check what version of Starsector your mods were built for and inform you if they don't match the version you're playing on.
    • Just like in the vanilla launcher, it will warn you if the Release Candidate (RC) values are out of sync, and warn you harder if the patch, minor or major versions don't match.
  • Checks for its own updates!
    • Performs version checks on itself and links you to the latest release.
    • On Windows and Linux, updates after 0.6.0 will support self updating. One click and you'll have the new version.
  • Sort how your mods are displayed.
    • This allows you to sort your mods in the app such that they appear in alphabetical order of ID, mod name or mod author, or by whether they are enabled or not.
  • Filters.
    • Filter out which mods are visible according to a number of filters, including version checker support (or lack thereof), update availability, enabled status, etc.
  • Launch the game from the Manager.
    • Pressing the big "Play Starsector" button in the top right will open the vanilla launcher, letting you cut one more step out of your workflow!
    • See below for an advanced version of this feature.
  • Persistent settings.
    • Point the mod manager to your Starsector install once, and it will keep track of it even after it is closed. Wherever you put or move the app, it should still be able to read your settings. This means that the program is also entirely portable, and can be used from anywhere on your system.
  • Advanced (Windows only): vmparams editing.
    • This feature, found in settings, provides a GUI for editing your vmparams file to change your minimum and maximum RAM allocations to Starsector. I do recommend that you familiarise yourself with the RAM requirements of modded Starsector first though, and the terminology involved (gigabytes, kilobytes, etc)
  • Experimental (Windows only): Skip the vanilla launcher with direct launch functionality.
    • Enable this feature in settings, and from then on pressing "Play Starsector" will launch the game directly into the first loading screen, skipping the extra button press of the vanilla launcher.
    • Due to technical limitations, you must also set your preferred resolution when you enable this feature, and the game will be launched in borderless mode.
    • This feature is largely untested, and may not function as expected. Warranty, null, void, you get it.
  • Multi-platform support
    • Currently supports the big three of Windows, Linux and macOS. Two Linux versions are available: standard/dynamic and static/musl. Linux users on major distros (like Ubuntu) should have no issue using the dynamic version, though some may find that it does not launch, in which case they should try the static version. Windows and macOS users should just be able to plug and play.

Demos in the spoiler below:
Spoiler






[close]

The entire program is written in Rust, and open source. You can find the sources/repository here: https://github.com/atlanticaccent/starsector-mod-manager-rust

Please do let me know if you find any issues, have any suggestions, or want to contribute to the project! I aim to provide some better compilation documentation soon, and will add contribution documentation if there is interest.


Most importantly of all, you can find the latest release here: https://github.com/atlanticaccent/starsector-mod-manager-rust/releases


Important final note: Whilst I've put plenty of love and care into this, no guarantees are provided (see license). There is the possibility that this may muck up your mods, their configs, or your vmparams file. A crash may leave your Starsector installation in an undefined state. Do post here or on GitHub if you encounter any issues, and I may be able to provide some assistance.
« Last Edit: February 15, 2024, 09:54:29 AM by AtlanticAccent »
Logged

dostillevi

  • Ensign
  • *
  • Posts: 30
    • View Profile

This is exciting!
Logged

SolumAmant

  • Ensign
  • *
  • Posts: 2
    • View Profile

Alright well how do you use it? I'm not seeing an .exe or anything.
Logged

Jaghaimo

  • Admiral
  • *****
  • Posts: 661
    • View Profile

This is fantastic. And I already have my saves under git regime, so I can sync between computers and do branching stories so not afraid of bugs.
Some UI feedback - the app is already usable but these should in my opinion put it in "well polished" place:
  • Most important for me - double click a row to open forum thread (if mod is supports version checker). No info about forum thread anywhere, so need to go back to mod, open mod version file and pick the id from there.
  • Whole row could be highlighted instead of just one column.
  • No highlighting for up to date mods, grey (neutral) colour for unsupported mods, and amber/yellow for outdated - less of information overload, when something is outdated you instantly see it (amber, non-neutral code), and when everything is up to date - neutral colours only (white zebra or slightly darker grey).
  • Cells look like they have unnecessary newline or some bottom padding, see screenshot below. Fixing that would let you cram more rows. Perhaps also vertically centre text like select box?
  • Header could have a Unicode arrows (up/down) to indicate which one is being used for sorting.
  • Sorting on version is weird - are you using natural sorting? I'd expect version going ascending / descdending but to be also groupped first outdated, then unsupported, then rest
  • When update is present - local 1, update 2 is not very informative. We already have local in the background, just show full update version instead of last digits for both.
  • Detailed view at the bottom - bolden field names, and right align. Or maybe even borderless two column table (left column right aligned, left as is)? Also vertical size could be lower, just enough to show first Description line with scrolling as needed.
  • Extras: enable all, disable all, show outdated, show unsupported etc. Could replace the menu (Settings) with those in a button bar (along with Settings). Fontawesome icons perhaps?
  • Minor, but would it be possible not to spawn console window? Perhaps this will help: https://stackoverflow.com/questions/29763647/how-to-make-a-program-that-does-not-display-the-console-window
I am very excited to have this in my daily gaming, lifesaver :)

« Last Edit: June 11, 2021, 11:45:57 PM by Jaghaimo »
Logged

AtlanticAccent

  • Lieutenant
  • **
  • Posts: 73
    • View Profile

Spoiler
This is fantastic. And I already have my saves under git regime, so I can sync between computers and do branching stories so not afraid of bugs.
Some UI feedback - the app is already usable but these should in my opinion put it in "well polished" place:
  • Most important for me - double click a row to open forum thread (if mod is supports version checker). No info about forum thread anywhere, so need to go back to mod, open mod version file and pick the id from there.
  • Whole row could be highlighted instead of just one column.
  • No highlighting for up to date mods, grey (neutral) colour for unsupported mods, and amber/yellow for outdated - less of information overload, when something is outdated you instantly see it (amber, non-neutral code), and when everything is up to date - neutral colours only (white zebra or slightly darker grey).
  • Cells look like they have unnecessary newline or some bottom padding, see screenshot below. Fixing that would let you cram more rows. Perhaps also vertically centre text like select box?
  • Header could have a Unicode arrows (up/down) to indicate which one is being used for sorting.
  • Sorting on version is weird - are you using natural sorting? I'd expect version going ascending / descdending but to be also groupped first outdated, then unsupported, then rest
  • When update is present - local 1, update 2 is not very informative. We already have local in the background, just show full update version instead of last digits for both.
  • Detailed view at the bottom - bolden field names, and right align. Or maybe even borderless two column table (left column right aligned, left as is)? Also vertical size could be lower, just enough to show first Description line with scrolling as needed.
  • Extras: enable all, disable all, show outdated, show unsupported etc. Could replace the menu (Settings) with those in a button bar (along with Settings). Fontawesome icons perhaps?
  • Minor, but would it be possible not to spawn console window? Perhaps this will help: https://stackoverflow.com/questions/29763647/how-to-make-a-program-that-does-not-display-the-console-window
I am very excited to have this in my daily gaming, lifesaver :)


[close]

Thank you for the very fast feedback! I'm really happy you like it so far.

I'll try and respond to everything you've written, but it might not be in quite the right order:
  • Very good point, and really should have been part of 0.2.0 - I just got a bit trigger happy. This feature is being tracked here https://github.com/atlanticaccent/starsector-mod-manager-rust/issues/45
  • I'm assuming this is in reference to the update status? I'll experiment with it, but I'm concerned it might make it a bit hard on the eyes with the colours I've chosen - I can always make this configurable from settings.
  • Again, something for experimentation and potentially configuration. A good point on the information overload though.
  • I took this approach as the GUI framework I'm using isn't completely mature (but still really great), meaning there's no automated text wrapping (ie: there's no nice way to insert line breaks). My solution was then to make each row just tall enough to fit two lines, and hopefully that'd be enough for mods with longer names/author lists. Vertical centring is definitely doable though. Tracking here: https://github.com/atlanticaccent/starsector-mod-manager-rust/issues/46
  • Fantastic idea, that shouldn't take much to add
  • I've definitely done something weird here: I don't know why but I implemented a natural sorting on version numbers yeah lol. I'll switch to your suggestion
  • Good point, will change
  • Unfortunately bolding is something I can't do :'(, at least not using standard text in Iced. An SVG based hack or something like it might be possible, but I'm not sure that's a road I want to go down. Another experiment and see. The description box can probably much shorter, yeah - as an insight into how this works, the vertical sizes are based on proportions, so the list is 2/3 and the details box 1/3 of vertical height, give or take some pixels
  • All fantastic suggestions, tracking them here: https://github.com/atlanticaccent/starsector-mod-manager-rust/issues/47
  • Amazing! I thought this had to do with some print statements I'd left somewhere, but this seems to have fixed it! Thank you!

Again, great to hear your feedback. There's still plenty to do, and I aim to keep developing!
Logged

Jaghaimo

  • Admiral
  • *****
  • Posts: 661
    • View Profile

Re: 2&3: This is why I suggested changing the colouring scheme a bit, and that way avoid information overload and eye strain (mostly neutral, and non-neutral but full line when relevant).

Re: 4 - When I was looking to pick Rust for my pet project (I didn't, found Starsector and picked Java) I did some research, read https://www.areweguiyet.com/ and decided to use https://github.com/linebender/druid. I think iced was my fallback in case I didn't like druid. Anyway, at this point I'd be happy with one line-width and just cutting (or letting the cell not to render) text.

New issue: Install mod from archive (probably from folder as well) - initial file picker opens in Starsector folder which is fine, I navigate to Downloads and pick mod - it replaces/updates so fine, I click Install mod from archive again - and at this point I would expect last used directory (so Downloads), but instead I am back at Starsector folder.

And another issue: Updating mod does not work correctly - asks if you want to replace, I say yes, it removes old one, installs new one as `temp_<modname>` and never renames temp to modname. What it does is removes "extension" (everything from last dot) and copies content to that folder. Installing a "fresh" mod works fine, just update behaves in an odd way.

Example:
Upgrading Nexerelin 0.10.2b (I think) that is in "Nexerelin" folder. Program removes that folder, creates "temp_Nexerelin_0.10.2c" and then makes "temp_Nexerelin_0.10" and moves everything from "temp_Nexerelin_0.10.2c" to "temp_Nexerelin_0.10". And it never deletes "temp_Nexerelin_0.10.2c" (empty folder). Same happened for other mods I was upgrading.
« Last Edit: June 12, 2021, 02:55:38 PM by Jaghaimo »
Logged

AtlanticAccent

  • Lieutenant
  • **
  • Posts: 73
    • View Profile

I remember considering Druid too. Looking again, it certainly feels like it has a lot more going on, but it also seems a lot harder to get anywhere. Iced comparatively has far fewer capabilities but the ones that do exist work well enough to get almost there. Maybe one day this project could be rewritten using Druid  ;D.

That file selection behaviour certainly seems annoying, but I can see how to fix it relatively easily.

That last issue seems like a doozy though, I'll have a look right away.

The tragic part of this is that I have almost as much fun building this as gaming, and have yet to play 0.95 hahaha

Edit: For that last issue, are you upgrading from a folder or from a zip/archive? Is the program saying "Folder with name exists" or "Mod with ID exists"?

Edit-I'm_dumb_edition: I see what's going wrong. I tried to be smart and reuse some code, for frankly no good reason. Should be a simple enough fix.
« Last Edit: June 12, 2021, 03:20:46 PM by AtlanticAccent »
Logged

AtlanticAccent

  • Lieutenant
  • **
  • Posts: 73
    • View Profile

I've pushed a new release with some of the features discussed above/a fix or two.




Release notes
  • Links to fractal forum/nexus mods posts if they are included in the .version file of a mod.
    • Clicking a link will open it in your system default browser.
  • Fix: Installing a mod with a conflicting ID/upgrading a mod now works as intended.
Logged

Jaghaimo

  • Admiral
  • *****
  • Posts: 661
    • View Profile

What about self-update notification? Could reuse whole logic, and just have a built-in version file content for itself (and hosted version file with the repo)?

Also updating Ship Direction Marker still fails (leaves a temp folder with the mod inside the temp folder) - probably due to _ in modId. Easiest to reproduce is to install latest, and try to upgrade to the same version.

Similarly, something odd happened to me installing an updated to my mod - Stelnet (from 1.1.2 to 1.1.3) - the update ended in `stelnet-1.1.3`, UI didn't refresh (was still showing outdated even though that one got removed) and trying to re-update ends up with another case of `temp_` folder with mod inside it. Easiest to reproduce - install latest and upgrade to the same version, once for the bug mentioned here, second time for the bug above.

I think both can be tracked down to the program making `modid-version` folder, instead of just using `modid`.

Minor usability issue: start fresh program (no config yet), go to settings, select Starsector folder and tick "enable VM settings" - they are unavailable. Close the app, open again - now you can edit VM settings.

Finally, sorting (initial, or when no column sorting is selected) could be: outdated, unsupported (as they will require manual check), up-to-date with each category just sorted alphabetically.
« Last Edit: June 14, 2021, 05:51:39 AM by Jaghaimo »
Logged

AtlanticAccent

  • Lieutenant
  • **
  • Posts: 73
    • View Profile

What about self-update notification? Could reuse whole logic, and just have a built-in version file content for itself (and hosted version file with the repo)?

I've pitched this idea, and some good feedback on it was that auto updates are hard - mods often have breaking changes, and it's hard to know when a change is a breaking change. You could tag an update as breaking, but then mod authors might always tag the update as breaking. You could have the manager scream that running an autoupdate will maybe break everything, but then users will just click past that all the time. It has the potential to be an endless cat and mouse game, but on the other hand, if people start putting direct download links in their version files, then I'm not opposed to picking those up and building the feature on top of them.

Also updating Ship Direction Marker still fails (leaves a temp folder with the mod inside the temp folder) - probably due to _ in modId. Easiest to reproduce is to install latest, and try to upgrade to the same version.

Similarly, something odd happened to me installing an updated to my mod - Stelnet (from 1.1.2 to 1.1.3) - the update ended in `stelnet-1.1.3`, UI didn't refresh (was still showing outdated even though that one got removed) and trying to re-update ends up with another case of `temp_` folder with mod inside it. Easiest to reproduce - install latest and upgrade to the same version, once for the bug mentioned here, second time for the bug above.

I think both can be tracked down to the program making `modid-version` folder, instead of just using `modid`.

This is now fixed with https://github.com/atlanticaccent/starsector-mod-manager-rust/commit/3c4ac62deda6d8624af9fe8f329530c24cf52e0c, though I can see the possibility of going wrong in the future - I'd try and future proof it but it's kinda hard to think of how right now.

Detailed explanation:
Spoiler
There were a couple bugs at play here.
One was that the code that handled cases where a folder already existed would always trigger the code that would handle mod ID conflicts, even though if it deleted the folder the incoming mod no longer would have a conflicting ID.
The second was that I wasn't running the mod folder parse after successfully updating/replacing a mod with the same ID. So, if you ran a further upgrade it would try to delete a path that didn't exist, and go all kinds of screwy.
Anyway I've tested it a bunch now and installing both Ship Direction Marker and installing/upgrading stelnet work fine.
[close]

Minor usability issue: start fresh program (no config yet), go to settings, select Starsector folder and tick "enable VM settings" - they are unavailable. Close the app, open again - now you can edit VM settings.
Gonna work on pinning this one down now. Not totally sure what's going on there yet.

Finally, sorting (initial, or when no column sorting is selected) could be: outdated, unsupported (as they will require manual check), up-to-date with each category just sorted alphabetically.
Good idea. Would you prefer that ASAP or would you be ok if it came with 0.3.0 (which might be a while)?
Logged

AtlanticAccent

  • Lieutenant
  • **
  • Posts: 73
    • View Profile

Update v0.2.2

Changes in this release:
  • New: Install browsers remembers last browsed directory, and re-opens in it
  • New: Add Apply button to the settings page - writes out any settings that have been changed, but does not close the settings page.
  • Fix: mod list parse failure when "enabled_mods.json" file did not exist
  • Fix: two more upgrade/replace bugs
  • Fix: not being able to edit vmparams on first start (first time selecting Starsector installation directory)



Logged

Yunru

  • Admiral
  • *****
  • Posts: 1560
    • View Profile

It's probably high effort, low reward, but it's plausible to have a customisable load order.

I've not tested with numbers, or mixing cases, but mods are implemented based on their mod name (note: not ID, name), with something starting A overriding something starting C (e.g. Magic Lib starts "zzz").

Thus it should simply be a matter of changing mod names for the profile to generate a load order, say by numbering them.

AtlanticAccent

  • Lieutenant
  • **
  • Posts: 73
    • View Profile

It's probably high effort, low reward, but it's plausible to have a customisable load order.

I've not tested with numbers, or mixing cases, but mods are implemented based on their mod name (note: not ID, name), with something starting A overriding something starting C (e.g. Magic Lib starts "zzz").

Thus it should simply be a matter of changing mod names for the profile to generate a load order, say by numbering them.

I thought about this a bit, but I'm not sure what cases a user would want this for. I know the libs have to load the earliest, but bar those are there mods that would benefit?
Logged

Jaghaimo

  • Admiral
  • *****
  • Posts: 661
    • View Profile

In Skyrim you want a specific load order to end up with a correct overwrites of files. It's needed as there are thousands of mods and files to account for. In Starsector we only have a handful of mods, they don't affect each other (mostly), and sporadically replace vanilla files (mostly append / merge). As such, it is enough to rely on build-in sorting and let modders decide (by aaa-ING or zzz-ING a mod).


Quote
Good idea. Would you prefer that ASAP or would you be ok if it came with 0.3.0 (which might be a while)?

Any time is a good time - your project, your priorities. The only thing I "want" ASAP are bugfixes with no workaround.
« Last Edit: June 14, 2021, 11:45:16 PM by Jaghaimo »
Logged

Zuthal

  • Ensign
  • *
  • Posts: 47
    • View Profile

I would like to be able to run this on macOS. I tried running the .exe version via Wine, though that does not work, so I guess to run it on macOS I would have to compile it myself. Do you have any pointers/instructions for that? Because it looks like it'd be very useful.
Logged
Pages: [1] 2 3 ... 5