The longest journey controller support [Solved]

Hey there,

I hope I put the post in the tight category.

So, I was wondering whether TLJ supports a controller, and if yes how to make it work.

Thanks in advance for your time. ^^

Edit:

I found a solution after quite some searching.

I used qjoiypad.
To install:

sudo apt install qjoypad

Or check your distribution software manager, it should be there (it was on mint 19.3).
I saw in the internet that some times the gamepad is not automatically detected, but that was not my case. Keep in mind that with qjoypad you can use your gamepad outside of the game as well.

I used this (after 2:45) and this (after 2:50) videos as reference as to how to use the program.

And this is the keymapping I did.

I checked the gradient boxes on axis 1 and 2 (which are left analog) and 4 and 5 (which are right analog), selected power function below and put mouse speed at 5 for left analog and 10 for right.
Axis 3 and 6 are lt and rt respectively, and axis 7 and 8 the qpad.
On Axis 1 and 4 were mouse horizontal.
On Axis 2 and 5 were mouse vertical.
On Axis 6 I allocated the “X” key that seems to have a purpose in-game.

According to the second video, by pressing a key, the equivalent box should highlight. That didn’t happen to me so I allocated numbers to each key and used them on a text editor to see which is which.

Le me know if I missed to mention something. ^^

Hey

Not familiar with this game, there are two entries in the database. Which one do you mean?

https://lutris.net/games/?q=The+Longest+Journey

As for your controller, which one do you have and does it work in other games you run via Lutris?

Hi,

First of all, thanks for taking the time to help me. I appreciate it. ^^

I mean the second game in the list, The Longest Journey.
As for my controller I have a logitech f710 wireless, which runs without problems on other games.

Ah this one.

Do you have the steam version? I know Steam has some configuration options for controllers. and I see many people online fiddling with these. Maybe its an option.

No it’s the gog. :confused:
I tried adding the game on steam as a non-steam game to see if the controller would function but it doesn’t unfortunately.

Not very much experience with controllers but this seems very interesting.

https://www.gog.com/forum/owlboy/controller_linux

Thanks a lot! I’ll have a look at it tomorrow and see what happens. ^^

You could try Sc-Controller.

The blurb below the link is wrong, Sc-Controller handles more than Stream Controllers

I didn’t have any luck with SC Controller unfortunately. Or at least I don’t know how to make it work.
So I went to the ResidualVM forum and found about xboxdrv. Here’s the link.
I figured that to make the script work, you need to put the complete path of the file,
ex.

sudo xboxdrv -d --config /home/john/tlj.xboxdrv.ini

where tlj.xboxdrv.ini is the script you download from the github link and you just rename it.

Now the gamepad works, but I have trouble with the key mapping, as I know basically nothing to that. What I understood is missing is the mouse being replaced by the joystick and the left mouse click. I’ll try searching around for a bit, but if anyone can provide any help with that I would really appreciate it. ^^

Great that you are posting your findings. This helps other games who are having the same problems tremendously. :+1:

From what I can see the mappings are in the ini file. For example:

x1=KEY_LEFT:KEY_RIGHT

So could it be a matter of identifying the keys used in this game and editing the ini file accordingly?

If that is the case you could write two shell scripts. One that will start the driver using the game-specific ini file and one that will stop it. The could be placed in the pre-launch and post-launch fields in the Lutris game settings.

Don’t mention it. I will edit my first post when we manage to find a solution to have it as future reference for anyone interested in it, and i can manage it, I will add a script to the lutris installer. ^^

I think it is indeed a matter of identifying the keys, so I searched a bit.

In the script we can find the following:

Maps the Xbox360 controller like this:
-Left analog stick: arrow keys
-D-Pad: arrow keys (duh)
-Left shoulder button: examine
-A: use, select, enter
-B: pick, put away
-X: run
-Y: inventory
-Start: pause
-Back: Esc (exit from menus)
-Home (big Xbox button): main menu

So from that I deduce that the present key mapping doesn’t include the mouse movements, but arrow keys.

From looking on this steam topic I seem to have found a way to know how the gamepad keys are named.
My keys seem to be:

ABS_Y left joy updown
ABS_X left joy leftright
BTN_SELECT left joy click

ABS_RZ right joy updown
ABS_Z right joy leftright
BTN_START right joy click

ABS_HATOY dpad updown
ABS_HATOX dpad leftright

BTN_EAST a but
BTN_C b but
BTN_NORTH y but
BTN_SOUTH x but

BTN_WEST lr
BTN_TL lt
BTN_Z rb
BTN_TR rt

BTN_TL2 back
BTN_TR2 start

Now what bugs me is how to render the left analog stick movement to the mouse movement.

Can the game be controlled by keyboard alone? If this driver doesn’t support mouse mappings maybe the other way around works?

Unfortunately no, it can’t. :confused:

Edit:
Seeing as I was struggling with the key mapping of xboxdrv, I tried using a software with a graphic interface, so I installed qjoypad.
To my surprise, it worked perfectly and it was much easier and quicker!

I binded the keys to my convenience and tried real-time in the game and everything went smoothly.
I will edit my first post with the key binding I used for future reference.

I hope as well that someone will be able give a solution for using xboxdrv as I’m really curious to see how it’s done.