It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
high rated
Since this game does not support rebinding (and, when I searched, I found comments by the developer to the effect of "that's on purpose"), it doesn't work with my gamepad (DualShock 4 on Linux) out of the box. I use jscal to correct this, running the remap before the game starts and restoring the old when it finishes. I thought I'd post my jscal commands for anyone who cares.

To get the default config, run jsql -q /dev/input/js0. This prints the command to execute to restore the bindings. On mine, it returns:
jscal -u 8,0,1,2,3,4,5,16,17,13,304,305,307,308,310,311,312,313,314,315,316,317,318 /dev/input/js0

I run that command when the game is finished to restore the original mapping, although there's little point. It will be restored automatically if the controller is removed and reinserted, and most games I play these days use the event driver rather than the js driver, anyway (the js driver doesn't support vibration, or precise button and axis labels, for one, not that very many games support these features).

To make the right stick and buttons work correctly, I run this before the game:
jscal -u 8,0,1,3,2,5,4,16,17,13,288,289,290,291,310,311,312,313,314,315,317,318,316 /dev/input/js0

Before the hid_sony driver was changed to be more gamepad-like (4.15?), it returned:
jscal -u 8,0,1,2,3,4,5,16,17,13,288,289,290,291,310,311,312,313,314,315,316,317,318 /dev/input/js0

Which I corrected for this game with:
jscal -u 8,0,1,3,2,5,4,16,17,13,288,289,290,291,310,311,312,313,314,315,317,318,316 /dev/input/js0

And now my rant:

Devs, support remappings. If you really think users shouldn't be allowed to remap for "the intended experience", at least provide a documented way of adding a config file to correct mappings as I have had to do above (which most users won't do). "Adding profiles" for known controllers may cover common cases, but it's a losing battle, in the end, and you'll still end up with users who can't play with a controller because you refuse to let them. This sort of low-level remapping should also be supported for games that allow remapping: it's annoying when I have to swap triangle and square and it swaps the labels at the same time, prompting me to press square now when I should be pressing triangle.

I guess I should at least complement the devs or allowing me to use playstation button labels instead of xbox (but I'm mostly used to the xbox ones by now).

Of course, I may be wrong about all of this, and there's a simple way to make it all work the way it's supposed to without hassle. If so, feel free to enlighten me.
avatar
darktjm: Snip!
Not a Linux user, but thanks for the contribution.
Some +rep for you!
I had the same problem, the buttons bindings of my Wired Nintendo Switch controller (PowerA) are wrong.

I tried your solution with jscal, it works for remapping some buttons except for D-pad buttons.

Then I found another solution that works for me: using xboxdrv by following this guide: (google "Play with any USB controller on Linux using xboxdrv to emulate a XBOX controller")

It allows to map buttons including D-pad buttons and simulate an Xbox controller

Tip: to check how your gamepad buttons are mapped: gamepadviewer.com
Post edited August 18, 2020 by DLight1
avatar
DLight1: I tried your solution with jscal, it works for remapping some buttons except for D-pad buttons.
True, jscal can't convert buttons to axes or vice-versa. I'm not sure what other purpose you meant by remapping the D-pad. I hadn't really thought of that. I have thought a lot about remapping since I made this thread, though. Mostly event device remapping, since js devices are obsolete (the kernel developers decided not to map vibration and LEDs to js, among other things). I completely forgot about this game, though. Maybe this will motivate me to modify my current favored remapping solution to support js devices better (an LD_PRELOAD library that doesn't require root like uniput-based solutions or semi-permanent device modification like jscal). My current alternative is to use xboxdrv with a patch to support vibration (which is irrelevant for games that use js instead of events, anyway). For anyone interested, my notes and code are on my misc. game-related bitbucket project. I would prefer to never use uinput again, but there is one game (Slay the Spire) which crashes with my LD_PRELOAD library. Since crosscode runs via a browser, I expect it will have difficulties, as well.

edit: basic js device support added to my LD_PRELOAD remapper, but probably needs more testing and maybe a jscal-like reordering feature (currently it assigns buttons only in numerical event code order, but that still allows any remapping as long as the game doesn't look at the GBTNMAP/GAXMAP results).
Post edited August 22, 2020 by darktjm