Snark

[1.7.1+] AttitudeAdjuster v1.1: Set control point via action group. Variable-pitch control point for spaceplane reentry.

Recommended Posts

What it does

  • Adds action group items for toggling control points, for parts that have multiple control points defined.
  • Adds a variable-pitch control point that's handy for spaceplane-style reentry (i.e. instead of "hold :prograde:", you want SAS to "hold attitude with nose up N degrees").
  • Adds an axis binding (new KSP 1.7.1 feature) so that you can control the pitch angle with keyboard keys.

thumbnail.png

Download from SpaceDock
License: CC-BY-NC-SA 4.0
Source code

 

How to install

Unzip the contents of "GameData" to your GameData folder, same as with most mods. (Note, includes ModuleManager.)

 

Why would anyone want this?

KSP 1.6 introduces a new feature that allows a "command" part (such as a crew pod or probe core) to support multiple control points (e.g. "forward", "reverse"), which the player can select either in flight or in the vehicle editor.

That's a powerful and useful tool... but it stops just short of what I'd like to have.  In particular, the stock game doesn't provide any way to select among those control points using action groups.  Also... I've long wanted the ability for SAS to hold a "slightly nose-up" attitude during reentry (i.e. the way spaceplanes usually do), meaning I'd love to have a pitched control point-- with the ability to vary the pitch as desired.

Well, this mod closes that gap.  :)

Action groups

actions.png

This mod makes several new actions available in the vehicle editor, which you can assign to action groups as you please.

  • "Toggle CP: <name>":  This action is for a 2-way toggle that flips back and forth between the named control point and the part's default.  This is added to all command pods and probe cores that support multiple control points.  For example, in the screenshot above, the HECS2 probe core has three alternate control points besides the default ("Forward", "Reversed", plus the new "Pitched" one provided by this mod), so each of those gets a corresponding "toggle" action made available.
  • "Change Control Point":  This is a cyclic action that just switches the control point to whichever one's next.  In other words, it does exactly the same thing as clicking the stock "Change Control Point" button on the part's right-click menu.  This action is added to all command pods and probe cores in the stock game that have 3 or more control points available.

 

Axis group binding

KSP 1.7.1 adds a new feature called "axis groups", which work similarly to action groups but allows binding control axes to part actions.  AttitudeAdjuster 1.1 adds an axis group binding for "Pitch Angle" so that you can set up your craft to allow using keyboard bindings (e.g. the I and J keys, if you use the "Translate U/D" axis, to take one example).

axis.png

 

New "pitched" control point

This mod adds a new control point, "Pitched", to certain parts in the stock game.  It's accessible both in the vehicle editor and in flight.

editor.png

reentry.png

The "pitched" control point is pointed in the part's :prograde: direction... but rotated downward by a few degrees (25 degrees, by default).  That way, if you want to do a "nose up" spaceplane-style reentry, all you have to do is to select the "Pitched" control point, and tell SAS to hold :prograde:, and your craft will do exactly what you want.  But that's not the clever bit.  :)

The clever bit is that the pitch angle is user-adjustable.  Whenever the "Pitched" control point is the currently selected one, either in the editor or in flight, then a "Pitch Angle" control will appear on the right-click menu (see above screenshots).  This is a slider control that lets you pick any angle you like, from zero up to 90 degrees.

Currently, the following parts have a "Pitched" control point added to them:

  • All probe cores that include SAS functionality
  • The stock cockpits (Mk1 regular and inline, Mk2 regular and inline, Mk3)

I've deliberately not added it to the various "rocket" command pods (such as the Mk1, etc.), just to avoid clutter.  However, if you'd prefer to add it there, too (or remove it from one of the places I've added it), that's easy to do-- see the "Extending / customizing" section, below.

 

Extending / customizing

All of the new functionality is added and configured via ModuleManager-- which means It's flexible.  ;)  If there's some aspect of how I've set things up that you don't like, it's easy for you to tweak just by adding your own ModuleManager config.

Examples of how the mod can be customized via config:

  • Choose which actions are available on which parts (e.g."Toggle CP" and "Change Control Point" actions).
  • Choose which parts get the "Pitched" control point added.
  • Customize the numeric behavior of the pitched control point's UI.  For example, if you want it to vary from 0 to 10 degrees in increments of 0.1 degrees (instead of the default "0 to 90 degrees in increments of 1 degree"), then you can do that.

In the interest of avoiding clutter, I won't go into all the technical details here, but you should be able to work it out from looking at the config files.  Feel free to ask me if you have any questions.  :)

Edited by Snark
Update to v1.1 (new axis binding feature for KSP 1.7.1)

Share this post


Link to post
Share on other sites

Nice mod! And congrats on 10,000 rep! 

Edited by EchoLima

Share this post


Link to post
Share on other sites

And here I was using the trim function like a n00b :p

Looks good, I've been meaning to get into spaceplanes in my current save, no doubt this will help! Grabbing for future use, thank you! :D

Share this post


Link to post
Share on other sites

This looks fantastic for spaceplane re-entries! Once again, @Snark does not disappoint!

Downloaded...won't need to use an angled probe core as a control point anymore :cool:

Share this post


Link to post
Share on other sites
19 minutes ago, RealKerbal3x said:

won't need to use an angled probe core as a control point anymore

That is, indeed, pretty much the point.  :)

Share this post


Link to post
Share on other sites
8 minutes ago, DStaal said:

You always manage the 'now why didn't anyone think of that before?' mods.

My own theory is not that I'm the first to think of it... just that I'm more easily irritated.  "Annoyance is the mother of invention."  :sticktongue:

(Seriously, though:  a major reason this wasn't done before is that it wouldn't have been possible before yesterday-- or, at least, would have needed a whole lot more work.  That's because this is leveraging the new "switchable control point" feature in KSP 1.6.  Before 1.6 shipped, anyone wanting to do this would have had to implement that entire feature from scratch.  As it is, my job was really easy, thanks to the excellent job Squad did in making the new feature nicely moddable.  If you look at the source code for the mod, you'll find that there's remarkably little code there.  I didn't have to do much-- I'm just standing on Squad's shoulders, here.  Thanks, Squad!)

Share this post


Link to post
Share on other sites
11 minutes ago, Snark said:

 

 (Seriously, though:  a major reason this wasn't done before is that it wouldn't have been possible before yesterday-- or, at least, would have needed a whole lot more work.  That's because this is leveraging the new "switchable control point" feature in KSP 1.6.  Before 1.6 shipped, anyone wanting to do this would have had to implement that entire feature from scratch.  As it is, my job was really easy, thanks to the excellent job Squad did in making the new feature nicely moddable.  If you look at the source code for the mod, you'll find that there's remarkably little code there.  I didn't have to do much-- I'm just standing on Squad's shoulders, here.  Thanks, Squad!)

Three cheers for SQUAD and 1.6!

Share this post


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

looking at this it could be used for dumb easy take off too

...right? 

Possibly, though you'd have to have the pitch angle tuned just right for a particular craft (if it's a smidgeon too high, you loop around and/or stall; if it's a smidgeon too low, you gradually nosedive).

Anyway, if someone finds it useful for that, great!  :)

Share this post


Link to post
Share on other sites

Hmm..ill have to try this out. This sounds very useful usingkeyboard controls...wasd sensitivity is all or nothing so this should make thinks a bit easier for reentry OR ascent. Thanks bro!

Share this post


Link to post
Share on other sites

At first I didn't *quite* understand what this was doing -- other than being a really narrow-focused component of an autopilot -- but after reading the description i gets it! Awesome :)

Share this post


Link to post
Share on other sites

@Snark  This is great, I was told about it last night.

Any chance to get it added to CKAN?

Share this post


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

Any chance to get it added to CKAN?

Would love to!  Thought I already had, in fact.  :)

I did the same thing I always do when I release a new mod on SpaceDock, which is that I checked the little checkbox that says "put it on CKAN?"  Past that, it's beyond my ken.

Did it not work?  Is there some additional button I need to press?

Share this post


Link to post
Share on other sites
40 minutes ago, Snark said:

Would love to!  Thought I already had, in fact.  :)

I did the same thing I always do when I release a new mod on SpaceDock, which is that I checked the little checkbox that says "put it on CKAN?"  Past that, it's beyond my ken.

Did it not work?  Is there some additional button I need to press?

Nope.  But it doesn't always work properly.  With what you just said, I'll go ahead and generate a new netkan and get it added.

If you ever have a problem with a mod not getting into CKAN, just let me know

Ok, it's done

Share this post


Link to post
Share on other sites

Such a wonderful little mod. 

Got to use it on stream last night

Thank you @Snark

Share this post


Link to post
Share on other sites

Hi @Snark, does this mod allow to change the control point for the External command seat?

Thanks

Share this post


Link to post
Share on other sites
14 hours ago, kurgut said:

Hi @Snark, does this mod allow to change the control point for the External command seat?

No, it doesn't.

I wanted to, but IIRC, I discovered that the command chair isn't set up the same way as other control pods, so it would have required some additional code to handle it specially, so I didn't. (The memory is a bit fuzzy and I'm not at my KSP machine at the moment, but I seem to recall that it was something along those lines.)

Share this post


Link to post
Share on other sites

Hi all,

I'm pleased to announce the release of AttitudeAdjuster v1.1, now with axis group bindings!

axis.png

KSP 1.7.1 adds a new feature called "axis groups", which work similarly to action groups but allows binding control axes to part actions.  AttitudeAdjuster 1.1 adds an axis group binding for "Pitch Angle" so that you can set up your craft to allow using keyboard bindings (e.g. the I and J keys, if you use the "Translate U/D" axis, to take one example).

Note that this is a stock feature-- you don't need Breaking Ground to be able to use it.

Other than this new feature (which requires KSP 1.7.1), the only other change is to update ModuleManager to the most recent version (4.0.2).

Enjoy!  :)

(And if there are any modders out there, reading this and wondering "how did he do that?", I've written a brief modder's tutorial on axis group binding.)

Share this post


Link to post
Share on other sites

Oh, fantastic! I'm going to love playing with all the new stuff in BG+1.7.1...

Share this post


Link to post
Share on other sites

I dared to try it with KSP 1.6.1 (yes) and RO / RP-1.

And ofc it was not only incompatible, it was a desaster :D
Load lock before reaching the main menu and massive log spamming.

I archived all logs and the screenshot of the state after the bar stopped moving.

Fun fact is, after removing AttitudeAdjuster the main issue was gone, also the log spamming.

But KSP still stopped loading at the same spot.
So I found two different issues ... and one has nothing to do with your mod.

And the other issue is kinda old, because when KSP stops loading while loading Squad/Parts/Utility/commDish88-88/commDish88-88 that is something already to be found by Google by 2016.

If you're interested whatsoever, I put it on Dropbox and post it here.

Share this post


Link to post
Share on other sites
Posted (edited)

Update: error 2 was because I removed RemoteTech for testing - but in my setup environment it's a nailed dependency ...

(Damn, timeout for automatic post merging passed by quickly ...)

Edited by Gordon Dry

Share this post


Link to post
Share on other sites
18 minutes ago, Gordon Dry said:

I dared to try it with KSP 1.6.1 (yes) and RO / RP-1.

And ofc it was not only incompatible, it was a desaster :D

Correct, since the label clearly says "1.7.1+".

And 1.6.1 < 1.7.1.  Not my problem.  ;)

¯\_(ツ)_/¯

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.