TheRagingIrishman

[1.3] Smart Actuators v1.1 (6/3/17)

39 posts in this topic

Posted (edited)

A revival of part of the Stock Bug Fix Plus mod by @Claw, original thread here: http://forum.kerbalspaceprogram.com/index.php?/topic/87737-ksp-v113-stock-bug-fix-modules-release-v113b1-10-jul-16

Overview:

Doesn't it bother you when you're chilling up in space, relaxing in your amazing SSTO but whenever you go to rotate your ship, all the control surfaces start moving around and it wrecks the serenity of the moment? Well it was annoying me so I went and got this mod working. It prevents control surfaces from moving if in the vacuum of space.

What it does?

It checks to see if your ship is experiencing any atmospheric pressure and if it is 0 or close to 0, it will lock control surfaces. The threshold it cuts off at is dynamic (for reference, the line is around 65km on Kerbin and 40km on Duna).

Thanks to the following:

  • @Claw for doing all the hard work
  • @Diazo for their helpful guide to setting up an IDE to work with KSP
  • @linuxgurugamer for inspiring me to stop procrastinating 

To-Do:

  • Get airbrakes to not move when retracted and not in atmo
  • Add a button to the part menu to allow you to toggle off the blocker (on that part)
  • Get engine gimbals to lock when the engine is off

Changelog:

  • 1.1
    • add in ability to block gimbal movement when no fuel flow
  • 1.0.2
    • update to 1.3
    • catch a game-crashing nullref
  • 1.0.1.1
    • fixed SmartActuation.version
  • 1.0.1
    • added Airbrakes and other parts that use ModuleAeroSurface rather than ModuleControlSurface
    • enabled deployment while in orbit
    • added button to turn off the blocker (per part)
    • added SmartActuation.version
    • added changelog.txt

Download: https://github.com/theRagingIrishman/SmartActuation/releases

Source Code: https://github.com/theRagingIrishman/SmartActuation

88x31.png

Creative Commons 4.0 Attribution-NonCommercial-ShareAlike

CC BY-NC-SA

HOW TO INSTALL :

  1. Extract "SmartActuation" into your "Kerbal Space Program\GameData" file
  2. Enjoy
Edited by TheRagingIrishman
16 people like this

Share this post


Link to post
Share on other sites

Posted (edited)

Ckan?

Congrats

Edited by linuxgurugamer
1 person likes this

Share this post


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

Ckan?

Congrats

Thanks. I'm all good with it being on CKAN (but it's no big rush).

Share this post


Link to post
Share on other sites

I'll get it up there this evening

1 person likes this

Share this post


Link to post
Share on other sites
41 minutes ago, linuxgurugamer said:

I'll get it up there this evening

No procrastination there!

So, is this only for "control surfaces" or will it work on "elevon", "control_srf" or "aileron", etc? Just asking because I've some ideas....

Share this post


Link to post
Share on other sites

Posted (edited)

Can I make a little suggestion? I noticed that in 1.2.2 if I retract a landing gear or a landing leg from the right click menu, it activate the action group retracting all of them. This is terrible in some situation, where you want to just move the mass of your ship on one side.

would it be an easy task?

Edited by Nansuchao
1 person likes this

Share this post


Link to post
Share on other sites

Posted (edited)

1 hour ago, smotheredrun said:

So, is this only for "control surfaces" or will it work on "elevon", "control_srf" or "aileron", etc? Just asking because I've some ideas....

Right now it only works on ModuleControlSurface which is all stock control parts other than the airbrake because the airbrake uses ModuleAeroSurface. Adding in the ability to affect ModuleAeroSurface is next on my todo list and I think I'll be able to get it done tonight. To check if a part uses ModuleControlSurface or ModuleAeroSurface right click on it in the menu in the VAB or in the SPH and if it says something similar to GqN5l7H.png then it uses ModuleControlSurface and if it looks like 4dYVIdv.png then it uses ModuleAeroSurface.

1 hour ago, Nansuchao said:

Can I make a little suggestion? I noticed that in 1.2.2 if I retract a landing gear or a landing leg from the right click menu, it activate the action group retracting all of them. This is terrible in some situation, where you want to just move the mass of your ship on one side.

would it be an easy task?

I'm not sure how hard this would be or what exactly it would take but I'll look into it.

Edited by TheRagingIrishman
3 people like this

Share this post


Link to post
Share on other sites

Any possibility you could throw it on spacedock so I can get emails about updates?

Share this post


Link to post
Share on other sites
9 minutes ago, TheRagingIrishman said:

Right now it only works on ModuleControlSurface which is all stock control parts other than the airbrake because the airbrake uses ModuleAeroSurface. Adding in the ability to affect ModuleAeroSurface is next on my todo list and I think I'll be able to get it done tonight. To check if a part uses ModuleControlSurface or ModuleAeroSurface right click on it in the menu in the VAB or in the SPH and if it says something similar to GqN5l7H.png then it uses ModuleControlSurface and if it looks like 4dYVIdv.png then it uses ModuleAeroSurface.

 

So this has nothing to do with an individual line within the ModuleControlSurface like this one:

              %transformName = obj_ctrlSrf

it just deals with the ModuleControlSurface as a whole?

Share this post


Link to post
Share on other sites
3 minutes ago, smotheredrun said:

So this has nothing to do with an individual line within the ModuleControlSurface like this one:

              %transformName = obj_ctrlSrf

it just deals with the ModuleControlSurface as a whole?

Yup. And I just got it to work with ModuleAeroSurface as well. Now to add a toggle!

1 person likes this

Share this post


Link to post
Share on other sites

Hey TheRagingIrishman,

Good work! :wink:

 

 

On 3.5.2017 at 0:27 AM, linuxgurugamer said:

I'll get it up there this evening

@linuxgurugamer

It's still not visible on my CKAN, is this a bug?

Share this post


Link to post
Share on other sites

I'll check in a few minutes

Share this post


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

I'll check in a few minutes

OK,

Thank you! :wink:

Share this post


Link to post
Share on other sites

Sorry, I forgot to do this, working on it now.

It would help if you added a .version file.  Not absolutely necessary, but help both AVC and CKAN to know when new versions are available

Share this post


Link to post
Share on other sites

It's been done for a few hours how.

Share this post


Link to post
Share on other sites

Posted (edited)

New release 1.0.1 is up. Pinging @linuxgurugamer (I added a .version file, does CKAN need to know about this?)

Changelog:
-added Airbrakes and other parts that use ModuleAeroSurface rather than ModuleControlSurface
-enabled deployment while in orbit
-added button to turn off the blocker (per part)
-added SmartActuation.version
-added changelog.txt)

Edited by TheRagingIrishman
3 people like this

Share this post


Link to post
Share on other sites

Yes, I'll get to it tomorrow night

1 person likes this

Share this post


Link to post
Share on other sites

Posted (edited)

I checked  the .version file for syntax errors before making any changes:

Your .version file has syntax errors:

  • Extra comma following the "Allow Release
  • MIssing comma after brace closing the GITHUB section
  • Missing brace at the end.

I use a website: https://jsonformatter.org/

to validate JSON when I write it by hand.  

For these, I use the site:   http://ksp-avc.cybutek.net/

to store current data and generate the file for me.

The following is fixed:

{
  "NAME":"SmartActuation",
  "URL":"https://raw.githubusercontent.com/theRagingIrishman/SmartActuation/master/SmartActuation.version",
  "DOWNLOAD":"https://github.com/theRagingIrishman/SmartActuation/releases/latest",
  "GITHUB":
  {
    "USERNAME":"theRagingIrishman",
    "REPOSITORY":"SmartActuation",
    "ALLOW_PRE_RELEASE":false
  },
  "VERSION":
  {
    "MAJOR":1,
    "MINOR":0,
    "PATCH":1,
    "BUILD":0
  },
  "KSP_VERSION":
  {
    "MAJOR":1,
    "MINOR":2,
    "PATCH":2
  }
}

 

Edited by linuxgurugamer
2 people like this

Share this post


Link to post
Share on other sites
42 minutes ago, linuxgurugamer said:

I checked  the .version file for syntax errors before making any changes:

Your .version file has syntax errors:

  • Extra comma following the "Allow Release
  • MIssing comma after brace closing the GITHUB section
  • Missing brace at the end.

I use a website: https://jsonformatter.org/

to validate JSON when I write it by hand.  

For these, I use the site:   http://ksp-avc.cybutek.net/

to store current data and generate the file for me.

The following is fixed:


{
  "NAME":"SmartActuation",
  "URL":"https://raw.githubusercontent.com/theRagingIrishman/SmartActuation/master/SmartActuation.version",
  "DOWNLOAD":"https://github.com/theRagingIrishman/SmartActuation/releases/latest",
  "GITHUB":
  {
    "USERNAME":"theRagingIrishman",
    "REPOSITORY":"SmartActuation",
    "ALLOW_PRE_RELEASE":false
  },
  "VERSION":
  {
    "MAJOR":1,
    "MINOR":0,
    "PATCH":1,
    "BUILD":0
  },
  "KSP_VERSION":
  {
    "MAJOR":1,
    "MINOR":2,
    "PATCH":2
  }
}

 

Fixed in 1.0.1.1 thanks.

Share this post


Link to post
Share on other sites

Posted (edited)

And now, the first folder in the file is "Desktop"

You can fix by just repackaging and uploading again to Github, don't forget to delete the bad one first

 

Edited by linuxgurugamer

Share this post


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

And now, the first folder in the file is "Desktop"

You can fix by just repackaging and uploading again to Github, don't forget to delete the bad one first

Sorry about that, was rushing to fix the .version before a test I just finished. Fixed now.

Share this post


Link to post
Share on other sites

Ok, updated.  Just remember to keep the .version updated with the correct version

1 person likes this

Share this post


Link to post
Share on other sites

This crashes the game upon launching a vessel w/ a control surface in 1.3. Are there plans for an update?

Share this post


Link to post
Share on other sites
3 hours ago, Iamsodarncool said:

This crashes the game upon launching a vessel w/ a control surface in 1.3. Are there plans for an update?

That's not good, let me see what I can do.

Share this post


Link to post
Share on other sites

update to 1.3, links and changelog in the OP (@Iamsodarncool)

3 people like this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now