Jump to content

[1.8] MandatoryRCS 1.8 & Part Pack 1.4 - Reaction wheels nerf, SAS persistence, rotation in timewarp


Gotmachine

Recommended Posts

MandatoryRCS

This plugin revisit the stock balance between the overpowered reaction wheels and RCS thrusters which are useless outside of docking situations. It does not propose a more realistic simulation of reaction wheels but is a collection of tweaks aimed at limiting their functions and balancing the gameplay.

Reaction wheels are turned into stabilizers, preventing your vessel to spin out of control and keeping it pointed at the direction you choose in the SAS autopilot. But they have a very low (and somewhat realistic) torque power when the pilot or the SAS request a pitch, roll or yaw rotation.

This mean that like in real life, most crafts always need a few RCS thrusters (and propellant) to have orientation authority, but you still get most of the playability benefits of overpowered reaction wheels.

As a side benefit, the plugin also fix the "timewarp rotation stop" stock behavior, and introduce a few related features like keeping the vessel oriented toward the SAS selection in timewarp and when switching vessels / reloading the game.

Features

Reaction wheels nerf

  • Reaction wheels have two different torque power, the stock one and a heavily nerfed, somewhat realistic one.
  • Nerfed torque provided on pilot or SAS rotation requests.
  • Stock torque when SAS "Stability mode" is turned on.
  • Stock torque when the vessel has reached the SAS selection (prograde, normal, target, etc).
  • Torque output is affected by the vessel angular velocity : the faster the vessel rotate, the weaker reaction wheels are.
  • Pods and cockpits built-in reaction wheels can't be controlled (they don't respond to pilot/SAS input) but still provide SAS stabilization.
  • Reaction wheels in probes cores and independent parts can be controlled.
  • Hiding of irrelevant reaction wheels right-click menu options and action groups.

Rotation persistence trough timewarp and reloading

  • Timewarping will not stop the vessel from rotating.
  • Rotation is restored after timewarping, switching vessels or reloading.
  • Rotation is not continuously calculated for unloaded (on rails) vessels, for minimal performance impact and code complexity.

SAS autopilot persistence trough timewarp and reloading

  • The vessel will keep its orientation toward the SAS selection when timewarping, switching vessels or reloading.
  • The SAS selection is remembered and restored when switching vessels or reloading.

Customization

  • Features can be enabled, disabled or tweaked in the ingame "Difficulty Settings" menu.

Download and detailed info

Current version : v1.8 for KSP 1.8

Latest release and source from github

Spoiler

Instructions & notes

Download & source

I highly recommend that you grab it from CKAN !

But you can also get the latest release and source from github

Requirements

This requires the ModuleManager plugin to work. You can download it here

Incompatibilities

  • (Semi-)Saturatable Reaction Wheels : can still be used but the reaction wheels features will be automatically disabled.
  • Persistent Rotation : can still be used but the SAS and rotation persistence features will be automatically disabled.
  • MechJeb, TCA, KOS and other autopilots are likely to cause various issues : first, autopilots usually expect the stock "timewarp kill rotation" behavior, the fact that this doesn't happen can cause weird behavior. Second, MandatoryRCS is build upon the stock SAS and use its state to know when reaction wheels are allowed to stabilize the vessel. Autopilots usually disable completly the stock SAS, causing reaction wheels to become useless.
  • Due to the persistent rotation feature, using KAS for attaching vessels together in space will end badly.

Recommendations

  • RCS Build Aid (Forum post) - Editor plugin to help you place your RCS thrusters efficiently.
  • RLA StockAlike (Pictures) - A light part packs featuring (among other things) some super useful small RCS thrusters, monopropellant tanks and engines.

Disclaimer

This is my first plugin and I'm far from a skilled programmer, so the code for this may be ugly. As far as I know, it does the job and doesn't break the game. However, keep in mind that I don't really know what I'm doing. If anybody has the time to review and comment my code, I'm open to suggestions and pull requests :)

Thanks

@MarkusA380 for figuring out how to make vessels rotate, you saved me a lot of time !

The whole KSP community for its awesomeness !

Licensing

This masterful work of art is released under the unlicense.

So public domain, feel free to do anything, especially updating this plugin if I'm not around.

Changelog

Known bugs and glitches

  • Getting out of timewarps with the SAS direction hold activated input a large roll "kick", most visible at high timewarp levels. I tried a lot of things to find out why this happen or fix it, and failed.
  • When switching to an unloaded vessel with its SAS in "target", "antitarget" or "maneuver" mode, the orientation change is applied a few frames after the vessel is unpacked, leading to the rotation event being visible to the player. Won't fix as this is minor, purely cosmetic and fixing would require large modifications.

v1.8 for KSP 1.8 - 09/02/2020

  • Recompiled for KSP 1.8

v1.7 for KSP 1.7 - 01/09/2019

  • Added support configs to move RCS thrusters / MP tanks / reaction wheels earlier in the tech tree. Supported parts : stock, RLA stockalike and ReStockPlus.

v1.6 for KSP 1.7.0 - 31/05/2019

  • Recompiled for KSP 1.7 (should be compatible with KSP 1.6)
  • Code tweaks for fail-safe reference acquisition to the stock module. Should fix be the occasional nullref spam that was happening on reentry.

v1.5 for KSP 1.4.1

  • Recompiled for KSP 1.4.1
  • (bugfix) Fixed NRE on asteroids changing SOI
  • (bugfix) Fixed NRE on planting flags

v1.4 for KSP 1.3.1

  • Recompiled for KSP 1.3.1
  • Tweaks to the settings menu

v1.3 for KSP 1.3.0

  • Recompiled for KSP 1.3.0 (thx Linuxgurugamer)
  • (bugfix) Fixed typo in settings (issue #1)

v1.2 for KSP 1.2.2

  • (feature) Ingame settings menu with compatibility checks for SSRW and PR plugins. They can now be used alongside the plugin, incompatible features are auto-disabled.
  • (feature) Torque output on pilot/SAS input is now very low instead of disabled.
  • (feature) Torque output on pilot/SAS input is still disabled for all reaction wheels in manned parts. This can be overridden/customized trough a "isControllable" parameter available in the module config (see the default patch CFG for more about that).
  • (improvement) In SAS target mode, reaction wheels provide torque only if they have closely reached the target first (less "magnet effect")
  • (improvement) Refactored several things in ModuleTorqueController, now a bit less dirty.
  • (improvement) SAS target hold in body-relative modes (pro/retrograde, radial, normal) is now disabled when the vessel SOI change.

v1.1 for KSP 1.2.2

  • (bugfix) Fixed SAS orientation being applied when not reached on initiating timewarp (woops)
  • (bugfix) Tweaked a few things to prevent the perpetual SAS roll overshoot.

v1.0 for KSP 1.2.2

  • (feature) The torque output from reaction wheels is now affected by the vessel angular velocity : the torque output decrease when the angular velocity increase, down to a minimum of 5% when the angular velocity reach 45° / second.
  • (bugfix) Fixed reaction wheels providing a bit of torque when switching SAS from stability assist mode to a target hold mode after loading a vessel (fixed by forcing module deactivation every fixedupdate)
  • (bugfix) Fixed SAS overshooting its target when using RCS (Fixed by explicitly setting reaction wheels torque to 0 when the module is disabled)
  • (bugfix) Irrelevant reaction wheels action groups options are now hidden

Perhaps planned features

  • Reaction wheels saturation over time when landed.
  • (Maybe) Make reaction wheels able to "help" RCS thrusters by providing torque when they are activated, lowering the RCS fuel consumption.
  • A part pack of RCS thrusters, MP tanks and orbital MP engines (soon :D)

Realism notes

The way reaction wheels work with this plugin isn't realistic. This said, in lowering their torque output to realistic values for maneuvering, this plugin make the playstyle a lot closer to the reality without cutting too much on playability. In real life, reaction wheels and control moment gyroscopes (CMR) can provide only very small amounts of torque. For example, each CMR on the ISS is rougly 1.2 meter wide, weight about 280 kg (source) and provide only 0.258 kNm of torque (source). Now compare that to the 5 kNm provided by the 0.625m, 50 kg small reaction wheel in KSP.

 

MandatoryRCS Part Pack

Small part pack to provide more RCS thrusters in a stockalike fashion

Tiny thrusters (0.25 kN) With tiny exhaust effect RV-105 variations
tiny%20thrusters.jpg microRCS%20exhaust.jpg RV-105%20variations.jpg

Download and detailed info

Current version : v1.4 for KSP 1.2 to 1.7

Latest release and source from github

Spoiler

Download & source

I highly recommend that you grab it from CKAN !

But you can also get the latest release and source from github

Licensing

This masterful work of art is released under the unlicense.

So public domain, feel free to do anything, especially updating this mod if I'm not around.

Changelog

v1.4 for KSP 1.2 to 1.7

  • Moved tiny thruster to "stability" tech tree node

v1.3 for KSP 1.2 to 1.7

  • Fixed ReStock compatibility (thanks GordonDry)

v1.2 for KSP 1.2 to 1.7

  • Add MM patching logic to point textures at the depreciated Squad RV-105 textures if needed
  • Marked as compatible with KSP 1.2 > 1.7

v1.1 for KSP 1.2, 1.3 & 1.4

  • Marked as compatible with KSP 1.4

v1.0 for KSP 1.2 & 1.3

  • Initial release

Current parts :

0.25 kN RCS blocks with custom tiny exhaust effect.

Nozzle configurations :

  • 1x front
  • 1x down
  • 2x lateral
  • 2x lateral 45°
  • 2x lateral + 1x down
  • 2x lateral 45° + 1x down

RV-105 block variations

Nozzle configurations :

  • 1x down
  • 2x lateral
  • 2x lateral 45°
  • 2x lateral + 1x down
  • 2x lateral 45° + 1x down
  • 2x lateral 45° + 1x down + 1x up
  • 2x lateral + 2x front

Planned parts :

4 kN RCS blocks, nozzle configurations :

  • 1x front
  • 1x down (90° angle)
  • 2x lateral
  • 2x lateral 45°
  • 2x lateral + 2x front

 

Edited by Gotmachine
Link to comment
Share on other sites

Thanks !

The patch is generic, so the plugin should be compatible with all parts as long as they use the stock ModuleReactionWheel for their reaction wheels. I don't think there is anything out there that doesn't, but what do I know :D...

Edited by Gotmachine
Link to comment
Share on other sites

Thanks for the offer but I've already got a bunch of models done, and I want to make a pack that offer various specific RCS block configurations (what I think is the most efficient). Still need to do texturing and configs but I may be able to get that done next week. Perhaps. Maybe. :D

Link to comment
Share on other sites

Quick update on the upcoming part pack :

STEADLER Engineering Corps leaked a super-secret document about their future "micro RCS" product line. Space agencies around the word are guessing it was done on purpose, to see the reactions and comments before entering production phase :P

MicroRCS_showcase.jpg

Those tiny thrusters will be very useful with the plugin because the RV-105 and the Place-Anywhere are really overpowered (and oversized) for small spaceships in the 0-15t range. This is a problem because the SAS usually try to go as fast as possible, wasting a lot of Monopropellant in the process. With RCS, better turn slower if you want to be fuel-efficient. Also, they will be available early in the tech tree (at the Flight Control node), along with a small Monopropellant canister because as it is now, the mod is very hard in the early career due to the lack of RCS options (You can grab RLA Stockalike as a temp fix, it has similar parts).

This is the full list of what I've got in mind with this pack (this is very likely to be revised, I'm open to suggestions) :

  • RCS options earlier in the tech tree
  • Decrease of stock MP tanks dry mass
  • Slightly rebalance the ISP of MP engines and RCS blocks
  • Monopropellant tanks from RLA Stockalike
  • Orbital MP engines from RLA Stockalike (Maybe)
  • 0.25 kN RCS blocks, nozzle configurations :
    • 1x front
    • 1x down
    • 2x lateral
    • 2x lateral 45°
    • 2x lateral + 1x down
    • 2x lateral 45° + 1x down
  • RV-105 block variations, nozzle configurations :
    • 1x down
    • 2x lateral
    • 2x lateral 45°
    • 2x lateral + 1x down
    • 2x lateral 45° + 1x down
    • 2x nozzles 45° + 1x down + 1x up
    • 2x lateral + 2x front
  • 4 kN RCS blocks, nozzle configurations :
    • 1x front
    • 1x down (90° angle)
    • 2x lateral
    • 2x lateral 45°
    • 2x lateral + 2x front
  • Aerodynamic blocks
  • Large RCS LFO blocks

And also a quick question : knowing that there are not many mods that include RCS blocks, that the "Command and control" editor category is usually a bit empty, and that my parts will by light on memory usage (low-res textures and models), would you prefer two separate downloads, one for the parts and another for the plugin (would also be split on CKAN) or do you think it's a better option to pack everything together (since the plugin doesn't play very well with only the stock parts) ?

Edited by Gotmachine
Link to comment
Share on other sites

On 1/10/2017 at 11:58 AM, Gotmachine said:

And also a quick question : knowing that there are not many mods that include RCS blocks, that the "Command and control" editor category is usually a bit empty, and that my parts will by light on memory usage (low-res textures and models), would you prefer two separate downloads, one for the parts and another for the plugin (would also be split on CKAN) or do you think it's a better option to pack everything together (since the plugin doesn't play very well with only the stock parts) ?

Well, I'll vote for separate packs, because I want those RCS ports, but I don't mind overpowered reaction wheels.  :wink: 

Link to comment
Share on other sites

@DStaal Ok. Thinking about it, the reverse situation is also likely to happen (someone want the plugin but not the parts), like stock-parts only games or people who already have RCS variants. I will probably do two separate downloads. Easy to make one recommend the other on CKAN.

Also, a bit of explaining to answer @Dragon01 suggestion of including some kind of saturation system to the reaction wheels (like (Semi-)Saturatable Reaction Wheels) : in real life, reaction wheels and control moment gyroscopes (CMR) can provide only very small amounts of torque. For example, each of the four CMR on the ISS fit into a 1.2m wide casing, weight a total of about 1100 kg (source) for a torque output of 0.258 kNm (source). Now compare that to the 5 kNm provided by the 0.625m, 50 kg small reaction wheel in KSP. The thing is, RL reaction wheels are only used for very slow maneuvers and keeping attitude over extended durations. If you look at actual manned crafts or probes that where designed to travel somewhere (not satellites), the vast majority of them are or were equipped with some kind of RCS system for attitude control during maneuvers and burns.

Now what does that mean for the game ? If you try to patch the reaction wheels torque output / mass to realistic values (easily done with a simple MM patch), vessels mass (and partcount) will skyrocket :P. Not to mention that the SAS can't really handle having such low torque at its disposal. This mean that in nearly every case, you will need RCS thrusters to have enough torque to have decent (and I mean playable) control of your craft. And there are all the situations where the overpowered reaction wheels are a near-necessity for keeping the situation under control : stability assist during ascents, landings and docking, to compensate a not perfectly aligned engine configuration, also keeping landed crafts and rovers from tipping over...

This is the rational behind this plugin : keep the craft stable trough reaction wheels, require RCS thrusters for control authority in space, don't make the game boring to play. In my opinion, this is more realistic than trying to add a realistic saturation system to a highly unrealistic reaction wheel. And in a way, I already simulate some kind of RW saturation trough the "the faster the vessel rotate, the weaker reaction wheels are" rule.

As for future features, there is two things I'm considering : partially enable the RW torque when RCS thrusters are fired, to reduce a bit the monopropellant consumption (which is high mainly due to the SAS autopilot being very inefficient), and allow RW to provide very small amounts of torque for (very slow) control authority of satellites and crafts in the 0-5 tons range, using near realistic values for the torque output. The problem with messing with those things is that the SAS is super sensitive to dynamic changes in the vessel available torque, resulting in dampening inaccuracies making things rather unplayable.

 

Edited by Gotmachine
Link to comment
Share on other sites

Just released v1.2 : a few thing changed, some additions, some polishing here and there.

Changelog :

  • (feature) Ingame settings menu with compatibility checks for SSRW and PR plugins. They can now be used alongside the plugin, incompatible features are auto-disabled.
  • (feature) Torque output on pilot/SAS input is now very low instead of disabled.
  • (feature) Torque output on pilot/SAS input is still disabled for all reaction wheels in manned parts. This can be overridden/customized trough a "isControllable" parameter available in the module config (see the default patch CFG for more about that).
  • (improvement) In SAS target mode, reaction wheels provide torque only if they have closely reached the target first (less "magnet effect")
  • (improvement) Refactored several things in ModuleTorqueController, now a bit less dirty.
  • (improvement) SAS target hold in body-relative modes (pro/retrograde, radial, normal) is now disabled when the vessel SOI change.

The part pack is coming along slowly, I redid the small thrusters set for a simpler, more unified design. They now have their own super tiny monopropellant exhaust effect. Also mostly finished the RV-105 variations, now working on the large (4 kN) set, but I'm having a hard time finding a nice design for those. Meanwhile, some quick screenshots of what is done:

Redone tiny thrusters (RV-105 for scale) :

tiny%20thrusters.jpg

With tiny exhausts effects :

microRCS%20exhaust.jpg

RV-105 variations (reusing stock RV-105 texture) :

RV-105%20variations.jpg

 

Link to comment
Share on other sites

  • 3 weeks later...

Hi 

Really liking this, tried it out for abit and works perfectly.
I always used to MM-nerf the reaction wheels (torque *= 0.02 :P ) but it was always troublesome to keep a station from spinning madly when you EVA and grab something, this mod by it's mechanics seams to mitigate that(?)

The RCS parts look beautiful!!

Link to comment
Share on other sites

  • 3 weeks later...

Hello, I am using your mod and I really like it! Thanks a lot for your hardwork. I also think your balancing rationales are very solid.

I wanted to ask if a certain effect that I am experiencing is related to this mod. I am mostly having this effect on my airplanes. When I attempt to make small adjustments to my attitude with SAS in stability assist mode, I am experiencing a strong reaction in the reverse direction after my adjustment. I am thinking that it might be due to the strong torque available to SAS trying to correct my adjustment. Or it might be aerodynamic effects, too. I am not sure. This is a difficult situation to describe. But to ask in a different way, is SAS able to tell the difference between my input and natural instability? Can it be that SAS is attempting to "correct" my input and it is too good at correcting me due to the large amount of torque available to it?

Also how is the part pack coming along?

Link to comment
Share on other sites

@canisin Thanks for the support !

Regarding your observations : when you are in SAS "Stability Assist", the SAS try to use all the available torque (from control surfaces and reaction wheels) to maintain the current orientation. With the plugin, when you are in this mode, reaction wheels have their stock powerful torque as long as you don't input anything. As soon as you try to move (on control input), their torque drop to "realistic values". Those values are so low that in aerodynamic situations, reaction wheels have no effect at all, but when you release the input, the RW torque get back to the stock powerful values all of sudden. The SAS isn't really designed to handle that and usually this result in a small overcorrection.

This said, the only time I'm actually seeing this effect is in space with a non-stability assist SAS mode and a large vessel. As far as I know, the SAS has only a limited ability to counteract external aero forces so in stability assist mode, when you change your orientation and then release the input, there is always a counteraction due to aero forces. The plugin probably has a small effect on top of that but I fail to see it.

At some point I tried messing a bit with the SAS parameters but it did more harm than good, so for now it will stay as it is :P

About the part pack, I unfortunately don't have much time to work on it, but if you want you can download the tiny RCS set and the RV-105 set from this link

Link to comment
Share on other sites

  • 1 month later...

Typo report:

in the main menu difficulty settings submenu, there are three places where the word 'threshold' is spelled 'threesold.'

"Persistance" and "persistant" should be "persistence" and "persistent."  Three places.

Under the Rotation and SAS... side, "trough" should be "through."

Thanks, I like the mod and hope this is helpful instead of annoying

Link to comment
Share on other sites

  • 1 month later...

This mod came up in a KSP stream chat discussion today.  Any interest in a realism/difficult setting, where RCS thrusters require some tiny amount of electric charge to operate?  So you'd lose RCS control if you run completely out of charge.  Not really related to the main features of this mod, but it could be an appropriate place.

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 months later...

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