Electrocutor Posted April 1, 2020 Share Posted April 1, 2020 *shoots at the rainbow-farting flying toaster cat again* Quote Link to comment Share on other sites More sharing options...
Tonas1997 Posted April 4, 2020 Share Posted April 4, 2020 I'm getting an error with this patch: @PART[*]:HAS[#CrewCapacity[<1],@MODULE[ModuleCommand]]:FINAL { %entryCost = #$cost$ * 2 } I never used variables before, so I don't know what I'm doing wrong - but I suspect numeric operations have to be done in some other way... Quote Link to comment Share on other sites More sharing options...
Jso Posted April 4, 2020 Share Posted April 4, 2020 32 minutes ago, Tonas1997 said: I'm getting an error with this patch: @PART[*]:HAS[#CrewCapacity[<1],@MODULE[ModuleCommand]]:FINAL { %entryCost = #$cost$ * 2 } I never used variables before, so I don't know what I'm doing wrong - but I suspect numeric operations have to be done in some other way... %entryCost = #$cost$ @entryCost *= 2 Quote Link to comment Share on other sites More sharing options...
Tonas1997 Posted April 7, 2020 Share Posted April 7, 2020 On 4/4/2020 at 11:28 PM, Jso said: %entryCost = #$cost$ @entryCost *= 2 Thanks, that worked! As a follow-up, however, I found out that this doesn't seem to work with float values, as patches that multiply that field by a fractional number (for instance 1.2) keep the part from being compiled. This is a bit weird, as both cost and entryCost are float fields. Am I doing something else wrong, or am I restricted to use integers as multiplying factors? Quote Link to comment Share on other sites More sharing options...
peteletroll Posted April 7, 2020 Share Posted April 7, 2020 Maybe like this? %entryCost = #$cost$ @entryCost *= 12 @entryCost /= 10 Not on PC now... Quote Link to comment Share on other sites More sharing options...
blowfish Posted April 8, 2020 Share Posted April 8, 2020 On 4/7/2020 at 2:14 PM, Tonas1997 said: Thanks, that worked! As a follow-up, however, I found out that this doesn't seem to work with float values, as patches that multiply that field by a fractional number (for instance 1.2) keep the part from being compiled. This is a bit weird, as both cost and entryCost are float fields. Am I doing something else wrong, or am I restricted to use integers as multiplying factors? It should work with floats. In fact it only works in floats. What does your patch look like? One thing I'll add though is that MM has no knowledge of what any field is or means. Everything MM sees starts as a string. If you tell it to multiply it will attempt to convert both operands to floats and then convert the result back to a string. Quote Link to comment Share on other sites More sharing options...
Tonas1997 Posted April 11, 2020 Share Posted April 11, 2020 Here it is: // Probe cores: 1.2x the unit cost @PART[*]:HAS[#CrewCapacity[<1],@MODULE[ModuleCommand]]:FINAL { %entryCost = #$cost$ %entryCost *= 1.2 } // Crewed capsules: 5x the unit cost @PART[*]:HAS[#CrewCapacity[>0],@MODULE[ModuleCommand]]:FINAL { %entryCost = #$cost$ %entryCost *= 5 } The former won't work, whereas the latter will Quote Link to comment Share on other sites More sharing options...
Jso Posted April 11, 2020 Share Posted April 11, 2020 1 hour ago, Tonas1997 said: Here it is: // Probe cores: 1.2x the unit cost @PART[*]:HAS[#CrewCapacity[<1],@MODULE[ModuleCommand]]:FINAL { %entryCost = #$cost$ %entryCost *= 1.2 } // Crewed capsules: 5x the unit cost @PART[*]:HAS[#CrewCapacity[>0],@MODULE[ModuleCommand]]:FINAL { %entryCost = #$cost$ %entryCost *= 5 } The former won't work, whereas the latter will % means edit or create. I don't believe it will accept any operator other than = (assignment). So when when you initialize your value use % (because @ will throw an error if the value does not exist). Afterwards use @ to edit the existing value. @entryCost *= 1.2 will work. Quote Link to comment Share on other sites More sharing options...
DeepWaterDaz Posted April 13, 2020 Share Posted April 13, 2020 (edited) I am trying to modify USI MKS conversion rates to balance with stock converters. The USI Module I am trying to change is "USI_ConverterSwapOption" Would one of you Guru's care to point me in the right direction? I am not achieving any effect with the following plugin: @PART[MKS_Processor250]:FINAL { @MODULE[USI_ConverterSwapOption],* { @INPUT_RESOURCE[MetallicOre,Uraninite,Substrate,Minerals,Karbonite,Commodities,MaterialKits,Metals,Polymers,Supplies,Ore,Machinery,Recyclables,SpecializedParts,Fertilizer,Hydrates,Gypsum,Dirt,Silicates,Silicon,RefinedExotics,ColonySupplies,Organics,Rock,Karborundum,XenonGas,ArgonGas,LiquidFuel,Oxidizer,Water,Chemicals,Mulch,LqdHydrogen,LiquidFuel,MonoPropellant],* { @Ratio *= 173 } @OUTPUT_RESOURCE[MetallicOre,Uraninite,Substrate,Minerals,Karbonite,Commodities,MaterialKits,Metals,Polymers,Supplies,Ore,Machinery,Recyclables,SpecializedParts,Fertilizer,Hydrates,Gypsum,Dirt,Silicates,Silicon,RefinedExotics,ColonySupplies,Organics,Rock,Karborundum,XenonGas,ArgonGas,LiquidFuel,Oxidizer,Water,Chemicals,Mulch,LqdHydrogen,LiquidFuel,MonoPropellant],* { @Ratio *= 173 } } } The config I am trying to modify is as follows: Spoiler PART { name = MKS_Processor250 module = Part author = RoverDude MODULE { name = USI_Converter GeneratesHeat = true AutoShutdown = true UseSpecialistBonus = false TemperatureModifier { key = 0 50000 key = 500 20000 key = 1000 5000 key = 1500 2500 key = 2000 500 key = 3000 0 } ThermalEfficiency { key = 0 0 key = 500 0.15 key = 1000 1.0 key = 1500 0.25 key = 2000 0.1 key = 3000 0 } } MODULE { name = USI_Converter GeneratesHeat = true AutoShutdown = true UseSpecialistBonus = false TemperatureModifier { key = 0 50000 key = 500 20000 key = 1000 5000 key = 1500 2500 key = 2000 500 key = 3000 0 } ThermalEfficiency { key = 0 0 key = 500 0.15 key = 1000 1.0 key = 1500 0.25 key = 2000 0.1 key = 3000 0 } } MODULE { name = USI_ConverterSwapOption ConverterName = LFO StartActionName = Start LFO StopActionName = Stop LFO INPUT_RESOURCE { ResourceName = Ore Ratio = 0.047 } INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 5.64 } OUTPUT_RESOURCE { ResourceName = LiquidFuel Ratio = 0.00423 DumpExcess = False } OUTPUT_RESOURCE { ResourceName = Oxidizer Ratio = 0.00517 DumpExcess = False } OUTPUT_RESOURCE:NEEDS[ART] { ResourceName = Rock Ratio = 0.0094 DumpExcess = true } INPUT_RESOURCE { ResourceName = Machinery Ratio = 0.00000325 } OUTPUT_RESOURCE { ResourceName = Recyclables Ratio = 0.00000325 DumpExcess = true } REQUIRED_RESOURCE { ResourceName = Machinery Ratio = 650 } } MODULE { name = USI_ConverterSwapOption ConverterName = LiquidFuel StartActionName = Start LiquidFuel StopActionName = Stop LiquidFuel INPUT_RESOURCE { ResourceName = Ore Ratio = 0.047 } INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 5.64 } OUTPUT_RESOURCE { ResourceName = LiquidFuel Ratio = 0.0094 DumpExcess = False } OUTPUT_RESOURCE:NEEDS[ART] { ResourceName = Rock Ratio = 0.0094 DumpExcess = true } INPUT_RESOURCE { ResourceName = Machinery Ratio = 0.00000325 } OUTPUT_RESOURCE { ResourceName = Recyclables Ratio = 0.00000325 DumpExcess = true } REQUIRED_RESOURCE { ResourceName = Machinery Ratio = 650 } } MODULE { name = USI_ConverterSwapOption ConverterName = MonoPropellant StartActionName = Start MonoPropellant StopActionName = Stop MonoPropellant INPUT_RESOURCE { ResourceName = Ore Ratio = 0.047 } INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 5.64 } OUTPUT_RESOURCE { ResourceName = MonoPropellant Ratio = 0.0094 DumpExcess = False } OUTPUT_RESOURCE:NEEDS[ART] { ResourceName = Rock Ratio = 0.0094 DumpExcess = true } INPUT_RESOURCE { ResourceName = Machinery Ratio = 0.00000325 } OUTPUT_RESOURCE { ResourceName = Recyclables Ratio = 0.00000325 DumpExcess = true } REQUIRED_RESOURCE { ResourceName = Machinery Ratio = 650 } } MODULE { name = USI_ConverterSwapOption ConverterName = Chemicals StartActionName = Start Chemicals StopActionName = Stop Chemicals INPUT_RESOURCE { ResourceName = Minerals Ratio = 0.0047 } INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 5.64 } OUTPUT_RESOURCE { ResourceName = Chemicals Ratio = 0.00094 DumpExcess = False } OUTPUT_RESOURCE:NEEDS[ART] { ResourceName = Rock Ratio = 0.00094 DumpExcess = true } INPUT_RESOURCE { ResourceName = Machinery Ratio = 0.00000325 } OUTPUT_RESOURCE { ResourceName = Recyclables Ratio = 0.00000325 DumpExcess = true } REQUIRED_RESOURCE { ResourceName = Machinery Ratio = 650 } } MODULE { name = USI_ConverterSwapOption ConverterName = Metals StartActionName = Start Metals StopActionName = Stop Metals INPUT_RESOURCE { ResourceName = MetallicOre Ratio = 0.0047 } INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 5.64 } OUTPUT_RESOURCE { ResourceName = Metals Ratio = 0.00094 DumpExcess = False } OUTPUT_RESOURCE:NEEDS[ART] { ResourceName = Rock Ratio = 0.00094 DumpExcess = true } INPUT_RESOURCE { ResourceName = Machinery Ratio = 0.00000325 } OUTPUT_RESOURCE { ResourceName = Recyclables Ratio = 0.00000325 DumpExcess = true } REQUIRED_RESOURCE { ResourceName = Machinery Ratio = 650 } } MODULE { name = USI_ConverterSwapOption ConverterName = Polymers StartActionName = Start Polymers StopActionName = Stop Polymers INPUT_RESOURCE { ResourceName = Substrate Ratio = 0.0047 } INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 5.64 } OUTPUT_RESOURCE { ResourceName = Polymers Ratio = 0.00094 DumpExcess = False } OUTPUT_RESOURCE:NEEDS[ART] { ResourceName = Rock Ratio = 0.00094 DumpExcess = true } INPUT_RESOURCE { ResourceName = Machinery Ratio = 0.00000325 } OUTPUT_RESOURCE { ResourceName = Recyclables Ratio = 0.00000325 DumpExcess = true } REQUIRED_RESOURCE { ResourceName = Machinery Ratio = 650 } } MODULE { name = USI_ConverterSwapOption ConverterName = Fertilizer(G) StartActionName = Start Fertilizer(G) StopActionName = Stop Fertilizer(G) INPUT_RESOURCE { ResourceName = Gypsum Ratio = 0.003 } INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 4.5 } OUTPUT_RESOURCE { ResourceName = Fertilizer Ratio = 0.0015 DumpExcess = False } OUTPUT_RESOURCE:NEEDS[ART] { ResourceName = Rock Ratio = 0.000375 DumpExcess = true } INPUT_RESOURCE { ResourceName = Machinery Ratio = 0.00000325 } OUTPUT_RESOURCE { ResourceName = Recyclables Ratio = 0.00000325 DumpExcess = true } REQUIRED_RESOURCE { ResourceName = Machinery Ratio = 650 } } MODULE { name = USI_ConverterSwapOption ConverterName = Fertilizer(M) StartActionName = Start Fertilizer(M) StopActionName = Stop Fertilizer(M) INPUT_RESOURCE { ResourceName = Minerals Ratio = 0.0047 } INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 5.64 } OUTPUT_RESOURCE { ResourceName = Fertilizer Ratio = 0.00094 DumpExcess = False } OUTPUT_RESOURCE:NEEDS[ART] { ResourceName = Rock Ratio = 0.00094 DumpExcess = true } INPUT_RESOURCE { ResourceName = Machinery Ratio = 0.00000325 } OUTPUT_RESOURCE { ResourceName = Recyclables Ratio = 0.00000325 DumpExcess = true } REQUIRED_RESOURCE { ResourceName = Machinery Ratio = 650 } } MODULE { name = USI_ConverterSwapOption ConverterName = Silicon StartActionName = Start Silicon StopActionName = Stop Silicon INPUT_RESOURCE { ResourceName = Silicates Ratio = 0.0047 } INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 5.64 } OUTPUT_RESOURCE { ResourceName = Silicon Ratio = 0.00094 DumpExcess = False } OUTPUT_RESOURCE:NEEDS[ART] { ResourceName = Rock Ratio = 0.00094 DumpExcess = true } INPUT_RESOURCE { ResourceName = Machinery Ratio = 0.00000325 } OUTPUT_RESOURCE { ResourceName = Recyclables Ratio = 0.00000325 DumpExcess = true } REQUIRED_RESOURCE { ResourceName = Machinery Ratio = 650 } } MODULE { name = USI_EfficiencyBoosterSwapOption ConverterName = [Crusher] StartActionName = Start [Crusher] StopActionName = Stop [Crusher] EfficiencyTag = Crusher EfficiencyMultiplier = 1.728 INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 17.282 } REQUIRED_RESOURCE { ResourceName = Machinery Ratio = 650 } INPUT_RESOURCE { ResourceName = Machinery Ratio = 0.00000325 } OUTPUT_RESOURCE { ResourceName = Recyclables Ratio = 0.00000325 DumpExcess = true } } MODULE { name = USI_EfficiencyBoosterSwapOption ConverterName = [Smelter] StartActionName = Start [Smelter] StopActionName = Stop [Smelter] EfficiencyTag = Smelter EfficiencyMultiplier = 1.728 INPUT_RESOURCE { ResourceName = ElectricCharge Ratio = 17.282 } REQUIRED_RESOURCE { ResourceName = Machinery Ratio = 650 } INPUT_RESOURCE { ResourceName = Machinery Ratio = 0.00000325 } OUTPUT_RESOURCE { ResourceName = Recyclables Ratio = 0.00000325 DumpExcess = true } } RESOURCE { name = Machinery amount = 650 maxAmount = 650 isTweakable = True } RESOURCE { name = Recyclables amount = 0 maxAmount = 650 isTweakable = True } } Update: I have tried modifying the patch by replacing the "_" by a "?" wildcard since it was pointed out that KSP does not recognise the underscore. New patch below: Spoiler @PART[MKS?Processor250]:FINAL{ @MODULE[USI?ConverterSwapOption],* { @INPUT_RESOURCE[*],* { @Ratio *= 173 } @OUTPUT_RESOURCE[*],* { @Ratio *= 173 } }} The change is however not reflected in MM ConfigCache. Any assistance would be appreciated. Edited April 14, 2020 by DeepWaterDaz Update Quote Link to comment Share on other sites More sharing options...
blowfish Posted April 15, 2020 Share Posted April 15, 2020 @DeepWaterDaz please use code tags. I can't read anything in there. Quote Link to comment Share on other sites More sharing options...
Jso Posted April 15, 2020 Share Posted April 15, 2020 On 4/13/2020 at 4:35 AM, DeepWaterDaz said: I have tried modifying the patch by replacing the "_" by a "?" wildcard since it was pointed out that KSP does not recognise the underscore. New patch below: You don't need to do that. MM handles underscores just fine. On 4/13/2020 at 4:35 AM, DeepWaterDaz said: @INPUT_RESOURCE[*],* This is not matching because INPUT_RESOURCE doesn't have a name field, it has a ResourceName field. INPUT_RESOURCE[*] is looking for name=anything and since there are no name fields it never matches. Just use @INPUT_RESOURCE,* and it will do what you intend there. Quote Link to comment Share on other sites More sharing options...
blowfish Posted April 15, 2020 Share Posted April 15, 2020 On 4/7/2020 at 2:14 PM, Tonas1997 said: As a follow-up, however, I found out that this doesn't seem to work with float values, as patches that multiply that field by a fractional number (for instance 1.2) keep the part from being compiled. This is a bit weird, as both cost and entryCost are float fields. Am I doing something else wrong, or am I restricted to use integers as multiplying factors? Okay should have read this a little closer. The problem as nothing to do with ModuleManager. If you look at GameData/ModuleManager.ConfigCache, you will see that the multiplication is getting applied correctly. The problem is that entryCost is actually an int. The API docs confirm this. So you must provide a whole number. Quote Link to comment Share on other sites More sharing options...
blowfish Posted April 15, 2020 Share Posted April 15, 2020 (edited) And because I started thinking about it again, here's a patch that rounds to the nearest integer: Spoiler input: SOME_NODE { value = 1.0 value = 1.1 value = 1.15 value = 1.2 value = 1.25 value = 1.3 value = 1.35 value = 1.4 value = 1.45 value = 1.5 value = 1.55 value = 1.6 value = 1.65 value = 1.7 value = 1.75 value = 1.8 value = 1.85 value = 1.9 value = 1.95 value = 2.0 } patch: @SOME_NODE { @value,* += 0.5 @value,* ^= :\.\d+$:: } result: SOME_NODE { value = 1 value = 1 value = 1 value = 1 value = 1 value = 1 value = 1 value = 1 value = 1 value = 2 value = 2 value = 2 value = 2 value = 2 value = 2 value = 2 value = 2 value = 2 value = 2 value = 2 } explanation: it adds 0.5 and then truncates everything after (and including) the decimal point and yeah doesn’t handle negative numbers or scientific notation but most of the time this should be sufficient Edited April 15, 2020 by blowfish Quote Link to comment Share on other sites More sharing options...
Jognt Posted April 15, 2020 Share Posted April 15, 2020 On 3/13/2020 at 5:55 PM, VoidSquid said: I was afraid of such an answer. (Actually, I'd have given the same answer if I'd knew a bit more about this stuff). I was puzzled when I tried to look it up: what might be the difference between IsEnabled and moduleIsEnabled ? Still don't know this. Guess it's try and error One question remains though: There's a lot of ways to get stuff done so my main question would be "What are you trying to achieve when you say you wish to 'disable' them?" (literally no thrusters? thrusters that are toggled off by default? Just the effects but no thrust?) With regards to :HAS[@MODULE[ModuleCommand],@MODULE[ModuleRCSFX]] -> the comma means AND. A pipe means OR. Note that OR does not work within a HAS statement. Quote Link to comment Share on other sites More sharing options...
Tonas1997 Posted April 20, 2020 Share Posted April 20, 2020 (edited) Why isn't this patch: @PART[*]:HAS[#category[Propulsion|Engine],@MODULE[ModuleEngines*]]:FINAL { %entryCost = #$cost$ @entryCost *= 3 } capturing any engines? Example from the MM cache: Spoiler PART { module = Part name = ROE-F1 author = Shadowmage, Pap subcategory = 0 RSSROConfig = true RP0conf = true maxTemp = 673.15 skinTemp = 773.15 fuelCrossfeed = true breakingForce = 10000 breakingTorque = 10000 scale = 1.0 rescaleFactor = 1.0 node_stack_top = 0,0,0,0,1,0,2 node_stack_bottom = 0,-5.6373,0,0,-1,0,2 node_attach = 0,0,0,0,1,0,2 attachRules = 1,1,1,1,0 title = F-1 Series description = The massive Rocketdyne F-1 engine. One of the largest, most powerful rocket engines ever built. Ensure you enable roll capability or disable gimbal as required for your application. Plume configured by RealPlume. tags = apollo, saturn, saturn-v, s-ic, saturn-5, f1, f-1 stagingIcon = LIQUID_ENGINE stageOffset = 1 childStageOffset = 1 entryCost = 409361 crashTolerance = 12 gTolerance = 100 maxPressure = 20000 manufacturer = Rocketdyne category = Engine TechRequired = giganticRocketry cost = 15570 MODEL { model = ROEngines/Assets/SSTU/SC-ENG-F1 scale = 1.5232, 1.38, 1.5232 } MODULE { name = ModuleEnginesRF thrustVectorTransformName = F1-ThrustTransform powerEffectName = Kerolox-Lower-F1 shieldedCanActivate = True exhaustDamageMultiplier = 20 exhaustDamageFalloffPower = 1 exhaustDamageMaxMutliplier = 1.0 exhaustDamageSplashbackMult = 0.1 exhaustDamageSplashbackMaxMutliplier = 0.1 } MODULE { name = ModuleGimbal gimbalTransformName = F1-Bell gimbalRange = 6.0 useGimbalResponseSpeed = true gimbalResponseSpeed = 16 } MODULE { name = ModuleSurfaceFX thrustProviderModuleIndex = 1 fxMax = 1 maxDistance = 120 falloff = 2 thrustTransformName = SmokeTransform } MODULE { name = ROEModelConstraint LOOK_CONST { transformName = F1-Strut-LeftUpper targetName = F1-Target-LeftLower } LOOK_CONST { transformName = F1-Strut-LeftLower targetName = F1-Target-LeftUpper } LOOK_CONST { transformName = F1-Strut-RightUpper targetName = F1-Target-RightLower } LOOK_CONST { transformName = F1-Strut-RightLower targetName = F1-Target-RightUpper } LOOK_CONST { transformName = F1-FuelLineLeft targetName = F1-Target-FuelLeft } LOOK_CONST { transformName = F1-FuelLineRight targetName = F1-Target-FuelRight } LOOK_CONST { transformName = F1-FuelLineCenter targetName = F1-Target-FuelCenter } } MODULE { name = EngineGroupModule } MODULE { name = EngineLightEffect enableEmissiveLight = true engineEmissiveMultiplier = 1.33 jitterMultiplier = 0.1 lightFadeCoefficient = 0.8 lightPower = 1.0 lightRange = 9.0 multiplierOnIva = 0.5 exhaustRed = 1 exhaustGreen = 0.88 exhaustBlue = 0.68 emissiveRed = 0.6 emissiveGreen = 0.0 emissiveBlue = 0.0 emissiveLogRed = 0.4 emissiveLogGreen = 0.1 emissiveLogBlue = 0.0 emissiveQuadRed = 0.0 emissiveQuadGreen = 0.5 emissiveQuadBlue = 0.05 lightOffsetX = 0.0 lightOffsetY = 0.0 emissiveOffsetZ = 0.0 exhaustOffsetZ = 1.0 } MODULE { name = GeometryPartModule } MODULE { name = FARAeroPartModule } MODULE { name = FARPartModule } MODULE { name = KOSNameTag } MODULE { name = ModuleEngineConfigs configuration = F-1 origMass = 8.391459 modded = false type = ModuleEnginesRF CONFIG { name = F-1 minThrust = 7740.5 maxThrust = 7740.5 heatProduction = 100 ullage = True pressureFed = False ignitions = 1 PROPELLANT { name = Kerosene ratio = 0.3800 DrawGauge = True } PROPELLANT { name = LqdOxygen ratio = 0.6200 } atmosphereCurve { key = 0 304 key = 1 263 } IGNITOR_RESOURCE { name = ElectricCharge amount = 0.5 } IGNITOR_RESOURCE { name = TEATEB amount = 1 } } CONFIG { name = F-1A description = Uprated F-1 developed for post-Apollo launch vehicles. Tested extensively, but cancelled following the cancellation of Apollo minThrust = 9189.6 maxThrust = 9189.6 massMult = 0.97673 heatProduction = 100 ullage = True pressureFed = False ignitions = 1 PROPELLANT { name = Kerosene ratio = 0.3800 DrawGauge = True } PROPELLANT { name = LqdOxygen ratio = 0.6200 } atmosphereCurve { key = 0 310 key = 1 270 } IGNITOR_RESOURCE { name = ElectricCharge amount = 0.5 } IGNITOR_RESOURCE { name = TEATEB amount = 1 } } } RESOURCE { name = TEATEB amount = 1 maxAmount = 1 } PLUME { name = Kerolox-Lower-F1 transformName = F1-ThrustTransform localRotation = 0,0,0 plumePosition = 0,0,3.5 plumeScale = 1.5 flarePosition = 0,0,3.35 flareScale = 1.2 energy = 0.7 speed = 1 localPosition = 0,0,0 fixedScale = 1 emissionMult = 0.5 saturationMult = 1 alphaMult = 1 blazeScale = 1 coreScale = 1 fumeScale = 1 lampScale = 1 plume2Scale = 1 plume3Scale = 1 smokeScale = 1 shockScale = 1 shockconeScale = 1 slagScale = 1 streamScale = 1 blazePosition = 0,0,0 corePosition = 0,0,0 fumePosition = 0,0,0 lampPosition = 0,0,0 plume2Position = 0,0,0 plume3Position = 0,0,0 smokePosition = 0,0,0 shockPosition = 0,0,0 shockconePosition = 0,0,0 slagPosition = 0,0,0 streamPosition = 0,0,0 plumeIdentifier = Kerolox-Lower-F1 processed = true } EFFECTS { Kerolox-Lower-F1 { plumeIdentifier = Kerolox-Lower-F1 MODEL_MULTI_SHURIKEN_PERSIST { transformName = F1-ThrustTransform localRotation = 0,0,0 localPosition = 0,0,3.35 fixedScale = 1.2 name = Kerolox-Lower-F1-flare modelName = RealPlume/MP_Nazari_FX/nasaf1 emission = 0.0 0 emission = 0.01 0.2 emission = 1.0 4 speed = 0.0 1 speed = 1.0 1 offset = -0.5 energy = 0.0 0.07 energy = 1.0 0.07 size = 0.0 0.5 size = 1.0 0.5 fixedEmissions = false randomInitalVelocityOffsetMaxRadius = 1 linGrow { power = 0 2 power = 1 2 } grow { power = 0 5 power = 1 5 } } MODEL_MULTI_SHURIKEN_PERSIST { transformName = F1-ThrustTransform localRotation = 0,0,0 localPosition = 0,0,3.5 fixedScale = 1.5 energy = 0.7 speed = 1 emissionMult = 0.5 alphaMult = 1 saturationMult = 1 name = Kerolox-Lower-F1-plume modelName = RealPlume/MP_Nazari_FX/KWbooster fixedEmissions = false sizeClamp = 50 randomInitalVelocityOffsetMaxRadius = 2 saturationMult { density = 0.19 1 density = 0.07 0.9 density = 0.045 0.8 density = 0.02 0.7 } randConeEmit { density = 1.0 0 density = 0.25 1 density = 0.06 1.5 density = 0 1.7 } logGrow { density = 1.0 1 density = 0.2 1 density = 0.1 7 density = 0.0 2 } logGrowScale { density = 1.0 1 density = 0.8 1 density = 0.46 1.3 density = 0.2 2 density = 0.1 4 density = 0.0 5 } linGrow { density = 1.0 -0.2 density = 0.25 0 density = 0.07 4 density = 0.035 12 density = 0.0 25 } speed { density = 1.0 5 density = 0.46 5 density = 0.2 5 density = 0.1 8 density = 0.05 8 density = 0.01 6 density = 0.0 4 } xyForce { density = 1 0.4 density = 0.25 0.6 density = 0.06 0.75 density = 0.01 0.85 density = 0 1 } zForce { density = 1 1 density = 0.2 1.02 density = 0 1.033 } emission { density = 1.0 10 density = 0.5 10 density = 0.2 12 density = 0.1 9 density = 0.07 7 density = 0.035 15 density = 0.01 15 density = 0.0 13 power = 1 1 power = 0.01 0.2 power = 0 0 } energy { density = 1.0 1.25 density = 0.3 1 density = 0.2 0.7 density = 0.07 0.65 density = 0.035 0.25 density = 0.0 0.2 } size { density = 1.0 2 density = 0.8 1.8 density = 0.2 1.7 density = 0.06 1.4 density = 0.01 1.2 density = 0.0 0.8 } } MODEL_MULTI_SHURIKEN_PERSIST { transformName = F1-ThrustTransform localRotation = 0,0,0 localPosition = 0,0,3.5 fixedScale = 1.5 emissionMult = 0.5 alphaMult = 1 saturationMult = 1 name = Kerolox-Lower-F1-plumeboundary modelName = RealPlume/Hoojiwana_FX/MPspike fixedEmissions = false sizeClamp = 50 randomInitalVelocityOffsetMaxRadius = 5 randConeEmit { density = 1.0 0 density = 0.25 1 density = 0.06 1.7 density = 0 2 } xyForce { density = 1 0.05 density = 0.25 0.1 density = 0.06 0.45 density = 0.01 0.75 density = 0 1 } logGrow { density = 1.0 1 density = 0.2 2 density = 0.1 7 density = 0.0 10 } logGrowScale { density = 1.0 1 density = 0.8 1.5 density = 0.46 2 density = 0.2 3 density = 0.1 4 density = 0.0 6 } linGrow { density = 1.0 -0.2 density = 0.46 0.0 density = 0.2 3 density = 0.035 20 density = 0.0 25 } speed { density = 1.0 2 density = 0.25 2.5 density = 0.1 4 density = 0.05 4.5 density = 0.0 4 } zForce { density = 1 1 density = 0.2 1.02 density = 0 1.04 } emission { density = 1.0 2.0 density = 0.8 2 density = 0.5 3 density = 0.2 4 density = 0.1 4 density = 0.05 5 density = 0.01 6 density = 0.0 7 power = 1 1 power = 0.01 0.2 power = 0 0 } energy { density = 1.0 3 density = 0.3 2.5 density = 0.2 1.7 density = 0.05 1.6 density = 0.01 1 density = 0.0 0.4 } size { density = 1.0 1.8 density = 0.8 1.6 density = 0.2 1.5 density = 0.06 1.3 density = 0.0 0.7 } } AUDIO { name = Kerolox-Lower-F1-audio channel = Ship clip = RealPlume/KW_Sounds/sound_altloop2 volume = 0.0 0.0 volume = 1.0 1.5 pitch = 0.0 1.0 pitch = 1.0 1.0 loop = true } } engage { AUDIO { channel = Ship clip = RealPlume/KW_Sounds/sound_liq10 volume = 1.5 pitch = 1.0 loop = false } } disengage { AUDIO { channel = Ship clip = sound_vent_soft volume = 1.0 pitch = 2.0 loop = false } } flameout { AUDIO { channel = Ship clip = sound_explosion_low volume = 1.0 pitch = 2.0 loop = false } } } MODULE { name = TestFlightInterop } MODULE { name = TestFlightCore title = F-1 configuration = engineConfig = F-1:F-1 maxData = 10000 techTransferMax = 2000 techTransfer = } MODULE { name = FlightDataRecorder_Engine configuration = F-1 flightDataEngineerModifier = 0.4 flightDataMultiplier = 3.87878787878788 } MODULE { name = TestFlightReliability configuration = F-1 reliabilityCurve { key = 0 0.000381212121212121 key = 3000 0.000108484848484849 -2.46753246753247E-08 -2.46753246753247E-08 key = 10000 1.75757575757576E-05 0 0 } } MODULE { name = TestFlightReliability_EngineCycle configuration = F-1 ratedBurnTime = 165 engineConfig = F-1 cycle { key = 0.00 10.00 key = 5.00 1.00 -0.8 0 key = 170 1 0 0 key = 417.5 100 1.1830303030303 0 } } MODULE { name = TestFlightFailure_ShutdownEngine configuration = F-1 duFail = 1100 weight = 32 failureType = software failureTitle = Engine Shutdown duRepair = 50 severity = major REPAIR { canBeRepairedInFlight = True dataSize = 1 dataScale = 1 repairChance = 75 canBeRepairedOnSplashed = True canBeRepairedByRemote = True } } MODULE { name = TestFlightFailure_IgnitionFail configuration = F-1 restoreIgnitionCharge = False duFail = 1050 oneShot = True failureType = mechanical failureTitle = Failed to ignite additionalFailureChance = 0.2 ignorePressureOnPad = True severity = major pressureCurve { key = 0 1 0 0 key = 5000 1 0 0 key = 15000 0.85 -2.25E-05 -2.25E-05 key = 30000 0.4 key = 50000 0.15 0 0 } baseIgnitionChance { key = 0 0.9371 key = 3000 0.9821 4.07142857142857E-06 4.07142857142857E-06 key = 10000 0.9971 0 0 } } MODULE { name = TestFlightFailure_ReducedMaxThrust oneShot = True configuration = F-1 duFail = 700 weight = 8 failureType = mechanical failureTitle = Loss of Thrust duRepair = 250 severity = minor REPAIR { canBeRepairedInFlight = False canBeRepairedOnSplashed = False canBeRepairedByRemote = False repairChance = 75 } } MODULE { name = TestFlightFailure_EnginePerformanceLoss oneShot = True configuration = F-1 duFail = 800 weight = 16 failureType = mechanical failureTitle = Performance Loss duRepair = 250 severity = minor ispMultiplier = 0.5 ispMultiplierJitter = 0.1 REPAIR { canBeRepairedInFlight = False canBeRepairedOnSplashed = False canBeRepairedByRemote = False repairChance = 75 } } MODULE { name = TestFlightFailure_Explode configuration = F-1 failureTitle = Explosion! duFail = 1300 weight = 2 failureType = mechanical severity = major } MODULE { name = TestFlightCore title = F-1A configuration = engineConfig = F-1A:F-1A maxData = 10000 techTransferMax = 2000 techTransfer = F-1:50 } MODULE { name = FlightDataRecorder_Engine configuration = F-1A flightDataEngineerModifier = 0.4 flightDataMultiplier = 2.03174603174603 } MODULE { name = TestFlightReliability configuration = F-1A reliabilityCurve { key = 0 0.00019968253968254 key = 3000 5.6825396825397E-05 -1.29251700680273E-08 -1.29251700680273E-08 key = 10000 9.20634920634924E-06 0 0 } } MODULE { name = TestFlightReliability_EngineCycle configuration = F-1A ratedBurnTime = 315 engineConfig = F-1A cycle { key = 0.00 10.00 key = 5.00 1.00 -0.8 0 key = 320 1 0 0 key = 792.5 100 0.61968253968254 0 } } MODULE { name = TestFlightFailure_ShutdownEngine configuration = F-1A duFail = 1100 weight = 32 failureType = software failureTitle = Engine Shutdown duRepair = 50 severity = major REPAIR { canBeRepairedInFlight = True dataSize = 1 dataScale = 1 repairChance = 75 canBeRepairedOnSplashed = True canBeRepairedByRemote = True } } MODULE { name = TestFlightFailure_IgnitionFail configuration = F-1A restoreIgnitionCharge = False duFail = 1050 oneShot = True failureType = mechanical failureTitle = Failed to ignite additionalFailureChance = 0.2 ignorePressureOnPad = True severity = major pressureCurve { key = 0 1 0 0 key = 5000 1 0 0 key = 15000 0.85 -2.25E-05 -2.25E-05 key = 30000 0.4 key = 50000 0.15 0 0 } baseIgnitionChance { key = 0 0.9371 key = 3000 0.9821 4.07142857142857E-06 4.07142857142857E-06 key = 10000 0.9971 0 0 } } MODULE { name = TestFlightFailure_ReducedMaxThrust oneShot = True configuration = F-1A duFail = 700 weight = 16 failureType = mechanical failureTitle = Loss of Thrust duRepair = 250 severity = minor REPAIR { canBeRepairedInFlight = False canBeRepairedOnSplashed = False canBeRepairedByRemote = False repairChance = 75 } } MODULE { name = TestFlightFailure_EnginePerformanceLoss oneShot = True configuration = F-1A duFail = 800 weight = 16 failureType = mechanical failureTitle = Performance Loss duRepair = 250 severity = minor ispMultiplier = 0.5 ispMultiplierJitter = 0.1 REPAIR { canBeRepairedInFlight = False canBeRepairedOnSplashed = False canBeRepairedByRemote = False repairChance = 75 } } MODULE { name = TestFlightFailure_Explode configuration = F-1A failureTitle = Explosion! duFail = 1300 weight = 2 failureType = mechanical severity = major } } Edited April 20, 2020 by Tonas1997 Quote Link to comment Share on other sites More sharing options...
Corax Posted April 20, 2020 Share Posted April 20, 2020 1 hour ago, Tonas1997 said: Why isn't this patch: @PART[*]:HAS[#category[Propulsion|Engine],@MODULE[ModuleEngines*]]:FINAL { %entryCost = #$cost$ @entryCost *= 3 } capturing any engines? If I were to guess, last sentence in post above yours. Quote Link to comment Share on other sites More sharing options...
Tonas1997 Posted April 20, 2020 Share Posted April 20, 2020 14 minutes ago, Corax said: If I were to guess, last sentence in post above yours. Well, that was shameful of me. I'll try to split this patch in two, then Quote Link to comment Share on other sites More sharing options...
Corax Posted April 20, 2020 Share Posted April 20, 2020 1 hour ago, Tonas1997 said: Well, that was shameful of me. I'll try to split this patch in two, then To be fair, I wouldn't have been aware of it either. Time to check my patch collection, I guess... $ grep -r HAS * | grep '|' All clear. Note this will likely result in false positives, but it provides a quick overview. Quote Link to comment Share on other sites More sharing options...
Ja222 Posted April 26, 2020 Share Posted April 26, 2020 (edited) If I were to write a patch increasing all antenna power by a factor of X is this the correct way to do it? @PART[*]:HAS[@MODULE[ModuleDataTransmitter]]:FINAL { @antennaPower *= X } I have been trying to tweak antennas for my x6.4 scale game but to no avail, I must be missing something. EDIT: added the :FINAL flag because I want this patch to be applied after all other changes. EDIT2: or would the code look like this where I need to specify that I want to edit a field in the MODULE instead? @PART[*]:HAS[@MODULE[ModuleDataTransmitter]]:FINAL { @MODULE[ModuleDataTransmitter] { @antennaPower *= X } } EDIT3: Rubber ducky rule worked, second solution is valid Edited April 26, 2020 by Ja222 Quote Link to comment Share on other sites More sharing options...
blowfish Posted April 27, 2020 Share Posted April 27, 2020 16 hours ago, Ja222 said: EDIT3: Rubber ducky rule worked, second solution is valid In general, the structure of the patch will match the structure of the thing you're trying to patch. Quote Link to comment Share on other sites More sharing options...
Virtualgenius Posted April 27, 2020 Share Posted April 27, 2020 Which log do i troll through to figure out whats generating a warning in MM I would like to correct it or delete it is it ksp.log or something else Thanks in advance Quote Link to comment Share on other sites More sharing options...
Brigadier Posted April 27, 2020 Share Posted April 27, 2020 (edited) 8 hours ago, Virtualgenius said: Which log do i troll through to figure out whats generating a warning in MM I would like to correct it or delete it is it ksp.log or something else Places I would look would be the player.log and the <your KSP instal>\GameData\ModuleManager.ConfigCache. Edited April 27, 2020 by Brigadier Quote Link to comment Share on other sites More sharing options...
blowfish Posted April 27, 2020 Share Posted April 27, 2020 6 hours ago, Virtualgenius said: Which log do i troll through to figure out whats generating a warning in MM I would like to correct it or delete it is it ksp.log or something else Thanks in advance They will all contain the information, ModuleManager.log should probably be your go-to for MM specific stuff though. Quote Link to comment Share on other sites More sharing options...
Probus Posted May 3, 2020 Share Posted May 3, 2020 I'm updating the Engineering Tech Tree mod. I was thinking about the aviation branch. If there are no propellers in the game, I want to put the small Juno engine in the first aviation node along with an intake. But, if any other mod that has propellers in it is installed, I want to put the jet engine parts back in the jet engine node (or something like that). What would be the best way to do something like that. Using several NEEDS? Quote Link to comment Share on other sites More sharing options...
ns88ns Posted May 3, 2020 Share Posted May 3, 2020 (edited) Hi, community. A quick question: is there a way/method to check whether an other node is defined from root path? E.g.: I would like to apply patch to a part only in case if a resource is already defined: @PART[MyCoolPart]:AFTER[OtherCoolMod] { (all the stuff) } but only if root node RESOURCE_DEFINITION[ResName] exists already? Thank you in advance. Edited May 3, 2020 by ns88ns fixed typos 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.