TaranisElsu

[1.0.2] TAC Sticky Controls v0.3.1 [24May]

Recommended Posts

Thunder Aerospace Corporation presents our latest innovation: Sticky Controls

Someone -- Bill? -- got a little too excited during his last flight and spilled his drink on the control panel. Now the control stick won't return to neutral when released! The weird thing is that some pilots started saying the plane was easier to fly, so we hired an intern to spill drinks on every control panel. Through many trials and careful experiments, we have found the ideal amount to spill. Also includes some cleaner for when it is no longer desirable, like after reaching space.

The latest release is version 0.3.1 which works with KSP 1.0.2. Download below.

Having problems with this mod (or any others)?

Read the [Official] How To Get Support. I cannot do much to help without log files.

Just something that I threw together because I was frustrated trying to fly planes using the keyboard. I have many hours on MS Flight Simulator, and this makes the controls behave similarly to that. In my opinion, it makes planes much easier to fly in the atmosphere. I probably would never have created this if I could just get my stupid joystick to work with KSP, but it is really old :(.

Features

NOT ALL FEATURES ARE IMPLEMENTED YET.

  • Each attitude control input (the WASD keys) moves the controls by a small amount and the controls do not return to neutral when released. Works kind of like trim, but more adjustable and easier to work with. May be familiar to players of the Microsoft Flight Simulator series.
  • Fully adjustable: easy to change the amount the controls move per key press.
  • Immediately center the controls by pressing ` (The tilde key in the top-left of US keyboards, next to the 1).
  • Set to the current control positions by pressing Y. Useful for setting the controls to what SAS was using before turning off SAS. The idea was shamelessly stolen from Extended Trim.
  • Toggle on/off whenever desired by pressing Alt+`.
  • Displays a small window showing the current control positions, along with the configurable settings.
  • Not implemented yet: The window can be shown or hidden by clicking the button, which can be displayed on its own, in Blizzy's toolbar, or in the stock toolbar.
  • Not tested with RemoteTech2 nor MechJeb. I suggest that you turn this off if using MechJeb controls, if you have no connection for RT2, or if signal delay is significant.
  • Configurable settings:
    - Speed: how fast the controls move while pressing the key
    - Step: the minimum amount the controls are moved per key press. It also snaps the controls to multiples of this value, so larger values cause it to change in large discreet steps.
    - PrecisionControlsModifier: scales both Speed and Step by this amount when "precision controls" is turned on (the Caps Lock key in KSP's default key bindings).
    - Minimum Time: the time in seconds a key has to be held down in order for the controls to move more than a single step.
    - Exponent: larger values make the controls move much faster when holding a key down longer. When set to 1, the controls move the same amount per unit of time regardless of how long the key has been held down.
    - Position Dead Zone (new): controls the dead zone around zero where the controls have no effect.
    - Position Exponent (new): larger values make it so controls have less effect when near zero and a much larger effect when farther from zero.
    - ZeroControlsKey: the key bound to zeroing the controls. The default is 'z'. Note that toggling on/off is always Alt plus this key (need to change to support Mac/Linux)
    - SetControlsKey: the key bound to using the current control positions. The default is 'y'.

License

Apache License Version 2.0

Download the latest version.

Download from Curse (coming soon) (Alternate Download)

Source code available on Github.

Change log

Release v0.3.1

- Updated for KSP 1.0.2

- Changed to use OnPreAutopilotUpdate so that SAS and other autopilots can override the input.

- Keeps the current trim when setting control positions.

- Added position scaling and a deadzone.

- Resets the control movement speed when crossing the neutral point.

- Fixed rover compatibility. I did not realize wheel steering and wheel throttle were handled separately.

- Changed the default settings to my preferred settings.

- Updated MiniAVC to v1.0.3.0

- Updated to latest TacLib: sets the min/max KSP version, hoping that future KSP updates won't break too much.

Release v0.2

- Updated for KSP 0.25

- Changed the default key to toggle on/off or zero controls to ` (The tilde key in the top-left of US keyboards, next to the 1).

- Locks out normal inputs when enabled.

- Refactored the way control input works: it moves the controls slowly at first, speeding up as you hold the key down longer.

- Added a key for capturing the current control positions. Defaults to y. Useful for setting the controls to what SAS was using before turning off SAS. The idea was shamelessly stolen from Extended Trim.

Release v0.1

- Initial version

Notice

This mod includes version checking using MiniAVC. If you opt-in, it will use the internet to check whether there is a new version available. Data is only read from the internet and no personal information is sent. For a more comprehensive version checking experience, please download the KSP-AVC Plugin.

Edited by TaranisElsu
Released v0.3.1 for KSP 1.0.2

Share this post


Link to post
Share on other sites

Oh, so this makes the controls work like in those tricky parking games then? Awesome! :D

I'll give this a try when I get home.

Share this post


Link to post
Share on other sites

If this is what I think it is... No more wobbly control surfaces and hypersonic stalls, without resorting to MechJeb or the RT2 flight computer?! foams at the mouth

Share this post


Link to post
Share on other sites

Genius :D

And trust me, even if you had a new joystick you'd still be using the keyboard.

I have a Saitek X55 and I'm using the keyboard, because KSP/unity joystick support is awfulbad. I tried man, I tried so hard :(

Share this post


Link to post
Share on other sites

I am liking this mod. Especially where I can turn it off and on at will. BUT....... Its nearly impossible to use at the moment because the commands are not balanced. At least in my case, the negative Pitch and Roll are six times more sensitive than positive Pitch and Roll.

For example, I press the E key once to roll right, this creates a +0.050 input, but when I push the Q key once to neutralize it, it jumps immediately to -0.250. This makes the mod almost completely unplayable because I am having to constantly watch these numbers in a tiny font.

Perhaps this is as simple to fix as having a "Deadzone" which prevents the numbers from crossing the neutral point in a single button press.

I like where this is going, but IT NEEDS IMPROVEMENT. Thanks for working on this cool mod!

Share this post


Link to post
Share on other sites

Really great mod and believe this will make aircraft flight control MUCH better!! After trying I did find a bug so thought I'd bring it to your attention. The speed at which the controls respond do not match in all directions. In particular, roll left (Q) responds much faster than roll right (E). Likewise pitch down (W) has a far faster control response than pitch up (S). Yaw both had equal control response in both directions.

I just noticed this very much as AviatorBJP posted so I look like a bit of an idiot saying it again :P Doh!

Share this post


Link to post
Share on other sites

The only problem I have with this mod, is that I have no idea what I will change the key to xD Seriously, FloorIt just fits on Z so well. I'll find something...

Share this post


Link to post
Share on other sites

Someone -- Bill? -- got a little too excited during his last flight and spilled his drink on the control panel. Now the control stick won't return to neutral when released! The weird thing is that some pilots started saying the plane was easier to fly, so we hired an intern to spill drinks on every control panel. Through many trials and careful experiments, we have found the ideal amount to spill. Also includes some cleaner for when it is no longer desirable, like after reaching space.

Why would you ever give the stick to Bill in the first place? You know he has OCD, don't you? He almost crashed his first plane I let him fly because he kept toggling the landing gear when landing. Luckily Bob took over.

But seriously: nice plugin, awesome introduction text. :)

Share this post


Link to post
Share on other sites
The only problem I have with this mod, is that I have no idea what I will change the key to xD Seriously, FloorIt just fits on Z so well. I'll find something...

Yeah, that was my first thought too! FloorIt has become a major staple for my games, so the "z" key is now as taboo as "x" or space bar. Perhaps changing it to CTRL-z is possible in a new version?

Share this post


Link to post
Share on other sites

@JeffreyCor and @AviatorBJP, I thought I noticed the differing speeds for some axis directions, but I wasn't sure. Not sure what could be causing it though... The code is consistent.

Would it be possible to have some axes sticky while others remain free? This would greatly benefit many aircraft designs.

Interesting suggestion. Not sure how useful it will be though...

Yeah, but that requires spending money. And I would only use it for KSP since my joystick still works for other games that I've played. Even other Unity games :(.

Yeah, that was my first thought too! FloorIt has become a major staple for my games, so the "z" key is now as taboo as "x" or space bar. Perhaps changing it to CTRL-z is possible in a new version?

You can change it to whatever key you want. I don't know how to allow modifiers yet though. I will add that as soon as I figure it out.

Genius.

Should it go in the ThunderAerospace folder or or out on its own?

It should be installed in the KSP/GameData/TacStickyControls, just like it is packaged within the zip.

Share this post


Link to post
Share on other sites

I am trying to understand how to use this mod.. but can't.. I am making so many planes just disappear in the oceans :D

How should I use it? I have no previous experience in flight simulations with this feature

Share this post


Link to post
Share on other sites

i tried it, and i must say you have something here, but it has some quircks, that makes using this kinda hard and confusing..

When you have engaged a "Trim" to lets say a left turn, with Pitch,yaw,Roll applied in the turn, thus your plane is banked, (roll) and want to go back level turn turning roll back to the right, the plane starts to make a barrelroll to the left, dispite your hitting hard Right..

Only solvable thing is, smash Z...

Same is with Pitch, when the "trim" is enabled and for example you have a -5 Pitch, and want to level again or climb, bad luck Up only way is down...

I know hitting Z is resetting it, and you then can manouvre the other direction, but still it does makes things hard to fly again..

Now you dont battle a wobble over sencitive returning to centre control (what is allready making this mod GREAT, dont get me wrong)

But now you must try to remember even in those OHH CRAP moments where you just do something in order to save a bad manouvre, to smash Z after every input, what makes flying this in crappy moments imho

even worse as flying without it.

As long things go smooth and straight... This mod is a godsend gift..

Ofc not sure is this is a kind of limitation, or just an oversign with making the mod..

And its not as you stated how FSX works as well, yeah the sticky part is, but not the reset after each input ;)

Still as WIP with some tweaks this could be a godssend gift to all those who fly KSP with KB..

Share this post


Link to post
Share on other sites

Ah nice mod. In fact, I had the same idea, and you beat me to it! Here's my similar mod I posted a couple of days ago: RKE Joystick http://forum.kerbalspaceprogram.com/threads/92586

I first tried the "sticky" keyboard mode you have, in my 0.5 release. It just didn't to seem quite right, but your implementation seems a lot more usable. My release today (0.6) tries an alternate approach by introducing a limiter for the keyboard controls. For example, you can set the limit to 50%, and holding down Q will only deliver a 50% left-roll control.

Nice work!

Edited by spudbean

Share this post


Link to post
Share on other sites

Changes

  • Updated for KSP 0.25
  • Changed the default key to toggle on/off or zero controls to ` (The tilde key in the top-left of US keyboards, next to the 1).
  • Locks out normal inputs when enabled.
  • Refactored the way control input works: it moves the controls slowly at first, speeding up as you hold the key down longer.
  • Added a key for capturing the current control positions. Defaults to y. Useful for setting the controls to what SAS was using before turning off SAS. The idea was shamelessly stolen from Extended Trim.

Has anyone besides me been using this? I saw a few people try it out but I'm not sure how many kept it.

Share this post


Link to post
Share on other sites

Could we have only pitch channel sticky while roll and yaw channels still being re-centered automatically. Or could we switch the sticky mode per channel on-the-fly? Because you know normally we don't want a trim on roll or yaw unless we have unbalanced load-out.

Share this post


Link to post
Share on other sites

I'm having trouble hiding the settings box... is there a command I'm missing? I've tried the two keys that are on by default, as well as doing ALT+ them.. no luck. Any help would be welcome! :)

Share this post


Link to post
Share on other sites
I'm having trouble hiding the settings box... is there a command I'm missing? I've tried the two keys that are on by default, as well as doing ALT+ them.. no luck. Any help would be welcome! :)

Unfortunately, that is not implemented yet (see the OP). SoonTM. For now, you can drag it most of the way off the screen. It will resist being dragged completely off the screen so you do not need to worry about losing it.

Share this post


Link to post
Share on other sites
This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.