razuhl / SSMSController

Adds controller support for starsector combat.
GNU Lesser General Public License v3.0
5 stars 1 forks source link

Starsector doesn't work with DS4 #2

Closed DUBlajes closed 3 years ago

DUBlajes commented 3 years ago

I have a problem: I'm using DS4 with a PS4 controller and, even though the game recognises the controller, once configured it doesn't work.

Is there any solution?

razuhl commented 3 years ago

The game only supports DirectInput so it shouldn't be necessary to use DS4Windows. If you are using it make sure you are not disabling the directinput signals and using only the xinput for xbox360 simulation.

DUBlajes commented 3 years ago

The game only supports DirectInput so it shouldn't be necessary to use DS4Windows. If you are using it make sure you are not disabling the directinput signals and using only the xinput for xbox360 simulation.

I've also tried with a DS3 and SCPToolkit and I have the same problem with both DS3 and DS4:

The game detects the controller but it doesn't work... The buttons A,B,X,Y Start and Select work both neither the analog sticks nor the directional buttons nor the triggers do.

razuhl commented 3 years ago

Sounds promising. If the buttons work then it should be a mapping issue. Please attach your "C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\starsector.log"(default path) and "C:\Program Files (x86)\Fractal Softworks\Starsector\saves\common\SSMSQoL.json.data". Make sure it is the setup where the buttons work and then starting and closing the app is enough to produce the relevant info in the log.

DUBlajes commented 3 years ago

Ok, here they are:

Logs.zip

razuhl commented 3 years ago

Ok it seems you have your controller running as an emulated xbox 360 controller with the default mapping. However the mappings seem to be language sensitive. The axis names must be changed.

X Axis = Eje X Y Axis = Eje Y X Rotation = Rotación X Y Rotation = Rotación Y Z Axis = Eje Z

X/Y Axis is one stick, X/Y Rotation is another and Z Axis are the triggers. The buttons are mapped via numeric index and are unaffected. You should have a, b, y, z, start, select, left bumper, right bumper, push down stick left and push down stick right. What those inputs correspond to on the PS4 controller is based on how you mapped PS4 to Xbox.

You can lookup the values for mapping in the starsector.log by searching for "Found controller" there is a section that is listing all available devices and their button/axis readouts. The D-Pad won't work if you use an xbox controller since microsoft moved support for that and rumble to XInput instead of DirectInput. If you map the device "Wireless Controller" which should be the PS4 native then the dpad input should be available as buttons(you get 14 instead of 10 buttons and an additional axis Rotación Z).

DUBlajes commented 3 years ago

Finally! It worked! Thank you very much for all your help, dude!