Jump to content

[1.1] AFBW v1.7-beta (Joystick & controller mod)


nlight

Recommended Posts

Hello everyone,

After reading the last few pages and installing AFBW 1.5.1 with the .DLL update posted a few days ago, here is what I get when i click the AFBW button:

Broken AFBW interface

This is in KSP 1.0.2 under Windows 7 64 bit. Is this the "SDL issue" discussed a few post back or something else?

You know what, this just happened to me too. My keyboard profile editor now looks just like yours.

I was trying to map keyboard keys in AFBW instead of the stock input system, hoping it would solve my multiple keypresses issue. (Side note: it did not.) Since I use the X52, some of my joystick buttons are joystick buttons and some are keyboard keys.

I tried adding a keyboard mapping for SAS Hold, which I thought was mapped to a keystroke but was actually a joystick button. The AFBW key mapper interface immediately changed into the window you pasted a screenshot of, all the way down to the almost-invisible outline of some GUI element in the top left.

What happened is AFBW put the XML appropriate for a joystick button into the section for keyboard keys in advanced_flybywire_config_v21.xml, and permanently confused itself. My AFBW seems to be pretty good about not letting me press keyboard keys while assigning joystick buttons, but theoretically this could swing both ways. You might be able to fix your XML file and go on about your business.

I was able to fix mine without losing my profiles.

A joystick mapping looks like this:


<KeyValuePairOfDiscreteActionBitset>
<Key>Stage</Key>
<Value>
<m_SingleData>0</m_SingleData>
<m_Data>
<int>2</int>
<int>0</int>
</m_Data>
<m_NumBits>42</m_NumBits>
</Value>
</KeyValuePairOfDiscreteActionBitset>

A keyboard mapping looks like this:


<KeyValuePairOfDiscreteActionBitset>
<Key>Custom06</Key>
<Value>
<m_SingleData>0</m_SingleData>
<m_Data>
<int>0</int>
<int>4194304</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
<int>0</int>
</m_Data>
<m_NumBits>329</m_NumBits>
</Value>
</KeyValuePairOfDiscreteActionBitset>

I found this entry in the keyboard section (<wrapper>KeyboardMouse</wrapper>)


<KeyValuePairOfDiscreteActionBitset>
<Key>SASHold</Key>
<Value>
<m_SingleData>0</m_SingleData>
<m_Data>
<int>16</int>
<int>0</int>
</m_Data>
<m_NumBits>42</m_NumBits>
</Value>
</KeyValuePairOfDiscreteActionBitset>

Deleting it put things back to normal. AFBW interface is working fine now.

If yours is acting up because of a misplaced button in your keys section, the bad entry will probably be at the bottom of that section. Looks like AFBW adds mappings in order as you enter them.

Link to comment
Share on other sites

Thanks for trying an find a solution to my problem.

I tried reinstalling AFBW today and figure out what was wrong by following misterbk file template. To my surprise, I clicked on the AFBW button and the interface was alright! I think my problem was that I misplaced the two files "SDL2.dll" and "XInputInterface.dll" in the Gamedata folder instead of the KSP main folder...

Anyway, this is weird that, as misterbk pointed out, the interface can get screwed up when adding key map. I'll try and fiddle around with it now that I got the interface working and report back on my findings.

Update: After adjusting and tweaking a few things in AFBW, I came to the conclusion that it is not very useful in it's current state:

- Throttle assignment is only using the "last half of the axis" so you end up with throttle starting to increase past the middle point.

- Changing analog rate to "Quadratic" cause close to zero movement to be completely ignored. My guess is that this is due to some sort of imprecise rounding method: Act kind of like a large "dead zone". Would also be more useful if you could adjust this for each individual axis instead of globally or have a "curve editor" for each axis instead.

I am going to stick with default controller support and Saitek profiler for now...

Edited by Galenmacil
Link to comment
Share on other sites

Thanks for trying an find a solution to my problem.

Anyway, this is weird that, as misterbk pointed out, the interface can get screwed up when adding key map.

Just if you add a joystick button binding to the keyboard/mouse bindings.

- Throttle assignment is only using the "last half of the axis" so you end up with throttle starting to increase past the middle point.

Did you calibrate? I get this before I've calibrated.

- Changing analog rate to "Quadratic" cause close to zero movement to be completely ignored. My guess is that this is due to some sort of imprecise rounding method

That's the expected behavior of quadratic. It adds precision to small movements and makes large movements less precise. Use linear, the x52 already has good precision close to center. Also, you should use either the deadzone in the control panel, or the deadzone in Kerbal, not both. I turned off deadzones in the drivers and that seems to work.

I am going to stick with default controller support and Saitek profiler for now...

You will probably notice laggy controls when your framerate starts to drop. This mod fixes that, but as you saw can add some other annoyances. If you have trouble with high part counts, give it another try. Also a must for remapping axes for spaceplanes and rovers, and gives you some new mappings that aren't in stock, like parking brake.

Hopefully we eventually get either a fix for this or stock joystick support that doesn't suck. :\

Link to comment
Share on other sites

Loving this mod, great to be able to use my stick for flying with FAR :)

However the rover issue is a bit of a pain, I've had a look around but not been able to see a solution. Any suggestions? or do I need to remove the mod whenever I want to use the rovers?

Thanks

Link to comment
Share on other sites

Yeah I'd tried that, the profile is not selected but its still got the reverse on full when driving. Can't see anything else to disable it aside from that, am I missing something?

Link to comment
Share on other sites

Yeah I'd tried that, the profile is not selected but its still got the reverse on full when driving. Can't see anything else to disable it aside from that, am I missing something?

Check the game's regular bindings, make sure the axis isn't bound in those.

Sometimes the AFBW plugin correctly removes the binding from the game's regular controls section, sometimes it doesn't. I had at least one axis stay bound in the vanilla settings area too, and thought the plugin didn't work until I found it.

Link to comment
Share on other sites

  • 2 weeks later...

- Throttle assignment is only using the "last half of the axis" so you end up with throttle starting to increase past the middle point.

Did you calibrate? I get this before I've calibrated.

:\

Do you mean calibration in the mod or outside of KSP? Because with AFBW's calibration it doesn't fix that issue for me, unless I'm doing it incorrectly.

Link to comment
Share on other sites

Do you mean calibration in the mod or outside of KSP? Because with AFBW's calibration it doesn't fix that issue for me, unless I'm doing it incorrectly.

If your throttle has half of its range negative like mine (a Logitech Extreme 3D Pro) then the AFBW calibration won't help. It won't shift the negative values to be positive values.

If you have calibration software outside of KSP that can shift the values to be all positive then that might work.

Link to comment
Share on other sites

If your throttle has half of its range negative like mine (a Logitech Extreme 3D Pro) then the AFBW calibration won't help. It won't shift the negative values to be positive values.

If you have calibration software outside of KSP that can shift the values to be all positive then that might work.

You don't need to do that: just callibrate using AFBW (ensuring your throttle is at 0% when you start) and then invert the axis in AFBW. Works for me with my Saitek X52 in Linux.

Link to comment
Share on other sites

You don't need to do that: just callibrate using AFBW (ensuring your throttle is at 0% when you start) and then invert the axis in AFBW. Works for me with my Saitek X52 in Linux.

That is the really important part. If you don't do this, you might end up with inverted half range throttle course.

Link to comment
Share on other sites

You don't need to do that: just callibrate using AFBW (ensuring your throttle is at 0% when you start) and then invert the axis in AFBW. Works for me with my Saitek X52 in Linux.

I was surprised that this worked. I had looked at the source earlier but I missed the section of code for calibration. Thanks!

One point to clarify, setting to what the Controller Configuration showed as 0% didn't work for me. I had to move the throttle all the way down to the position I wanted to be 0%. This showed up as 1 until I hit calibrate.

Link to comment
Share on other sites

One point to clarify, setting to what the Controller Configuration showed as 0% didn't work for me. I had to move the throttle all the way down to the position I wanted to be 0%. This showed up as 1 until I hit calibrate.

Yes, I meant the physical position of 0%. Thank you for adding the clarification.

Link to comment
Share on other sites

Try using one of the finger knobs for the rover throttle. If you were to get the main throttle to work with rovers, you would probably experience problems trying to use it for liftoff and spaceplanes.

I vaguely remember getting it to work once, but I have been experiencing a different odd glitch with the throttle. Usually it is zero to -1.0, but every now and then the game sees my throttle as a full axis that goes negative to positive. I don't know how or why, because by design that joystick's throttle axis (like all throttle axes) is supposed to be zero when the throttle is all the way down. It's possible that the first time I tried rovers was a time when I got that glitch. I end up calibrating inside AFBW on every launch.

Ever since the first day, I've been using the finger wheels for rovers. The main reason is they have a detent in the middle where I know the wheels are off.

Honestly though, rovers are so bugged in that game that I stopped using them entirely after I landed the first one on the Mun. They are nigh frictionless, like slowly melting ice wheels on a Teflon planet. The brakes don't even stop the wheels when the throttle is at zero and the rover is stationary, flipped upside down with its wheels in the air. You can make them stop spinning by deactivating their motors and then applying brakes, but until you do that throttle in both directions makes them spin faster, and it still takes like 30 seconds for a free-spinning rover wheel to stop itself. The rover can't even stay traveling forward, it will slowly angle to one side and start this weird infinite frictionless skid in the direction it was traveling. Yet somehow, even when the rover is sliding frictionlessly 30° to the left of its wheel axes and has no reaction wheels or RCS thrusters, you can still use the steering to slowly control its yaw. (Which would indicate to me that if it's only drifting 2° to 5° off axis, the wheels should have enough friction to turn that into a turn instead of skidding for miles in the same direction. But no, as soon as it's traveling faster than a Kerbal can run, it loses all control.)

Unless there's a mod that fixes them, I recommend simply not using rovers. KSP has obviously faked the physics in some way that just doesn't work at all.

In fact, ignoring friction seems to be a common problem in most of their math. Ever docked two spaceships only to get a slowly building resonant standing wave of spaceship wobble, when you are high in orbit and there are no forces acting on the craft? Ever put wheels on something, given it a tiny boost up to 10kph, and coasted along flat landscape for hours? Ever used a Kerbal climbing up a ladder into an obstruction as a thruster to get your science car moving after it runs out of gas? I've landed small spaceplanes (single small jet engine, two liquid fuel fuselage, cockpit and wings), hit the parking brakes and gotten something from the fridge while I waited for the thing to stop so I could get out and take a surface sample on Kerbin.

Edited by misterbk
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
I still cannot get the throttle working correctly. It's still using only half of the axis.

I think I remember seeing someone mention they had rigged up some kind of toggle, so they could effectively "switch gears" into reverse. Maybe that will work for you?

Otherwise, like I said, maybe the throttle just won't work. Even if I am remembering right and did have it going both ways at some point, like I said I stopped using it that way due to not having a center detent and being pretty much unable to turn the throttle off. But rover wheels are so bugged and confusing anyway, it's possible I only thought that was what was going on.

I assigned rover throttle to one of the trim wheels. Those go both directions.

TBH, I think this plugin is dead. It's been long enough that I doubt anything more is coming.

I've pretty much shelved KSP. It's too broken for me to enjoy. Last time I tried to build a rocket, it took three days because bugs with fairings kept forcing me to restart the game. Then once I got the thing to launch without physics glitches blowing it up, the solar panels spontaneously broke off for no apparent reason.

I might check back in a year and see if the devs have managed to fart out something that works a little better.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...