aquilux Posted September 20, 2017 Share Posted September 20, 2017 (edited) 3 hours ago, Aelfhe1m said: That's why I put a wild card in the edit part as well. Sorry, I missed that bit. I've been trying this out: //Add engine response time to all instant response engines based on part mass. //Author: Aelfhe1m, Aquilux //@PART[*]:HAS[@MODULE[ModuleEngines*]]:HAS[PROPELLANT[Oxidizer]|PROPELLANT[MonoPropellant],~useEngineResponseTime[True]] //Aq version @PART[*]:HAS[@MODULE[ModuleEngines*]]:HAS[!PROPELLANT[SolidFuel],~useEngineResponseTime[True]] //Ae version //find parts containing ModuleEnginesFX that uses Oxidiser, but does not have useEngineResponseTime { @MODULE[ModuleEngines*] { engineAccelerationSpeed = #$/mass$ //edit engineAccelerationSpeed, initially set it equal to mass$ @engineAccelerationSpeed *= 4.3333 // modify by multiplying value using KW values for ratio engineDecelerationSpeed = #$/mass$ //same for decel @engineDecelerationSpeed *= 4.4333 // modify by KW ratio // other operators are += for add -= for subtract and |= for raise to the power of (e.g. square) useEngineResponseTime = True //create useEngineResponseTime } } Both my search string and your search string (starting up with one commented out, then restarting with the other commented out and clearing MM's cache between loads) just catches all engines. Solid fuel, Xenon, whatever. Also, I'm getting weird behavior with the "engine??celerationSpeed" values. The "Skipper" LF engine, being the heaviest on my test craft, throttles up and down the fastest, while the "Puff" Monoprop engine, the lightest of them all, is the slowest to respond. Looking at the documentation, ModuleEnginesFX appears not to support those variables, though they obviously have some sort of affect. Test Edit: BTW, your code often contained an extra closing bracket. I tried running it as is once, but it threw a fault. Was this an extra bracket, or were you missing an open bracket? Edit edit: I think I see it in the documentation. I'll try the assumption that it was needed for the nesting, and come back with the results. Edited September 20, 2017 by aquilux Quote Link to comment Share on other sites More sharing options...
Aelfhe1m Posted September 20, 2017 Share Posted September 20, 2017 2 minutes ago, aquilux said: :HAS[PROPELLANT[Oxidizer]|PROPELLANT[MonoPropellant] won't work because :HAS doesn't support OR. If you only want it to affect liquid fuel engines then try using :HAS[@PROPELLANT[LiquidFuel]&@PROPELLANT[Oxidizer]]. Also watch out for bracketing. In both versions in your last snippet :HAS[@MODULE[ModuleEngine*] should not have an extra ] before the next :HAS clause because you want the next clause to apply to the found module not the part. 7 minutes ago, aquilux said: Also, I'm getting weird behavior with the "engine??celerationSpeed" values. The "Skipper" LF engine, being the heaviest on my test craft, throttles up and down the fastest, while the "Puff" Monoprop engine, the lightest of them all, is the slowest to respond. http://anatid.github.io/XML-Documentation-for-the-KSP-API/class_module_engines.html#a0ea45fd55aaf2293a1f2d48da4f23287 High values = faster throttling, low values = slower throttling 10 minutes ago, aquilux said: Looking at the documentation, ModuleEnginesFX appears not to support those variables, though they obviously have some sort of affect. ModuleEnginesFX inherits from ModuleEngines so all the base ModuleEngines fields should continue to have effect in MEFX. Quote Link to comment Share on other sites More sharing options...
aquilux Posted September 20, 2017 Share Posted September 20, 2017 1 minute ago, Aelfhe1m said: won't work because :HAS doesn't support OR. So I 'll have to make separate MM configs for each resource I guess. I have a few hybrid rocket engines that still need to spool up the delivery of oxidiser, but use solid fuel. Quote Also watch out for bracketing. In both versions in your last snippet :HAS[@MODULE[ModuleEngine*] should not have an extra ] before the next :HAS clause because you want the next clause to apply to the found module not the part. Yeah, just found that. Feel kind of dumb for it, but hey, that's how you learn right? Quote High values = faster throttling, low values = slower throttling Hmmm. Going to have to wrap my head around that math then, I got my assumptions backwards. Quote ModuleEnginesFX inherits from ModuleEngines so all the base ModuleEngines fields should continue to have effect in MEFX. That clarifies things. I guess I missed that in the documentation. I'll post my results when I figure out the math, as that's likely going to be the last thing I'll figure out. Quote Link to comment Share on other sites More sharing options...
aquilux Posted September 20, 2017 Share Posted September 20, 2017 (edited) So, I've managed to chart the engineAccelerationSpeed, engineDecelerationSpeed, and Mass values for the KW rocketry engines as examples and derive trendlines. Problem is the equations are polynomial. Now, I'm total crap at algebra and the MM algebra functions appear to be done one step at a time, but this'd be easily solved if I could use multiple variables. and toss them when done. Is this doable within MM config files, or will I have to somehow consolidate the mass variables together? These are the equations: engineAccelerationSpeed = -0.153838m + 0.00495282m2 + 1.95125 engineDecelerationSpeed =-0.165447m + 0.0053904m2 + 2.1989 I want to do something along the line of: engineAccelerationSpeed = #$/mass$ //start first componenet engineAccelerationSpeed *= -0.153838 //complete first component A = #$/mass$ //start second component A != 2 //continue second component A *= 0.00495282 //complete second component engineAccelerationSpeed += A //combine components one and two engineAccelerationSpeed += 1.95125 //combine final component //for final product Is this possible in MM code, or is there some better way to do it? Edited September 20, 2017 by aquilux Quote Link to comment Share on other sites More sharing options...
Aelfhe1m Posted September 20, 2017 Share Posted September 20, 2017 @aquilux Yes you can use your own variables in MM. The code is mostly fine but each line that modifies a value (rather than declaring a new variable) should start with an @. You can then delete a temp variable after you're finished with it using !variablename = delete (the word delete can be anything but MM requires some value after the = sign). Depending on how complicated the arithmetic gets it can need to be split over multiple patches to make sure everything happens in the right order but that shouldn't be needed here. Spoiler engineAccelerationSpeed = #$/mass$ //start first componenet @engineAccelerationSpeed *= -0.153838 //complete first component A = #$/mass$ //start second component @A != 2 //continue second component @A *= 0.00495282 //complete second component @engineAccelerationSpeed += A //combine components one and two @engineAccelerationSpeed += 1.95125 //combine final component //for final product !A = delete // delete temp variable Quote Link to comment Share on other sites More sharing options...
aquilux Posted September 21, 2017 Share Posted September 21, 2017 @PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[!PROPELLANT[SolidFuel],~useEngineResponseTime[True]]] @PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[Oxidizer],~useEngineResponseTime[True]]] So I'm getting stumped. what is the difference between these, and why would the one asking for oxidiser fail but not the one rejecting solid fuel? Quote Link to comment Share on other sites More sharing options...
Aelfhe1m Posted September 21, 2017 Share Posted September 21, 2017 59 minutes ago, aquilux said: @PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[!PROPELLANT[SolidFuel],~useEngineResponseTime[True]]] @PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[Oxidizer],~useEngineResponseTime[True]]] So I'm getting stumped. what is the difference between these [snip]? The first says: Quote give me all PART nodes that have a MODULE node which has a name starting "ModuleEngines" and that node does not have a PROPELLANT node with name "SolidFuel" and also no useEngineResponseTime key with value "True" The second says: Quote give me all PART nodes that have a MODULE node which has a name starting "ModuleEngines" and that node has a PROPELLANT node with name "Oxidizer" and also no useEngineResponseTime key with value "True" Or to put it more compactly. The first is only exclude SolidFuel and the second is only include Oxidizer. 1 hour ago, aquilux said: and why would the one asking for oxidiser fail but not the one rejecting solid fuel? In what circumstance are you seeing it fail? I just did a test and both work equally well detecting an LV-T45. Quote Link to comment Share on other sites More sharing options...
aquilux Posted September 21, 2017 Share Posted September 21, 2017 (edited) This is what I'm working with. //Add engine response time to engines that pump fluids but have no engine spooling. //Author: Aelfhe1m & Aquilux //////////////////////////////////////////////////////////////////// //This script adds engine spooling delay to engines that pump at least one liquid for a chemical reaction. //Engine spooling delay is dependent on the momentum of the turbines in the engine. //This script assumes that turbine mass is an average fraction of engine mass, thus delay is derived from engine mass. // //equations for accel/decel/mass relationships derived from KW rocketry values: // //engineAccelerationSpeed = -0.153838M + 0.00495282M^2 + 1.95125 // //engineDecelerationSpeed = -0.165447M + 0.0053904M^2 + 2.1989 // //values and derived trend lines can be found here: //https://goo.gl/733mKw (published google sheets chart) ////////////////////////////////////////////////////////////////// //Spooling for engines with oxidiser (to account for hybrid and //other exotic chemical engines using oxidiser) //This does not apply the test values to the stock parts in my game. //I could send you my Config Cach, but it might take a while to go through. @PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[Oxidiser],~useEngineResponseTime[True]]] //find parts containing ModuleEnginesFX that use //Oxidiser, but does not have useEngineResponseTime { @MODULE[ModuleEngines*] { //math functions not operative yet, just spits out errors, //////////////////////////////////////begin polynomial math for engineAccelerationSpeed // MATHa = #$/mass$ //start first component temp variable // @MATHa *= -0.153838 //complete first component // // // MATHb = #$/mass$ //start second component temp variable // @MATHb != 2 //incorporate exponent // @MATHb *= 0.00495282 //complete second component // // // MATHc = 1.95125 //set third component temp variable // // // //Do these all need to be "#$/MATH*$" ? // // // engineAccelerationSpeed = MATHa //combine first component // @engineAccelerationSpeed += MATHb //combine second component // @engineAccelerationSpeed += MATHc //combine third component // // // //temp variables not cleared to reduce operations // // // //////////////////////////////////////begin polynomial math for engineDecelerationSpeed // @MATHa = #$/mass$ //alter previously set first component temp variable // @MATHa *= -0.165447 //complete first component // // // @MATHb = #$/mass$ //alter previously set second component temp variable // @MATHb != 2 //incorporate exponent // @MATHb *= 0.0053904 //complete second component // // // @MATHc = 2.1989 //alter previously set third component temp variable // // // engineDecelerationSpeed = MATHa //combine first component // @engineDecelerationSpeed += MATHb //combine second component // @engineDecelerationSpeed += MATHc //combine third component // // // !MATHa = clear //clear temp variable // !MATHb = clear //clear temp variable // !MATHc = clear //clear temp variable // //////////////////////////////////////end polynomial math engineAccelerationSpeed = 6 //absurd test value engineDecelerationSpeed = 6 //more absurdity (for SCIENCE!) useEngineResponseTime = True //create useEngineResponseTime } } //todo: repeat patch for monoprop engines. Edited September 21, 2017 by aquilux Quote Link to comment Share on other sites More sharing options...
Aelfhe1m Posted September 21, 2017 Share Posted September 21, 2017 @aquilux KSP uses US spelling for "Oxidizer" (be careful though a few mod authors do not use US spelling for their introduced nodes, keys and names so always check the original) The errors in your commented out section are because you need to use the #$variablename$ syntax everywhere you use a variable on the right hand side of an equation e.g. engineDecelerationSpeed = #$MATHa$ Quote Link to comment Share on other sites More sharing options...
aquilux Posted September 21, 2017 Share Posted September 21, 2017 (edited) 2 hours ago, Aelfhe1m said: KSP uses US spelling for "Oxidizer" That's weird. I could have sworn I copy/pasted from a squad .cfg. That might be it. 2 hours ago, Aelfhe1m said: you need to use the #$variablename$ syntax I was starting to guess that. I feel kind of dumb for not trying it. Thank you so much for the help @Aelfhe1m. Also, considering how atrocious the <code> tool is for tabbing and alignment, I'm not even going to try. I'll just copy/paste directly from notepad++ and dump it into the widget. Hopefully it comes out right on the other side when others copy/paste from the page. In case you or someone else uses notepad++ as well, there's a forum post that has a user defined language syntax that you can download and import to properly highlight MM patches. Edited September 21, 2017 by aquilux Quote Link to comment Share on other sites More sharing options...
aquilux Posted September 22, 2017 Share Posted September 22, 2017 (edited) Something in the math keeps throwing exceptions, but I'm not seeing it. I'll keep looking, but for now, this is what I have. //Add engine response time to engines that pump fluids but have no engine spooling. //Author: Aelfhe1m & Aquilux //////////////////////////////////////////////////////////////////// //This script adds engine spooling delay to engines that pump at least one liquid for a chemical reaction. //Engine spooling delay is dependent on the momentum of the turbines in the engine. //This script assumes that turbine mass is an average fraction of engine mass, thus delay is derived from engine mass. // //equations for accel/decel/mass relationships loosely derived from KW rocketry values: // //engineAccelerationSpeed = -0.00488414m + 0.00482174m^2 + -0.000113284m^3 + 0.0000007285m^4 + 0.0898108 // //engineDecelerationSpeed = 0.00557365m + 0.00486915m^2 + -0.000118177m^3 + 0.0000007683m^4 + 0.123049 // //values and derived trend lines can be found here: https://goo.gl/733mKw (published google sheets chart) ////////////////////////////////////////////////////////////////// //Spooling for engines with oxidiser (to account for hybrid and other exotic chemical engines using oxidiser) @PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[Oxidizer],~useEngineResponseTime[True]]] //find parts containing ModuleEnginesFX that uses Oxidiser, but does not have useEngineResponseTime { @MODULE[ModuleEngines*] { useEngineResponseTime = True //create useEngineResponseTime //////////////////////////////////////////////////begin polynomial math for engineAccelerationSpeed MATHa = #$/mass$ //start first component temp variable @MATHa *= -0.00488414 //complete first component // MATHb = #$/mass$ //start second component temp variable @MATHb != 2 //incorporate exponent @MATHb *= 0.00482174 //complete second component // MATHc = #$/mass$ //start third component temp variable @MATHc != 3 //incorporate exponent @MATHc *= -0.000113284 //complete third component // MATHd = #$mass$ //start fourth component @MATHd != 4 //incorporate exponent @MATHd *= 0.0000007285 //complete fourth component // engineAccelerationSpeed = #$MATHa$ //combine first component @engineAccelerationSpeed += #$MATHb$ //combine second component @engineAccelerationSpeed += #$MATHc$ //combine third component @engineAccelerationSpeed += #$MATHd$ //combine fourth component @engineAccelerationSpeed += 0.0898108 //combine fifth component //keep variables initialised //////////////////////////////////////////////////begin polynomial math for engineDecelerationSpeed MATHa = #$/mass$ //start first component temp variable @MATHa *= 0.00557365 //complete first component // MATHb = #$/mass$ //start second component temp variable @MATHb != 2 //incorporate exponent @MATHb *= 0.00486915 //complete second component // MATHc = #$/mass$ //start third component temp variable @MATHc != 3 //incorporate exponent @MATHc *= -0.000118177 //complete third component // MATHd = #$mass$ //start fourth component @MATHd != 4 //incorporate exponent @MATHd *= 0.0000007683 //complete fourth component // engineDecelerationSpeed = #$MATHa$ //combine first component @engineDecelerationSpeed += #$MATHb$ //combine second component @engineDecelerationSpeed += #$MATHc$ //combine third component @engineDecelerationSpeed += #$MATHd$ //combine fourth component @engineDecelerationSpeed += 0.123049 //combine fifth component // !MATHa = clear //clear temp variable !MATHb = clear //clear temp variable !MATHc = clear //clear temp variable !MATHd = clear //clear temp variable //////////////////////////////////////////////////end polynomial math } } //todo: repeat patch for monoprop engines. If I comment out all the MATHd sections, the errors go away. I had thought that maybe it was an issue of too many characters for a number, but rounding up did not help. Edited September 22, 2017 by aquilux Quote Link to comment Share on other sites More sharing options...
Aelfhe1m Posted September 22, 2017 Share Posted September 22, 2017 @aquilux Check your log files to see the errors: Quote [ModuleManager] Error - Cannot parse variable search when inserting new key MATHd = #$mass$ There's a missing / in #$/mass$. Also you're reusing the same variable names in the decel block so you should use @ (modify not create) at the beginning of the lines where your setting them to mass With those two sets of edits it will run error free. Quote Link to comment Share on other sites More sharing options...
aquilux Posted September 22, 2017 Share Posted September 22, 2017 Good eye. I'm not sure how I missed that. Same with the @ on the second section, that was leftover from when I made and deleted the variables twice. Quote Link to comment Share on other sites More sharing options...
aquilux Posted September 22, 2017 Share Posted September 22, 2017 (edited) Engine spool delay for all. Ok, so here is the completed patch. I'd like to thank @Aelfhe1m for all their help, I couldn't have figured this thing without them. This patch adds engine spool delays to all engines that pump some form of fluid for a chemical reaction (stock resources only). The delays are based off of engine mass, with the ratios being loosely based on the KW rocketry engines. //Add engine response time to engines that pump fluids but have no engine spooling. //Author: Aelfhe1m & Aquilux //////////////////////////////////////////////////////////////////// //This script adds engine spooling delay to engines that pump at least one liquid for a chemical reaction. //Engine spooling delay is dependent on the momentum of the turbines in the engine. //This script assumes that turbine mass is an average fraction of engine mass, thus delay is derived from engine mass. // //equations for accel/decel/mass relationships loosely derived from KW rocketry values: // //engineAccelerationSpeed = -1.16878m + 0.0875252m^2 + -0.00253789m^3 + 0.0000260111m^4 + 5.74868 // //engineDecelerationSpeed = 1.14632m + 0.0856818m^2 + -0.00246803m^3 + 0.0000251029m^4 + 5.82994 // //values and derived trend lines can be found here: https://goo.gl/733mKw (published google sheets chart) ////////////////////////////////////////////////////////////////// //Spooling for engines with oxidiser (to account for hybrid and other exotic chemical engines using oxidiser) @PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[Oxidizer],~useEngineResponseTime[True]]] //find parts containing ModuleEngines* that uses Oxidiser, but does not have useEngineResponseTime { @MODULE[ModuleEngines*] { useEngineResponseTime = True //create useEngineResponseTime //////////////////////////////////////////////////begin polynomial math for engineAccelerationSpeed MATHa = #$/mass$ //start first component temp variable @MATHa *= -1.16878 //complete first component // MATHb = #$/mass$ //start second component temp variable @MATHb != 2 //incorporate exponent @MATHb *= 0.0875252 //complete second component // MATHc = #$/mass$ //start third component temp variable @MATHc != 3 //incorporate exponent @MATHc *= -0.00253789 //complete third component // MATHd = #$/mass$ //start fourth component @MATHd != 4 //incorporate exponent @MATHd *= 0.0000260111 //complete fourth component // engineAccelerationSpeed = #$MATHa$ //combine first component @engineAccelerationSpeed += #$MATHb$ //combine second component @engineAccelerationSpeed += #$MATHc$ //combine third component @engineAccelerationSpeed += #$MATHd$ //combine fourth component @engineAccelerationSpeed += 5.74868 //combine fifth component //keep variables initialised //////////////////////////////////////////////////begin polynomial math for engineDecelerationSpeed @MATHa = #$/mass$ //start first component temp variable @MATHa *= 1.14632 //complete first component // @MATHb = #$/mass$ //start second component temp variable @MATHb != 2 //incorporate exponent @MATHb *= 0.0856818 //complete second component // @MATHc = #$/mass$ //start third component temp variable @MATHc != 3 //incorporate exponent @MATHc *= -0.00246803 //complete third component // @MATHd = #$/mass$ //start fourth component @MATHd != 4 //incorporate exponent @MATHd *= 0.0000251029 //complete fourth component // engineDecelerationSpeed = #$MATHa$ //combine first component @engineDecelerationSpeed += #$MATHb$ //combine second component @engineDecelerationSpeed += #$MATHc$ //combine third component @engineDecelerationSpeed += #$MATHd$ //combine fourth component @engineDecelerationSpeed += 5.82994 //combine fifth component // !MATHa = clear //clear temp variable !MATHb = clear //clear temp variable !MATHc = clear //clear temp variable !MATHd = clear //clear temp variable //////////////////////////////////////////////////end polynomial math } } //Spooling for engines with MonoPropellant @PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[MonoPropellant],~useEngineResponseTime[True]]] //find parts containing ModuleEngines* that uses MonoPropellant, but does not have useEngineResponseTime { @MODULE[ModuleEngines*] { useEngineResponseTime = True //create useEngineResponseTime //////////////////////////////////////////////////begin polynomial math for engineAccelerationSpeed MATHa = #$/mass$ //start first component temp variable @MATHa *= -1.16878 //complete first component // MATHb = #$/mass$ //start second component temp variable @MATHb != 2 //incorporate exponent @MATHb *= 0.0875252 //complete second component // MATHc = #$/mass$ //start third component temp variable @MATHc != 3 //incorporate exponent @MATHc *= -0.00253789 //complete third component // MATHd = #$/mass$ //start fourth component @MATHd != 4 //incorporate exponent @MATHd *= 0.0000260111 //complete fourth component // engineAccelerationSpeed = #$MATHa$ //combine first component @engineAccelerationSpeed += #$MATHb$ //combine second component @engineAccelerationSpeed += #$MATHc$ //combine third component @engineAccelerationSpeed += #$MATHd$ //combine fourth component @engineAccelerationSpeed += 5.74868 //combine fifth component //keep variables initialised //////////////////////////////////////////////////begin polynomial math for engineDecelerationSpeed @MATHa = #$/mass$ //start first component temp variable @MATHa *= 1.14632 //complete first component // @MATHb = #$/mass$ //start second component temp variable @MATHb != 2 //incorporate exponent @MATHb *= 0.0856818 //complete second component // @MATHc = #$/mass$ //start third component temp variable @MATHc != 3 //incorporate exponent @MATHc *= -0.00246803 //complete third component // @MATHd = #$/mass$ //start fourth component @MATHd != 4 //incorporate exponent @MATHd *= 0.0000251029 //complete fourth component // engineDecelerationSpeed = #$MATHa$ //combine first component @engineDecelerationSpeed += #$MATHb$ //combine second component @engineDecelerationSpeed += #$MATHc$ //combine third component @engineDecelerationSpeed += #$MATHd$ //combine fourth component @engineDecelerationSpeed += 5.82994 //combine fifth component // !MATHa = clear //clear temp variable !MATHb = clear //clear temp variable !MATHc = clear //clear temp variable !MATHd = clear //clear temp variable //////////////////////////////////////////////////end polynomial math } } Edited September 22, 2017 by aquilux Quote Link to comment Share on other sites More sharing options...
TranceaddicT Posted September 22, 2017 Share Posted September 22, 2017 Question: If you added :BEFORE[Squad] would this then add the useEngineResponseTime before any other mods (like RealFuels); thus making this usable in a heavily modded game? Quote Link to comment Share on other sites More sharing options...
aquilux Posted September 22, 2017 Share Posted September 22, 2017 4 minutes ago, TranceaddicT said: Question: If you added :BEFORE[Squad] would this then add the useEngineResponseTime before any other mods (like RealFuels); thus making this usable in a heavily modded game? If the useEngineResponseTime components carry over to any new engines generated by MM copies of .cfg files, then yes you can, otherwise you could probably just change the resources it looks for (unless the engine code gets stupid complicated with the ability to select various fuels). But I just realised that I think I got the math backwards, and I'm in the process of reworking it, so give me a little while. Quote Link to comment Share on other sites More sharing options...
aquilux Posted September 22, 2017 Share Posted September 22, 2017 the math is... mostly fixed. I think. Should work for the most part. Quote Link to comment Share on other sites More sharing options...
TranceaddicT Posted September 23, 2017 Share Posted September 23, 2017 20 hours ago, aquilux said: If the useEngineResponseTime components carry over to any new engines generated by MM copies of .cfg files, then yes you can, otherwise you could probably just change the resources it looks for (unless the engine code gets stupid complicated with the ability to select various fuels). But I just realised that I think I got the math backwards, and I'm in the process of reworking it, so give me a little while. So, for RealFuels' oxidizers (LOx, N2O4, HNO3, N2O, HTP, et al.), something like: @PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[LqdOxygen|NTO|HNO3|NitrousOxide|HTP|N2F4|OF2|AK*|ClF*|FLOX*|IRFNA*|LF2],~useEngineResponseTime[True]]] and Monopropellents (Hydrazine, HTP, NitrousOxide, and N2) or Bipropellents (NTO/MMH): @PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[Hydrazine|HTP|NitrousOxide|Nitrogen|MON*|UDMH+NTO],~useEngineResponseTime[True]]] Quote Link to comment Share on other sites More sharing options...
aquilux Posted September 23, 2017 Share Posted September 23, 2017 (edited) 1 hour ago, TranceaddicT said: @PART[*]:HAS[@MODULE[ModuleEngines*]:HAS[@PROPELLANT[LqdOxygen|NTO|HNO3|NitrousOxide|HTP|N2F4|OF2|AK*|ClF*|FLOX*|IRFNA*|LF2],~useEngineResponseTime[True]]] I'm not sure about real fuels, so you'll have to try it out both your suggested way, and by listing each fuel, but you'll have to make a whole copy of each fuel. The reason why I had to separate oxidiser and monoprop is that apparently " | " does not work in the filter section. On 9/19/2017 at 6:58 PM, Aelfhe1m said: won't work because :HAS doesn't support OR. If this changes, or I'm wrong, I'll be combining the two so that there is only one math section and what not. Edited September 23, 2017 by aquilux Quote Link to comment Share on other sites More sharing options...
TranceaddicT Posted September 25, 2017 Share Posted September 25, 2017 On 9/23/2017 at 11:52 AM, aquilux said: I'm not sure about real fuels, so you'll have to try it out both your suggested way, and by listing each fuel, but you'll have to make a whole copy of each fuel. The reason why I had to separate oxidiser and monoprop is that apparently " | " does not work in the filter section. If this changes, or I'm wrong, I'll be combining the two so that there is only one math section and what not. So yeah, intuitively, you'd think `|` would work. Alas, the reality is a different beast. I bumped an (extremely old) issue on GitHub using this and my RF as examples. Also made note that the documentation is lacking in this regard. Quote Link to comment Share on other sites More sharing options...
juanml82 Posted October 8, 2017 Share Posted October 8, 2017 I've just made this simple little patch to increase the amount of science the mobile lab can hold before getting full to 5,000 (I was tired of setting up alarms for the same space station over and over) // Change the amount of science the mobile lab holds // Author: juanml82 @PART[Large_Crewed_Lab]:final { @MODULE[ModuleScienceConverter] { @scienceCap = 5000 } } Quote Link to comment Share on other sites More sharing options...
Wyzard Posted October 9, 2017 Share Posted October 9, 2017 One more update to my patch for science transfer, because I learned about ModuleManager's "&" prefix to add a property only if it's not already defined: // Add in-vessel transfer support to all parts that can hold science, unless // explicitly disabled by the part. This is the same ability that the stock // Experiment Storage Unit has; it doesn't really make sense for it to be // limited to just the that part. // Author: Wyzard @PART[*]:HAS[@MODULE[ModuleScienceContainer],!MODULE[KerbalEVA]] { @MODULE[ModuleScienceContainer] { // Allow "Container: Collect All" and "Container: Transfer // Data" by default. &canTransferInVessel = True // Allow targeting by "Container: Transfer Data" on other // parts by default. &canBeTransferredToInVessel = True } } Quote Link to comment Share on other sites More sharing options...
Tyko Posted October 9, 2017 Share Posted October 9, 2017 MODERATORS - Is it possible to get this thread pinned in the forum? There's so much useful stuff here. Thanks! Quote Link to comment Share on other sites More sharing options...
Deddly Posted October 10, 2017 Share Posted October 10, 2017 It is indeed very useful information, but we try to avoid pinning things like this because they usually stay around near the top of the forum anyway, and because we try not to favour one person's mods above another's. On the other hand, you could always nominate this for Thread of the Month by sending me or another moderator a PM and it could end up getting pinned for a whole month Quote Link to comment Share on other sites More sharing options...
steve_v Posted October 10, 2017 Share Posted October 10, 2017 (edited) 9 minutes ago, Deddly said: we try not to favour one person's mods above another's. Not sure how you got "one persons mod" from "community database". This is not a mod, it's a collection of ModuleManager snippets from a great many contributors - much like the community mods and plugins library thread. That one is pinned, so why shouldn't this get the same treatment? If you're talking about not favouring ModuleManager itself, it's used in most mods anyway, and it has it's own thread to not favour. Edited October 10, 2017 by steve_v Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.