ModOrganizer2 / modorganizer

Mod manager for various PC games. Discord Server: https://discord.gg/ewUVAqyrQX if you would like to be more involved
http://www.nexusmods.com/skyrimspecialedition/mods/6194
GNU General Public License v3.0
2.16k stars 160 forks source link

New modlist flags: download present, scripted install, merged mods. #1126

Open alphaniner opened 4 years ago

alphaniner commented 4 years ago

Requested flags

  1. Flag for mods whose install file is still present in the downloads folder.
    • Should not appear for merged installs, unless MO2 starts recording all files for such installs (which would be a great improvement in itself) and all are present.
  2. Flag for mods that are the product of a scripted install.
    • Again, should not appear for merged installs as long as only the last file is recorded. If the first install was scripted the flag should be removed after a merge.
  3. Flag for mods that are the product of a merged install.
    • If practical, maybe different icon for merges that involved any overwrites and those that didn't.

Rationale

This is based on my practice of mod annotation and file retention:

  1. I delete the files for simple installs and keep (+hide) them otherwise. This flag would be a simple QOL feature to help keep the folder clean.
  2. I append "(I)" to a mod's name in lieu of a flag. Remembering that a mod is the product of a scripted install can be useful for troubleshooting, especially if you record the options you chose last time (too bad this isn't practical to do automatically).
  3. I append "(M)" to a mod's name in lieu of a flag. Again, can be useful for troubleshooting, especially if you record the names of all install files and keep them.
Al12rs commented 4 years ago

Does using the Notes column not work for this? The search text filter can filter the notes as well.

alphaniner commented 4 years ago

I don't think the Notes section is particularly suited to 1).

As for 2) and 3), the method I'm using is the first solution I came up with. My main issue with the Notes field was that it tends to get pushed aside.

If I limit the one-liner section of the Notes to just a few letters and symbols, and move the field away from the very end, it could function like a manual flags area. That's probably what I'll start doing. Thanks for the inspiration.

It would still be nice if this kind of thing were automatic, but if no one else has any interest in this I'm fine with that.

alphaniner commented 4 years ago

Any idea if this is the kind of thing that could be implemented with a plugin?

I didn't realize until just now that plugins could be written in Python.

Al12rs commented 4 years ago

I don't think this can be done with a plugin but maybe @Holt59 knows better.

Al12rs commented 4 years ago

To be honest, I would only see 1 happening, and only to see whether there is a path to a file. Mo2 will not check if the file exists unless you try to reinstall it. There is already a suggestions here: #1084 And then there is this one which would help #1080

Al12rs commented 4 years ago

It could be cool to allow users to define new filters from a plugin.

Holt59 commented 4 years ago

I doubt this can be done with a plugin, or at least not without tremendous efforts.

Flag for mods whose install file is still present in the downloads folder.

You'd need to watch the download folder to check when files are deleted. That's doable but you'd have to have your own watcher, etc.

Flag for mods that are the product of a scripted install.

MO2 has no idea that an install is the product of a scripted install, it's all handled by the installer plugins. You could register a onModInstalled callback that would check the installation_file in the meta.ini, then re-open the archive to check if it was a FOMOD, BAIN, whatever.

Flag for mods that are the product of a merged install.

This is known to MO2 but is not reported to plugins. You could remember the old state of each mod and then check the difference using onModInstalled but that would be pretty heavy.


There are two things related to what you want:

  1. We'd need callbacks, or improved ones. That part is not difficult: we can add a "downloadDeleted" callback, or add details in the onModInstalled callback. That would not work for installation files that are not in the MO2 download tabs thought.

  2. We'd need a way to allow plugins to add extra flags to MO2. That's probably not difficult from a technical point-of-view, but there are decisions to take on how to do that.

alphaniner commented 4 years ago

You'd need to watch the download folder to check when files are deleted. That's doable but you'd have to have your own watcher, etc.

I wasn't actually thinking of something that would be updated in real time, just a check when MO2 is launched and maybe on Refresh.

As for the rest, I'll just stick to my system of using symbols in the Notes field. But thank you for the detailed response.