Jump to content

Joystick Woes


Recommended Posts

Hi all,

I can't get my joystick to work with KSP on Windows. It's a Thrustmaster Hotas Warthog. I've tried with drivers, without, thought it might be a usb 3 issue so I installed drivers for that from Intel. No dice. In the in-game settings menu, I get no input from any of the axis controls when I try to configure input. It just doesn't react when configuring axes at all, says "None", where it should say axis 1.3 or whatever. None of the buttons work either. I'm running a stock KSP, clean install of the latest release (1.6.x), on Windows 7. I also tried on 1.3.1, which is my modded install.

Interestingly, I've tried this on OSX, and it works perfectly fine. I say interesting because the joystick has no support for OSX, it's just configured as an HID. But alas, my Windows desktop is much more macho, so I really want to run it there. At least I know 1) the joystick is clearly working, and 2) I'm setting it up in KSP correctly.

I'm not sure how to upload an attachment to the forum or I would share my game log. For what it's worth, I don't see any references to joysticks, the name of the device or input devices in there.

I've also tried, for what it's worth, passing the joystick input through ucr and vjoy. Also not detected by KSP. I tried running the AFBW mod, but it wasn't available for 1.3, and I haven't tried on the stock game.

Best,

OOSTRA

Link to comment
Share on other sites

5 hours ago, jeaneallenn said:

I am using Thrustmaster T.16000M FCS. I bought this one for the elite dangerous. 

I also have the T.16000M FCS (also bought for elite dangerous). It's not working for me either.

I also installed Fly-by-wire mod, it didn't help either. I can use "calibrate" to see that the buttons, sticks and sliders, are all doing stuff, but when it comes to flying, only dead stick.

Did you do any setup? Do you have a config file?

Link to comment
Share on other sites

  • 2 months later...

I have a Microsoft Sidewinder Force Feedback 2 Joystick. It was released in 1998 and it uses USB. It works great in Descent and similar games.

I tried to use it in Kerbal Space Program, but the axis are not detected correctly, moving the joystick from one end to the other results in several jumps in the corresponding axis in the game. It was beyond unusable.

The solution I found requires two different pieces of software. FreePIE to create a mapping script and vJoy to install a virtual Joystick that works well with KSP.

FreePIE requires you to write a script in Python in order to make your Joystick work. It is very powerful but writing the scripts is not as simple as mapping using a GUI.

So, here's the script that works with the Sidewinder Joystick:

from System import Int16

def map_range(n, lu, hu, lm, hm):
	return lm + (hm - lm) * float(n - lu) / (hu - lu)

if starting:
   #min = Int16.MinValue
   #max = Int16.MaxValue
   # Kerbal Space Program hack
   max = 16000
   min = 1-max
   
vJoy[0].x = map_range(joystick[1].x, -1000, 1000, min, max)
vJoy[0].y = map_range(joystick[1].y, -1000, 1000, min, max)
vJoy[0].rz = map_range(joystick[1].zRotation, -1000, 1000, min, max)
vJoy[0].slider = map_range(joystick[1].sliders[0], -1000, 1000, min, max)
vJoy[0].setButton(0, joystick[1].getDown(0))
vJoy[0].setButton(1, joystick[1].getDown(1))
vJoy[0].setButton(2, joystick[1].getDown(2))
vJoy[0].setButton(3, joystick[1].getDown(3))
vJoy[0].setButton(4, joystick[1].getDown(4))
vJoy[0].setButton(5, joystick[1].getDown(5))
vJoy[0].setButton(6, joystick[1].getDown(6))
vJoy[0].setButton(7, joystick[1].getDown(7))
vJoy[0].setAnalogPov(0, joystick[1].pov[0])

After this, in KSP both Joysticks will appear, the Sidewinder is the first and the virtual one is next.

When mapping the controls, KSP will sometimes register the Sidewinder and sometimes register the vJoy. To fix this you should also edit the settings.cfg file.

The settings.cfg file for my KSP looks like this (only the relevant parts):

INPUT_DEVICES
{
	vJoy - Virtual Joystick = 1
	SideWinder Force Feedback 2 Joystick = 0
}
AXIS_PITCH
{
	PRIMARY
	{
		name = vJoy - Virtual Joystick
		axis = 1
		inv = False
		sensitivity = 1.81119001
		deadzone = 0
		scale = 1
		group = 0
		modeMask = -1
	}
	SECONDARY
	{
		name = None
		axis = -1
		inv = False
		sensitivity = 1
		deadzone = 0
		scale = 1
		group = 0
		modeMask = -1
	}
}

I hope this helps other to use whatever Input devices they want to play KSP.

Edited by Sheldonari
Clarify section introduction
Link to comment
Share on other sites

Others will surely have to modify the script according to the axis and buttons in their hardware.

There's a very useful diagnostics function to observe the values reported by the joystick when it is moved.

diagnostics.watch(joystick[1].x)

 

Link to comment
Share on other sites

  • 10 months later...
On 6/7/2019 at 5:33 AM, Sheldonari said:

Others will surely have to modify the script according to the axis and buttons in their hardware.

There's a very useful diagnostics function to observe the values reported by the joystick when it is moved.


diagnostics.watch(joystick[1].x)

 

Can you tell wich values to play with?

Yeah, i'm still using 1.4.5

Edited by Neros7
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...