Jump to content

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


Recommended Posts

Ok, i will try to setup a dev environment then, because i think that matching controller names instead of id will work around the unity bug.

No deadline from me though :D

Edited by pba
Link to comment
Share on other sites

Hello @linuxgurugamer,

So I believe I finally solved all my crashing issues with the game. I have been able to run my game for hours on end while alt-tabbing and doing things in the background....like looking stuff up on the Internet, and then returning to the game and playing for more hours....not one crash to desktop. No matter how many ships I build or how many times I revert flights back to the VAB/SPH (that was typically when my game would decide to crash).

I solved it because the only thing consistent with every crash dump file generated was xinput1_3.dll in the error log generated with the crash dump file. Xinput1_3.dll was always the first module listed in the error log. I sent you one of my error logs several days ago. I typically only had one to three modules listed and xinput1_3.dll was the only consistent module.

One of the mods I have consistently run since I started playing the game is this one. I do so because I cannot fly planes well without some sort of stick to fly with. I am not a fan of arrow keys for flying a plane, or w, a, s, d....

I'm not writing this here because this mod is causing the crashing. The crashes happened without this mod installed. They happen without any mods installed. Now that I isolated the issue to xinput1_3.dll, I've done some Internet searching and if you Google just "xinput crashing game" you'll find that simply having an xbox controller plugged into your computer has somehow caused some games to crash historically (I was not aware of this).

I want to say I have had crashes without it plugged in that still involved xinput1_3.dll, but I can't honestly remember for sure at this point. I typically just leave my xbox controller plugged in regardless if I am using it or not, because so many computer games support one at this point that I use it frequently. 

Once I started pinpointing this as the issue I did a file search on my C drive for xinput1_3.dll and realized it was installed in several different places. There is normally an around 80KB 32bit version in syswow64 and an around 105KB 64bit version in your system32 Windows folders if you have Windows 10. I noticed KSP has two identical 80KB versions(meaning they are both probably 32 bit) in the data/plugin folders for both the 32bit and 64bit data folders. I found it odd that the 64bit version of the game has a potentially 32bit file in it. Some other games I have installed from Steam also seem to supply an xinput1_3.dll, like Witcher 3.

What I still don't grasp is why in ALL my crash logs it lists the file location of xinput1_3.dll as C:\WINDOWS\SYSTEM32. Since system32 is the 64bit folder for windows the file size is listed as the larger version and says it's 107368 bytes. Why it doesn't make sense to me is as I stated KSP has two identical copies of it included when you install it, and they are both around 80KB. Shouldn't the game be running the xinput1_3.dll file installed with the game and not the one in my Windows folder?

What I ended up doing because of this (since I don't program or know how to tell KSP to utilize one file instead of another file) is rename the 105KB xinput1_3.dll fille in my Windows system32 folder and then copy the 80KB xinput1_3.dll file from the KSP_x64_data\plugins folder into my system32 folder. I understand this is a really poor decision because you shouldn't mess with your Windows files in general. It's especially bad in this case because as I stated the game seems to have two copies of the 32bit version and I just copied one to my 64bit Windows folder. I imagine I will need to reverse this change if I want my xbox controller to work or not crash other 64bit games I play in the future.

That being said, since I did that the game has been totally stable despite me having so many mods installed. I did notice it takes several seconds longer when I return to the VAB/SPH now, but I can live with it taking several seconds to load the VAB if it's not crashing to desktop instead.

One of the threads I have found since making this change that was about xinput crashing games in general recommend running the game in Windows 8 compatibility mode. I suppose I should revert the file swap I made and see if that works instead....If that worked it could be less foolish in the long run. To be honest though, I have never had much success with windows compatability mode actually making games function better. It seems to be pretty much hit or miss, and often doesn't do anything....at least for me the times I have tried using it on a game shortcut due to the game frequently crashing or something.

One of the reasons I wrote all this here was to ask if you know of a way to make this mod use the xinput1_3.dll file included with KSP. I noticed this mod puts some dll files in the main KSP folder instead of in the GameData folder....Do you think it would use it if I copied a copy of xinput1_3.dll there instead? I suppose I could just try that instead of asking your opinion, lol....

I also just wanted to get back to you about seeming to solve my crashing in general. Since you manage so many mods for KSP and so many issues can arise with the game, I figured you enjoy finding solutions to things and solving problems in general....

Having the game crash to desktop after playing for 5-10 minutes is a fairly aggravating issue....especially since the game takes about that long to reload after it crashes....I was about at the point where I was just going to be done playing the game at all....I have like 200 other Steam games I could be playing instead....

 

Link to comment
Share on other sites

1 minute ago, JoE Smash said:

Hello @linuxgurugamer,

So I believe I finally solved all my crashing issues with the game. I have been able to run my game for hours on end while alt-tabbing and doing things in the background....like looking stuff up on the Internet, and then returning to the game and playing for more hours....not one crash to desktop. No matter how many ships I build or how many times I revert flights back to the VAB/SPH (that was typically when my game would decide to crash).

I've been following the other thread, did you read this post, it tells you exactly what you were experiencing:

 

3 minutes ago, JoE Smash said:

One of the reasons I wrote all this here was to ask if you know of a way to make this mod use the xinput1_3.dll file included with KSP. I noticed this mod puts some dll files in the main KSP folder instead of in the GameData folder....Do you think it would use it if I copied a copy of xinput1_3.dll there instead? I suppose I could just try that instead of asking your opinion, lol....

Keep in mind that Unity (actually, c# in general) uses DLL files slightly differently.  They are dynamically loaded, but (and this is big), they are NOT the same type of DLL files as in the system.  They are pre-compiled c# code, which gets interpreted by the Mono interpreter.  The reason this mod puts a couple of DLL files into the root is because those files are real DLL files, and are loaded by Windows BEFORE the game loads.  You can try to put the xinput dll there, but I don't think it will do anything.

 Have you tried verifying that DirectX is installed correctly?

Link to comment
Share on other sites

Yeah....well there is no real way to verify DirectX installation anymore I looked that up already. It gets updated via Windows update now....I did run windows update to verify there are no updates.

The most recent DirectX distribute-able is for DX 11.2 I think, from June 2010. I downloaded and reinstalled that and there was no issue. Before and after that Dxdiag reported no issues through the Windows + R run path.....

Thanks for linking that response, I had stopped reading my own thread because it was annoying me....

Link to comment
Share on other sites

15 hours ago, JoE Smash said:

I noticed KSP has two identical 80KB versions(meaning they are both probably 32 bit) in the data/plugin folders for both the 32bit and 64bit data folders. I found it odd that the 64bit version of the game has a potentially 32bit file in it.

 

I can confirm that the version in the 64bit folder is, in fact, 32 bit. For how to check this, see this article. It uses a wonderful little tool called DependencyWalker.

DependencyWalker confirms that the dll has several problems, not the least of which is that it's a 32bit library that calls 64bit libraries. The potential for problems is huge. It's pretty clear this is a less than desirable situation, especially when a 64bit version is available. Your experience of much more stable gameplay after switching in the 64bit version would tend to confirm this.

Edit: I see I misunderstood your solution.. hmm.. so a 32bit .dll, called by a 64bit executable, that calls 64bit .dll's, and it works better than the M$ standard 64bit one? Hmm.. very weird.

Please do consider reporting all this to the Squad devs, if you haven't already.

 

(Incidentally, it's nice to see you over this side of town! Long time no see!)

Edited by JAFO
Link to comment
Share on other sites

2 hours ago, JAFO said:

 

I can confirm that the version in the 64bit folder is, in fact, 32 bit. For how to check this, see this article. It uses a wonderful little tool called DependencyWalker.

DependencyWalker confirms that the dll has several problems, not the least of which is that it's a 32bit library that calls 64bit libraries. The potential for problems is huge. It's pretty clear this is a less than desirable situation, especially when a 64bit version is available. Your experience of much more stable gameplay after switching in the 64bit version would tend to confirm this.

Please do consider reporting all this to the Squad devs, if you haven't already.

 

(Incidentally, it's nice to see you over this side of town! Long time no see!)

HOLY CRAP JAFO! Is that you? 

I just referenced The Long Dark in my last post, lol....

I didn't get to check my notifications because I was writing another novella of a post....

I guess you figured out it was me because my name is JoE, I'm a Biochemist, and I still get in forum arguments everywhere I go and hate forums in general....lol.

I probably have a particular way of writing as well...I imagine....

Lot of run on sentences and dots....

I also always seem to find myself playing games full of bugs that are driving me insane....

Thanks for that program link, I'll check it out when I get a chance...

Edited by JoE Smash
Link to comment
Share on other sites

2 hours ago, JoE Smash said:

HOLY CRAP JAFO! Is that you? 

Yep.. the original and the best... accept no substitutes. :D

I'd seen on Steam that you were playing KSP recently, but didn't know you were on the forums until I saw your post here. So no, it wasn't your writing style or confrontations that got my attention.. it was simply that just after I submitted my reply, I thought "Hang on, I know that name from TLD!"

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for the advice about calibration, it solved my problem nicely.

However, now I have a different issue. Whenever I try to use Mechjeb to automatically execute maneuver nodes, control surfaces/SAS will orient my rocket in the correct direction without my input on the stick, however the throttle will not engage automatically like Mechjeb normally does when you let it handle maneuvers for you. 

I suspect this is somehow related to the fact that every time I change the mod settings and then leave the flight scene, they return to default upon returning to the flight scene, even though I've saved them seven times over before leaving flight scene the first time. This includes a pesky little setting called "AFBW overrides SAS and other control inputs", which is enabled by default but I prefer disabled for the sole purpose of letting Mechjeb control my craft when I don't particularly care for manual control. I expect this setting to be the source of my problem; however, it also doesn't help that even with the setting disabled it still doesn't let Mechjeb have the throttle - that is of course, assuming the setting is disabled at all (and seeing as settings tend to revert every time I leave the flight scene I suspect what I'm looking at is effectively a placebo button that does absolute jack).

Can anyone else confirm this to be the case? Running 1.4.5.  Also I should mention that for a brief period last night I was not having this problem; I leave the game and come back a day later and it's back again. 

Link to comment
Share on other sites

  • 1 month later...

Hi, After version 1.4.1 the joystick in linux just stopped working . when i run the launcher it shows that it found the joystick, that message you see about it. But when you run KSP it just ignores joystick completely . it works fine on 1.4.1 but any version after that my joystick does not work in linux and its very aggravating. So i found this mod, and i thought all my problems was solved i loved it, But when i'm on the moon and i have 3 or 4 different craft in the scene, the joystick controls every craft on there, not just the active vessel. is there any way to fix this? if i'm on a rover and start driving around, give it some throttle, all the ships in the scene will start moving. if i just move the axis back and forth you can see it controlling all the ships at once. makes it kind of useless when there are more than one ship in the scene. PLease help!

Link to comment
Share on other sites

  • 3 weeks later...
On 9/11/2018 at 12:10 PM, rispeed said:

Hi, After version 1.4.1 the joystick in linux just stopped working . when i run the launcher it shows that it found the joystick, that message you see about it. But when you run KSP it just ignores joystick completely . it works fine on 1.4.1 but any version after that my joystick does not work in linux and its very aggravating. So i found this mod, and i thought all my problems was solved i loved it, But when i'm on the moon and i have 3 or 4 different craft in the scene, the joystick controls every craft on there, not just the active vessel. is there any way to fix this? if i'm on a rover and start driving around, give it some throttle, all the ships in the scene will start moving. if i just move the axis back and forth you can see it controlling all the ships at once. makes it kind of useless when there are more than one ship in the scene. PLease help!

That is, ummm, odd.  This mod controls input, it doesn't do anything to the vessels.  I hate to say it, but you must have another mod installed which mirrors inputs to all craft.

Link to comment
Share on other sites

On 8/9/2018 at 10:39 PM, Auriga_Nexus said:

Thanks for the advice about calibration, it solved my problem nicely.

However, now I have a different issue. Whenever I try to use Mechjeb to automatically execute maneuver nodes, control surfaces/SAS will orient my rocket in the correct direction without my input on the stick, however the throttle will not engage automatically like Mechjeb normally does when you let it handle maneuvers for you. 

I suspect this is somehow related to the fact that every time I change the mod settings and then leave the flight scene, they return to default upon returning to the flight scene, even though I've saved them seven times over before leaving flight scene the first time. This includes a pesky little setting called "AFBW overrides SAS and other control inputs", which is enabled by default but I prefer disabled for the sole purpose of letting Mechjeb control my craft when I don't particularly care for manual control. I expect this setting to be the source of my problem; however, it also doesn't help that even with the setting disabled it still doesn't let Mechjeb have the throttle - that is of course, assuming the setting is disabled at all (and seeing as settings tend to revert every time I leave the flight scene I suspect what I'm looking at is effectively a placebo button that does absolute jack).

Can anyone else confirm this to be the case? Running 1.4.5.  Also I should mention that for a brief period last night I was not having this problem; I leave the game and come back a day later and it's back again. 

I can confirm that yes, ABFW overrides the throttle input (has bitten me more than once).  I don't have any time right now to fix it, but I'm adding an issue to Github to track this

 

 

Edited by linuxgurugamer
Link to comment
Share on other sites

When the override option is disabled AFBW works by checking to see if there is any input for the three axises (roll, pitch, yaw), and if not, then the keyboard input is used.  This is assuming that when not being used, the joystick axises are centered to 0.0

The throttle is different, in that it doesn't have a default setting.  What I think I'm going to do is the following:

Whichever is the last to provide a changed input will set the throttle.  In other words, if the throttle is set to full, and you hit the Z key, that will set it it to 0, until the throttle on the joystick is moved, which will then override the keyboard and set the throttle to whatever the joystick is positioned to.

Link to comment
Share on other sites

On 9/11/2018 at 5:10 PM, rispeed said:

Hi, After version 1.4.1 the joystick in linux just stopped working . when i run the launcher it shows that it found the joystick, that message you see about it. But when you run KSP it just ignores joystick completely . it works fine on 1.4.1 but any version after that my joystick does not work in linux and its very aggravating. So i found this mod, and i thought all my problems was solved i loved it, But when i'm on the moon and i have 3 or 4 different craft in the scene, the joystick controls every craft on there, not just the active vessel. is there any way to fix this? if i'm on a rover and start driving around, give it some throttle, all the ships in the scene will start moving. if i just move the axis back and forth you can see it controlling all the ships at once. makes it kind of useless when there are more than one ship in the scene. PLease help!

On 9/27/2018 at 3:04 PM, linuxgurugamer said:

That is, ummm, odd.  This mod controls input, it doesn't do anything to the vessels.  I hate to say it, but you must have another mod installed which mirrors inputs to all craft.

Hi, first off thanks for the time and effort you spend on your mods, they make my time in KSP much more enjoyable.

Secondly, I have this same issue, I'm not bothered by it though just thought you would like the info. It is particularly evident when I switch from vessel to vessel with the [ ] keys. Both craft end up being controlled by the joystick but not the keyboard (confirmed). I have just been quick saving and reloading when it happens and this resets the controls to one craft. Also switching vessels in the map screen does not lead to this problem. It seems to have happened on occasion when I didn't us the [ ] keys but I am not sure.  I just tried a few scenarios, switching with the map screen and kerbal alarm leads to the problem as well, it appears that distance plays a role. I have a lot of mods installed but I don't think any of them have any control functionality. 

Info:

KSP Version: 1.4.5:2243 Win 64 Bit

Mods:

KSP: 1.4.5 (Win64) - Unity: 2017.1.3p1 - OS: Windows 10  (10.0.0) 64bit
ClickThroughBlocker - 0.1.6.7
Toolbar - 1.7.17.11
ToolbarControl - 0.1.6.16
Chatterer - 0.9.95.2110
Environmental Visual Enhancements - 1.4.2.2
Kerbal Engineer Redux - 1.1.5.3
AdvancedFlyByWire - 1.8.0.5
KSP-AVC Plugin - 1.2.0.2
Docking Port Alignment Indicator - 6.8.2
ScienceAlert - 1.9.4.2
StageRecovery - 1.8
Kerbal Alarm Clock - 3.9.1
Waypoint Manager - 2.7.2

Thanks again for your efforts.

 

 

Edited by Nekton
Link to comment
Share on other sites

There's a problem. The joysticks work, but for some reason, there's a problem with EVA'd kerbals. In space, they work fine, but on the ground, they walk in place. The only way to get them to move is to point them in the direction I want them to go, then sprint (hold down shift). But when I turn, they keep moving in the same direction, even if they are pointed backwards. The only way to turn is to stop moving, turn the way I want to go, and sprint again. As you can imagine, this is very annoying.

I am running 64 bit ksp 1.4.5 on Windows 10. I installed off of CKAN. I am using the most recent version on CKAN

Will upload logs later tonight. I'm not at home, so I can't access my computer right now.

Edited by TeslaPenguin1
Link to comment
Share on other sites

A problem I somehow have, and I have no idea why, (keep in mind I do have the dependencies installed) When I click on the menu to set up the controls, it is blank for some reason, and here is a picture.

YT3vVKw.jpgI have no clue why it's doing this, it might be some sort of conflict, but I noticed something in the top left of the window saying "Settings", but it's cut off a bit, so I can't click it.
It's weird, so I'm going to look for some answers. If I can't find any, oh well. (I play 1.4.5 on 64 bit, windows 10, incase you needed that info.)

Edited by X Sonic Pro X
Picture duplicated for some reason, whoops!
Link to comment
Share on other sites

41 minutes ago, X Sonic Pro X said:

A problem I somehow have, and I have no idea why, (keep in mind I do have the dependencies installed) When I click on the menu to set up the controls, it is blank for some reason, and here is a picture.

YT3vVKw.jpgI have no clue why it's doing this, it might be some sort of conflict, but I noticed something in the top left of the window saying "Settings", but it's cut off a bit, so I can't click it.
It's weird, so I'm going to look for some answers. If I can't find any, oh well. (I play 1.4.5 on 64 bit, windows 10, incase you needed that info.)

Log file would be useful 

Link to comment
Share on other sites

12 hours ago, X Sonic Pro X said:

Hope that's all you need, if I messed up, that's probably cause I haven't posted a log file before

12 hours ago, X Sonic Pro X said:

, I haven't had to post my log file before, but here you go

No, it is  not what I need, and please do NOT paste log files into messages.  Short snippets are ok, but you should upload the entire log file (output_log.txt) to a file sharing site or dropbox, and just post a link to the file

Link to comment
Share on other sites

20 hours ago, X Sonic Pro X said:

Right, I haven't had to post my log file before, but here you go.

Hi there,

Just a note that we've had to snip the log file out of your post.  Please never post gigantic content into the forum (even in a spoiler section), because it hammers people's browsers-- especially on mobile devices, where it could cause the browser to lock up entirely.

Log files are indeed useful and necessary, but putting them into the forum post itself causes problems.  Therefore, when you need to share a log, generally the best way to do that is to host it on some 3rd-party file-sharing site (e.g. Dropbox, Google Drive, whatever), and then just link to it from your forum post.  That way, interested parties can download your log, but it doesn't discommode people who are just trying to read the forums.

Thanks!  :)

Link to comment
Share on other sites

2 minutes ago, Snark said:

Hi there,

Just a note that we've had to snip the log file out of your post.  Please never post gigantic content into the forum (even in a spoiler section), because it hammers people's browsers-- especially on mobile devices, where it could cause the browser to lock up entirely.

Log files are indeed useful and necessary, but putting them into the forum post itself causes problems.  Therefore, when you need to share a log, generally the best way to do that is to host it on some 3rd-party file-sharing site (e.g. Dropbox, Google Drive, whatever), and then just link to it from your forum post.  That way, interested parties can download your log, but it doesn't discommode people who are just trying to read the forums.

Thanks!  :)

Right, yeah, sorry about that. It's been a while since I have been active on the forum anyways. I'll think twice next time. ;)

Link to comment
Share on other sites

I figured I should thank you for bringing this mod back, I've been doing the head slamming routine trying to get my old MS sidewinder pro to work with linux and this was like finding a pallet of money to me. Thank you for your time and effort.

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