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.19k stars 163 forks source link

Please re-introduce INI Tweaks per mod #663

Closed tunbridgep closed 3 years ago

tunbridgep commented 5 years ago

There are some mods such as Darnified UI for New Vegas which always need custom INI tweaks. There is also a mod I made called No Magic Compass which uses them (and sets them in a FOMOD installer) to disable Quest markers.

Would it be possible to re-introduce the INI tweaks capability in MO2? It was very, very useful as it helped to keep mods extremely self-contained. Currently, if I need, for example, Darnified UI's INI tweaks, I have to do them to the game INI itself and remember to change it back afterwards. This is bad from a philosophy standpoint as even being disabled, a mod might "bleed" into the rest of the game, which is bad. I want a mod to be COMPLETELY disabled when I disable it, and this includes disabling it's INI changes

I would simply like to have the original INI Tweaks restored, if at all possible.

Also, I am not sure the "Modify INI" fomod function ever actually worked. If not, it would be great to have it work the same way - it would basically add an auto-generated INI file to the list of ini tweaks for any given mod.

Al12rs commented 5 years ago

Sadly all the code handling the Ini tweaks was inside the MO1 Virtualization library, basically it was hacking the game to allow a merged ini file to be shown. MO2 has a completely new Virtual Library which is designed to be a general purpose VFS, with no modding specific code inside. It could be used by other applications which need a virtual file system, without any strange game specific hacks inside.

This means that the entire feature of INITweaks is simply not implemented and actually needs to be implemented from scratch to not require virtualization hacks. It is possible, but the amount of effort and time to implement is very high for the amount of use that the feature actually would see.

Newer games such as Skyrim already natively load INI files with the same name as plugins files (eg: if you have foobar.esp enabled, the game will also try to load foobar.ini if it finds it in the data folder). So the only game that actually would make use of this is Oblivion, and only a restricted number of mods there.

I'm not excluding the possibility of implementing this, simply stating that there are a lot of other features that will take priority over this and the implementation isn't at all trivial.

If someone with development knowledge shows up wanting implement the feature then we would be happy to help him as we can.

gab commented 5 years ago

@Al12rs If this feature was to be implemented, how would you envision it from a technical standpoint? Something like modifying the .ini on-the-fly when launching some application from MO2?

I was wondering if perhaps each ini line could be treated in the conflict logic and viewer as pretty much its own file, with the last mod to modify an ini line "winning".

Al12rs commented 5 years ago

Im actually working on an Ini manager standalone application that will allow handling Ini edits as if they were mods with conflicts, priority with drag and drop etc. I's for a uni project that I have to show mid September but I have other exams to give as wel, so I still have not started on actual code. After the project is done I will see if I can Expose the functionality as a plugin for Mo2 or something

AnyOldName3 commented 5 years ago

I assume you're thinking of having it be an IPluginFileMapper with an onAboutToRun callback to:

and expose that path to the game with the IPluginFileMapper functions.

If so, you might have to figure out what happens when two file mapper plugins map the same path, as the ini bakery plugin will also try mapping something to that path. In fact, what does the ini bakery plugin even do? Is it just mapping the profile-specific ini if it's enabled and otherwise doing nothing?

Al12rs commented 5 years ago

I guess I will find out when the time comes. Still have to start writing the damn thing and pass the exam, as well as three other exams...

Al12rs commented 4 years ago

duplicate of #215

AnyOldName3 commented 3 years ago

This is a description of the original INI Tweaks implementation. There are source code snippets and thoughts on the implications above and below it: https://discordapp.com/channels/265929299490635777/412414009694748693/768522711931682916

Also, I'm not sure why we've got two instances of this issue and only one's got a Duplicate label.