luxtorpeda-dev/luxtorpeda

Set recommended controller configuration for certain engines

Closed this issue · 7 comments

Feature Request

Certain engines will need a specific gamepad/joystick configuration in order to be really playable.

Solution

Investigate if luxtorpeda can configure or at least, suggest a config for each engine.

Additional Context

No response

@neuromancer Are you talking about steam configurations or in-game configurations?

There's already some games where the game engine data is setting a gamepad configuration, you can see those by the metadata. Is there any in particular that you're interested in?

For reference, the last time I messed around with it was this ticket: luxtorpeda-dev/packages#529

You'll also see in the metadata (the json file in packages) where there's references to controller support and what's known/supported so far.

Are you talking about steam configurations

Yes. In the particular case of wetlands, the steam controller with the gyroscope works great (moving the mouse with the trackpad is really slow), so perhaps could be nice to associated a particular config option with that.

Interesting, not sure if theres anything we can do to change steam controller configs, but could be worth looking into. Theres packages like this (https://github.com/meh/steamy/tree/master/vdf) that can read vdf files but would still need to determine where those are stored and how they could be changed,

Someone on discord had some thoughts on this that should help:

In our case we are just having one layout for the entirety of RetroDECK that we need to version handle.
It's a huge layout profile that has a radial and several sub-radial menus + a different input profile when you press R4 or L4 for the hotkeys.
Basically it gives you direct access to over 70+ hotkeys quickly when you game, so no matter if you jump from Wii to SNES to PSP, there should be functions you could use (I have not seen anyone do this at this scale so far  ).  

How we are doing in our internal beta channel is:
Steam allows both custom profile icons and custom profiles to be put in their respective folders /template and /binding_icons. So we can just inject our profile with the users permissions inside those folders.

BUT

In your use-case you have an GAMEID that you are targeting so you should in theory be able to inject it into lets say the Morrowind folder and only allow it to show up in Morrowind.

Our problem is that being an external application that you get an random  GAMEID  that is different on  each machine, so we can't target that... thus the template folder.

Looks like the following could be used to get the steam user id:

STEAM_CLIENT_CONFIG_FILE = /home/d10sfan/.local/share/Steam/steam.cfg

STEAM_COMPAT_CLIENT_INSTALL_PATH = /home/d10sfan/.local/share/Steam

SteamUser = d10sfan

/home/d10sfan/.local/share/Steam/config/loginusers.vdf

= 
"users"
{
	"76561197990646384"
	{
		"AccountName"		"d10sfan"
		"PersonaName"		"d10sfan"
		"RememberPassword"		"1"
		"WantsOfflineMode"		"0"
		"SkipOfflineModeWarning"		"0"
		"AllowAutoLogin"		"1"
		"mostrecent"		"1"
		"Timestamp"		"1694443004"
	}
}

Once the 76561197990646384 is found (which is a steamid64), it can be converted to a steamid3.

Then if the folder the game lives in has a steam_input_template.vdf file, copy it to /home/d10sfan/.steam/steam/userdata/30380656/241100/remote/controller_config/1148590/, replacing the user id and the app id.

This would then let steam input profiles be imported automatically on game launch, although the user would need to pick it, which I think would be the best workflow anyways.

May be simpler than that if last_user from the steamlocate works (locate our own app and then ask for last user, which should be accurate since we're running). https://github.com/WilliamVenner/steamlocate-rs/tree/49826554e81fab76994ecbb843b3480173f611b5#steamid-ng-support

Implemented this in #242

Steam input templates can be provided in the game directory and then they'll be imported. Some more details can be seen here about how to create the template - https://github.com/luxtorpeda-dev/packages/blob/master/docs/Creating_a_Package.md#steam-input-templates