-
Notifications
You must be signed in to change notification settings - Fork 72
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
MO2Conf files not written on launch of the app, issue with nxm:// links not resolved #1093
Comments
Regardless of platform, please never use these types of links. However, I'll try to help anyway, as you are not on SteamOS. If you try to remove the download config file or a containing folder for these, does it resolve the issue? I don't use MO2, and I do not use these types of links for any software regardless of platform, so this issue is probably going to just end up as "don't use these links and download mods manually". Also, in saying that #1082 fixed it, the author of that PR said it fixed it, and it didn't cause regressions for me in testing, so it's likely that before or after that commit the issue would persist. In my opinion these links will never work correctly. Quite a few people across many software types have tried to get this to work and it simply has not, including for SteamTinkerLaunch. cc @zerodogg , although it's very reasonable if you like me also put your hands up and don't understand why this isn't working. |
One other thing to test: In the log attached it doesn't look like you're launching MO2. If you run The URL handling code, to my understanding, will launch MO2 but it isn't the same as If you look at the PR, these lines are added to However this is not called in The PR allowed instances to be able to download MO2 mods by configuring them appropriately if they are launched with The assumption from the author may have been the same as mine; MO2 is started with these fixes from that PR before you try to download a mod. If you have done so then we're on the same page and sadly I don't know what the issue is. If you have not. that may be the problem. Try launching the global MO2 with Also, the author of the PR is free to weigh in here and tell me my understanding is wrong. They may have more insight into what is going on (I've written very, very little of the MO2 stuff for SteamTinkerLaunch, it was done years ago by the previous maintainer). |
steamtinkerlaunch.log |
global.txt |
That missing path sounds valid as I don't think this information is available outside of running from Steam. But I don't know if it's needed when running with Wine directly (I thought we ran MO2 with Wine directly specifically to avoid this kind of thing). Did you try removing any of those existing config files and then running both global MO2 and the instance you want to run with, and seeing if that fixes the problem? When I'm on my PC again I'll compare your config with the one on my system and see what is different, if anything. |
Ok, so, the pull request probably only fixed game-specific installs of MO2, and not a global MO2. I'll try to reproduce the issue on my end with a global MO2. |
That makes sense, since the game-specific installs should be using Proton (I think) and would have access to |
Right, so, the global and game-specific MO2s have different code paths for their config files, and thus the original fix doesn't apply for the global one. Give this a try, either by trying the fix-nxm-urlscheme-global branch of my fork at https://github.com/zerodogg/steamtinkerlaunch/ - or by just applying the patch below to your local version. Either way you will need to start MO2 again normally once for steamtinkerlaunch to rewrite the global config file. Then try the links again. Patch: diff --git a/steamtinkerlaunch b/steamtinkerlaunch
index 38f64c6..042fd89 100755
--- a/steamtinkerlaunch
+++ b/steamtinkerlaunch
@@ -19760,6 +19760,9 @@ function updateMO2GlobConf {
{
echo "GMO2EXE=\"$MO2EXE\""
echo "RUNPROTON=\"$MO2RUNPROT\""
+ echo "MO2PFX=\"$MO2PFX\""
+ echo "MO2WINE=\"$MO2WINE\""
+ echo "MO2INST=\"$MO2INST\""
echo "STEAM_COMPAT_CLIENT_INSTALL_PATH=\"$STEAM_COMPAT_CLIENT_INSTALL_PATH\""
echo "STEAM_COMPAT_DATA_PATH=\"$MO2CODA\""
} > "$MYGLOBDLDAT" |
Ok, so that patch isn't quite complete, it also has another code path for launching too. Give me another moment. |
Second time's the charm. Same branch, or the patch below. A global MO2 launches properly with the install URL for me with this one. There are some other issues with the handling that is a bit odd though (ie. it will use the local GM2 variant even if the previous launch was a global one, if the local one exists - which is why my initial patch was incomplete, it "worked" for me since it wasn't using the global one) - but that's not relevant for this particular issue, but needs fixing eventually. git diffdiff --git a/steamtinkerlaunch b/steamtinkerlaunch
index 38f64c6..f5a8acc 100755
--- a/steamtinkerlaunch
+++ b/steamtinkerlaunch
@@ -17626,6 +17626,15 @@ function dlMod2nexurl {
else
writelog "ERROR" "${FUNCNAME[0]} - Could not find a valid $MO instance for '${MONGURL}' - giving up"
fi
+ elif [ -d "${GMO2EXE%/*}" ] && [ -n "$MO2PFX" ] && [ -n "$MO2WINE" ]; then
+ MYINST="$(grep -m1 "\"${MONGURL}\"" "$MO2GAMES" | cut -d ';' -f1)"
+ MYINST="${MYINST//\"/}"
+ if [ -n "$MYINST" ]; then
+ writelog "INFO" "${FUNCNAME[0]} - Starting global MO2 in prefix '$MO2PFX' using '$MO2WINE' on $MYINST"
+ WINEDEBUG="-all" WINEPREFIX="$MO2PFX" "$MO2WINE" "$GMO2EXE" -i "$MYINST" "$1" 2>&1 | tee /tmp/RUNMO2DL.log
+ else
+ writelog "ERROR" "${FUNCNAME[0]} - Could not find a valid global MO2 instance"
+ fi
else
writelog "ERROR" "${FUNCNAME[0]} - Attempted to download Url '$1' for game '$MONGURL', but seems like global '$MYGLOBDLDAT' has incomplete data - giving up" "E"
fi
@@ -19760,6 +19769,9 @@ function updateMO2GlobConf {
{
echo "GMO2EXE=\"$MO2EXE\""
echo "RUNPROTON=\"$MO2RUNPROT\""
+ echo "MO2PFX=\"$MO2PFX\""
+ echo "MO2WINE=\"$MO2WINE\""
+ echo "MO2INST=\"$MO2INST\""
echo "STEAM_COMPAT_CLIENT_INSTALL_PATH=\"$STEAM_COMPAT_CLIENT_INSTALL_PATH\""
echo "STEAM_COMPAT_DATA_PATH=\"$MO2CODA\""
} > "$MYGLOBDLDAT" |
The Mod organizer button in the menu that appears when launching a game with the steamtinkerlaunch compatibility tool is to launch the global mod organizer instance, is that right? I was under the impression that it launched the game-specific instance, that might explain my confusion. |
Nevertheless, your commit will be helping other people. Thanks! |
No, that button should be launching the game-specific one. Sorry, I was confused by you attempting to use the global one in your second comment. Those patches will do nothing for you, then (but will fix stuff for others later, so, uh yay?). Could you just launch MO2 in the normal way you start it (through Steam), then just close it, and upload the steamtinkerlaunch.log that it generates? That file should have some information about it writing the newvegas-specific instance settings. If your steamtinkerlaunch is up-to-date (as it seems to be), then it can't start MO2 without writing those files, so I'm guessing something goes wrong while writing them. Also, check if /home/gabrielle/.config/steamtinkerlaunch/mo2/dldata/newvegas.conf exists, and if it does then include that as well. (it's 00:17 here, so I'll have to dig into this tomorrow morning) |
I'm able to download using nxm:// links if I launch MO2 by setting the MO2 option in the game menu to "gui", thus launching MO2 once I close the Steamtinkerlaunch window. Launching MO2 through the menu button seems to behave differently and won't download mods using nxm:// links. |
The button on the main menu should be the global MO2, or "standalone." Launching MO2 with Game Mode (setting @zerodogg Nevertheless, you're a legend for being able to help with this :-) |
Reopening pending further discussion :-) |
Could you add an indication or a hint in the UI that the button launches it in global mode and that one should use the |
This is already documented on the wiki. Also, "global" is the internal term for it, and comes from ModOrganizer 2 being installed to its own prefix. This mode is used to configure MO2 and is referred to on the wiki as "Standalone Mode", and Game Mode ("GUI") is used for actually launching games, as that's the one installed to the game prefix.
If you think a note on the UI is any more beneficial I guess it could be added, although I'm concerned about how verbose it could end up being. Some people in the past have used it to launch games for example instead of using GUI mode, and adding a note that it's standalone mode won't help people that haven't read the wiki as it won't mean anything to them. The purpose of launching in standalone mode is that it's your "master" ModOrganizer 2, and the others, while still installed to the per-game prefix, are meant to inherit their configuration from the Standalone installation. To my knowledge that's why it was implemented the way it was (I don't use MO2, when I mod games I do it manually). I'm not against adding a UI note I'm just concerned it may not end up being that useful. |
So, like I thought, it wasn't writing the correct file with info about the game install, thus causing the nxm:// link launching to fail since it got confused by being told to use a game-specific instance, but then the game-specific config file not being there. This commit should fix that by falling back to using the game AID (which your logfile confirms is properly set) to detect the game name: zerodogg@7b6c66f |
@Dictorclef Did you have a chance to test if the changes work? If so, I can merge the PR :-) |
@Dictorclef #1096 was merged into master (to avoid further conflicts, particularly with #1100). Feel free to test if this resolves the issue. If so, this issue can be closed. @zerodogg Thank you once again for your hard work on this area 🎉 |
Sorry for the delay and thanks! It seems to be writing the conf file well even in global mode, so I'd say the issue is fixed. |
System Information
Issue Description
Nexus mods downloads don't work through Mod Organizer 2. When I look into the steamtinkerlaunch.log file it complains about the .conf files not being present, an issue I thought was resolved by commit #1082.
Logs
steamtinkerlaunch.log
The text was updated successfully, but these errors were encountered: