ebkr / r2modmanPlus

A simple and easy to use mod manager for several games using Thunderstore
MIT License
1.1k stars 178 forks source link

[SPEC - WIP] Modifying install behaviour via "mm.meta.json" #608

Open ebkr opened 2 years ago

ebkr commented 2 years ago

This issue is to work out a specification for an mm.meta.json file to be used to modify mod installation behaviour.

The following fields are currently being considered, however more may be added if needed.

Field Data type Required Description
package_installer string ("BepInEx", "MelonLoader") No Override install behaviour to allow a mod to install as the developer intends should multiple loaders be used for a game. (Potential use case is Subnautica, if ever supported, with both BepInEx and QMods).
overwrites_existing_mod boolean No Should a mod store files in a directory usually inaccessible this would allow the files to be installed to another mod's subdirectory. For use with BepInEx.
mod_to_overwrite string If previous is true Specify the directory to overwrite. Only one directory may be specified.
LordAshes commented 2 years ago

From the TaleSpire community it would be desirable if there was an option to prompt for file overwriting when installing updates. Currently some of the TaleSpire plugins have user configurable files in the plugin folder itself (so that the user does not need to take any action beyond installing the plugin to use the sample configuration) but this means that the configuration files are overwritten when the plugin is updated. I would propose the following installation behavior if possible:

Provide a R2ModMan setting for Replacement Prompting. If the setting is off, updates would replace files without prompting. If the setting is on, any replaced file (that is not the same as before), during update, would cause a prompt asking if the user wants to replace that file. This means if a user uninstalls the plugin and installs the update, no prompts would occur but if the user just updates the plugin, it would prompt for any files that have changed. Any new files included in the update would be added without prompt since they are not replacing files.

This would help avoid having updates overwrite user modified configuration files.

harbingerofme commented 2 years ago

As far as I understand, talespire modding uses BepInEx. Why doesn't it also use BepInEx's configuration system?

LordAshes commented 2 years ago

Currently the most common file access library being used only accesses plugin folders. However, that can be addressed.

The issue is that even if the R2ModMan mods to distribute files into the configuration system, what will happened when the plugin is updated?

Will the configuration files in the update overwrite the previous configuration files thus overwriting any modifications the user made to those files? Will it keep the existing configuration files and thereby potentially prevent the plugin from running because the update uses a different format of configuration file?

This is why a replace prompt would be a nice feature.

On Fri, Sep 10, 2021 at 9:22 AM harbingerofme @.***> wrote:

As far as I understand, talespire modding uses BepInEx. Why doesn't it also use BepInEx's configuration system?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ebkr/r2modmanPlus/issues/608#issuecomment-916900740, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGQ5Y6CGKNENGNQI2FNL22LUBIBBJANCNFSM5C7QHVYQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.