linuxgurugamer

[1.5.1, 1.6.1, 1.7.2] AFBW Revived (Joystick & controller mod)

Recommended Posts

User @nlight created this wonderful interface to improve the controller handling of KSP.  He hasn't been around since 2016, so I'm adopting it.  Original thread is here: https://forum.kerbalspaceprogram.com/index.php?/topic/85711-11-afbw-v17-beta-joystick-controller-mod/

Advanced Fly-By-Wire

The new version for KSP 1.4.x has new dependencies

New Dependencies

CKAN has been updated to install the dependencies, if needed

Supports KSP 1.4+ on 64-bit Windows, 64-bit Linux and OSX

XInput is not available on Linux.

Windows 7 and up. Windows XP is not supported.

Linux users, you must install SDL2 through your distro's package manager (libSDL2-2.so must be present on the system)

 

To install the libsdl2 libraries on Linux, do one of the following:

If on CentOS or Redhat:

sudo yum update
sudo yum install SDL2

If on Ubuntu:

sudo apt-get update
sudo apt-get install libsdl2-2.0-0

 

Features

- Simple to configure
- Edit your control setup at any time during flight, no need to go back to the main menu to change bindings
- Button combos!
- Plug & play
- Multiple presets
- Supports all controller & joystick models using SDL
- Native support for Xbox 360- compatible controllers through XInput
- Unlimited number of buttons and axes
- Keyboard & mouse support
- Lower latency and better analog precision for some controllers
- Dead-zone detection and analog calibration

NgIVDIQ.png

How to use

The mod adds a new button to the mod toolbar. Click the game controller icon or press Shift + L during flight to bring up AFBW's main configuration screen.
After setting up your controller you should save your game (by using quick-save or exiting to space center), which will automatically save your controller configuration as well.

Availability

 

Manual installation

Windows

1. Download the latest mod archive from SpaceDock

2. Copy the contents of the archive inside KSP's root folder. You should see the game controller icon during flight mode.

3. Please note that XInputInterface.dll and SDL2.dll must be in the same folder as the KSP executable and not in GameData.

Linux

1. Download the latest mod archive from SpaceDock

2. Install SDL2 using your distro's package manager (libSDL2-2..so. should be present on the system)

3. Copy the contents of the archive inside KSP's root folder.

 

Report bugs in GitHub's issue tracker or as a reply to this post.

 

Edited by linuxgurugamer

Share this post


Link to post
Share on other sites

I am aware of a problem in the release, am working to fix that right now

Fixed

Edited by linuxgurugamer

Share this post


Link to post
Share on other sites

Oh my ******* god we're back in business boys. Get your second hand used flight sticks out and butter some bread!! :D

Share this post


Link to post
Share on other sites

Wow! Quick question: can you make a Mac version?

Share this post


Link to post
Share on other sites

Thanks for adopting this and all you do for the KSP community. I have seen new members searching and finding this mod but ending up frustrated that it's been orphaned.

I test the buttons and axis and had this input.  I hope it helps.

Win10 64-bt
KSP Version 1.4.3.2152  64-bit  (Steam)
note AGExt is installed too
afbw 1.8.0.1 5/27/18 AM

CTB 0.1.6.5
TbC 0.1.6.7

Buttons with issues:

Pitch Trim+  : Pegs the input to the top right away

Pitch Trim-  : Pegs the input to the bottom right away

SAS (Radial in): Triggers Radial out

SAS (Radial out): Triggers Radial in 

EVA Jetpack: does nothing

EVA interact: not sure what this does

EVA Jump: Does nothing

EVA AutoRun [Toggle]: displays "AutoRun: On/Off" but does not run. 

Physics TimeWarp+ = only works if physics time warp is already started

Navball [Toggle]: Does nothing

IVA Focus Window: Far as I can tell does nothing, but IDK what it should do ( recenter would be a good idea to have as VR roles out)

Axis:

All work but the Wheel Trim(s) are hard to use. Mainly because of there is no way of seeing the input like on attitude. 

 

LOG:

https://drive.google.com/file/d/1Qt-NR-AtBdj6oWtQx7igpPWnnsUPwafq/view?usp=sharing

 

Suggestions:

Add Camera Reset to buttons

Add Steer Left\Right into buttons

Add Drive Forward\Back into buttons

Have options for the action groups to be toggle-able.

Hud mode:  target\surface\orbit 

 

Thank you,

Share this post


Link to post
Share on other sites

This is great Linuxgurugamer,

One request, would it be possible to differentiate gear up and gear down as functions within the Add Buttons list? I know KSP just uses G as a toggle for the landing gear, but since Action Groups can differentiate between retract and deploy, perhaps AFBW could too. I know I could assign them independently to action groups, but given the limited number, it would be nice not to.

Share this post


Link to post
Share on other sites

@linuxgurugamer can I use this as an auto-trim,  i.e., as the fly-by-wire in atmospheric autopilot?  Say,  I click a button and it tries to keep a straight flight,  to the limit of the control surface's authority?

Share this post


Link to post
Share on other sites

I have a trim feature tweak to suggest as well, where the axis position sets the trim position. Currently moving the trim axis sets the magnitude of the trim travel. So if I want to adjust my trim a bit I have to “blip” the knob, tweaking it forward and back or back and forward just a bit to make the change.

Just now, Daniel Prates said:

@linuxgurugamer can I use this as an auto-trim,  i.e., as the fly-by-wire in atmospheric autopilot?  Say,  I click a button and it tries to keep a straight flight,  to the limit of the control surface's authority?

Nothing like that is part of this mod, it’s all direct control

Share this post


Link to post
Share on other sites

Oh,  ok. 

49 minutes ago, Drew Kerman said:

Nothing like that is part of this mod, it’s all direct control

I'll leave it as a suggestion,  anyway. Its a great feature of AA,  I use it and nothing else from that mod (for cruising,  I prefer pilot helper). I imagine AFBW could feature something similar (equal): you press a button,  and it tries to keep straight.

Share this post


Link to post
Share on other sites
24 minutes ago, Daniel Prates said:

Oh,  ok. 

I'll leave it as a suggestion,  anyway. Its a great feature of AA,  I use it and nothing else from that mod (for cruising,  I prefer pilot helper). I imagine AFBW could feature something similar (equal): you press a button,  and it tries to keep straight.

If you use FAR, that has all the tools you need as well. On a recent flight of 1203km I was able to use the Roll stabilizer as an autopilot in conjunction with Waypoint Manager. WM gives me a Great Circle heading to a destination. Due to the rotating planet that heading changes over the course of the flight by a tenth of a degree every minute or so depending on which way I'm flying. So just saying "hold wings level at 0 degrees roll" will drift me off course. But you can open the FAR settings for the stability controls and set the desired amount of roll/pitch/yaw you want. it's accurate to hold a roll to a hundredth of a degree (at least). So I can set it to hold 0.25° (for example) and the aircraft kept pace with the changing heading. I was hands-off the stick from after take off until the time came to approach and land, not counting the middle where I reached the objective and had to fly around manually a bit.

Share this post


Link to post
Share on other sites
1 hour ago, Drew Kerman said:

If you use FAR, that has all the tools you need as well. On a recent flight of 1203km I was able to use the Roll stabilizer as an autopilot in conjunction with Waypoint Manager. WM gives me a Great Circle heading to a destination. Due to the rotating planet that heading changes over the course of the flight by a tenth of a degree every minute or so depending on which way I'm flying. So just saying "hold wings level at 0 degrees roll" will drift me off course. But you can open the FAR settings for the stability controls and set the desired amount of roll/pitch/yaw you want. it's accurate to hold a roll to a hundredth of a degree (at least). So I can set it to hold 0.25° (for example) and the aircraft kept pace with the changing heading. I was hands-off the stick from after take off until the time came to approach and land, not counting the middle where I reached the objective and had to fly around manually a bit.

Yeah I do use far and never got to explore its many tools! Tks for the advice.

Share this post


Link to post
Share on other sites

This mod should be stock! I always found the stock joystick mapper much to be desired... no support for more than 16 buttons and some joysticks won't even work at all!

So i had to use Xpadder to map the remaining buttons...

Share this post


Link to post
Share on other sites
12 minutes ago, MK3424 said:

This mod should be stock! I always found the stock joystick mapper much to be desired... no support for more than 16 buttons and some joysticks won't even work at all!

So i had to use Xpadder to map the remaining buttons...

What is Xpadder?

Share this post


Link to post
Share on other sites
2 hours ago, linuxgurugamer said:

What is Xpadder?

It's a third party app to rebind keys to controllers/sticks.

Share this post


Link to post
Share on other sites
10 hours ago, Torih said:

It's a third party app to rebind keys to controllers/sticks.

Among other things.. 

Quote

Xpadder allows you to map keyboard keys and mouse button actions to your game controller buttons
Xpadder also allows you to map the mouse pointer to your game controller sticks
Xpadder can also handle combinations, sequences, toggles, triggers, shift sets, multiple controllers and more
Xpadder is designed for Windows 10, 8.1, 8, 7, Vista and XP

 

I've used Xpadder for over 8 years now. Jonathan is a great dev, and it's fantastic value for the cheap one-time price (yep - buy once, and you get free upgrades for life). Even after 10 years, it still gets regular updates (usually twice a year) and new features added. There's also a very helpful support forum, and Jonathan is very receptive to feedback.

https://xpadder.com

Edited by JAFO

Share this post


Link to post
Share on other sites

New release, 1.8.0.2

  • Updated name in .version file
  • Updated Jenkins file for Linux build
  • Added missing file for Linux

Share this post


Link to post
Share on other sites

I didn't pushed my changes to github as i am was unsure, if invest time in this mod.
Have you already fixed some bugs? I willing to provide some fixes as pull requests.

Share this post


Link to post
Share on other sites
49 minutes ago, Voidi said:

I didn't pushed my changes to github as i am was unsure, if invest time in this mod.
Have you already fixed some bugs? I willing to provide some fixes as pull requests.

Please do, the only changes I've done have been to update it for 1.4.1 and add support for the ToolbarController (removing all the current button code as not necessary) and support for the ClickthroughBlocker.

I have had a few people mention some issues, I belive there were a few posts above, and this one I got on Twitch:

Quote

But i noticed that there are many buttons my qwertz keyboard that i cannot use, like those that are not part of the standart qwerty keyboard like äöü and ß

 

Share this post


Link to post
Share on other sites

Wonderful to see that you're maintaining this great mod, but unfortunately I'm having some difficulty running it on Linux.

I am on a clean install via steam, using a fresh sandbox save and tried to put a stock craft onto the launch pad, and was able to load in with the prereq mods (ClickThroughBlocker, AVC, Toolbar Control).

However when I added AFBW 1.8.0.2, loading a flight scene causes a segmentation fault under with the 32-bit client, and a some sort of spinlock under 64 bit i.e. a cpu was pegged at 100% usage, never makes progress even after ~30 minutes

 

System info and logs: https://pastebin.com/mC1zEfLF
(Put onto pastebin due to CloudFlare not liking the content, originally put into spoiler sections)

 

I can file this on Github as well if you'd prefer.

Edited by ReyTigerLinux

Share this post


Link to post
Share on other sites

32 bit is not supported.

And I need to see the entire log, not just snippits

That message from ToolbarController is fine, it's just a left-over debug statement

 

On 5/27/2018 at 3:00 PM, Daniel Prates said:

Oh,  ok. 

I'll leave it as a suggestion,  anyway. Its a great feature of AA,  I use it and nothing else from that mod (for cruising,  I prefer pilot helper). I imagine AFBW could feature something similar (equal): you press a button,  and it tries to keep straight.

It's not going to happen.  This mod is ONLY an interface to the joysticks, it doesn't and won't do anything else

On 5/27/2018 at 11:39 AM, Ericwi said:

Pitch Trim+  : Pegs the input to the top right away

Pitch Trim-  : Pegs the input to the bottom right away

That's the way pitch trim works in KSP, nothing can be done about that right now

On 5/27/2018 at 11:39 AM, Ericwi said:

EVA Jetpack: does nothing

EVA interact: not sure what this does

EVA Jump: Does nothing

 EVA AutoRun [Toggle]: displays "AutoRun: On/Off" but does not run

Were you trying to use this EVA?

 

On 5/27/2018 at 11:39 AM, Ericwi said:

Physics TimeWarp+ = only works if physics time warp is already started

Right now, that's just the way it is.

Share this post


Link to post
Share on other sites
4 hours ago, linuxgurugamer said:

 

Were you trying to use this EVA?

 

Yes. On the runway.  I see there were some errors in the log.

Edited by Ericwi

Share this post


Link to post
Share on other sites
10 hours ago, ReyTigerLinux said:

I am on a clean install via steam, using a fresh sandbox save and tried to put a stock craft onto the launch pad, and was able to load in with the prereq mods (ClickThroughBlocker, AVC, Toolbar Control).

However when I added AFBW 1.8.0.2, loading a flight scene causes a segmentation fault under with the 32-bit client, and a some sort of spinlock under 64 bit i.e. a cpu was pegged at 100% usage, never makes progress even after ~30 minutes

 

System info and logs: https://pastebin.com/mC1zEfLF
(Put onto pastebin due to CloudFlare not liking the content, originally put into spoiler sections)

32 bit is not supported.

And I need to see the entire log, not just snippits

That message from ToolbarController is fine, it's just a left-over debug statement

4 hours ago, Ericwi said:

Yes. On the runway.  I see there were some errors in the log.

What exactly were you doing with the EVA?  I need specifics, please

I also need the full log, the "output_log.txt"

Edited by linuxgurugamer

Share this post


Link to post
Share on other sites

I've identified the problems, but it's going to take a little while to fix because of the way it was coded.

Share this post


Link to post
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.