![](https://forum.kerbalspaceprogram.com/uploads/set_resources_17/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
![](https://forum.kerbalspaceprogram.com/uploads/set_resources_17/84c1e40ea0e759e3f1505eb1788ddf3c_default_photo.png)
ialdabaoth
Members-
Posts
549 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by ialdabaoth
-
Due to how some of the internals of KSP works, it's buggy if you don't specify a basemass. I can try to grab basemass from mass in the editor, but sometimes that glitches on the way to the launchpad - specifying it explicitly tends to fix that. Other than basemass, though, you can totally do the rest of that - efficiency, mass, temperature, etc. all default so that if you want, you can just specify a propellant name. Also, note that I am making plugin compatability much easier in future releases; this is my current project: Module Manager
-
Yeah, just add fuel and oxidizer together. Basemass is generally half the mass of the tank part, which seems to work out to 0.0003125 * volume. Of course, some tanks break this - for example, my configs set the orange tanks as being a little heavier, in exchange for being more efficient at storing LOX and LH2.
-
Funny you should ask! That's exactly what I've been working on for the past week; if you click on the link, it'll take you to the forum thread where I'm asking for beta testers.
-
So, let's say you want to install IonCross's Life Support System plugin. And then you want to install FAR's accurate aerodynamics plugin. And then you want to install my wonderful Modular Fuel Tanks plugin. But then you realize: each of these mods requires you to replace your part.cfg files. If you want to install both, you're going to have to go into your part.cfg files, figure out what each mod needs you to change, and then write your own modified version. This is tedious and error-prone, and no for the faint of heart. BUT NOT ANYMORE! Now, IonCross and FAR, and anyone else who distributes modified versions of stock parts, can simply distribute ModuleManager with their own plugin, and ModuleManager will do the work for you. How it works: There's a file that sits in your PluginData directory, called PluginData/ModuleManager/parts.cfg This file looks something like this: include = ModularFuelTanks.cfg include = FAR.cfg include = IonCrossLSS.cfg Then you see that each of those files also exists within PluginData/ModuleManager/; for example, ModularFuelTanks.cfg looks something like this: include = KW_modularFuelTanks.cfg include = BAC9_modularFuelTanks.cfg include = BobCat_modularFuelTanks.cfg fuelTank { REPLACE { RESOURCE { name = LiquidFuel amount = 160 maxAmount = 160 } RESOURCE { name = Oxidizer amount = 240 maxAmount = 240 } } ADD { MODULE { name = ModuleFuelTanks volume = 400 basemass = 0.125 TANK { name = LiquidH2 efficiency = 0.975 mass = 0.000 temperature = -253 loss_rate = 0.0000000005 } TANK { name = LiquidOxygen efficiency = 0.995 mass = 0.0003125 temperature = -183 loss_rate = 0.0000000001 } TANK { name = LiquidFuel efficiency = 1.0 mass = 0.0003125 } TANK { name = Oxidizer efficiency = 1.0 mass = 0.0003125 } TANK { name = MonoPropellant efficiency = 1.0 mass = 0.0005 } } } } fuelTank_long { REPLACE { RESOURCE { name = LiquidFuel amount = 320 maxAmount = 320 } RESOURCE { name = Oxidizer amount = 480 maxAmount = 480 } } ADD { MODULE { name = ModuleFuelTanks volume = 800 basemass = 0.25 TANK { name = LiquidH2 efficiency = 0.975 mass = 0.000 temperature = -253 loss_rate = 0.0000000005 } TANK { name = LiquidOxygen efficiency = 0.995 mass = 0.0003125 temperature = -183 loss_rate = 0.0000000001 } TANK { name = LiquidFuel efficiency = 1.0 mass = 0.0003125 } TANK { name = Oxidizer efficiency = 1.0 mass = 0.0003125 } TANK { name = MonoPropellant efficiency = 1.0 mass = 0.0005 } } } } fuelTank1-2 { REPLACE { RESOURCE { name = LiquidFuel amount = 1440 maxAmount = 1440 } RESOURCE { name = Oxidizer amount = 1760 maxAmount = 1760 } } ADD { MODULE { name = ModuleFuelTanks volume = 3200 basemass = 1 TANK { name = LiquidH2 loss_rate = 0.000015 efficiency = 0.975 mass = 0.000 } TANK { name = LiquidOxygen efficiency = 0.995 mass = 0.0003125 } TANK { name = LiquidFuel efficiency = 1.0 mass = 0.0003125 } TANK { name = Oxidizer efficiency = 1.0 mass = 0.0003125 } TANK { name = MonoPropellant efficiency = 1.0 mass = 0.0005 } } } } fuelTank2-2 { REPLACE { RESOURCE { name = LiquidFuel amount = 640 maxAmount = 640 } RESOURCE { name = Oxidizer amount = 960 maxAmount = 960 } } ADD { MODULE { name = ModuleFuelTanks volume = 1600 basemass = 0.5 TANK { name = LiquidH2 efficiency = 0.975 temperature = -253 loss_rate = 0.0000000005 mass = 0.000 } TANK { name = LiquidOxygen efficiency = 0.995 temperature = -183 loss_rate = 0.0000000001 mass = 0.0003125 } TANK { name = LiquidFuel efficiency = 1.0 temperature = 150 mass = 0.0003125 } TANK { name = Oxidizer efficiency = 1.0 mass = 0.0003125 } TANK { name = MonoPropellant efficiency = 1.0 mass = 0.0005 } } } } fuelTank3-2 { REMOVE { RESOURCE=LiquidFuel RESOURCE=Oxidizer } ADD { RESOURCE { name = LiquidH2 amount = 4637 maxAmount = 4637 } RESOURCE { name = LiquidOxygen amount = 1716 maxAmount = 1716 } MODULE { name = ModuleFuelTanks volume = 6400 basemass = 2 TANK { name = LiquidH2 efficiency = 0.995 mass = 0.0000 temperature = -253 loss_rate = 0.0000000005 } TANK { name = LiquidOxygen efficiency = 1.0 mass = 0.0003125 temperature = -183 loss_rate = 0.0000000001 } TANK { name = LiquidFuel efficiency = 1.0 mass = 0.0003125 } } } } fuelTank4-2 { REPLACE { RESOURCE { name = LiquidFuel amount = 320 maxAmount = 320 } RESOURCE { name = Oxidizer amount = 480 maxAmount = 480 } } ADD { MODULE { name = ModuleFuelTanks volume = 800 basemass = 0.25 TANK { name = LiquidH2 efficiency = 0.975 mass = 0.000 temperature = -253 loss_rate = 0.0000000005 } TANK { name = LiquidOxygen efficiency = 0.995 mass = 0.0003125 temperature = -183 loss_rate = 0.0000000001 } TANK { name = LiquidFuel efficiency = 1.0 mass = 0.0003125 } TANK { name = Oxidizer efficiency = 1.0 mass = 0.0003125 } TANK { name = MonoPropellant efficiency = 1.0 mass = 0.0005 } } } } fuelTankSmall { ADD { MODULE { name = ModuleFuelTanks volume = 200 basemass = 0.0625 TANK { name = LiquidH2 efficiency = 0.975 mass = 0.000 temperature = -253 loss_rate = 0.0000000005 } TANK { name = LiquidOxygen efficiency = 0.995 mass = 0.0003125 temperature = -183 loss_rate = 0.0000000001 } TANK { name = LiquidFuel efficiency = 1.0 mass = 0.0003125 } TANK { name = Oxidizer efficiency = 1.0 mass = 0.0003125 } TANK { name = MonoPropellant efficiency = 1.0 mass = 0.0005 } } } REPLACE { RESOURCE { name = LiquidFuel amount = 80 maxAmount = 80 } RESOURCE { name = Oxidizer amount = 120 maxAmount = 120 } } } launchClamp1 { ADD { MODULE { name = RefuelingLaunchClamp pump_rate = 100.0; trf_towerPivot_name = obj_girdercap trf_towerStretch_name = obj_girder trf_anchor_name = obj_ground trf_animationRoot_name = launchclamp anim_decouple_name = launchclamp } } } liquidEngine { REPLACE { MODULE { name = ModuleEngines thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 215 heatProduction = 400 fxOffset = 0, 0, 0.8 PROPELLANT { name = LiquidFuel ratio = 0.4 DrawGauge = True } PROPELLANT { name = Oxidizer ratio = 0.6 } atmosphereCurve { key = 0 370 key = 1 320 } } } } LiquidEngine1-2 { REPLACE { MODULE { name = ModuleEngines thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 1500 heatProduction = 500 fxOffset = 0, 0, 1.5 PROPELLANT { name = LiquidFuel ratio = 0.35 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.65 } atmosphereCurve { key = 0 330 key = 1 280 } } } } liquidEngine2 { ADD { MODULE { name = ModuleEngineConfigs configuration = LiquidFuel+Oxidizer (200 Thrust, 370 Isp) modded = false CONFIG { name = LiquidFuel+Oxidizer (200 Thrust, 370 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 200 heatProduction = 400 fxOffset = 0, 0, 0.4 PROPELLANT { name = LiquidFuel ratio = 0.4 DrawGauge = True } PROPELLANT { name = Oxidizer ratio = 0.6 } atmosphereCurve { key = 0 370 key = 1 320 } } CONFIG { name = LiquidFuel+LiquidOxygen (210 Thrust, 390 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 210 heatProduction = 375 fxOffset = 0, 0, 0.4 PROPELLANT { name = LiquidFuel ratio = 0.35 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.65 } atmosphereCurve { key = 0 390 key = 1 330 } } CONFIG { name = LiquidH2+LiquidOxygen (175 Thrust, 460 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 175 heatProduction = 350 fxOffset = 0, 0, 0.4 PROPELLANT { name = LiquidH2 ratio = 0.73 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.27 } atmosphereCurve { key = 0 460 key = 1 340 } } } } REPLACE { MODULE { name = ModuleEngines thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 200 heatProduction = 400 fxOffset = 0, 0, 0.574338 PROPELLANT { name = LiquidFuel ratio = 0.4 DrawGauge = True } PROPELLANT { name = Oxidizer ratio = 0.6 } atmosphereCurve { key = 0 370 key = 1 320 } } } } liquidEngine2-2 { ADD { MODULE { name = ModuleEngineConfigs configuration = LiquidH2+LiquidOxygen (220 Thrust, 460 Isp) modded = false CONFIG { name = LiquidFuel+Oxidizer (250 Thrust, 370 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 250 heatProduction = 350 fxOffset = 0, 0, 0.4 PROPELLANT { name = LiquidFuel ratio = 0.4 DrawGauge = True } PROPELLANT { name = Oxidizer ratio = 0.6 } atmosphereCurve { key = 0 370 key = 1 270 } } CONFIG { name = LiquidFuel+LiquidOxygen (255 Thrust, 390 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 55 heatProduction = 325 fxOffset = 0, 0, 0.4 PROPELLANT { name = LiquidFuel ratio = 0.35 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.65 } atmosphereCurve { key = 0 390 key = 1 300 } } CONFIG { name = LiquidH2+LiquidOxygen (220 Thrust, 460 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 300 heatProduction = 290 fxOffset = 0, 0, 0.4 PROPELLANT { name = LiquidH2 ratio = 0.73 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.27 } atmosphereCurve { key = 0 460 key = 1 310 } } } } REPLACE { MODULE { name = ModuleEngines thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 220 heatProduction = 290 fxOffset = 0, 0, 0.4 PROPELLANT { name = LiquidH2 ratio = 0.73 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.27 } atmosphereCurve { key = 0 450 key = 1 270 } } } } liquidEngine3 { REPLACE { MODULE { name = ModuleEngines thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 50 heatProduction = 300 fxOffset = 0, 0, 0.21 PROPELLANT { name = LiquidH2 ratio = 0.73 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.27 } atmosphereCurve { key = 0 460 key = 1 300 } } } ADD { MODULE { name = ModuleEngineConfigs configuration = LiquidFuel+Oxidizer (50 Thrust, 370 Isp) modded = false CONFIG { name = LiquidFuel+Oxidizer (50 Thrust, 370 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 50 heatProduction = 300 fxOffset = 0, 0, 0.21 PROPELLANT { name = LiquidFuel ratio = 0.4 DrawGauge = True } PROPELLANT { name = Oxidizer ratio = 0.6 } atmosphereCurve { key = 0 370 key = 1 270 } } CONFIG { name = LiquidFuel+LiquidOxygen (55 Thrust, 390 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 55 heatProduction = 275 fxOffset = 0, 0, 0.21 PROPELLANT { name = LiquidFuel ratio = 0.35 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.65 } atmosphereCurve { key = 0 390 key = 1 300 } } CONFIG { name = LiquidH2+LiquidOxygen (40 Thrust, 460 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 40 heatProduction = 250 fxOffset = 0, 0, 0.21 PROPELLANT { name = LiquidH2 ratio = 0.73 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.27 } atmosphereCurve { key = 0 460 key = 1 310 } } } } } microEngine { ADD { MODULE { name = ModuleEngineConfigs configuration = LiquidFuel+Oxidizer (1.5 Thrust, 290 Isp) modded = false CONFIG { name = LiquidFuel+Oxidizer (1.5 Thrust, 290 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.02 minThrust = 0 maxThrust = 1.5 heatProduction = 30 fxOffset = 0, 0, 0.02 PROPELLANT { name = LiquidFuel ratio = 0.4 DrawGauge = True } PROPELLANT { name = Oxidizer ratio = 0.6 } atmosphereCurve { key = 0 290 key = 1 220 } } CONFIG { name = LiquidFuel+LiquidOxygen (1.6 Thrust, 310 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 1.6 heatProduction = 25 fxOffset = 0, 0, 0.02 PROPELLANT { name = LiquidFuel ratio = 0.35 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.65 } atmosphereCurve { key = 0 310 key = 1 230 } } CONFIG { name = LiquidH2+LiquidOxygen (1.2 Thrust, 425 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 1.2 heatProduction = 20 fxOffset = 0, 0, 0.02 PROPELLANT { name = LiquidH2 ratio = 0.73 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.27 } atmosphereCurve { key = 0 425 key = 1 270 } } } } REPLACE { MODULE { name = ModuleEngines thrustVectorTransformName = thrustTransform exhaustDamage = False ignitionThreshold = 0.1 minThrust = 0 maxThrust = 1.5 heatProduction = 30 fxOffset = 0, 0, 0.02 PROPELLANT { name = LiquidFuel ratio = 0.4 } PROPELLANT { name = Oxidizer ratio = 0.6 } atmosphereCurve { key = 0 290 key = 1 220 } } } } miniFuelTank { ADD { MODULE { name = ModuleFuelTanks volume = 12.5 basemass = 0.01 TANK { name = LiquidH2 loss_rate = 0.000015 efficiency = 0.975 mass = 0.000 } TANK { name = LiquidOxygen efficiency = 0.995 mass = 0.0003125 loss_rate = 0.0000025 } TANK { name = LiquidFuel efficiency = 1.0 mass = 0.0003125 } TANK { name = Oxidizer efficiency = 1.0 mass = 0.0003125 } TANK { name = MonoPropellant efficiency = 1.0 mass = 0.0005 } } } REPLACE { RESOURCE { name = LiquidFuel amount = 5 maxAmount = 5 } RESOURCE { name = Oxidizer amount = 7.5 maxAmount = 7.5 } } } MK1Fuselage { ADD { MODULE { name = ModuleFuelTanks volume = 150 basemass = 0.35 TANK { name = LiquidH2 loss_rate = 0.000015 efficiency = 0.95 mass = 0.0 temperature = -253 loss_rate = 0.00002 } TANK { name = LiquidOxygen efficiency = 0.99 mass = 0.0 temperature = -183 loss_rate = 0.000003 } TANK { name = LiquidFuel efficiency = 1.0 mass = 0.0 } TANK { name = Oxidizer efficiency = 1.0 mass = 0.0 } TANK { name = MonoPropellant efficiency = 1.0 mass = 0.0005 } } } } mk2Fuselage { ADD { MODULE { name = ModuleFuelTanks volume = 160 basemass = 0.2 TANK { name = LiquidH2 loss_rate = 0.000015 efficiency = 0.95 mass = 0.0 temperature = -253 loss_rate = 0.00002 } TANK { name = LiquidOxygen efficiency = 0.99 mass = 0.0 temperature = -183 loss_rate = 0.000003 } TANK { name = LiquidFuel efficiency = 1.0 mass = 0.0 } TANK { name = Oxidizer efficiency = 1.0 mass = 0.0 } TANK { name = MonoPropellant efficiency = 1.0 mass = 0.0005 } } } } mk2SpacePlaneAdapter { MODULE { name = ModuleFuelTanks volume = 80 basemass = 0.1 TANK { name = LiquidH2 loss_rate = 0.000015 efficiency = 0.95 mass = 0.0 temperature = -253 loss_rate = 0.00002 } TANK { name = LiquidOxygen efficiency = 0.99 mass = 0.0 temperature = -183 loss_rate = 0.000003 } TANK { name = LiquidFuel efficiency = 1.0 mass = 0.0 } TANK { name = Oxidizer efficiency = 1.0 mass = 0.0 } TANK { name = MonoPropellant efficiency = 1.0 mass = 0.0005 } } } mk3Fuselage { ADD { MODULE { name = ModuleFuelTanks volume = 240 basemass = 0.3 TANK { name = LiquidH2 loss_rate = 0.000015 efficiency = 0.95 mass = 0.0 temperature = -253 loss_rate = 0.00002 } TANK { name = LiquidOxygen efficiency = 0.99 mass = 0.0 temperature = -183 loss_rate = 0.000003 } TANK { name = LiquidFuel efficiency = 1.0 mass = 0.0 } TANK { name = Oxidizer efficiency = 1.0 mass = 0.0 } TANK { name = MonoPropellant efficiency = 1.0 mass = 0.0005 } } } } mk3spacePlaneAdapter { ADD { MODULE { name = ModuleFuelTanks volume = 160 basemass = 0.2 TANK { name = LiquidH2 loss_rate = 0.000015 efficiency = 0.95 mass = 0.0 temperature = -253 loss_rate = 0.00002 } TANK { name = LiquidOxygen efficiency = 0.99 mass = 0.0 temperature = -183 loss_rate = 0.000003 } TANK { name = LiquidFuel efficiency = 1.0 mass = 0.0 } TANK { name = Oxidizer efficiency = 1.0 mass = 0.0 } TANK { name = MonoPropellant efficiency = 1.0 mass = 0.0005 } } } } nuclearEngine { REPLACE { MODULE { name = ModuleEngines thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 60 heatProduction = 600 fxOffset = 0, 0, 1.6 PROPELLANT { name = LiquidH2 ratio = 1.0 DrawGauge = True } PROPELLANT { name = nuclearFuel ratio = 0.00000000001 DrawGauge = False } atmosphereCurve { key = 0 850 key = 1 220 } } } ADD { MODULE { name = ModuleAlternator OUTPUT_RESOURCE { name = nuclearFuel rate = -0.000001 } OUTPUT_RESOURCE { name = nuclearWaste rate = 0.000001 } OUTPUT_RESOURCE { name = ElectricCharge rate = 0.25 } } MODULE { name = ModuleGenerator isAlwaysActive = true OUTPUT_RESOURCE { name = ElectricCharge rate = 0.25 } OUTPUT_RESOURCE { name = nuclearWaste rate = 0.0000001 } INPUT_RESOURCE { name = nuclearFuel rate = 0.0000001 } } RESOURCE { name = nuclearFuel amount = 4 maxAmount = 4 } } } radialLiquidEngine1-2 { ADD { MODULE { name = ModuleEngineConfigs configuration = LiquidFuel+LiquidOxygen (120 Thrust, 370 Isp) modded = false CONFIG { name = LiquidFuel+Oxidizer (115 Thrust, 280 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 115 heatProduction = 375 fxOffset = 0, 0, 0.1 PROPELLANT { name = LiquidFuel ratio = 0.4 DrawGauge = True } PROPELLANT { name = Oxidizer ratio = 0.6 } atmosphereCurve { key = 0 280 key = 1 220 } } CONFIG { name = LiquidFuel+LiquidOxygen (120 Thrust, 370 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 120 heatProduction = 350 fxOffset = 0, 0, 0.1 PROPELLANT { name = LiquidFuel ratio = 0.35 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.65 } atmosphereCurve { key = 0 370 key = 1 290 } } CONFIG { name = LiquidH2+LiquidOxygen (105 Thrust, 450 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 105 heatProduction = 275 fxOffset = 0, 0, 0.1 PROPELLANT { name = LiquidH2 ratio = 0.73 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.27 } atmosphereCurve { key = 0 450 key = 1 320 } } } } REPLACE { MODULE { name = ModuleEngines thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 120 heatProduction = 350 fxOffset = 0, 0, 0.1 PROPELLANT { name = LiquidFuel ratio = 0.35 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.65 } atmosphereCurve { key = 0 370 key = 1 290 } } } } radialRCSTank { ADD { MODULE { name = ModuleFuelTanks volume = 40 basemass = 0.055 TANK { name = LiquidH2 loss_rate = 0.000015 efficiency = 0.975 mass = 0.000 } TANK { name = LiquidOxygen efficiency = 0.995 mass = 0.0003125 loss_rate = 0.0000025 } TANK { name = LiquidFuel efficiency = 1.0 mass = 0.0003125 } TANK { name = Oxidizer efficiency = 1.0 mass = 0.0003125 } TANK { name = MonoPropellant efficiency = 1.0 mass = 0.0005 } TANK { name = XenonGas efficiency = 0.99 mass = 0.00625 } } } } rocketNoseCone { ADD { MODULE { name = ModuleFuelTanks volume = 400 basemass = 0.4 TANK { name = LiquidH2 efficiency = 0.975 mass = 0.000 temperature = -253 loss_rate = 0.0000000005 } TANK { name = LiquidOxygen efficiency = 0.995 mass = 0.0003125 temperature = -183 loss_rate = 0.0000000001 } TANK { name = LiquidFuel efficiency = 1.0 mass = 0.0003125 } TANK { name = Oxidizer efficiency = 1.0 mass = 0.0003125 } TANK { name = MonoPropellant efficiency = 1.0 mass = 0.0005 } } } } smallRadialEngine { ADD { MODULE { name = ModuleEngineConfigs configuration = LiquidFuel+Oxidizer (200 Thrust, 370 Isp) modded = false CONFIG { name = LiquidFuel+Oxidizer (20 Thrust, 280 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 20 heatProduction = 150 fxOffset = 0, 0, 0.01 PROPELLANT { name = LiquidFuel ratio = 0.4 DrawGauge = True } PROPELLANT { name = Oxidizer ratio = 0.6 } atmosphereCurve { key = 0 280 key = 1 220 } } CONFIG { name = LiquidFuel+LiquidOxygen (25 Thrust, 390 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 25 heatProduction = 133 fxOffset = 0, 0, 0.01 PROPELLANT { name = LiquidFuel ratio = 0.35 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.65 } atmosphereCurve { key = 0 390 key = 1 250 } } CONFIG { name = LiquidH2+LiquidOxygen (18 Thrust, 450 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 18 heatProduction = 125 fxOffset = 0, 0, 0.01 PROPELLANT { name = LiquidH2 ratio = 0.73 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.27 } atmosphereCurve { key = 0 450 key = 1 250 } } } } REPLACE { MODULE { name = ModuleEngines thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 20 heatProduction = 150 fxOffset = 0, 0, 0.01 PROPELLANT { name = LiquidH2 ratio = 0.73 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.27 } atmosphereCurve { key = 0 450 key = 1 250 } } } } toroidalAerospike { ADD { MODULE { name = ModuleEngineConfigs configuration = LiquidFuel+Oxidizer (200 Thrust, 370 Isp) modded = false CONFIG { name = LiquidFuel+Oxidizer (200 Thrust, 370 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 200 heatProduction = 600 fxOffset = 0, 0, 0.25 PROPELLANT { name = LiquidFuel ratio = 0.4 DrawGauge = True } PROPELLANT { name = Oxidizer ratio = 0.6 } atmosphereCurve { key = 0 370 key = 1 368 } } CONFIG { name = LiquidFuel+LiquidOxygen (175 Thrust, 390 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 175 heatProduction = 550 fxOffset = 0, 0, 0.25 PROPELLANT { name = LiquidFuel ratio = 0.35 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.65 } atmosphereCurve { key = 0 390 key = 1 388 } } CONFIG { name = LiquidH2+LiquidOxygen (150 Thrust, 460 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 150 heatProduction = 500 fxOffset = 0, 0, 0.25 PROPELLANT { name = LiquidH2 ratio = 0.73 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.27 } atmosphereCurve { key = 0 460 key = 1 455 } } } } REPLACE { MODULE { name = ModuleEngines thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 175 heatProduction = 550 fxOffset = 0, 0, 0.25 PROPELLANT { name = LiquidFuel ratio = 0.35 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.65 } atmosphereCurve { key = 0 390 key = 1 388 } } } } toroidalFuelTank { ADD { MODULE { name = ModuleFuelTanks volume = 22.2 basemass = 0.0125 TANK { name = LiquidH2 loss_rate = 0.000015 efficiency = 0.975 mass = 0.000 } TANK { name = LiquidOxygen efficiency = 0.995 mass = 0.0003125 loss_rate = 0.0000025 } TANK { name = LiquidFuel efficiency = 1.0 mass = 0.0003125 } TANK { name = Oxidizer efficiency = 1.0 mass = 0.0003125 } TANK { name = MonoPropellant efficiency = 1.0 mass = 0.0005 } TANK { name = XenonGas efficiency = 0.99 mass = 0.000625 } } } REPLACE { RESOURCE { name = LiquidFuel amount = 10 maxAmount = 10 } RESOURCE { name = Oxidizer amount = 12.2 maxAmount = 12.2 } } } So, each config file can include multiple subfiles, and can also includes Part nodes. A Part node is simply the name of a Part (for example, fuelTank2-2), followed by a series of subnodes that describe what to change on that part. A Part node can contain any of three types of subnodes: REMOVE A REMOVE node contains a list of fields. Each field's key must be a RESOURCE or MODULE, and its value must be the name of the Resource or PartModule to remove from the part. ADD An ADD node contains a list of nodes. Each node must be a RESOURCE or MODULE node to add to the part. REPLACE A REPLACE node functionally operates like a REMOVE node followed by an ADD node - for each RESOURCE or MODULE subnode, it finds the RESOURCE or MODULE with the name specified, deletes it, and replaces it with the one defined in the subnode. This should make plugin compatibility between authors about 10x easier, while we wait for the official solution in 0.20. Get it here. View source here. What do you think, Sirs?
-
Nevermind! I got it to work! For everyone who needs to add a PartModule to a part in the VAB, here is how you do it: PartModule module = part.AddModule (addNode.GetValue("name")); if(Awaken (module)) { // uses reflection to find and call the PartModule.Awake() private method module.Load(addNode); Awaken(module) is a static method that looks like this: public static bool Awaken(PartModule module) { // thanks to Mu and Kine for help with this bit of Dark Magic. // KINEMORTOBESTMORTOLOLOLOL if (module == null) return false; object[] paramList = new object[] { }; MethodInfo awakeMethod = typeof(PartModule).GetMethod("Awake", BindingFlags.Instance | BindingFlags.NonPublic); if (awakeMethod == null) return false; awakeMethod.Invoke(module, paramList); return true; } Because reflection in C# is AWESOME.
-
Bored 3D Modeler looking for a challenge..
ialdabaoth replied to Cryocasm's topic in KSP1 Mods Discussions
I can make the plugin happen. -
Bored 3D Modeler looking for a challenge..
ialdabaoth replied to Cryocasm's topic in KSP1 Mods Discussions
Sweet... make the shock plate animate over 1.0s and give to me, and I will build a plugin to make it work. -
Update: After lots of blind flailing and remembering a bit of a conversation with Mu, I've discovered that the problem is that part.AddModule(ConfigNode node) fails if the partModule's .Awake() method doesn't get called (apparently there's setup that happens in there). Unfortunately, PartModule.Awake() is private. Fortunately, C# has reflection. I've now managed to get new PartModules to successfully spawn from the editor. However, the parts they spawn on still do not appear to recognize their PartModules. What is the order of operations necessary to add a new module to a part at runtime, from outside that part's scope?
-
No, the code is right as-is. Useable volume is what the player inputs, because that's what the player cares about. "Consumed volume" is equal to useable volume PLUS the inefficiency, which is equal to 1/efficiency. As a user, you just enter "5500" in the LiquidH2 box, and it sets your LiquidH2 to 5500. If that takes up 6200 volume units, then 6200 volume units need to be subtracted from the tank - but as the user, you shouldn't have to do that math. You shouldn't have to say "if I want to store X units of this resource, how much should I ask for?" - you just pick your tank internal volume, and my system computes the rest.
-
I'll release to spaceport once I have enough evidence that there aren't any hidden bugs, but in the meantime: Ialdabaoth's Modular Fuel Tank system source at: https://github.com/Ialdabaoth/modularFuelTanks Released through GPL3.0 (http://www.gnu.org/licenses/gpl.html) HOW IT WORKS: 1. First, you need a part configured with a ModuleFuelTanks. The simplest ModuleFuelTanks node you can have looks something like this: MODULE { name = ModuleFuelTanks volume = 400 TANK { name = LiquidFuel } TANK { name = Oxidizer } TANK { name = MonoPropellant } } This tells my plugin that you have a fuel tank with a total volume of 400 Kerbos (note: one Kerbo = 6.25 Liters; talk to Squad), and you want the user to be able to fill that tank with any amount of MonoPropellant, Oxidizer and LiquidFuel, so long as the total volume of those 3 propellants adds up to less than 400. If you want to get fancier, here is a more complicated MODULE: MODULE { name = ModuleFuelTanks volume = 400 basemass = 0.125 TANK { name = LiquidH2 loss_rate = 0.000015 efficiency = 0.975 mass = 0.000 } TANK { name = LiquidOxygen efficiency = 0.995 mass = 0.0003125 loss_rate = 0.0000025 } TANK { name = LiquidFuel efficiency = 1.0 mass = 0.0003125 } TANK { name = Oxidizer efficiency = 1.0 mass = 0.0003125 } TANK { name = MonoPropellant efficiency = 1.0 mass = 0.0005 } } This tells the module that this tank can hold LiquidFuel, Oxidizer, MonoPropellant, LiquidH2 and LiquidOxygen. It also tells the module how much additional mass or volume each type of tank consumes (beyond the mass and volume of the fuel itself), and that LiquidHydrogen is slightly leaky. The values are: name = LiquidOxygen // the RESOURCE name that this kind of tank holds efficiency = 0.995 // the percentage of tank volume that can store fuel mass = 0.0003125 // the additional dry mass added per volume of this tank temperature = -183 // the temperature that fuel begins evaporating loss_rate = 0.0000000002 // the rate at which fuel evaporates of the container. Note that 'mass' and 'efficiency' is per volume of fuel, not per volume of tank+fuel. So if you want a tank to store 360 units of LiquidOxygen, in the RESOURCES column say: RESOURCE { name = LiquidOxygen amount = 360 maxAmount = 360 } Assuming the TANK configuration above, MaxAmount = 360 will create a tank that takes up (360 / .995) = 361.809 of the available volume, and which adds 360*.0003125 = 0.1125 tons to the dry mass of the tank, in addition to the mass of the LiquidOxygen itself. As long as the tank's Part is at a temperature below -183 Celsius, no LiquidOxygen will leak out; otherwise, LiquidOxygen will begin leaking out at a rate of (360*0.0000000001) = 0.000000036 units per second per degree Celcius that the part's temperature exceeds -183. At room temperature (25C), this works out to about 0.027 units per hour. 2. Once you have the module specified correctly in part.cfg, you can load up the tank in the editor. After attaching it to your ship, go to the Action Groups menu and click on the tank. There you will see various options - each fuel type will have a button to add a tank, or text boxes to adjust the tank volume and initial amount of that fuel, as well as a button to remove all tanks from this part. When you edit a If the system detects an engine attached, it will (usually) also give you a button to remove all tanks and then fill the entire volume with that engine's fuel, in the ratio that that engine consumes it. When you edit a fuel tank, its load out is automatically copied to all identical symmetrical fuel tanks. If you want to have an asymmetrical load-out, attach each tank separately with symmetry off, then edit each tank individually. 3. You can also configure engines to use multiple fuel types, like so: MODULE { name = ModuleEngineConfigs configuration = LiquidFuel+Oxidizer (50 Thrust, 370 Isp) modded = false CONFIG { name = LiquidFuel+Oxidizer (50 Thrust, 370 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 50 heatProduction = 300 fxOffset = 0, 0, 0.21 PROPELLANT { name = LiquidFuel ratio = 0.4 DrawGauge = True } PROPELLANT { name = Oxidizer ratio = 0.6 } atmosphereCurve { key = 0 370 key = 1 270 } } CONFIG { name = LiquidFuel+LiquidOxygen (55 Thrust, 390 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 55 heatProduction = 275 fxOffset = 0, 0, 0.21 PROPELLANT { name = LiquidFuel ratio = 0.35 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.65 } atmosphereCurve { key = 0 390 key = 1 300 } } CONFIG { name = LiquidH2+LiquidOxygen (40 Thrust, 460 Isp) thrustVectorTransformName = thrustTransform exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 maxThrust = 40 heatProduction = 250 fxOffset = 0, 0, 0.21 PROPELLANT { name = LiquidH2 ratio = 0.73 DrawGauge = True } PROPELLANT { name = LiquidOxygen ratio = 0.27 } atmosphereCurve { key = 0 460 key = 1 310 } } } Each CONFIG node is effectively a ModuleEngines MODULE node that will overwrite the part's original ModuleEngines node when selected in the editor. Note that configuration=<name> MUST point to a CONFIG which matches the default ModuleEngines node. [https://github.com/Ialdabaoth/ModuleManager/blob/master/ModuleManager.zip?raw=true]Download link from GitHub This .ZIP contains the ModularFuelTanks plugin, the ModuleManager plugin, and ModuleManager .cfg files for each of the stock engines and fuel tanks in the game, as well as KW tanks and KSPX tanks, and courtesy ModuleManager .cfg files for Ferram Aerospace Research, RemoteTech, and IonCrossLSS. It also contains Resource definition .CFG files to give you a more "realistic" selection of fuels: -LiquidFuel is now changed to have the density and performance stats of kerosene (RP-1) -Oxidizer now has the density and performance stats of N2O4 -LiquidOxygen is added as an alternate oxidizer, which gives slightly better thrust and Isp at the cost of requiring cryogenic storage. -LiquidH2 is added as an alternate fuel, which gives lower thrust but higher Isp, and which is required for the LV-N nuclear rocket. Source code is here, if you're into that sort of thing.
-
How exactly did sexual reproduction evolved?
ialdabaoth replied to Cesrate's topic in Science & Spaceflight
There are some fungi with up to 8 different sexes, where each sex can reproduce with any of the other 7 (but not itself). I'll look up the specifics and come back... -
Tried it. referencing the part and partmodule's GameObject doesn't work, because the editor-part isn't at all the same part as the launchpad-part. The ship gets rebuilt from a temporary save file on the launchpad, so all you'd succeed in doing with DontDestroyOnLoad is having parts floating somewhere that never get cleaned up, leading to a memory leak.
-
Somehow, ModuleEngines manages to create a List<Propellants> that gets loaded from the part.cfg file, and this List<Propellants> is successfully copied from the part in VAB's PartLoader.LoadedPartsList into the part that gets created to stick on your ship in the editor. I cannot replicate this behavior in my own modules. I've done everything Mu presented in this thread, but when I click on my part and add it to the ship, my List<FuelTanks> is empty. I have confirmed that my List<FuelTanks> in PartLoader.LoadedPartsList has multiple entries, but none of them get copied to the new part. I have also confirmed that ModuleEngines' List<Propellants> DOES get copied correctly in the editor, so clearly what I want to do is possible. Help?
-
Since this thread is now in the correct forum, I'll go ahead and reply to it and get discussion started again. I had a solution to the following, but it was bugged, so I'm scrapping it and starting over. Knowing how "official" modules handle this would be ideal. 1. How do modules like moduleEngines currently store/retrieve List<>s like moduleEngines' Propellants? Clearly it works for these modules, so I'd like to know how it's being done. 2. Secondarily, if I change a part's Resources in the editor, how do I get those changes to propagate to the version that spawns on the launchpad? Here's my code, if it helps: modularFuelTanks.cs
-
Yeah. So, Let's say I have a plugin that scans the parts list, and lets you replace dynamically LiquidFuel, Oxidizer, Monopropellant, or any other pumpable fluid. Basically, it lets you reconfigure the fuel tank load of any fuel tank to carry an equivalent volume of any combination of fluids that you want. The trouble is, when I reach the launchpad, any resources that I've deleted from the part stay deleted, but any resources that I've added from the part go away. The resources are absolutely in the part in the VAB, but as soon as the scene changes it all disappears. Any idea what's going on here?