steam-rom-manager icon indicating copy to clipboard operation
steam-rom-manager copied to clipboard

Parser Variables for different user accounts

Open alexander-novo opened this issue 2 years ago • 3 comments

Hi, my suggestion is going to be very Yuzu-oriented, since that's what I have the most experience with, but it might end up applying to other emulators.

Yuzu has a user-profile feature, where saves are stored in different files depending on the selected profile. By default, it will choose whichever profile was last used - and this can't be changed while a game is a loaded. So if you are sharing a system with someone else (a steam deck, for instance), the current user experience is:

  1. Load up game through steam interface

  2. Stop emulation (maybe you can't do that - what if you only have a controller)

  3. Switch profile

  4. Restart emulation

Yuzu also has a command line argument for specifying which user profile to use to launch the game in - it's the index of the user in the 0-indexed list of user profiles. It would be nice if Steam Rom Manager had a parser variable like ${user-index} or something that supported this for the command line arguments field. This way it would autofill the required command line argument for each user account listed

alexander-novo avatar Jun 11 '23 06:06 alexander-novo

I'm not understanding what is being asked for here. If you had 4 user profiles in Yuzu, are you asking that 4 shortcuts be made with one parser for each game with different profiles for each?

Seems like it would be much easier to make 4 parsers, each with the profile set in the parsers command line arguments, this is extremely niche use case for it to be added to SRM.

kencinder avatar Dec 08 '23 01:12 kencinder

Steam ROM Manager has a "User Accounts" field, which you can supply with a list of steam user accounts. These accounts will have the parsed game added as a shortcut to their steam.

In the case of emulators, though, the emulators also have user accounts (and sometimes they let you specify which user you wish to log in as through command line argument). These user accounts separate things like saves - so my save games can only be seen when I'm on my emulator account. It makes more sense, then, that the shortcut generated by SRM for each account would immediately log that user into their own account so they see their own content, like save games. As it is right now, some emulators choose a default of logging in the last user or by default logging in the first user in the list. As well, you can't change users in the middle of a game, so the current flow is open SRM shortcut -> start game on incorrect user account -> close game -> switch account -> relaunch game, which kind of defeats the purpose of using SRM in the first place.

As an example, this can be circumvented in Yuzu by passing the -u <user> argument, where <user> is the index of a particular user in the 0-indexed list of user accounts. This would immediately start Yuzu (and then the game) with the correct user account every time. Then I'd like to be able to specify in my parser:

  1. User accounts: ${personA}${personB} (already possible)

  2. Command line arguments: -u ${user-index} (already possible - just add the new variable)

  3. A list of values to substitute in for ${user-index} that correspond to each value in 1): ${0}${1} (the requested feature - in general it is just a list of any value that changes based on user)

So that person A's shortcut launches with the argument -u 0 and person B's shortcut launches with the argument -u 1.

Let me know if that clears it up.

EDIT: As a slightly more complex example, perhaps you could set option 3 to ${-u 0 -fullscreen}${-u 1 -nofullscreen} and all the shortcuts generated for person A would launch on their user account in fullscreen, while person B's shortcuts would all launch on their account in windowed mode (a personal preference).

alexander-novo avatar Dec 08 '23 01:12 alexander-novo

Yes it clears it up, it's what I thought.

Makes more sense for two Yuzu parsers to be used where the command line arguments specify the Yuzu user-index you want for the parsers associated Steam user account.

eg; A parser with the user account A and Yuzu user index 0, and a parser with user account B and Yuzu user-index 1

It's far more work to do what you're thinking of and far simpler to just use a parser per user account.

kencinder avatar Dec 08 '23 05:12 kencinder

Yeah SRM doesn't do emulator specific features, this would be a yuzu specific variable. As Ken says you can achieve this by just having a few parsers instead of one.

cbartondock avatar Apr 26 '24 13:04 cbartondock