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

Wabbajack #305

Closed
frostworx opened this issue Sep 8, 2021 · 29 comments
Closed

Wabbajack #305

frostworx opened this issue Sep 8, 2021 · 29 comments
Labels
enhancement New feature or request

Comments

@frostworx
Copy link
Collaborator

With the upcoming Mod-Organizer 2 integration
being mostly finished and complete already, it makes sense to also add Wabbajack support.

Feature requests welcome!

@frostworx
Copy link
Collaborator Author

frostworx commented Sep 8, 2021

waiting for upcoming Wabbajack 3.0 which will have linux support

@frostworx
Copy link
Collaborator Author

frostworx commented Oct 11, 2021

"All the 3.0 work is now being done on the main repo: https://github.com/wabbajack-tools/wabbajack"

No idea how much time I will spend on stl in the future, but leaving this open anyway for possible contributors.

@frostworx
Copy link
Collaborator Author

by @ajventer from this issue
Wabbajack has a hard dependency on stand-alone ModOrganizer2 instances, in order to support a future Linux-capable Wabbajack STL should switch, or at least support, the use of stand-alone rather than shared MO2 instances, which are specific to the bottles of the games they apply to.

@frostworx
Copy link
Collaborator Author

Unlikely that I will find the time to add Wabbajack support. I left the issue open, in case someone wants to contribute a PR.

@ajventer
Copy link

I'd be happy to look into that, but it makes sense to wait until Wabbajack version 3 comes out which is meant to have Linux support. Right now I can only barely get it to run under wine, and it's finicky as hell - and even then it doesn't work because it's game-detection code doesn't understand steam on Linux. Once there is one that works - then one can figure out how to integrate it (if it even makes sense to).

I was just thinking of future proofing for it by changing the way ModOrganizer2 works - since the current approach would be entirely incompatible, so even if you use Wabbajack outside of STL you wouldn't be able to use STL to integrate MO2.

Just changing MO2 to use per-game copies in it's "standalone" mode (where it has a single game per MO2 instance, inside the instance itself, should be a much smaller change. It integrates with Proton's one-prefix-per-game approach already, and it means you can just remove all the game-detection code.

@ajventer
Copy link

PS. I'm actually happy to see if I can implement this change, and submit a PR, but it would be a breaking change - as existing MO2 setups won't work anymore, or alternatively - it would require a whole new mo2_standalone category to exist BESIDE the current implementation, this way users can choose which to use, and keep the current one for legacy support.

So before even trying to code a PR here, there are some decisions to be made, would love your input, then I'll see if I can get a working PR done in between work.

@frostworx
Copy link
Collaborator Author

Thanks for the offer! Until MO2 itself doesn't drop shared instances, I'd prefer to keep the support for those as well, so an additional solution for portable instances should be the way to go.
I think this probably might not even be too problematic to implement.
Basically something like this should work (let us discuss this, I don't know much about MO2):

  • add option USEPORTABLEMO2 to select the desired mode (as the shared mode is pretty much zero config for all games, I'd prefer using that by default)
    USEPORTABLEMO2=0 continue with implemented shared mode
    USEPORTABLEMO2=1:
  • install MO2 into the game WINEPREFIX
  • (when it is safe enough to install DotNet inside the WINEPREFIX without breaking anything, do that as well)
  • reuse the available autodetect/configure functions to create a portable MO2 instance for the running game automatically.

That should be already basically everything, right?
What needs to be checked is if any symlinks created in the shared mode conflict with the portable mode (I doubt that I set any symlinks in the actual game WINEPREFIX though, but only in the MO2 one, so this should be fine already)

@frostworx
Copy link
Collaborator Author

No idea if you'd be still interested in contributing wabbajack3 support (when it's ready) , @ajventer,
but you might want to read this before you spend any time into it.

@frostworx
Copy link
Collaborator Author

reopening because 3.0 major version is released (funny conicidence: this happened just a few days ago, but I haven't looked earlier after closing this issue)
https://github.com/wabbajack-tools/wabbajack/releases
seems like the native linux plans are cancelled(?)

I haven't even downloaded yet any 3.x release, so no idea if this even might be interesting/worth to implement, but might be interesting to know in any case - independantly from steamtinkerlaunch

@frostworx frostworx reopened this Sep 27, 2022
@ajventer
Copy link

ajventer commented Sep 27, 2022 via email

@frostworx
Copy link
Collaborator Author

added a quick&dirty wabbajack test run while writing the mo2 overhaul.
it opens correctly (after installing dotnet48 automatically),
a modlist can be selected as well, but "(Wabbajack.LoginManagers.NexusLoginManager) Logging into Nexus Mods"
opens a mostly black window with the nexusmod url on top. No option to interact with the window (also copying the url is no option). TL;DR: it doesn't seem to be possible to enter thre nexus api key, because the url is not redirected to the default browser.
(I have recognized a similar problem in MO2 recently, where it worked before, so maybe something broke in either proton or firefox - no idea)

@frostworx
Copy link
Collaborator Author

frostworx commented Oct 10, 2022

the relevant snippet from an manual proton wabbajack run (default WINEDEBUG, GE-Proton7-37) seems to be:

wine: Call from 000000007B01255E to unimplemented function wevtapi.dll.EvtCreateBookmark, aborting
so when nobody can help with getting the api key into wabbajack in some other way, I'd guess this is a dead end for now.

2022-10-10 18:03:22.0355|INFO|Wabbajack.LoginManagers.NexusLoginManager|Logging into Nexus Mods
wine: Call from 000000007B01255E to unimplemented function wevtapi.dll.EvtCreateBookmark, aborting
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Repeat 2 times:
--------------------------------
   at MS.Win32.PresentationCore.UnsafeNativeMethods+MILUnknown.Release(IntPtr)
--------------------------------
   at MS.Win32.PresentationCore.UnsafeNativeMethods+MILUnknown.ReleaseInterface(IntPtr ByRef)
   at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(System.Uri, System.IO.Stream, System.Windows.Media.Imaging.BitmapCacheOption, System.Guid ByRef, Boolean ByRef, System.IO.Stream ByRef, System.IO.UnmanagedMe
moryStream ByRef, Microsoft.Win32.SafeHandles.SafeFileHandle ByRef)
   at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(System.Uri, System.Uri, System.IO.Stream, System.Windows.Media.Imaging.BitmapCreateOptions, System.Windows.Media.Imaging.BitmapCacheOption, System.Net.Cache.Reques
tCachePolicy, Boolean)
   at System.Windows.Media.Imaging.BitmapDecoder.Create(System.IO.Stream, System.Windows.Media.Imaging.BitmapCreateOptions, System.Windows.Media.Imaging.BitmapCacheOption)
   at System.Windows.Media.Imaging.BitmapFrame.CreateFromUriOrStream(System.Uri, System.Uri, System.IO.Stream, System.Windows.Media.Imaging.BitmapCreateOptions, System.Windows.Media.Imaging.BitmapCacheOption, System.Net.Cache.RequestC
achePolicy)
   at System.Windows.Media.Imaging.BitmapFrame.Create(System.IO.Stream)
   at Wabbajack.InstallerVM+<PopulateNextModSlide>d__128.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Wabbajack.Instal
lerVM+<PopulateNextModSlide>d__128, Wabbajack, Version=3.0.1.9, Culture=neutral, PublicKeyToken=null]].ExecutionContextCallback(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Wabbajack.Instal
lerVM+<PopulateNextModSlide>d__128, Wabbajack, Version=3.0.1.9, Culture=neutral, PublicKeyToken=null]].MoveNext(System.Threading.Thread)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Wabbajack.Instal
lerVM+<PopulateNextModSlide>d__128, Wabbajack, Version=3.0.1.9, Culture=neutral, PublicKeyToken=null]].MoveNext()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(System.Object)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at System.Windows.Application.Run()
   at Wabbajack.App.Main()
wine: Call from 0000000170032198 to unimplemented function KERNEL32.dll.RaiseFailFastException, aborting
2022-10-10 18:04:16.0716|WARN|Wabbajack.InstallerVM|While loading slide|System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
   at MS.Win32.PresentationCore.UnsafeNativeMethods.MILUnknown.Release(IntPtr pIUnkown)
   at MS.Win32.PresentationCore.UnsafeNativeMethods.MILUnknown.ReleaseInterface(IntPtr& ptr)
   at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri, Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable, Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStr
eam, SafeFileHandle& safeFilehandle)
   at MS.Win32.PresentationCore.UnsafeNativeMethods.WICImagingFactory.CreateDecoderFromStream(IntPtr pICodecFactory, IntPtr pIStream, Guid& guidVendor, UInt32 metadataFlags, IntPtr& ppIDecode)
   at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCa
che)
   at System.Windows.Media.Imaging.BitmapDecoder.Create(Stream bitmapStream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption)
   at System.Windows.Media.Imaging.BitmapFrame.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy)
   at System.Windows.Media.Imaging.BitmapFrame.Create(Stream bitmapStream)
   at Wabbajack.InstallerVM.PopulateNextModSlide(ModList modList) in c:\oss\wabbajack\Wabbajack.App.Wpf\View Models\Installers\InstallerVM.cs:line 497

latest wabbajack2 fails with a "[ERROR] FATAL UNHANDLED EXCEPTION" loop when "logging in to nexus"

@ajventer
Copy link

It is definitely possible to get past the sign-in phase under wine - though the apps isn't particularly stable afterwards and in my case I had to disable DXVK to stop window flickering like mad, even then it wasn't working well - but it was progress. I never actually tried to do a nexus login.
It sounds like this guy did, though his guide doesn't explicitely say so, https://github.com/Omni-guides/Wabbajack-Linux-Bottles

It would be awesome if we could get wabbajack integration. But even if not, the gameMode MO2 now at least makes it possible to use wabbajack setups created on windows (or a VM) with STL - because you can just copy the mods, Stock Game Folder and "profiles" folder over the ones that STL installs (I have also done this successfully with rockerbacon's installer - and am currently running FO4 with magnum opus, the biggest modlist on wabbajack, on my steam deck just fine).
That said, hopefully as the steam deck proliferates and linux gaming becomes a bigger market - wabbajack will actually work on the linux support, if not a native version, at least help get it working better under wine/proton ?

@frostworx
Copy link
Collaborator Author

for the beginning it would be enough if the modding linux community would help more getting mo2/vortex/wabbajack get working better under wine/proton

@ajventer
Copy link

There are a few people trying to work on it, but so far everyone is just testing ideas - I don't think anyone has fully figured it out. It's entirely possible that this actually requires features from wine - it may not be a bad idea to submit your tracedump from above as a bug report at winehq for this app. The next build may contain a fix

@frostworx
Copy link
Collaborator Author

a serious debug output requires a little bit more effort for reporting upstream. I personally don't care for that functionality and won't spend any time on this, while people who care should provide proper reports.

@frostworx
Copy link
Collaborator Author

if someone wants to help with testing if opening nexus login works on their system:

  • use above mo2 overhaul branch
  • manually set USEWABBAJACK here to 1
  • manually download any/latest official Wabbajack.exe to ~/.config/steamtinkerlaunch/downloads/mo2/
  • start a (compatible) game with MO2 enabled

it should install/start wabbajack instead of mo2 (testing, apparently no final implementation)
gfx glitches are known and currently unrelated

@sonic2kk sonic2kk added the Upstream Parts of this issue are pending on upstream changes label Nov 11, 2022
@sonic2kk
Copy link
Owner

Since the MO2 Overhaul branch is merged and STL v12 is released, further testing for Wabbajack would be appreciated!

@ajventer
Copy link

I haven't tried it again in some time - no idea even where to start exactly, but I'm also not sure if it's actually worth mucking about with anymore.
The head dev of wabbajack has joined nexusmods and is now head dev on the collections feature in Vortex, which may actually end up being the default way.
Vortex works reasonably well PROVIDED you can get hardlinks working- windows symlinks don't play well with Linux. But hardlinks do.

@frostworx
Copy link
Collaborator Author

yes, that's why hardlinks are used in steamtinkerlaunch since vortex was implemented

@ajventer
Copy link

ajventer commented Dec 30, 2022 via email

@frostworx
Copy link
Collaborator Author

hardlinks only work when using the same physical drive which is also used by the game.
steamtinkerlaunch by default takes care of both using a directory on that drive and of setting the hardlink in the vortex configs
automatically.

@ajventer
Copy link

ajventer commented Dec 30, 2022 via email

@sonic2kk
Copy link
Owner

STL only works automatically for steam native games

Yup, and that's how it will most likely stay based on my understanding of how STL checks for Vortex games (using the AppManifest), as well as for scope reasons - The project is called SteamTinkerLaunch, after all 😄 The recent Hedge Mod Manager integration also only supports detection of Steam releases of games. MO2 is probably also the same if it has any similar logic.

I'm not sure why the GOG releases may not be working but I figure this is something to do with general Vortex + Wine usage, I don't think STL does anything to break it.

@ajventer
Copy link

ajventer commented Dec 30, 2022 via email

@frostworx
Copy link
Collaborator Author

indeed

@ajventer
Copy link

ajventer commented Jun 8, 2023

I have news on this issue. On a whim I downloaded Wabbajack.exe today, then used Lutris's custom Wine Installer setup to install it, pointed it at the directory and tried to run it. And it seemed to work fine. No UI glitches, the browse feature worked.

I couldn't test it end to end quickly because the next phase requires integration - it needs a supported game visible in the same prefix and when run it will set up MO2.

But this means it is, at least in theory, now possible to create an STL installer for wabbajack, which integrates with games much like Vortex does (by prelinking them in) and maybe even handle the task of letting the user run the created MO2 once they've installed something (though I think one would HAVE to ask the user to manually specify the path as MO2 makes it editable so it cannot be predicted from outside).

I'm fully aware that this is a big job - and I have a newborn, so I definitely don't have the time to take it on, but I thought I would at least let others know that this concept is now within the ream of possibility - if somebody has the time to tinker with it, great.

@sonic2kk sonic2kk added help wanted Features/Bug Fixes that welcome contributions and removed Upstream Parts of this issue are pending on upstream changes labels Jun 8, 2023
@sonic2kk
Copy link
Owner

sonic2kk commented Jun 8, 2023

Thanks for investigating! I don't have much interest in Wabbajack but I'd welcome a contribution on it.

There was some code implemented for Wabbajack (USEWABBAJACK i think is the variable in the global conf) but I have no idea what it does :-)

In general, modding support for STL will have to be contributed by the community, as I do not have the motivation.

@sonic2kk
Copy link
Owner

Given what's going on with MO2 v2.5.0 and the muddy upgrade path, not to mention no interest in this in 2.5yrs, I'm going to close this.

If someone wants to tackle this in future, it would be better to work on helping with MO2 directly first before we look into something like this.

@sonic2kk sonic2kk removed the help wanted Features/Bug Fixes that welcome contributions label Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants