would it be possible to have the option to launch a non steam games as a steam shortcut? or export database to steam in the tools?
I'd want this so you can use steam input as its great for emulator games etc and controller support, Programs like ICE allow you to add emulator games to steam so I don't see why playnite couldn't do the same thing!
Edit: i found another potentially helpful way to add this, you can create desktop shortcuts of non steam games by right clicking them so once the playnite data can be imported into steam you can launch it via playnite and thus steam with a url like this steam://rungameid/13099452113107288064 that was for an animal crossing rom as an example.
Depends on how hard is to export games to Steam (I doubt they have API for it). Can you find out where Steam stores data about games you add to it manually?
In shortcuts.vdf
I bought Steam controller recently and looked if there is easy way to connect Steam and Playnite.
Main problem is that after adding emulator to Steam, you can't easily pass arguments to it. For each exported game you need:
-add emulator
-add launch parameters, for emulator and path to rom file
-change name of the shortcut
-generate shortcut link and add it to Playnite
Good news, someone wrote detailed documentation how to do it:
https://github.com/CorporalQuesadilla/Steam-Shortcut-Manager/wiki/Steam-Shortcuts-Documentation
with python implentation:
https://github.com/CorporalQuesadilla/Steam-Shortcut-Manager/blob/master/shortcuts.py
(but I see that there is an opened issue about it not working...)
We may do it using different approach, create some launcher executable. You would import that one to Steam, and run all Playnite games though it.
In practice:
I'm not sure if it's going to work, mainly if Steam is clever enough to hook itself to a child process (the game itself) of launcher executable. The advantage is that we would not have to mess around with configuration of Steam shortcut (other then importing the launcher once) and we will be able to launch whatever we want (including additional scripts and stuff).
I'm not sure if simple launcher will work, because Steam Controller needs Steam Overlay to work, so child process would need to inherit it.
GloSC - https://github.com/Alia5/GloSC is the only other solution I could find, but it still adds shortcuts, and then creates 'a transparent, borderless window' for them. I would use it if I could add shortcuts from command line instead of its GUI.
Details from its author:
https://behind.flatspot.pictures/third-party-steam-controller-software-part2-my-take-on-it/
Oh, and 'one shortcut for all emulators' won't work, because Steam Controller configuration/button mappings are per shortcut/game and everything would need to use that one configuration.
@JosefNemec if you did want to go the route of just importing the non-Steam game shortcuts from Steam as-is, it wouldn't be much effort beyond the changes in #769. Shortcuts are handled very similarly to mods. Instead of folder path in the registry, the shortcuts.vdf filed mentioned above is used. It is just a binary KV file that can be read by the existing KeyValue class from SteamKit.
I'd be happy to take a closer look at implementing.
Problem is not importing shortcuts from Steam, but doing it the opposite way. Creating shortcut in Steam and then running Playnite game via Steam. I would personally like to see this implemented as a plugin once we add ability to overwrite Play action (when starting game) into the API.
I have a mostly working implementation of an extension to automatically create non-Steam shortcuts to games in Playnite. It automatically creates or updates non-Steam shortcuts and updates the game in Playnite to use it.
It's not quite perfect yet, see the TODOs, and it hasn't been tested much. I think it should work correctly on any game with a "Executable" or "URL" GameAction in Playnite.
I just found this tool that has a pretty clever solution. It basically runs a transparent window through steam and that way you can always have the overlay and steam input and in any app, perhaps a similar approach to this could be used? You can read more on it's Github page
https://alia5.github.io/GloSC/
https://github.com/Alia5/GloSC
@darklinkpower told me that the tool I just started developing might help here. Feel free to check it out.
Remote Play Detached
Thanks, I'll check it out. From the quick read I did, it looks like it works similar to what I proposed in one of my previous comments. I'll keep it in mind and do more research when it comes to implementing this.
I forgot to mention that there's a workaround you could use until this is properly implemented. Start Playnite from Steam (add it first as non-Steam game) and then launch games from that Playnite instance.
It works for most games from what I tried. Of course it has some disadvantages, like Steam showing that you are always in "Playnite" game and you can't create Steam input profiles for each game separately since you always only play "Playnite" game.
An user of launchbox made an plugin to it to do something pretty similar to what you guys are trying to do. Maybe it can help? https://github.com/lahma69/SteamLauncher
Most helpful comment
I have a mostly working implementation of an extension to automatically create non-Steam shortcuts to games in Playnite. It automatically creates or updates non-Steam shortcuts and updates the game in Playnite to use it.
It's not quite perfect yet, see the TODOs, and it hasn't been tested much. I think it should work correctly on any game with a "Executable" or "URL" GameAction in Playnite.
https://github.com/bburky/playnite-non-steam-shortcuts