Jump to content

[1.12.x] AFBW Revived (Joystick & controller mod)


Recommended Posts

3 hours ago, LordHelix said:

There is no file in the unity folder ~/Library/Logs>Unity. Is there a way to get ksp to generate it?

No, it's always generated.  From your home directory, you can try using this to find the file:

find . -iname Player.log -print

 

Link to comment
Share on other sites

2 hours ago, LordHelix said:

Im super lost and really want to get the most out of my new joystick with the help of @linuxgurugamer's mod.  Any help would be appreciated. 

I didn't realize you were on a Mac.

All I can suggest is to install the latest sdl2, and then symlink the library to a link with the name of 2.0.14 instead of the 2.0.20 (or whatever)

Edited by linuxgurugamer
Link to comment
Share on other sites

  • 3 weeks later...

Hello everyone !

I have an issue today :
How can I link the "main throttle" axis group that is shown in editor "action group" tab to my controller's throttle axis ?

I do have linked "Throttle"  to my axis, but if I link something to "main throttle" axis group in editor, it does not change the value with my controller, but it does with default keys on keyboard....

Does anyone have / had this issue ? And does anyone knows how to do this ?
Have a nice day all :)

Link to comment
Share on other sites

2 hours ago, Sppion1 said:

Hello everyone !

I have an issue today :
How can I link the "main throttle" axis group that is shown in editor "action group" tab to my controller's throttle axis ?

I do have linked "Throttle"  to my axis, but if I link something to "main throttle" axis group in editor, it does not change the value with my controller, but it does with default keys on keyboard....

Does anyone have / had this issue ? And does anyone knows how to do this ?
Have a nice day all :)

I think I had this issue as well with a Logitech Stick. Don't Think I found a solution. Sorry it's been a while.

Link to comment
Share on other sites

  • 2 weeks later...

is there  away to entirely disable xinput support? I know this is pretty much the opposite of the usual, but it's wrongly detecting a gamepad and causing my device numbering to change and everything freezes when I try to enable/disable devices

Link to comment
Share on other sites

9 hours ago, Hyratel said:

is there  away to entirely disable xinput support? I know this is pretty much the opposite of the usual, but it's wrongly detecting a gamepad and causing my device numbering to change and everything freezes when I try to enable/disable devices

No easily, would be better to disconnect the game pad before starting KSP

Link to comment
Share on other sites

On 5/13/2022 at 10:32 PM, linuxgurugamer said:

I didn't realize you were on a Mac.

All I can suggest is to install the latest sdl2, and then symlink the library to a link with the name of 2.0.14 instead of the 2.0.20 (or whatever)

I realize this might not help on Mac, but something that helped me on Linux:

  • I initially had trouble making KSP (1.12.3) find the library, but then noticed in Player.log that you can place native .so files in KSP_Data/Mono/ inside your KSP folder. Create the Mono subdirectory if it doesn't exist. The log also tells you the filename the game is looking for, in this case libSDL2-2.14 (which means it's trying to load libSDL2-2.14.so).
  • So, if you can get a binary of the libSDL2 2.0.14 DLL compatible with your system, place it (or a symlink to it) as KSP_Data/Mono/libSDL2-2.14.so, and it should work.
    • For Debian-based Linux, such as Ubuntu or Linux Mint:
      • PPAs may have already updated beyond 2.0.14, so that version is no longer readily available.
      • In case of Linux Mint 20.1 (see /etc/lsb-release), which is based on Ubuntu 20.04 LTS (see /etc/upstream-release/lsb-release), I used the amd64 package for Debian 11, from here. DO NOT INSTALL IT - instead, just open it in Archive Manager. You can find the DLL inside the data.tar.xz package that's inside the .deb package. Path therein is ./usr/lib/x86_64-linux-gnu/. You only need libSDL2-2.0.so.0.14.0, the actual DLL file (the file with nonzero size).
      • To check whether your system can load the binary, open a terminal, and ldd libSDL2-2.0.so.0.14.0. If that prints no "not found" errors, the binary should be good to go - just place a copy as KSP_Data/Mono/libSDL2-2.14.so, and test if KSP can now load AFBW without errors.
    • If no suitable binary is available, it might be possible to compile SDL 2.0.14 from source. Instructions on the SDL site.
On 6/17/2022 at 4:24 PM, linuxgurugamer said:

No easily, would be better to disconnect the game pad before starting KSP

Related to this, I would also be interested in a possibility to switch configs easily. I have a both a HOTAS and a gamepad, one of which is much more convenient for traveling... :)

For now, I think I'll do the usual - keep a file manager bookmark handy for the PluginData folder, and switch XML files manually. It's not something I need to do very often anyway.

The most important thing is that joysticks work in KSP 1.12! Thanks @linuxgurugamer for your continued support of the mod!

Link to comment
Share on other sites

  • 2 weeks later...

@linuxgurugamer Thank you for this mod.  I was pleasantly surprised to find that AFBW enables us to use our Flysky i6x RC transmitter as a flight controller in KSP.

Pitch, Yaw, & roll assignments work as expected.

However, while AFBW properly shows the correct True/False toggle state for several of the Flysky button/switches, strangely when I assign the functional buttons/switches to gear, lights, breaks, staging, etc. the result is that _everything_ I have assigned to any one 'button' toggles when I toggle any one of the 'buttons' I have assigned...basically the logic appears to be "if any button is toggled then do every action that is assigned to any button/switch".

Given this, we are currently assigning only the 'gear' to a button/switch, but if possible with this controller, we would like to properly set the other switches that are clearly recognized & toggle correctly in the configuration panel (= button/switch state pairs: 0-1, 2-3, 4-5. 6-7 )

 I have created a short screenshot video showing, as one example, the breaks & landing gear both toggling no matter whether I toggle switch/button 0-1 or switch/button 6-7 (one was individually assigned to gear & the other one to brakes...but as you can see the text also does not make clear which one).

Here is the player.log ( .zip link) in case it is of any help.  Thanks!

1080p screen capture of "all Buttons acting as one" for all assigned actions rather than the individual True/False state which is visibly OK per button in the configuration panel
Link to comment
Share on other sites

5 hours ago, AloE said:

@linuxgurugamer Thank you for this mod.  I was pleasantly surprised to find that AFBW enables us to use our Flysky i6x RC transmitter as a flight controller in KSP.

Pitch, Yaw, & roll assignments work as expected.

However, while AFBW properly shows the correct True/False toggle state for several of the Flysky button/switches, strangely when I assign the functional buttons/switches to gear, lights, breaks, staging, etc. the result is that _everything_ I have assigned to any one 'button' toggles when I toggle any one of the 'buttons' I have assigned...basically the logic appears to be "if any button is toggled then do every action that is assigned to any button/switch".

Given this, we are currently assigning only the 'gear' to a button/switch, but if possible with this controller, we would like to properly set the other switches that are clearly recognized & toggle correctly in the configuration panel (= button/switch state pairs: 0-1, 2-3, 4-5. 6-7 )

 I have created a short screenshot video showing, as one example, the breaks & landing gear both toggling no matter whether I toggle switch/button 0-1 or switch/button 6-7 (one was individually assigned to gear & the other one to brakes...but as you can see the text also does not make clear which one).

Here is the player.log ( .zip link) in case it is of any help.  Thanks!

1080p screen capture of "all Buttons acting as one" for all assigned actions rather than the individual True/False state which is visibly OK per button in the configuration panel
 

 

I'll take a look, but you have to understand that there are hundreds if not thousands of different controllers available for PCs.  Not sure if I can do anything, this hasn't been reported for any other controllers.

I have a RealFlight controller, with multiple buttons, and haven't noticed this either.

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

I'll take a look, but you have to understand that there are hundreds if not thousands of different controllers available for PCs

Thanks!   in case it helps, the FlySky i6x plugged in via usb appears as a standard Win10 HID...& the same buttons etc. show & work 'in game' in the AFBW configuration panel:

click for full resolution to see text clearly
hRestnf.gif
Link to comment
Share on other sites

  • 4 weeks later...

Hi linuxgurugamer,

I'm really excited to continue playing my realism-modded to the max KSP install (RO, RP-1, Principia, yada yada) with a flight stick. Unfortunately I've been having a devil of a time getting it to work. I'm almost there thanks to your work on this mod -- thanks! -- but I can't get my settings profiles to stick: Each time I exit and reload the scene, I have to reconfigure my controller input scheme at best. (Sometimes the flight controls fail to respond completely.) A look at my player.log reveals that AFBW is throwing the following exception:
 

Quote

 

DllNotFoundException: libSDL2-2.0.0.dylib

at (wrapper managed-to-native) SDL2.SDL.SDL_Init(uint)

at KSPAdvancedFlyByWire.SDLController.InitializeSDL () [0x0000a] in <aa89e93a18714f9599fdcfaba3d730f5>:0

at KSPAdvancedFlyByWire.SDLController.SDLUpdateState () [0x00000] in <aa89e93a18714f9599fdcfaba3d730f5>:0

at KSPAdvancedFlyByWire.AdvancedFlyByWire.Update () [0x00000] in <aa89e93a18714f9599fdcfaba3d730f5>:0

UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)

UnityEngine.DebugLogHandler:LogException(Exception, Object)

ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)

UnityEngine.Logger:LogException(Exception, Object)

UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)


(Filename: <aa89e93a18714f9599fdcfaba3d730f5> Line: 0)

 

My complete player.log is here: https://www.dropbox.com/s/e7yy0l5syoecdml/Player.log?dl=0

A clean install with only AFBW and dependencies using CKAN works perfectly. If you have any ideas or advice for me, it would be much appreciated! Let me know if there's any further info I can provide to help figure it out.

Edited by Clam
Link to comment
Share on other sites

2 hours ago, Clam said:

Hi linuxgurugamer,

I'm really excited to continue playing my realism-modded to the max KSP install (RO, RP-1, Principia, yada yada) with a flight stick. Unfortunately I've been having a devil of a time getting it to work. I'm almost there thanks to your work on this mod -- thanks! -- but I can't get my settings profiles to stick: Each time I exit and reload the scene, I have to reconfigure my controller input scheme at best. (Sometimes the flight controls fail to respond completely.) A look at my player.log reveals that AFBW is throwing the following exception:
 

My complete player.log is here: https://www.dropbox.com/s/e7yy0l5syoecdml/Player.log?dl=0

A clean install with only AFBW and dependencies using CKAN works perfectly. If you have any ideas or advice for me, it would be much appreciated! Let me know if there's any further info I can provide to help figure it out.

Try u installing and the reinstalling it

Link to comment
Share on other sites

Thanks for the quick reply. I wasn't sure whether you meant the mod or the game, so I created a fresh 1.10.1 instance and reinstalled all mods from a .ckan modlist. Unfortunately the behavior is unchanged, as is the log output.
 
Here are a couple of screenshots to show a potentially relevant detail: There are two AFBW buttons on the toolbar, one of which brings up the AFBW window as expected, the other of which brings up a faulty window.
 
 
 
Image
Image
 

Link to comment
Share on other sites

1 hour ago, Clam said:

Here are a couple of screenshots to show a potentially relevant detail: There are two AFBW buttons on the toolbar, one of which brings up the AFBW window as expected, the other of which brings up a faulty window.

That's the problem, you have two DLLs installed.

I looked at the log file and saw this:

AssemblyLoader: Loading assembly at E:\temp\Kerbal Space Program RO\GameData\ksp-advanced-flybywire\Plugins\AdvancedFlyByWire.dll
 
AssemblyLoader: Loading assembly at E:\temp\Kerbal Space Program RO\GameData\ksp-advanced-flybywire\Plugins\ksp-advanced-flybywire.dll

There was a bad DLL file there, delete this file:

 

E:\temp\Kerbal Space Program RO\GameData\ksp-advanced-flybywire\Plugins\ksp-advanced-flybywire.dll

Link to comment
Share on other sites

20 hours ago, linuxgurugamer said:

That's the problem, you have two DLLs installed.

I looked at the log file and saw this:

AssemblyLoader: Loading assembly at E:\temp\Kerbal Space Program RO\GameData\ksp-advanced-flybywire\Plugins\AdvancedFlyByWire.dll
 
AssemblyLoader: Loading assembly at E:\temp\Kerbal Space Program RO\GameData\ksp-advanced-flybywire\Plugins\ksp-advanced-flybywire.dll

There was a bad DLL file there, delete this file:

 

E:\temp\Kerbal Space Program RO\GameData\ksp-advanced-flybywire\Plugins\ksp-advanced-flybywire.dll

That worked. Thanks!!

Link to comment
Share on other sites

  • 3 weeks later...
On 8/1/2022 at 2:03 PM, linuxgurugamer said:

That's the problem, you have two DLLs installed.

I looked at the log file and saw this:

AssemblyLoader: Loading assembly at E:\temp\Kerbal Space Program RO\GameData\ksp-advanced-flybywire\Plugins\AdvancedFlyByWire.dll
 
AssemblyLoader: Loading assembly at E:\temp\Kerbal Space Program RO\GameData\ksp-advanced-flybywire\Plugins\ksp-advanced-flybywire.dll

There was a bad DLL file there, delete this file:

 

E:\temp\Kerbal Space Program RO\GameData\ksp-advanced-flybywire\Plugins\ksp-advanced-flybywire.dll

Awesome, I've been wondering what's going on as I was having the same issues.  CKAN shows that the Windows AFBW package contains both DLLs.  Maybe it needs to be updated?

Link to comment
Share on other sites

25 minutes ago, MiloRanger said:

Awesome, I've been wondering what's going on as I was having the same issues.  CKAN shows that the Windows AFBW package contains both DLLs.  Maybe it needs to be updated?

Ummm, are you sure?  This is what CKAN shows for the aBFW for Windows:  

kg18Be3.png

 

This is for the current versoin: 1.8.3.6.  The previous version did have that bad DLL, you should update CKAN before checking 

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

Ummm, are you sure?  This is what CKAN shows for the aBFW for Windows:  

kg18Be3.png

 

This is for the current versoin: 1.8.3.6.  The previous version did have that bad DLL, you should update CKAN before checking 

Ah, you're right.  I'd refreshed CKAN but I hadn't updated from 1.8.3.4 to 1.8.3.6.  TIL!

Link to comment
Share on other sites

15 hours ago, MiloRanger said:

Ah, you're right.  I'd refreshed CKAN but I hadn't updated from 1.8.3.4 to 1.8.3.6.  TIL!

You should always make sure you have the latest version of a mod before reporting a problem. 

I've lost count of how many problems have been solved just like this.

Glad that fixed it for you

LGG

Link to comment
Share on other sites

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...