Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOOT fails to update loadorder when run through MO2 command line #1094

Closed
leontristain opened this issue May 28, 2020 · 3 comments · Fixed by #1354
Closed

LOOT fails to update loadorder when run through MO2 command line #1094

leontristain opened this issue May 28, 2020 · 3 comments · Fixed by #1354
Labels
bug issue report User submitted report

Comments

@leontristain
Copy link

leontristain commented May 28, 2020

The problem:

LOOT fails to update loadorder when run through the command line.

Details

I am using MO2 version 2.2.2.1 archive version, downloaded from Nexus SSE page.

I'm trying to automate the running of LOOT by executing it through MO2 on the command line and ran into the following issue.

If I run LOOT through MO2 on the command line, using something akin to <path/to>ModOrganizer.exe -p Default <path/to>LOOT.exe, it would appear to work at first. LOOT would open up and show me my MO2 plugins, and I can sort and apply fine. After I hit the "Apply" button, I can see in the MO2 folder that profiles/Default/plugins.txt got updated with the expected changes. However, once I close LOOT, the changes to plugins.txt gets reverted back to what it used to be.

Whereas, if I open MO2 and run LOOT by manually navigating the GUI, this behavior doesn't happen. After I close LOOT, plugins.txt remains the newly updated list, and loadorder.txt gets updated as expected.

LOOT seems to only care about plugins.txt and seems to be doing the right thing. This looks like an MO2 bug where MO2 is failing to perform some postprocess functionality consistently between the gui-launch case and the cli-launch case.

Please let me know if it seems to be user error on my part or if there's a work around at this time. Thanks!

@leontristain leontristain added the issue report User submitted report label May 28, 2020
@leontristain leontristain changed the title LOOT fails to update loadorder when run through the command line LOOT fails to update loadorder when run through MO2 command line May 28, 2020
@isanae
Copy link
Contributor

isanae commented May 28, 2020

I can confirm that. I'm not sure whether it's something I broke when I changed the process running and lock overlay stuff or if it was always broken. MO doesn't refresh after starting processes from the command line, so when OrganizerCore is destroyed, it writes the old stuff.

It should be as simple as to change the two setWaitForCompletion() calls in main.cpp to setWaitForCompletion(ProcessRunner::Refresh).

@isanae isanae added the bug label May 28, 2020
@leontristain
Copy link
Author

Wow that was quick. Thanks for the quick response, and glad it doesn't sound hard to fix!

For the time being, I will work around this issue by writing a wrapper around LOOT to run through MO2, so that the wrapper can save out the generated plugins.txt and then apply it back onto the plugins.txt/loadorder.txt as a post process. It feels like a dirty hack but it should work I think. Meanwhile I'll wait patiently for when the fix gets out into the public :)

@Al12rs
Copy link
Member

Al12rs commented May 28, 2020

I tested changing those two lines but it doesn't seem to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue report User submitted report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants