linuxgurugamer Posted January 7, 2018 Share Posted January 7, 2018 (edited) This mod started as the Throttle Limit Action Groups, and was listed as discontinued. A forum user, @Errol, requested that I revive it and add a new feature. The new feature was significant enough that I decided to totally rename the mod. Originally suggested by Kofeyh of KSPTV, this super simple mod allows players to assign levels of throttle limiting to an engine on their craft through the magical power of action groups. These action groups work like any of the stock ones, meaning they will also copy to symmetry counterparts. Note that users of AGX will have to abide by AGX's cooldown periods and cannot simply spam a button. Plan your groups accordingly. Additionally, the mod now puts a minimum throttle setting on (currently) stock engines. What this means is that , for example, the Rapier which has a minimum throttle of 20%, will throttle from 100% down to 20% (using the full range of the throttle), and then to 0%. New functionality Added toolbar button and window for controlling the Thrust Limiter Can change the following: All active engines All inactive engines All RCS and can also select specific engine types Remembers window position Added settings window with the following options: Enable Throttle Limits Enable Global Thrust Limit Window Use Alternative Skin It is not totally safe to use both the Throttle Limits and the Global Thrust Limit Window together, it seems to confuse other mods which don't expect this behaviour. Availability Download: https://spacedock.info/mod/1640/Throttle Limit Extended Source: https://github.com/linuxgurugamer/ThrottleLimitExtended License: GPL V3 Also available via CKAN Toolbar button The toolbar button is used to open up the Thrust Limit window Action Groups Thrust Limit Window This mod now has the ability to change the thrust limits of various types of engines. Click the toolbar button (which looks like a throttle): Settings Window Edited August 20, 2018 by linuxgurugamer Link to comment Share on other sites More sharing options...
Psycho_zs Posted January 10, 2018 Share Posted January 10, 2018 Cool. You might be interested in this bugreport to tweak existing stock parameter to allow more sane native behavior: https://bugs.kerbalspaceprogram.com/issues/15826 I wonder if it is possble to use atmosphereCurve values in MM selectors. (To autoassign thrust limits based on the difference between ASL and VAC Isp values) Link to comment Share on other sites More sharing options...
linuxgurugamer Posted January 10, 2018 Author Share Posted January 10, 2018 (edited) 20 minutes ago, Psycho_zs said: Cool. You might be interested in this bugreport to tweak existing stock parameter to allow more sane native behavior: https://bugs.kerbalspaceprogram.com/issues/15826 I wonder if it is possble to use atmosphereCurve values in MM selectors. (To autoassign thrust limits based on the difference between ASL and VAC Isp values) I don't understand what you are saying in that bug report, because ModuleEnginesFX derives from ModuleEngines, and minThrust is defined in ModuleEngines, there is no reference to minThrust in ModuleEnginesFX. This mod has no problem changing the minThrust for any engine, be it a ModuleEngines or ModuleEnginesFX Oh, I misunderstood You are correct, except that in your bug report you only mention ModuleEnginesFX, while I'm pretty sure it happens with ModuleEngines as well Edited January 10, 2018 by linuxgurugamer Link to comment Share on other sites More sharing options...
Psycho_zs Posted January 10, 2018 Share Posted January 10, 2018 Thanks, I've updated the description. Link to comment Share on other sites More sharing options...
linuxgurugamer Posted January 10, 2018 Author Share Posted January 10, 2018 @Psycho_zs I wonder how they are going to implement it. Frankly, I don't have a problem with it using the entire throttle range for a limited thrust range. The only issue I see is that how do you turn off the engine. Right now, throttling down an engine will eventually turn it off. Using the entire throttle range prevents the engine from being accidently turned off. I know they can code it, but not sure if it's worth it. Link to comment Share on other sites More sharing options...
eberkain Posted January 10, 2018 Share Posted January 10, 2018 Its nice to have this come to stock parts instead of just being a RO thing. I like having the full range throttle motion to run the whole limited throttle range. So zero throttle is actually 20% thrust. Should work well with action groups set for engine startup and shutdown. Link to comment Share on other sites More sharing options...
Psycho_zs Posted January 12, 2018 Share Posted January 12, 2018 (edited) Things will get messy either way when engines with different throttle depth are used simultaneously. Combinations of things can be reduced down to three advanced tweakables: shutdown when throttle = 0 shutdown when current thrust < minThrust throttle mapping: proportinal, or stretched proportionally to deepest throttle, or stretched fully Out of 12 possible combinations only 7 make sense: Spoiler Proportional, shutdown under minThrust: Engine1: 0-----------------------------------------|maxThrust Engine2: 000000000000|minThrust--------------------|maxThrust Engine3: 00000000000000000000000000|minThrust------|maxThrust Throttle: 0|not_0-----|-------------|---------------|100 Proportional, shutdown at 0: Engine1: 0-----------------------------------------|maxThrust Engine2: 0mmmmmmmmmmm|minThrust--------------------|maxThrust Engine3: 0mmmmmmmmmmmmmmmmmmmmmmmmm|minThrust------|maxThrust Throttle: 0|not_0-----------------------------------|100 Proportional, no shutdown: Engine1: 0-----------------------------------------|maxThrust Engine2: mmmmmmmmmmmm|minThrust--------------------|maxThrust Engine3: mmmmmmmmmmmmmmmmmmmmmmmmmm|minThrust------|maxThrust Throttle: 0|not_0-----------------------------------|100 Stretched proportionally to deepest throttle, no shutdown: (Engine1 removed, otherwise it would be the same as proportional) Engine2: |minThrust--------------------------------|maxThrust Engine3: mmmmmmmmmmmmmmmmmmmmm|minThrust-----------|maxThrust Throttle: 0|not_0-----------------------------------|100 Stretched proportionally to deepest throttle, shutdown at 0 (Engine1 removed, otherwise it would be the same as proportional) Engine2: 0|minThrust-------------------------------|maxThrust Engine3: 0mmmmmmmmmmmmmmmmmmmm|minThrust-----------|maxThrust Throttle: 0|not_0-----------------------------------|100 Stretched full, no shutdown: Engine1: 0----------------------|maxThrust Engine2: 0------|minThrust-------------|maxThrust Engine3: 0------------------------------------------------|minThrust-------------|maxThrust Throttle: 0|not_0----------------|100 Stretched full, shutdown at 0: Engine1: 0----------------------|maxThrust Engine2: 0------0|minThrust------------|maxThrust Engine3: 0------------------------------------------------0|minThrust------------|maxThrust Throttle: 0|not_0----------------|100 Edited January 12, 2018 by Psycho_zs Link to comment Share on other sites More sharing options...
linuxgurugamer Posted January 12, 2018 Author Share Posted January 12, 2018 1 hour ago, Psycho_zs said: Things will get messy either way when engines with different throttle depth are used simultaneously. I totally agree. Wonder what happens now? 1 hour ago, Psycho_zs said: Combinations of things can be reduced down to three advanced tweakables: shutdown when throttle = 0 shutdown when current thrust < minThrust throttle mapping: stretched or proportinal Interesting analysis. But it doesn't address your first point. Throttle mapping needs to be done the same for all active engines. I think the simplest would one of the following: Throttle mapping is not stretched at all Throttle mapping is stretected to whichever engine has the lowest minThrust setting Link to comment Share on other sites More sharing options...
Psycho_zs Posted January 12, 2018 Share Posted January 12, 2018 1 hour ago, linuxgurugamer said: Throttle mapping is stretected to whichever engine has the lowest minThrust setting Nice idea. I've updated the analysis in previous post and in bugreport Link to comment Share on other sites More sharing options...
Psycho_zs Posted January 12, 2018 Share Posted January 12, 2018 Another batch of thoughts: Continuing burning when throttle is at 0 does not make sense gameplay-wise. Engines dynamically affecting behavior of other engines might not be handy predictablity-wise. You dock to some deeply throttleable craft while your throttle is not 0 and boom, unplanned blastoff. So proportional stretching should at least be optional. Flameout below minThrust can be set at part level. Sumarizing this we are left with 3 major variants: Proportional: Engine1: 0-----------------------------------------|maxThrust Engine2: 0mmmmmmmmmmm|minThrust--------------------|maxThrust Engine3: 0mmmmmmmmmmmmmmmmmmmmmmmmm|minThrust------|maxThrust Throttle: 0|not_0-----------------------------------|100 Stretched proportionally to deepest throttle: (Engine1 removed, otherwise it would be the same as proportional) Engine2: 0|minThrust-------------------------------|maxThrust Engine3: 0mmmmmmmmmmmmmmmmmmmm|minThrust-----------|maxThrust Throttle: 0|not_0-----------------------------------|100 Stretched full: Engine1: 0----------------------|maxThrust Engine2: 0------0|minThrust------------|maxThrust Engine3: 0------------------------------------------------0|minThrust------------|maxThrust Throttle: 0|not_0----------------|100 + an option at part level to flameout below minThrust, (default false) Link to comment Share on other sites More sharing options...
Psycho_zs Posted January 12, 2018 Share Posted January 12, 2018 Returning to Throttle Limit. I want to find a fallback algorithm of autoassigning minThrottle via MM in relation to Isp. Here are a couple of ways to calculate a coefficient to apply to maxThrottle: engine Isp(ASL) Isp(Vac) Isp(Vac) / Isp(ASL) ( Isp(Vac) / Isp(ASL) )^2 Thud 275 305 0,90 0,81 Terrier 85 345 0,25 0,06 Puddle 90 350 0,26 0,07 Skipper 280 320 0,88 0,77 Mainsail 285 310 0,92 0,85 Reliant 260 310 0,84 0,70 Swivel 250 320 0,78 0,61 Vector 295 315 0,94 0,88 Rhino 205 340 0,60 0,36 Dart 290 340 0,85 0,73 I do not know how to extract data from atmosphereCurve. Link to comment Share on other sites More sharing options...
eberkain Posted January 13, 2018 Share Posted January 13, 2018 Did a pull request with some config files for the mods I'm using that add engines. Link to comment Share on other sites More sharing options...
linuxgurugamer Posted January 14, 2018 Author Share Posted January 14, 2018 On 1/13/2018 at 11:42 AM, eberkain said: Did a pull request with some config files for the mods I'm using that add engines. Ok, I'll take a look, thanks Link to comment Share on other sites More sharing options...
Psycho_zs Posted January 15, 2018 Share Posted January 15, 2018 (edited) This config automatically sets throttle depth devised from Isp. It can be adapted to with ThrottleLimiterModule and act as a fallback. // find engines that use Oxidiser and have minThrust 0 @PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[Oxidizer],#minThrust[0]]]:FINAL { @MODULE[ModuleEngines*] { // set minThrust to maxThrust @minThrust = #$maxThrust$ // multiply by Isp(ASL): @minThrust *= #$atmosphereCurve/key,1[1, ]$ // divide by Isp(Vac): @minThrust /= #$atmosphereCurve/key,0[1, ]$ // Uncomment these for quad variant: // multiply by Isp(ASL) again: //@minThrust *= #$atmosphereCurve/key,1[1, ]$ // divide by Isp(Vac) again: //@minThrust /= #$atmosphereCurve/key,0[1, ]$ } // update description thrustPerc = #$MODULE[ModuleEngines*]/minThrust$ @thrustPerc *= 100 @thrustPerc /= #$MODULE[ModuleEngines*]/maxThrust$ @description ^= :$: Can be throttled down to #$thrustPerc$%.: } There are limitations: values from atmosphereCurve are extracted positionally. I haven't seen a config in my GameData that does funky things with atmosphereCurve, but if the first key isn't a vacuum value or the second isn't sea level value, things will go wrong. Maybe I will add filter for proper order in atmosphereCurve. The last bit about description update does not render the variable properly... Edited January 15, 2018 by Psycho_zs Link to comment Share on other sites More sharing options...
Kerbas_ad_astra Posted February 1, 2018 Share Posted February 1, 2018 Some time ago, I was working on making a mod like this. I never quite got the PartModule to behave the way I wanted, but I worked out a Module Manager patch that looked at an engine's part tags to determine whether it was a turbopump-driven (60% min throttle) or pressure-fed (15% min throttle) engine. (Any engines left over at the end got a 30% throttle limit.) It would be pretty straightforward to adapt to the different config logic that your mod uses. I can adjust the limits if you think e.g. 80% is a better limit for lifter engines, or what have you, but it would be a patch that handles any engine from any mod that didn't have a a specific patch for it. Would you be interested in taking it as a PR? Link to comment Share on other sites More sharing options...
linuxgurugamer Posted February 1, 2018 Author Share Posted February 1, 2018 13 minutes ago, Kerbas_ad_astra said: Some time ago, I was working on making a mod like this. I never quite got the PartModule to behave the way I wanted, but I worked out a Module Manager patch that looked at an engine's part tags to determine whether it was a turbopump-driven (60% min throttle) or pressure-fed (15% min throttle) engine. (Any engines left over at the end got a 30% throttle limit.) It would be pretty straightforward to adapt to the different config logic that your mod uses. I can adjust the limits if you think e.g. 80% is a better limit for lifter engines, or what have you, but it would be a patch that handles any engine from any mod that didn't have a a specific patch for it. Would you be interested in taking it as a PR? PRs are welcome, but I'm trying to understand what you are saying. How can you tell if an engine is turbopump-driven or pressure-fed? Sounds like it would be very useful. And, regarding the limit for lifter engines, for now I'd like to leave it at 80, although specific engines can always override that. The actual limit can be chagned later. Link to comment Share on other sites More sharing options...
Kerbas_ad_astra Posted February 1, 2018 Share Posted February 1, 2018 1 minute ago, linuxgurugamer said: PRs are welcome, but I'm trying to understand what you are saying. How can you tell if an engine is turbopump-driven or pressure-fed? Sounds like it would be very useful. And, regarding the limit for lifter engines, for now I'd like to leave it at 80, although specific engines can always override that. The actual limit can be chagned later. I'm basically depending on mod authors to be honest when tagging their engines. If the engine's tag list has "vernier", "land", "maneuver", "orbit', or "vacuum" in it, I figure it's a pressure-fed engine with a deep throttle. If the tags say "sustain", "launch", "ascend", or "boost", I figure it's a pump-driven engine. I'll set the patches to run AFTER[ThrottleLimitExtended], so the patches will only run on engines that haven't been specifically patched already (so we can handle any weird cases with patches that run earlier). The actual patch I'd made for what would have been my "ThrottleUp" mod is here: https://github.com/Kerbas-ad-astra/ThrottleUp/blob/master/GameData/ThrottleUp/ThrottleUp.cfg In addition to changing the limit, I'll also re-arrange the patches a little bit, since (in my mind) "orbit" and "vacuum" are a little more "ambiguous" in terms of what they signify, so I'll have 'vernier', 'land', and 'maneuver' first, then the turbopump tags, and then 'orbit' and 'vacuum'. Link to comment Share on other sites More sharing options...
linuxgurugamer Posted February 1, 2018 Author Share Posted February 1, 2018 30 minutes ago, Kerbas_ad_astra said: I'm basically depending on mod authors to be honest when tagging their engines. If the engine's tag list has "vernier", "land", "maneuver", "orbit', or "vacuum" in it, I figure it's a pressure-fed engine with a deep throttle. If the tags say "sustain", "launch", "ascend", or "boost", I figure it's a pump-driven engine. I'll set the patches to run AFTER[ThrottleLimitExtended], so the patches will only run on engines that haven't been specifically patched already (so we can handle any weird cases with patches that run earlier). The actual patch I'd made for what would have been my "ThrottleUp" mod is here: https://github.com/Kerbas-ad-astra/ThrottleUp/blob/master/GameData/ThrottleUp/ThrottleUp.cfg In addition to changing the limit, I'll also re-arrange the patches a little bit, since (in my mind) "orbit" and "vacuum" are a little more "ambiguous" in terms of what they signify, so I'll have 'vernier', 'land', and 'maneuver' first, then the turbopump tags, and then 'orbit' and 'vacuum'. Sounds good. Link to comment Share on other sites More sharing options...
linuxgurugamer Posted February 2, 2018 Author Share Posted February 2, 2018 New release, 2.0.1: Thanks to @Kerbas_ad_astra for this: Added "universal" tag-based patcher. Link to comment Share on other sites More sharing options...
linuxgurugamer Posted February 2, 2018 Author Share Posted February 2, 2018 New release, 2.0.2: Thanks to @eberkain for these: Add Support for RLA Added Puff Engine Missed Huff engine Added support for BDynamics Added HGR and QuizTech support Added USI Support Link to comment Share on other sites More sharing options...
Psycho_zs Posted February 2, 2018 Share Posted February 2, 2018 Well, I went on EVA, let go of the ladder and the ship turned the engine on and flew away. Link to comment Share on other sites More sharing options...
linuxgurugamer Posted February 2, 2018 Author Share Posted February 2, 2018 (edited) 22 minutes ago, Psycho_zs said: Well, I went on EVA, let go of the ladder and the ship turned the engine on and flew away. Very nice. some details would be nice, such as a log file, craft file, etc Edit: I just tested this, and didn't have a problem. This mod doesn't change the throttle, it just prevents it from going below a certain level. Edited February 2, 2018 by linuxgurugamer Link to comment Share on other sites More sharing options...
Psycho_zs Posted February 2, 2018 Share Posted February 2, 2018 (edited) ThrottleLimiterModule.CheckThrust: part; LV-303 "Pug" Liquid Fuel Engine, stv: decrease ThrottleLimiterModule.CheckThrust: part; LV-303 "Pug" Liquid Fuel Engine, stv: off ThrottleLimiterModule.CheckThrust: part; LV-303 "Pug" Liquid Fuel Engine, stv: off Just reproduced it again. This was in the log in the moment of ignition. Simple craft: mk1 pod, FL-T100, Pug. (from overhauls). Throttle was cut off by pressing X. More precisely, engine starts when I bump the craft with a kerbal, not when I let go of the hatch. Among other mods there are RealPlume/Smokescreen. These have a history of messing with engines in weird way. Will try on stock soon... ...Yep, same thing on stock game + TLE. Mk1 Pod, FL-T100, Terrier. The craft is scared of bumping it with a helmet and flies away. Similar messages in the log. Edited February 2, 2018 by Psycho_zs Link to comment Share on other sites More sharing options...
Jebs_SY Posted February 2, 2018 Share Posted February 2, 2018 (edited) Hi. Was able to reproduce it. Have to say, that pressing CTRL what is "throttle down" kicks the thrust of my engine to 60%. But the throttle stays at 0%. To kill the engine I need to press "X" (cut engine). Interesting is, even on EVA that happens. Made a quick video, send it to you, @linuxgurugamer Maybe it helps debugging. o/ BR JebsSY Edited February 2, 2018 by Jebs_SY Link to comment Share on other sites More sharing options...
linuxgurugamer Posted February 3, 2018 Author Share Posted February 3, 2018 (edited) Oh, i just duplicated it. It is when you hit the Ctrl key (ie: throttle down) or Shift (ie: thorttle up), nothing to do with bumping. And, I think I found it New release, 2.0.3: Fixed bug where any and all vessels in Physics range would turn on their engines if the throttle keys were pressed. Most noticed on EVA Edited February 3, 2018 by linuxgurugamer Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now