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.06k stars 155 forks source link

Investigate plugins.txt and loadorder.txt behavior #644

Open LostDragonist opened 5 years ago

LostDragonist commented 5 years ago

From NeOniq on Discord: https://discordapp.com/channels/265929299490635777/403979692501106688/542193126052331521

First of all, I want to apologize in advance for my "bad" English, since it not native to me. I hope that my conclusions will be comprehensive and useful for you.

More information on the issue with plugins.txt alphabetic order:

I tried a new method of testing with the external LOOT. Here is a short video: https://youtu.be/-v4Hz6-2OPc Please, let me explain the actions seen in this video to show you the source of the issue:

  1. For the example, initially the load order in MO2 is alphabetical. Then on this video I show the plugins.txt and loadorder.txt - they have the same contents.
  2. I run the external LOOT and scroll the lost to show that USLEEP patch is not the last one, but still under the CoT.esm, which is very strange, because the contents of the plugins.txt was different (USLEEP was last). By the way, previously I removed its settings folder in appdata to make sure that this strange load order not taken from LOOT itself. So, when the LOOT starts running it is the MO2 replaces the load order by a strange one (where USLEEP is under the CoT.esm) and gives it to LOOT. As for the plugins.txt in appdata-skyrim and user documents folders, they both always remain the same before and after the LOOT - they contain only vanilla masters, not plugins from MO. here is a picture with the contents comparasion of all three plugins.txt files: https://i.imgur.com/BVOT6Jp.jpg
  3. Next, before closing the LOOT I opened the plugins.txt and loadorder.txt files and see correct load order in both of them - it's the correct load order was transfered from the LOOT into MO2 profile folder.
  4. After I close LOOT in MO load order instantly becoming alphabetical, again. I open the files and see that the correct load order was gone and replaced by the MO2. That's why in the right panel of MO2 the load order remain always wrong.

Conclusions: Please, carefully look into interface log: https://drive.google.com/open?id=1DwasWngRH4M9hQPKOB5Bd5uS1r285CIO These multiple closing/saving actions is not the accsess errors at all. At this point please don't get me wrong, I really sorry, if it sound harsh for you in some way (English is not my native), just read and you will understand: At first MO2 tries to re-save plugins.txt many times as soon as LOOT is starting. It chages the load order and sends the "strange one" to LOOT. Secondly, MO2 re-saves the load order files in profile folder AFTER it alredy got the correct plugins.txt from LOOT. At this step it would be better to READ this file and re-save it into loadorder.txt (not to replace it), so that the load order will become correct in the right panel. These re-saving MO actions being repeated driven by a code. I don't have any accsess issues on my system 100% - I fully control it, and as I said estarday, I manually adjusted NTFS accsess rights for all folders on my system. Granted full roghts for groups: ALL, administrators and users. All folders, even the system profile folders (appdata) and its subfolders. So the access errors is imposible on my system.

Additional experience with MO1 directly related to current issue in MO2: It is acceptable to state, that the current problem originated from the inherited MO1 issue with plugins.txt, and I know about this legacy problem, I even fixed it for myself when worked with MO1 - this old problem remained unfixed in MO2, but in the most new versions of MO2 this problem was aggravated. Please let me share how I fixed the old problem in MO1 to help you understand the issue better: In MO1 I written CMD script, which makes a copy of the plugins.txt and renames this copy into loadorder.txt. I had run this script after closing the LOOT external utility. After my script was closed the MO1 instantly absorbed a new loadorder.txt and showed it in the right panel correctly. Note: MO1 does NOT re-save the plugins.txt and loadorder.txt after an external tool was closed (such as LOOT).

Thus, I came to a final conclusion: the mechanism of managing the plugins.txt and loadorder.txt need to be changed/fixed, especially for external LOOT. When external LOOT is started MO2 must not re-save the plugins.txt, and after closing the LOOT MO must not re-save the plugins.txt again - it must only re-save the plugins.txt as a loadorder.txt, and after that read the loadorder.txt to fill the right panel with correct load order. I assume, no one discovered this, because users are not curious like me. I spen many time to reveal this mechanics and fixed this for myself in MO2. I hoped that I can do the same in new MO2, but... :wink:

Here is a short video how MO2 acts without the lockedorder.txt: https://youtu.be/CshMZIqq-FM

I really respect your hard work and I will agree with any of your personal opinion about how the load order must be controlled, as I said, I know, that I always can return to MO1 and I will never say to dev team words like "you are wrong", because maybe the team sees the concept different, and I'm just a user, Mod organizer 2 is not my creation. In MO1 the concept of load order was different: I don't need to lock the load order to preserve it, also I don't need to use LOOT, if I want to change the order inside the plugins.txt and duplicate it as loadorder.txt, so that I can fully control and preserve the load order manually and though the LOOT's userlist.yaml without locking it. In MO2 I must lock the load order to preserve it and I can't control the list of plugins, which is very inconvinient (I had over 1200 mods in total in my Oldrim mod set), now it will be quite difficult to rebuild such mod set using MO2. Well, maybe that's why in Skyrim Special Edition almost no one managed to reach more than 200-300 mods in average, since it become inconvenient to maintain a bigger list of mods and plugins. Yeah, I know that 1000-2000 mods is a matter of a personal preference, but users of MO2 has been indirectly deprived of opportunity to even try it. Well, in my humble opinion, the loadorder.txt file must be re-saved only on two triggers:

  1. plugins.txt has been updated externally (by the LOOT or a file was edited by the user) > update loadorder.txt, don't update plugins.txt again.
  2. User dragged & dropped a plugin on the right panel > update both loadorder.txt and plugins.txt Currently MO2 work this way: When plugins.txt has been updated externally, it will be updated by MO2 again, also in alphabetical order. User drag and drop works well on MO2 already.
Al12rs commented 5 years ago

Possibly related to #643 as the logs seem to show similar outputs

Al12rs commented 5 years ago

It seems like MO2 recognizes his skyrim.exe to be an older version so it uses Filetime instead of plugins.txt, which is wrong