Multiple input bindings for a given action

Multiple input bindings for a given action

Postby bryx » 15 Mar 2022, 02:31

Hi,
I would like to have multiple bindings for the same actions. When we play we share 2 controller amongst many people and changing the configurations each time is impractical. We also play with random users and don't really go back to a proper identification each time. The controllers we use have more buttons than required and if this is possible we could easily accommodate the preferences of everyone, which are something like "nitro in the left trigger or left shoulder" or "be able to accelerate and brake/reverse with the vertical axis of the same joystick used to steer" or "use the left dpad or joystick indistinctly for the four directions (acc/brk/left/right)".
In the config GUI each input removed the last when binding. I am more than willing to change the config files manually if possible that way.

I am sorry if this is covered somewhere already. I did search and found https://forum.freegamedev.net/viewtopic ... ing#p76659 but it is a very "matter-of-fact" comment which may be obvious to more experienced users but does not quite explain the details. It did give me hope of it being possible and so here I am posting ;)

Thank you very much for any help and for such a great game!
bryx
 
Posts: 2
Joined: 02 Mar 2022, 14:30

Re: Multiple input bindings for a given action

Postby benau » 15 Mar 2022, 03:23

Then you need to edit $HOME/.config/supertuxkart/config-0.10/input.xml yourself
Image
benau
STK Moderator
 
Posts: 505
Joined: 08 Dec 2015, 17:32

Re: Multiple input bindings for a given action

Postby bryx » 15 Mar 2022, 13:22

Hi. Thank you for moderating my first post so quickly.

I'm game with modifying the file myself, the question is "how?"

I tried adding a second "action" element with the same name and what seems to happen is that the last one is the only one that remains in effect. For example:

I defined the four keys and the alternative WASD inside the same "keyboard" element:

I start the game and only WASD is usable, the arrow keys do nothing.

{l Code}: {l Select All Code}
<keyboard enabled="true" configName="">
   <!-- ... -->
    <action name="accel" event="1" id="38" character="0" /> <!-- UP arrow -->
    <action name="accel" event="1" id="87" character="0" /> <!-- W for WASD -->
   <!-- ... -->
</keyboard>


BTW: I am not sure if it makes any difference but I am running this on Windows, the config file being at %APPDATA%\supertuxkart\config-0.10\input.xml

Thanks!
bryx
 
Posts: 2
Joined: 02 Mar 2022, 14:30

Re: Multiple input bindings for a given action

Postby benau » 15 Mar 2022, 15:58

something like these won't work, try save multiple input.xml and use one depend on user
Image
benau
STK Moderator
 
Posts: 505
Joined: 08 Dec 2015, 17:32

Who is online

Users browsing this forum: No registered users and 1 guest