sonic2kk / steamtinkerlaunch

Linux wrapper tool for use with the Steam client for custom launch options and 3rd party programs
GNU General Public License v3.0
2.1k stars 70 forks source link

Mod.io Support? #636

Closed SentaiBrad closed 1 year ago

SentaiBrad commented 1 year ago

Feature Description

https://mod.io/g

There are a lot of mods on this service and it is easy to download and work through them. But, would it be possible to launch mod.io in a container through game mode? I know permissions and access to surrounding file structures are very difficult if not impossible while in game mode. I was wondering how and if it could be implemented though. Granted, super niche of a niche. It would really only be usable in game mode because in desktop mode you just load up the browser page.

More floating the idea out there, it would also require some user interaction as I can imagine it being absolute hell trying to code instructions on where to place mods for every game.

sonic2kk commented 1 year ago

I'm not sure what the idea behind this feature is. If the idea is to have SteamTinkerLaunch automatically launch this site (say in a contained browser) and install mods automatically for each game, then I'm unfortunately going to have to decline this feature suggestion.

If I'm wrong, please give more background on how this site works. If it is just a site where you download mods, surely it is just as easy to download and install the mods? It isn't up to SteamTinkerLaunch to install mods for you. It is a tool to help you manage integrations third party programs, not a modding frontend

sonic2kk commented 1 year ago

I should also mention as well that, if there are any extra steps that are worth documenting to detail how to manually use mods from this Mod.io service, feel free to leave instructions and we can get them added to the Modding wiki page.

I'm not sure how the service works but if it's not ideal to add to SteamTinkerLaunch, but there are extra steps needed to get mods integrated with it on Linux, please detail them and we can document them for other users :-)

SentaiBrad commented 1 year ago

While setting up MO2 for NV/TTW, I remembered mod.io being available for other games. My original idea was to have STL contain the browser, have the user pick what they want, direct the installs and install. Because of the sheer amount of games though, that would be impossible. So my next idea was to more or less just contain the browser and have a method for the user to direct where the mod needs to go. At that point, if it needs to be extracted then mod.io can help with that in GameMode (if possible), and then if there is an exe that STL detects (sometimes mods need to be launched in a special fashion, but I can't remember any off hand smh), then it could probably add that to the games STL commands/have an option when STL launches to launch normal exe or mod.exe (like how steam might prompt users for 32bit/64bit launches, or config launches).

That being said, I 100% understand why you might not want to add it. I tend to get grandiose ideas in my head xD

sonic2kk commented 1 year ago

Ah, I understand now. Basically a mod browser for finding and downloading mods specifically from Mod.io, yes? With the idea being that this will make downloading mods easier on Steam Deck in Game Mode? (and potentially beyond if/when Valve release SteamOS 3 for regular desktops)

If I am understanding you correctly (and apologies if not!), I can see the appeal of this idea but I'm not in favour of adding it. I feel like a user should just use their browser in Desktop Mode, and to be honest it is much preferable for users to do modding in Desktop Mode.

There is another problem with this, too. SteamTinkerLaunch's UI is written with Yad, which is a toolkit meant for showing dialogs in Bash. However on Steam Deck, we use the Yad AppImage, which is basically a pre-built version of Yad. This is because the Steam Deck doesn't come with Yad, so we download this AppImage at install time. This is needed to get STL to run. Hope this makes sense so far :sweat_smile:

The problem arises here: Yad itself has support for rendering webpages I believe using WebKit (on Linux Desktop, we use this for showing the Wiki with the F1 key). However I believe for filesize reasons, the Yad AppImage is not built with WebKit support. This means from Yad we cannot display a browser, and we would have to find some other way to do this, which would mean pulling in another dependency. I'm not necessarily against more dependencies but in this instance I don't believe it's worth pulling in an extra dependency to basically give the user a web browser.

In my own personal opinion, the ideal way to mod games on Steam Deck is to plug in a keyboard and mouse, hook up an external monitor, and do it all from Desktop Mode. MO2 wasn't designed with a touchscreen or even probably such a small screen in mind, and same goes double for Vortex. It was made with the intent being doing all of it from a desktop with probably a 1080p screen or higher. I totally understand that this is not ideal but mod setup is a fiddly process, full of copying files and paths and going through dialogs. It's much more straightforward to do this from a desktop interface (which Game Mode is, by design, not) with regular desktop peripherals, and more convenient to do it from a larger screen.

That's my two cents on this. I don't think it's worth basically building in a browser and doing some file extraction, which is not really that much more difficult for a user to do on their own in Desktop Mode.

Sorry about that, and sorry if I was a bit rude earlier. I don't mean to simply shoot down what is honestly a fairly well thought out request in fairness, but for the reasons outlined I'm not in favour of adding it.

If I got anything wrong or you have anything you think would make it more compelling to add this feature, please do reply! I'll leave this issue open but feel free to close if this answers your request.

SentaiBrad commented 1 year ago

Ah, I understand now. Basically a mod browser for finding and downloading mods specifically from Mod.io, yes? With the idea being that this will make downloading mods easier on Steam Deck in Game Mode? (and potentially beyond if/when Valve release SteamOS 3 for regular desktops)

If I am understanding you correctly (and apologies if not!), I can see the appeal of this idea but I'm not in favour of adding it. I feel like a user should just use their browser in Desktop Mode, and to be honest it is much preferable for users to do modding in Desktop Mode.

You totally are. Thank you for wanting to clarify what I presume to be a fairly thankless position by the overall community. I used to work with the owner of LaunchBox. While I did not code, we constantly talked about improving things, and I was the big sounding board before going to the community at large. So I totally understand your wanting to know more and appreciate that you take the time to understand.

There is another problem with this, too. SteamTinkerLaunch's UI is written with Yad, which is a toolkit meant for showing dialogs in Bash. However on Steam Deck, we use the Yad AppImage, which is basically a pre-built version of Yad. This is because the Steam Deck doesn't come with Yad, so we download this AppImage at install time. This is needed to get STL to run. Hope this makes sense so far 😅

The problem arises here: Yad itself has support for rendering webpages I believe using WebKit (on Linux Desktop, we use this for showing the Wiki with the F1 key). However I believe for filesize reasons, the Yad AppImage is not built with WebKit support. This means from Yad we cannot display a browser, and we would have to find some other way to do this, which would mean pulling in another dependency. I'm not necessarily against more dependencies but in this instance I don't believe it's worth pulling in an extra dependency to basically give the user a web browser.

Excuse my ignorance here: but could a custom app image not be made with exactly what is needed for Distro and DE's that are restrained in Userland only? The WebKit dependency would then be used for everything that the current SteamDeck variant is missing, no? I might be overstating what the paired-down version of STL is missing here.

In my own personal opinion, the ideal way to mod games on Steam Deck is to plug in a keyboard and mouse, hook up an external monitor, and do it all from Desktop Mode. MO2 wasn't designed with a touchscreen or even probably such a small screen in mind, and same goes double for Vortex. It was made with the intent being doing all of it from a desktop with probably a 1080p screen or higher. I totally understand that this is not ideal but mod setup is a fiddly process, full of copying files and paths and going through dialogs. It's much more straightforward to do this from a desktop interface (which Game Mode is, by design, not) with regular desktop peripherals, and more convenient to do it from a larger screen.

That's my two cents on this. I don't think it's worth basically building in a browser and doing some file extraction, which is not really that much more difficult for a user to do on their own in Desktop Mode.

Yea, I mostly agree with this point. If the user is willing to install STL in the first place, then they should be able to open their browser and install from mod.io. The only reason I say mostly is that my thought was thinking of adding more functionality within GameMode. Would a way to install from Decky be possible in that same regard? The reason I ask here is that then a more "general" user could install STL from Decky, and then have mod.io support in GameMode and everything else the browser would allow. I was even reading the Wiki, and technically Vortex and MO2 can be run in GameMode, and you can edit and add to that game only from there.

Sorry about that, and sorry if I was a bit rude earlier. I don't mean to simply shoot down what is honestly a fairly well thought out request in fairness, but for the reasons outlined I'm not in favour of adding it.

If I got anything wrong or you have anything you think would make it more compelling to add this feature, please do reply! I'll leave this issue open but feel free to close if this answers your request.

No, you were not rude in the least. If anything, asking for clarification and clearly caring means you are the furthest thing from being rude. You're all good. A random idea from a seemingly random user about something that is probably fairly hard to implement is a fair reason to need more info or to reject it. If I was in your place, I think I would have done the same thing. xD.

Let me know your thoughts on my expanded thoughts above.

sonic2kk commented 1 year ago

Excuse my ignorance here: but could a custom app image not be made with exactly what is needed for Distro and DE's that are restrained in Userland only? The WebKit dependency would then be used for everything that the current SteamDeck variant is missing, no? I might be overstating what the paired-down version of STL is missing here.

Maybe there is a misunderstanding here. The default Yad AppImage is just downloaded to $HOME/stl/deps/usr/bin/Yad.AppImage (I think it has some numbers after Yad, but you get the idea :sweat_smile:). This AppImage is only used for Steam Deck, and it is downloaded from steamtinkerlaunch-tweaks, and it was built using this tool. Once it's downloaded, a symlink named yad is created in that same folder.

When you build Yad you can specify various flags I believe and for SteamTinkerLaunch, WebKit is disabled when the AppImage is built. If I remember correctly this is to keep file size down. Maybe I didn't explain it well, but SteamTinkerLaunch itself doesn't take WebKit as a dependency, it's the Yad AppImage that has to be built with WebKit support enabled.

I think it is possible to build the AppImage with WebKit support, and you can tell SteamTinkerLaunch to use this custom binary using steamtinkerlaunch yad /path/to/yad. This step has to be done post-installation.

It isn't SteamTinkerLaunch that is missing WebKit support, so it's not SteamTinkerLaunch that is "paired-down" here so-to-speak. It's Yad.

SteamTinkerLauch is just a Bash script, it isn't compiled so you can really customise it however you like. You can just point it to a different Yad binary or even just change where the Yad symlink points to, and you've changed SteamTinkerLaunch to use a custom version of Yad.

Would a way to install from Decky be possible in that same regard?

Sorry, I have no idea what Decky is. And as for "general" users, SteamTinkerLaunch is primarily aimed at experienced Linux desktop users who have used the program before on Desktop, but want it on their Steam Deck. It's also not intended that users do their SteamTinkerLaunch tinkering from GameMode. Ideally it would all be done from Desktop Mode like on a regular Linux desktop, and then they can launch their games pre-configured from Game Mode.


I would like to know more about your thoughts on the AppImage though, I feel like there may have been some crossed wires there and that I am misunderstanding you.

SentaiBrad commented 1 year ago

Crossed wires only in the sense that I got the order of operations wrong I believe. I didn't understand how YAD was implemented, so when I said "Make a modified AppImage", I was referring to YAD. As you can clearly see, I am not a developer, just an end user with just enough knowledge to be dangerous. xD

As for the "General" end user, perfectly understandable. I would never even attempt to disrupt the mission statement.

Decky Loader is a Plugin Manager from within GameMode in the Quick Action Menu (the menu that opens on the right).

https://github.com/SteamDeckHomebrew/decky-loader

It's extremely useful.

sonic2kk commented 1 year ago

Ah alright I think I understand you now. Well it is possible to build the AppImage yourself and tell SteamTinkerLaunch to use that, but SteamTinkerLaunch uses the AppImage that it does for a reason and there are no plans to change that at the moment. This is primarily to keep file size down (I would like to try and find ways to make SteamTinkerLaunch even smaller, getting it < 50mb is my pipe-dream though I don't think it's possible at the moment).

Ah, thanks for the information about Decky. It seems neat, but I myself am not interested in Steam Deck Homebrew, so personally I have no real interest in spending time integrating SteamTinkerLaunch with this tool. I understand you are not a developer so this is not directly aimed at you, but just as a general "putting it out there" sort of thing, the community is welcome to look into this and submit a PR. I would be happy to review something like that, I am just not interested in it myself.

Sorry to disappoint. I'm not invalidating the feature request but just explaining why I don't think it is ideal to implement :slightly_smiling_face: I appreciate the time taken to discuss though.

SentaiBrad commented 1 year ago

Sorry to disappoint. I'm not invalidating the feature request but just explaining why I don't think it is ideal to implement 🙂 I appreciate the time taken to discuss though.

No worries, totally understand. Especially cause some Linux communities have that strange gatekeeping mentality in some communities, but here you guys are open and willing to discuss. That's awesome.

I like the Command Line enough, and respect why it's a tool to use, but if and when I can make things easier, I will xD.

I will be making more bug reports when I come across them, and Feature Requests when I think it's beneficial. :D

sonic2kk commented 1 year ago

I will be making more bug reports when I come across them, and Feature Requests when I think it's beneficial. :D

Of course, please do! And if you would ever like to you are always welcome to contribute code! SteamTinkerLaunch is a pure Bash tool, feel free to download and play around, and if you have anything you'd like to add no matter how small, you're welcome to!

And if you would like to contribute but don't want to code, you can write translations (or get the word out that translations are welcome!) and suggest improvements to the wiki :-) But of course, no pressure.

I'm hoping to make a contributing guide soon-ish, probably before the next release, just need to get some of the features I'm working on currently off my plate.