tralph3 / Steam-Metadata-Editor

An easy to use GUI that edits the metadata of your Steam Apps
GNU General Public License v3.0
161 stars 18 forks source link

Launch options for Linux are not being shown #20

Closed hfc2x closed 1 year ago

hfc2x commented 1 year ago

Hey there. I want to preface this by saying that this is probably just user error on my part, but I can't be really sure.

I wanted to say thank you for this tool, because it seems extremely useful. However, I haven't had any success with it whatsoever. I'm trying to edit some of my games and the tool is working, because I can see that the appinfo.vdf file is being saved, but when I launch Steam, there doesn't seem to be any changes whatsoever. I'll illustrate that with The Ultimate Doom:

The Ultimate Doom is a game that's only available for Windows (technically, since it's a DOS game that can run through DOSBox, and it's only the remaster included with it that's Windows exclusive), so it has to be ran with Proton. I tried adding new options for it with this tool, as seen here: Edit window

I wanted to add options for running the game with Chocolate Doom, so I added new entries below the default ones: Steam Editor pic 1 Steam Editor success

Saving actually DOES change the appinfo.vdf file, as I can see the changes in it when viewed through hex-editing: VDF edit done

However, restarting Steam doesn't change anything. It doesn't show my new options, and it doesn't actually change the appinfo.vdf file either. It just completely ignores it as if it didn't even exist: Steam launch ignores everything

Even like this, checking the appinfo.vdf file shows it still includes the extra entries in the screenshot above, but Steam just shows the default options. Enabling or disabling Proton doesn't change anything, it only removes the play/install button and says the game is only available for Windows as usual.

Now, I don't know if it's just me who's doing something wrong, or Steam changed something along the way that disregards appinfo.vdf. I have the game installed on a secondary drive (ext4 file system), but I also tried installing on the system drive, and it made no difference.

I'm running Manjaro Linux, by the way.

tralph3 commented 1 year ago

Hi, I knew when I was doing this that it would cause confusion, but I didn't really know how to make it clearer. Anyway, it's not you or me who's doing something wrong, it's just a quirk on how Steam manages applications.

You see, each Steam application has associated something called "Depots". I won't pretend I know exactly what these are, but they are sort of packages. These depots contain their own metadata, and they can be associated with a specific operating system. If you check the depots for The Ultimate Doom you'll see that it only contains a single one, with no OS specified (that means Windows). If you see the depots for a cross-platform title you'll see that it has some for Windows, Linux and Mac.

When you tell Steam to download a game on Linux, it will try to download a Linux depot. If the game has no Linux depot associated, it will download a Windows one and run it with Proton. If the game does have a Linux depot associated, it downloads the Linux one, and runs it as a regular executable.

If you force an application to use Proton, you tell Steam to download the Windows depot, regardless of it containing a Linux depot or not.

What you did with my tool, is set launch options for the Linux depot. The check marks at the bottom tell Steam what launch options each depot has. Since The Ultimate Doom contains no Linux depot, these options will never be shown. This means that in order to run Chocolate Doom through a launch options like you want, you'd need to mark it as a Windows launch option.

This also means that you are forced to run it with Proton, which is not really what you want, since it's a native executable of course.

The proper solution would be to add a Linux depot for the game, but that's something that only Valve and the game developer can do so...

I am currently not aware of any way to run native Linux executables through the launch options for a game that doesn't have a Linux depot. Steam will always run it with Proton no matter what. You could tell it to run a batch script and do something funky to launch a Linux executable? I don't really know, I haven't delved too much into that.

But yeah, that's what's causing the issue. I'm sorry that it's not very clear from the program itself. If you do find a workaround, let me know. I have faced this issue before.

Do know that if you really want to, you can add this launch option to literally any other game that has a Linux depot and it will work just fine. It won't be as pretty, but it would work.

Cheers.

tralph3 commented 1 year ago

I just remembered that Luxtorpeda exists. Maybe that could give you an idea on how to bypass this restriction.

hfc2x commented 1 year ago

Ah, okay. Thanks for clarifying. I'll check out Luxtorpeda then.