sal_vager Posted April 19, 2013 Share Posted April 19, 2013 (edited) Originally posted by Bedazzled; 28th August 2012 at 07:27, and recovered by AtanvaryarUse PPJoy (64bit version here) to create a virtual joystick, then use GlovePIE to run a script which maps the physical joystick controls to virtual ones which are interpreted correctly by Kerbal. The script needs to be running in the background while you are running Kerbal.1. PPJoy- open 'configure joysticks' dialog- click 'add...' to create virtual joystick- select it, click on 'mapping...', click on next- select 'delete individual mapping - use interface default'- click on next / yes / finish2. GlovePIE script:- open GlovePIE- enter and save the script below- click on run (do this each time you play Kerbal)//joystick axes (rockets - uses rudder controls for roll)PPJoy1.Analog0 = Joystick1.RotZPPJoy1.Analog1 = Joystick1.yPPJoy1.Analog2 = -1 * Joystick1.zPPJoy1.Analog6 = Joystick1.x//joystick axes (space-planes - uses rudder controls for yaw)//PPJoy1.Analog0 = Joystick1.x//PPJoy1.Analog1 = Joystick1.y//PPJoy1.Analog2 = -1 * Joystick1.z//PPJoy1.Analog6 = Joystick1.RotZ//pan camerakeyboard.Left = Joystick1.Pov1Rightkeyboard.Right = Joystick1.Pov1Leftkeyboard.Up = Joystick1.Pov1Downkeyboard.Down = Joystick1.Pov1Up//zoom in/outKeyboard.Equals = Joystick1.button3Keyboard.Minus = Joystick1.button4//map other keys to joystick buttons as requiredKeyboard.T = Joystick1.Button1Keyboard.M = Joystick1.Button2Keyboard.F2 = Joystick1.Button8//etc3. SETTINGS- You must edit the Kerbal 'settings.cfg' file manually, it won't work if you try to bind the controls in-game:...AXIS_PITCH{name = VirYid = joy0.1inv = Falsesensitivity = 1deadzone = 0}AXIS_ROLL{name = VirXid = joy0.0inv = Falsesensitivity = 1deadzone = 0}AXIS_YAW{name = VirRotZid = joy0.3inv = Falsesensitivity = 1deadzone = 0}AXIS_THROTTLE{name = VirZid = joy0.2inv = Falsesensitivity = 1deadzone = 0}...NB you may need to play around with the joystick IDs in the script and config file, depending on what other controllers you've got plugged into your PC. Hope that helps! You might also find xpadder is useful when setting up sticks and pads Edited April 19, 2013 by sal_vager Link to comment Share on other sites More sharing options...
ash73 Posted December 26, 2014 Share Posted December 26, 2014 (edited) Hi, thought I'd update this thread as I recently upgraded to Win 8.1 64 bit and found PPJoy doesn't have signed drivers.All is not lost, if you want to use literally ANY joystick with Kerbal on Win 8.1, all you need is vJoy and FreePIE. They are similar to PPJoy and GlovePIE, except FreePIE uses Python syntax.1. Install vJoy, create a virtual joystick, and use the "configure vJoy" program to set up the required number of axes, buttons and pov hats.2. Install FreePIE, and enter the following script:# KERBAL virtual joystickfrom System import Int16# position of joystick in USB game controller list (starts at 0)joyID = 1if starting: # indent following lines<press tab>system.setThreadTiming(TimingTypes.HighresSystemTimer)<press tab>system.threadExecutionInterval = 5<press tab>joystick[joyID].setRange(Int16.MinValue / 2.001, Int16.MaxValue / 2.001) # you might need to mod this# map analoguevJoy[0].rx = joystick[joyID].xvJoy[0].y = joystick[joyID].yvJoy[0].x = joystick[joyID].zRotationvJoy[0].z = -1 * joystick[joyID].zvJoy[0].setAnalogPov(0, joystick[joyID].pov[0])diagnostics.watch(joystick[joyID].pov[0]) # can be used to determine pov values for each direction# map buttonsif joystick[joyID].getDown(0): # indent following line<press tab>vJoy[0].setPressed(0)elif joystick[joyID].getDown(1): # indent following line<press tab>vJoy[0].setPressed(1)# etc...# map keys to buttonskeyboard.setKey(Key.T, joystick[joyID].getDown(0))keyboard.setKey(Key.M, joystick[joyID].getDown(1))keyboard.setKey(Key.NumberPadPlus, joystick[joyID].getDown(2))keyboard.setKey(Key.NumberPadMinus, joystick[joyID].getDown(3))# etc...# map pov hatskeyboard.setKey(Key.DownArrow, joystick[joyID].pov[0] == 0)keyboard.setKey(Key.LeftArrow, joystick[joyID].pov[0] == 9000)keyboard.setKey(Key.UpArrow, joystick[joyID].pov[0] == 18000)keyboard.setKey(Key.RightArrow, joystick[joyID].pov[0] == 27000)# end of scriptNotes: (a) To find the correct value of JoyID, go to search, enter "USB game controllers", and find the joystick's position in the list (for item 1, joyID=0)( Script indents were lost in post, use TAB to indent appropriate lines3. Edit Kerbal / settings.cfg. It has to be edited manually, it won't work if you try to bind the controls in-game. In my case I map the axes to joy2.0, joy2.1, joy2.2 and joy2.3AXIS_PITCH{ name = None id = joy2.1 inv = False sensitivity = 1 deadzone = 0.05 scale = 1 group = 0 switchState = Any}AXIS_ROLL{ name = None id = joy2.0 inv = False sensitivity = 1 deadzone = 0.05 scale = 1 group = 0 switchState = Any}AXIS_YAW{ name = None id = joy2.3 inv = False sensitivity = 1 deadzone = 0.05 scale = 1 group = 0 switchState = Any}AXIS_THROTTLE{ name = None id = joy2.2 inv = False sensitivity = 1 deadzone = 0.05 scale = 1 group = 0 switchState = Any}4. Save the script, run it, then start Kerbal.5. You can alt-tab back to FreePIE and edit the script while Kerbal is running if you need to modify your keyboard mappings.HTH Edited December 26, 2014 by Bedazzled Link to comment Share on other sites More sharing options...
ash73 Posted December 26, 2014 Share Posted December 26, 2014 p.s. links - vJoy and FreePIE Link to comment Share on other sites More sharing options...
minkz Posted September 13, 2017 Share Posted September 13, 2017 Hi, can i use this for all car games? And where can i download Kerbal? Link to comment Share on other sites More sharing options...
monstah Posted September 13, 2017 Share Posted September 13, 2017 9 minutes ago, minkz said: Hi, can i use this for all car games? And where can i download Kerbal? Since this thread is ancient, I really have no idea whether it still works or not, and what does it work with. Better start a new one. You can buy KSP from the store, or from Steam. Link to comment Share on other sites More sharing options...
Recommended Posts