Jump to content

[1.3.0] Community Database of Module Manager Patches for Stock KSP


Recommended Posts

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 by aquilux
Link to post
Share on other sites
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.

Link to post
Share on other sites
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.

 

Link to post
Share on other sites

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 by aquilux
Link to post
Share on other sites

@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

 

 

Link to post
Share on other sites
@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?

 

 

Link to post
Share on other sites
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.

Link to post
Share on other sites

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 by aquilux
Link to post
Share on other sites

@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$
Link to post
Share on other sites

 

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 by aquilux
Link to post
Share on other sites

    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 by aquilux
Link to post
Share on other sites

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

Link to post
Share on other sites

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 by aquilux
Link to post
Share on other sites
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.

Link to post
Share on other sites
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]]]

Link to post
Share on other sites
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 by aquilux
Link to post
Share on other sites
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.

Link to post
Share on other sites
  • 2 weeks later...

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

 

Link to post
Share on other sites

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
	}
}
Link to post
Share on other sites

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 :)

Link to post
Share on other sites
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". :huh:
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 by steve_v
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.

×
×
  • Create New...