moraroy / NonSteamLaunchers-On-Steam-Deck

Installs the latest GE-Proton and Installs Non Steam Launchers under 1 Proton prefix folder and adds them to your steam library. Installs... Battle.net, Epic Games, Ubisoft, GOG, EA App, Amazon Games, itch.io , Legacy Games, The Humble Games Collection, IndieGala, Rockstar Games Launcher,PS Plus, Glyph, VKPlay & HoYoPlay. SD Card Support and Games.
https://github.com/sponsors/moraroy
MIT License
2.72k stars 50 forks source link

Shortcut appid and config.vdf inconsistencies. #177

Open sysmoon14 opened 9 months ago

sysmoon14 commented 9 months ago

Thought I'd give us somewhere dedicated to chat about this issue.

I'm still struggling to get some consistent behaviour around both the appids in the shortcuts.vdf file and the behaviour of the application of compatibility tools. I even tried reverting my NSLGameScanner.py file back to an older copy from before we fixed Ubi and added EA, same inconsistencies.

I've noticed that we're still failing to match on the appid when checking if a shortcut exists, and the majority of the time it's falling back to matching the name, exe, and other fields instead.

From my investigation it seems that the appids in shortcuts.vdf are changed by Steam (perhaps encrypted) at some point.

When investigating this further, I decided to print out the appid that is returned in shortcut.get('appid') and compare it to the shortcut we generate using get_steam_shortcut_id(), they were different! If we take the game "Atari Mania" from the epic games store as an example:

so comparing these two will always return False, I think this is the underlying reason that duplicate games were observed.

Following on from this, I decided to manually enable proton for the same game, "Atari Mania" and to my astonishment the config.vdf then yielded a THIRD DIFFERENT appid! This time 2627077445. I can only assume this Steam encrypting the appids or returning them in different formats, and is why we're seeing inconsistent behaviour when applying proton.

So, unless we can figure out this mystery my suggestions at this point are:

I haven't raised a PR to this effect yet, because I wanted to get your opinion first.

moraroy commented 9 months ago

@sysmoon14 steam creates another appid for the same shortcut when an icon is applied to it, if no icon is applied to it, the appid will stay the same, I didn't know that setting the compat tool would give it another app I'd, that's interesting! Well... in the NonSteamLaunchers.sh I assign the compat tool no problem and it stays consistent with the launchers. I gave artwork to already existing shortcuts by "name"instead of appid because they already had one I think there is a way to do it correctly without having it effect us too much. I'll look into it more later today.

moraroy commented 9 months ago

@sysmoon14 may need to revert the duplicate entries seem to be back again for the games as well. Not sure which one to revert to

sysmoon14 commented 9 months ago

I'm not seeing any duplication at all at the moment, do you see it yourself? I've got another PR incoming though to resolve the appid inconsistencies though which should definitely help with duplication problems

moraroy commented 9 months ago

@sysmoon14 good work brother! You may have just saved the script! I added the PR, I definitely will look into the .sh file more.. I have to clean up that script alot haha. At least now in this .py things are alot cleaner thanks to you! This signed ID is similar to what I was using at first I believe I was using the game_id to give each shortcut an identifier. This seems to be more consistent. Before your PR, I noticed it was duplicating if I already had the launchers and games and was running the script.multiple times. I'm thinking I may need to switch up how the servi e is run. I'll do more testing. I know for a fact I have to change some things in the.py in order for the Decky Plug-in to Work.

sysmoon14 commented 9 months ago

No problem, I might take a look at the sh script too, but python is more my wheelhouse.

I've got an idea about automatically uninstalling games that are removed from EGS, Ubi Connect, and EA Play...baby steps though!

moraroy commented 9 months ago

@sysmoon14 I've always wanted to remove the shortcut automatically as well! In the near future just FYI this whole .py may need to change a bit, I'm waiting for a steam update that's going to change how we add shortcuts. Then it'll be pretty cool, I've done alot of testing on that and it's not quite there yet. Maybe you can help with that!

sysmoon14 commented 9 months ago

Oh cool, what's the update you're waiting for? Is it documented anywhere?

moraroy commented 9 months ago

@sysmoon14 you have discord? Add me @moraroy

sysmoon14 commented 9 months ago

Sent a friend request