From 1b7ce90fa97f46c974cf9ec0095a72ce097d9bea Mon Sep 17 00:00:00 2001 From: Alexander Yalov Date: Sat, 5 Feb 2022 20:38:19 +0300 Subject: [PATCH 1/8] fix optional CryoTanks_Power ISRU patch --- GameData/CryoTanks/Patches/CryoTanksISRU_patch.cfg | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/GameData/CryoTanks/Patches/CryoTanksISRU_patch.cfg b/GameData/CryoTanks/Patches/CryoTanksISRU_patch.cfg index 0ef0e66..64ab506 100644 --- a/GameData/CryoTanks/Patches/CryoTanksISRU_patch.cfg +++ b/GameData/CryoTanks/Patches/CryoTanksISRU_patch.cfg @@ -237,12 +237,18 @@ { @INPUT_RESOURCE:HAS[~ResourceName[ElectricCharge]],* { - @Ratio *= #$/CryoTanks_Power$ + @Ratio *= #$../../CryoTanks_Power$ } @OUTPUT_RESOURCE,* { - @Ratio *= #$/CryoTanks_Power$ + @Ratio *= #$../../CryoTanks_Power$ } } + +} + + +@PART:HAS[#CryoTanks_Power]:FOR[CryoTanks] +{ -CryoTanks_Power = none } \ No newline at end of file From ce48eee7bd0acd585c791a7e95689d261931bc95 Mon Sep 17 00:00:00 2001 From: Alexander Yalov Date: Sat, 5 Feb 2022 21:51:17 +0300 Subject: [PATCH 2/8] fix EC modifier patch --- .../CryoTanks/Patches/CryoTanksISRU_patch.cfg | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/GameData/CryoTanks/Patches/CryoTanksISRU_patch.cfg b/GameData/CryoTanks/Patches/CryoTanksISRU_patch.cfg index 64ab506..b00d876 100644 --- a/GameData/CryoTanks/Patches/CryoTanksISRU_patch.cfg +++ b/GameData/CryoTanks/Patches/CryoTanksISRU_patch.cfg @@ -1,6 +1,8 @@ //===================================================================================== // adds LH2, LH2Ox, LCH4, LCH4Ox Converters to parts, that are in CryoTanksISRU_Opt-In -// an invariant mass was used to calculate the values +// Converts appropriately into the resources conserving mass for each fuel type, e.g. +// 1 ore (10 kg/u) -> 2 LF (5 kg/u) +// 1 ore (10 kg/u) -> 141 LH2 (0.07085 kg/u) //===================================================================================== // --------------------------------------------------------------------------- @@ -210,24 +212,19 @@ @MODULE[ModuleResourceConverter]:HAS[#Tag[CryoTanks_Hydrogen]],* { - @INPUT_RESOURCE:HAS[@ResourceName[ElectricCharge]] + @INPUT_RESOURCE:HAS[#ResourceName[ElectricCharge]] { - @Ratio *= #$/CryoTanks_EC_Hydrogen$ + @Ratio *= #$../../CryoTanks_EC_Hydrogen$ } } @MODULE[ModuleResourceConverter]:HAS[#Tag[CryoTanks_Methane]],* { - @INPUT_RESOURCE:HAS[@ResourceName[ElectricCharge]] + @INPUT_RESOURCE:HAS[#ResourceName[ElectricCharge]] { - @Ratio *= #$/CryoTanks_EC_Methane$ + @Ratio *= #$../../CryoTanks_EC_Methane$ } } - - -CryoTanks_Converter = none - -CryoTanks_EC_Hydrogen = none - -CryoTanks_EC_Methane = none - } @@ -244,11 +241,14 @@ @Ratio *= #$../../CryoTanks_Power$ } } - } -@PART:HAS[#CryoTanks_Power]:FOR[CryoTanks] +@PART:HAS[#CryoTanks_Converter[Set]]:FOR[CryoTanks] { + -CryoTanks_Converter = none -CryoTanks_Power = none -} \ No newline at end of file + -CryoTanks_EC_Hydrogen = none + -CryoTanks_EC_Methane = none +} + From 8b7c8714db6c18b3fd0a69a0f954037f7300cc88 Mon Sep 17 00:00:00 2001 From: Scialytic <11653155+Scialytic@users.noreply.github.com> Date: Sat, 12 Feb 2022 19:08:08 -0500 Subject: [PATCH 3/8] Update CryoTanksProceduralFuelTanks.cfg --- .../Patches/CryoTanksProceduralFuelTanks.cfg | 275 ++++++++++++++---- 1 file changed, 211 insertions(+), 64 deletions(-) diff --git a/GameData/CryoTanks/Patches/CryoTanksProceduralFuelTanks.cfg b/GameData/CryoTanks/Patches/CryoTanksProceduralFuelTanks.cfg index ff83941..ff29f95 100644 --- a/GameData/CryoTanks/Patches/CryoTanksProceduralFuelTanks.cfg +++ b/GameData/CryoTanks/Patches/CryoTanksProceduralFuelTanks.cfg @@ -1,56 +1,154 @@ // Procedural Fuel Tanks Patch -// Most recent author: Ve +// Most recent author: Scialytic + +// ProceduralParts seems to recommend using unitsPerT rather than unitsPerKL. +// ref: https://github.com/KSP-RO/ProceduralParts/wiki/Calculation-of-tank-config-parameters +// Their rationale about mass ratios being more important than drag seems solid, so I'll stick with unitsPerT. + +// Reminder: Avoid using dryDensity to derive other values. It's not consistent even between stock parts. + +// The costMultiplier values inside the TANK_TYPE_OPTIONs below are set to roughly match the cost of equivalent stock/cryo tanks. +// This way it's easy to scale them all up as judged appropriate using priceMultiplier. + +CT_PROCEDURAL_TAX +{ + priceMultiplier = 1.1 +} + +!CT_PROCEDURAL_TAX:LAST[CryoTanks] {} @PART[procedural*Liquid]:NEEDS[ProceduralParts&!RealFuels&!ModularFuelTanks]:FOR[CryoTanks] { @MODULE[TankContentSwitcher] { + // Values calculated using CryoTanks' B9_TANK_TYPE definitions + // unitsPerT = unitsPerVolume / tankMass + // Note: tankMass is "the mass that this tank type has, per unit of volume" so really it's more of a tankDensity but ¯\_(ツ)_/¯ + // ref: https://github.com/post-kerbin-mining-corporation/CryoTanks/blob/master/GameData/CryoTanks/Patches/CryoTanksFuelTankTypes.cfg + + ratioPPDDtoB9TM = 174.24 // Magic number? I'd love to know what it logically represents + + // Stock resources configured by ProceduralParts + !TANK_TYPE_OPTION[Mixed] {} + !TANK_TYPE_OPTION[LiquidFuel] {} + !TANK_TYPE_OPTION[Oxidizer] {} TANK_TYPE_OPTION { - name = LqdHydrogen - dryDensity = 0.0187 - costMultiplier = 1.61 + name = #LOC_CryoTanks_switcher_fuel_lfox + dryDensity = #$@B9_TANK_TYPE[LFOX]/tankMass$ + @dryDensity *= #$../ratioPPDDtoB9TM$ + costMultiplier = 0.313 RESOURCE { - name = LqdHydrogen - // 1303.79733/0.0187 - unitsPerT = 69721.78235 + name = LiquidFuel + unitsPerT = #$@B9_TANK_TYPE[LFOX]/RESOURCE[LiquidFuel]/unitsPerVolume$ + @unitsPerT /= #$@B9_TANK_TYPE[LFOX]/tankMass$ + } + RESOURCE + { + name = Oxidizer + unitsPerT = #$@B9_TANK_TYPE[LFOX]/RESOURCE[Oxidizer]/unitsPerVolume$ + @unitsPerT /= #$@B9_TANK_TYPE[LFOX]/tankMass$ } } TANK_TYPE_OPTION { - name = HydroOxi - dryDensity = 0.0487 - costMultiplier = 1.35 + name = #LOC_CryoTanks_switcher_fuel_lf + dryDensity = #$@B9_TANK_TYPE[LF]/tankMass$ + @dryDensity *= #$../ratioPPDDtoB9TM$ + costMultiplier = 0.526 + RESOURCE + { + name = LiquidFuel + unitsPerT = #$@B9_TANK_TYPE[LF]/RESOURCE[LiquidFuel]/unitsPerVolume$ + @unitsPerT /= #$@B9_TANK_TYPE[LF]/tankMass$ + } + } + TANK_TYPE_OPTION + { + name = #LOC_CryoTanks_switcher_fuel_ox + dryDensity = #$@B9_TANK_TYPE[OX]/tankMass$ + @dryDensity *= #$../ratioPPDDtoB9TM$ + costMultiplier = 0.313 + RESOURCE + { + name = Oxidizer + unitsPerT = #$@B9_TANK_TYPE[OX]/RESOURCE[Oxidizer]/unitsPerVolume$ + @unitsPerT /= #$@B9_TANK_TYPE[OX]/tankMass$ + } + } + // CryoTanks + TANK_TYPE_OPTION + { + name = #LOC_CryoTanks_switcher_fuel_lh2ox + dryDensity = #$@B9_TANK_TYPE[LH2OCryo]/tankMass$ + @dryDensity *= #$../ratioPPDDtoB9TM$ + costMultiplier = 0.7624 RESOURCE { name = LqdHydrogen - unitsPerKL = 868.32902 + unitsPerT = #$@B9_TANK_TYPE[LH2OCryo]/RESOURCE[LqdHydrogen]/unitsPerVolume$ + @unitsPerT /= #$@B9_TANK_TYPE[LH2OCryo]/tankMass$ } RESOURCE { name = Oxidizer - unitsPerKL = 57.8886 + unitsPerT = #$@B9_TANK_TYPE[LH2OCryo]/RESOURCE[Oxidizer]/unitsPerVolume$ + @unitsPerT /= #$@B9_TANK_TYPE[LH2OCryo]/tankMass$ } } TANK_TYPE_OPTION { - name = MethaOxi - dryDensity = 0.0909 - costMultiplier = 1.3 + name = #LOC_CryoTanks_switcher_fuel_lh2 + dryDensity = #$@B9_TANK_TYPE[LH2Cryo]/tankMass$ + @dryDensity *= #$../ratioPPDDtoB9TM$ + costMultiplier = 0.9047 + RESOURCE + { + name = LqdHydrogen + unitsPerT = #$@B9_TANK_TYPE[LH2Cryo]/RESOURCE[LqdHydrogen]/unitsPerVolume$ + @unitsPerT /= #$@B9_TANK_TYPE[LH2Cryo]/tankMass$ + } + } + TANK_TYPE_OPTION + { + name = #LOC_CryoTanks_switcher_fuel_methalox + dryDensity = #$@B9_TANK_TYPE[LMOx]/tankMass$ + @dryDensity *= #$../ratioPPDDtoB9TM$ + costMultiplier = 0.7624 RESOURCE { name = LqdMethane - unitsPerKL = 325.94933 + unitsPerT = #$@B9_TANK_TYPE[LMOx]/RESOURCE[LqdMethane]/unitsPerVolume$ + @unitsPerT /= #$@B9_TANK_TYPE[LMOx]/tankMass$ } RESOURCE { name = Oxidizer - unitsPerKL = 108.64977 + unitsPerT = #$@B9_TANK_TYPE[LMOx]/RESOURCE[Oxidizer]/unitsPerVolume$ + @unitsPerT /= #$@B9_TANK_TYPE[LMOx]/tankMass$ } } + TANK_TYPE_OPTION + { + name = #LOC_CryoTanks_switcher_fuel_methane + dryDensity = #$@B9_TANK_TYPE[LM]/tankMass$ + @dryDensity *= #$../ratioPPDDtoB9TM$ + costMultiplier = 0.8478 + RESOURCE + { + name = LqdMethane + unitsPerT = #$@B9_TANK_TYPE[LM]/RESOURCE[LqdMethane]/unitsPerVolume$ + @unitsPerT /= #$@B9_TANK_TYPE[LM]/tankMass$ + } + } + // Scale up all costMultiplier values as configured at the top + @TANK_TYPE_OPTION,* + { + @costMultiplier *= #$@CT_PROCEDURAL_TAX/priceMultiplier$ + } } - + MODULE { name = ModuleCryoTank @@ -73,70 +171,119 @@ } } -@PART[proceduralTankLiquid]:NEEDS[SMURFF&ProceduralParts&!RealFuels&!ModularFuelTanks]:FOR[CryoTanks] +// Prep work before SMURFF's patches run +@PART[procedural*Liquid]:NEEDS[SMURFF&ProceduralParts&!RealFuels&!ModularFuelTanks]:FOR[CryoTanks] { @MODULE[TankContentSwitcher] { - // This runs before SMURFF. - // Hydrogen is already patched well by SMURFF - @TANK_TYPE_OPTION[HydroOxi] + @TANK_TYPE_OPTION:HAS[@RESOURCE[LiquidFuel]&@RESOURCE[Oxidizer]] { - // 1/unitsPerT - lh2mass = 0.00001417 - @lh2mass *= #$RESOURCE[LqdHydrogen]/unitsPerKL$ + @name = Mixed + } + @TANK_TYPE_OPTION:HAS[@RESOURCE[LiquidFuel]&!RESOURCE[Oxidizer]] + { + @name = LiquidFuel + } + @TANK_TYPE_OPTION:HAS[!RESOURCE[LiquidFuel]&@RESOURCE[Oxidizer]] + { + @name = Oxidizer + } + @TANK_TYPE_OPTION:HAS[@RESOURCE[LqdHydrogen]&@RESOURCE[Oxidizer]] + { + @name = HydroOxi + // SMURFF has its own ideas about the LH2/Ox tank mass ratio + // ref: https://github.com/Kerbas-ad-astra/SMURFF/blob/505112a488b1ebf74ff655d4680f3b29f0d7fafd/GameData/SMURFF/SMURFF.cfg#L955 + // Therefore, reconfigure the LH2/Ox TANK_TYPE_OPTION to behave consistently with SMURFF's version of the LH2OCryo B9_TANK_TYPE + lh2mass = #$@B9_TANK_TYPE[LH2Cryo]/tankMass$ + @lh2mass *= #$@B9_TANK_TYPE[LH2OCryo]/RESOURCE[LqdHydrogen]/unitsPerVolume$ + @lh2mass /= #$@B9_TANK_TYPE[LH2Cryo]/RESOURCE[LqdHydrogen]/unitsPerVolume$ @lh2mass /= #$@SMURFFCONFIG/lh2zbofactor$ - - oxmass = 0.000625 - @oxmass *= #$RESOURCE[Oxidizer]/unitsPerKL$ + + oxmass = #$@B9_TANK_TYPE[OX]/tankMass$ + @oxmass *= #$@B9_TANK_TYPE[LH2OCryo]/RESOURCE[Oxidizer]/unitsPerVolume$ + @oxmass /= #$@B9_TANK_TYPE[OX]/RESOURCE[Oxidizer]/unitsPerVolume$ @oxmass /= #$@SMURFFCONFIG/lfofactor$ - - @dryDensity = #$lh2mass$ - @dryDensity += #$oxmass$ - - -lh2mass = delete - -oxmass = delete + + tankMassSMURFF = #$lh2mass$ + @tankMassSMURFF += #$oxmass$ + + @dryDensity = #$tankMassSMURFF$ + @dryDensity *= #$../ratioPPDDtoB9TM$ + @RESOURCE[LqdHydrogen] + { + @unitsPerT = #$@B9_TANK_TYPE[LH2OCryo]/RESOURCE[LqdHydrogen]/unitsPerVolume$ + @unitsPerT /= #$../tankMassSMURFF$ + } + @RESOURCE[Oxidizer] + { + @unitsPerT = #$@B9_TANK_TYPE[LH2OCryo]/RESOURCE[Oxidizer]/unitsPerVolume$ + @unitsPerT /= #$../tankMassSMURFF$ + } } - @TANK_TYPE_OPTION[MethaOxi] + @TANK_TYPE_OPTION:HAS[@RESOURCE[LqdHydrogen]&!RESOURCE[Oxidizer]] { - // (B9_TANK_TYPE[LM]/tankMass) - lh2mass = 0.000070935 - @lh2mass *= #$RESOURCE[LqdMethane]/unitsPerKL$ - @lh2mass /= #$@SMURFFCONFIG/lfofactor$ - - oxmass = 0.000625 - @oxmass *= #$RESOURCE[Oxidizer]/unitsPerKL$ - //TODO: maybe a factor in between LFO and LH2 should be used, isnt this too good? - @oxmass /= #$@SMURFFCONFIG/lfofactor$ - - @dryDensity = #$lh2mass$ - @dryDensity += #$oxmass$ - - -lh2mass = delete - -oxmass = delete + @name = LqdHydrogen } - } -} - -// Rename HydroOxi back after SMURFF runs -@PART[proceduralTankLiquid]:NEEDS[SMURFF&ProceduralParts&!RealFuels&!ModularFuelTanks]:AFTER[zzz_SMURFF] -{ - @MODULE[TankContentSwitcher] - { - @TANK_TYPE_OPTION[HydroOxi] + @TANK_TYPE_OPTION:HAS[@RESOURCE[LqdMethane]&@RESOURCE[Oxidizer]] { - @name = LqdHydrogen+Oxidizer + @name = MethaOxi + @dryDensity /= #$@SMURFFCONFIG/lfofactor$ + @RESOURCE[LqdMethane] + { + @unitsPerT *= #$@SMURFFCONFIG/lfofactor$ + } + @RESOURCE[Oxidizer] + { + @unitsPerT *= #$@SMURFFCONFIG/lfofactor$ + } + } + @TANK_TYPE_OPTION:HAS[@RESOURCE[LqdMethane]&!RESOURCE[Oxidizer]] + { + @name = LqdMethane + @dryDensity /= #$@SMURFFCONFIG/lfofactor$ + @RESOURCE[LqdMethane] + { + @unitsPerT *= #$@SMURFFCONFIG/lfofactor$ + } } } } -// Rename HydroOxi back in case SMURFF was not installed -@PART[proceduralTankLiquid]:NEEDS[!SMURFF&ProceduralParts&!RealFuels&!ModularFuelTanks]:FOR[CryoTanks] +// Rename TANK_TYPE_OPTIONs and clean up after SMURFF runs +@PART[procedural*Liquid]:NEEDS[SMURFF&ProceduralParts&!RealFuels&!ModularFuelTanks]:AFTER[zzz_SMURFF] { @MODULE[TankContentSwitcher] { - @TANK_TYPE_OPTION[HydroOxi] + @TANK_TYPE_OPTION:HAS[@RESOURCE[LiquidFuel]&@RESOURCE[Oxidizer]] + { + @name = #LOC_CryoTanks_switcher_fuel_lfox + } + @TANK_TYPE_OPTION:HAS[@RESOURCE[LiquidFuel]&!RESOURCE[Oxidizer]] + { + @name = #LOC_CryoTanks_switcher_fuel_lf + } + @TANK_TYPE_OPTION:HAS[!RESOURCE[LiquidFuel]&@RESOURCE[Oxidizer]] + { + @name = #LOC_CryoTanks_switcher_fuel_ox + } + @TANK_TYPE_OPTION:HAS[@RESOURCE[LqdHydrogen]&@RESOURCE[Oxidizer]] + { + @name = #LOC_CryoTanks_switcher_fuel_lh2ox + !lh2mass = delete + !oxmass = delete + !tankMassSMURFF = delete + } + @TANK_TYPE_OPTION:HAS[@RESOURCE[LqdHydrogen]&!RESOURCE[Oxidizer]] + { + @name = #LOC_CryoTanks_switcher_fuel_lh2 + } + @TANK_TYPE_OPTION:HAS[@RESOURCE[LqdMethane]&@RESOURCE[Oxidizer]] + { + @name = #LOC_CryoTanks_switcher_fuel_methalox + } + @TANK_TYPE_OPTION:HAS[@RESOURCE[LqdMethane]&!RESOURCE[Oxidizer]] { - @name = LqdHydrogen+Oxidizer + @name = #LOC_CryoTanks_switcher_fuel_methane } } } From cc9d782943856c4166a09079cdd3b08931560ca3 Mon Sep 17 00:00:00 2001 From: Scialytic <11653155+Scialytic@users.noreply.github.com> Date: Sat, 12 Feb 2022 19:40:32 -0500 Subject: [PATCH 4/8] Fix tank type order when using RationalResources --- GameData/CryoTanks/Patches/CryoTanksProceduralFuelTanks.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameData/CryoTanks/Patches/CryoTanksProceduralFuelTanks.cfg b/GameData/CryoTanks/Patches/CryoTanksProceduralFuelTanks.cfg index ff29f95..3e5e38c 100644 --- a/GameData/CryoTanks/Patches/CryoTanksProceduralFuelTanks.cfg +++ b/GameData/CryoTanks/Patches/CryoTanksProceduralFuelTanks.cfg @@ -17,7 +17,7 @@ CT_PROCEDURAL_TAX !CT_PROCEDURAL_TAX:LAST[CryoTanks] {} -@PART[procedural*Liquid]:NEEDS[ProceduralParts&!RealFuels&!ModularFuelTanks]:FOR[CryoTanks] +@PART[procedural*Liquid]:NEEDS[CryoTanks&ProceduralParts&!RealFuels&!ModularFuelTanks] { @MODULE[TankContentSwitcher] { From d52a6adc0f856a59bebd74c11774a5c37b95acf3 Mon Sep 17 00:00:00 2001 From: Scialytic <11653155+Scialytic@users.noreply.github.com> Date: Sat, 12 Feb 2022 19:51:07 -0500 Subject: [PATCH 5/8] Update CryoTanksProceduralWings.cfg --- .../Patches/CryoTanksProceduralWings.cfg | 102 ++++++++++++++++-- 1 file changed, 96 insertions(+), 6 deletions(-) diff --git a/GameData/CryoTanks/Patches/CryoTanksProceduralWings.cfg b/GameData/CryoTanks/Patches/CryoTanksProceduralWings.cfg index 9406c04..3b78f11 100644 --- a/GameData/CryoTanks/Patches/CryoTanksProceduralWings.cfg +++ b/GameData/CryoTanks/Patches/CryoTanksProceduralWings.cfg @@ -1,8 +1,59 @@ -@ProceduralWingFuelSetups:NEEDS[CryoTanks&B9_Aerospace_WingStuff|pWings&!ModularFuelTanks] +// Procedural Wings Patch +// Most recent author: Scialytic + +// Nuke the existing FuelSets for ordering purposes (PWing's selector only provides "Next" so order is important for player convenience) +// Therefore, run ASAP to avoid causing problems for any other mods/patches that add FuelSets +@ProceduralWingFuelSetups:FIRST:NEEDS[CryoTanks&B9_Aerospace_WingStuff|pWings&!ModularFuelTanks] { + !FuelSet,* {} + FuelSet + { + name = Str + } + FuelSet + { + name = #LOC_CryoTanks_switcher_fuel_lf + Resource + { + name = LiquidFuel + ratio = 1 + } + } + FuelSet + { + name = #LOC_CryoTanks_switcher_fuel_lfox + Resource + { + name = LiquidFuel + ratio = 9 + } + Resource + { + name = Oxidizer + ratio = 11 + } + } + FuelSet + { + name = #LOC_CryoTanks_switcher_fuel_ox + Resource + { + name = Oxidizer + ratio = 1 + } + } + FuelSet + { + name = Mono + Resource + { + name = MonoPropellant + ratio = 1 + } + } FuelSet { - name = LH2 + name = #LOC_CryoTanks_switcher_fuel_lh2 Resource { name = LqdHydrogen @@ -11,11 +62,34 @@ } FuelSet { - name = LH2O + name = #LOC_CryoTanks_switcher_fuel_lh2ox Resource { name = LqdHydrogen - ratio = 15 + ratio = 3 // Yes, 3 not 15. Don't worry, it will be 15:1 units in game. LqdHydrogen has "volume = 1" in CommunityResourcePack's resource definitions, which changes how PWings calculates unitsPerVolume. + } // see: https://github.com/B9-Procedural-Wings/B9-PWings-Modified/blob/baf739d7ee217622710ce668825bf4db030fcc39/B9_PWings_Fork/WingTankResource.cs#L28 for details. + Resource + { + name = Oxidizer + ratio = 1 + } + } + FuelSet + { + name = #LOC_CryoTanks_switcher_fuel_methane + Resource + { + name = LqdMethane + ratio = 1 + } + } + FuelSet + { + name = #LOC_CryoTanks_switcher_fuel_methalox + Resource + { + name = LqdMethane + ratio = 0.6 // 3/5 is needed here because LqdMethane is 1 L/Unit whereas stock fuels are 5 L/Unit. } Resource { @@ -25,18 +99,34 @@ } } +// Unfortunately LqdMethane lacks "volume = 1" in CommunityResourcePack's resource definitions. That means PWings assumes it's a 5 L/Unit resource. +// Carrying only 20% of the fuel they should be would make the LqdMethane options practically useless. +// AFAICS there's no other way to communicate this info to PWings. +@RESOURCE_DEFINITION[LqdMethane] +{ + volume = 1 +} + @PART[B9_Aero_Wing_Procedural_TypeA,Proceduralwing*]:NEEDS[CryoTanks&!ModularFuelTanks] { MODULE { name = ModuleCryoTank - CoolingCost = 0.09 - CoolingEnabled = False + // in Ec per 1000 units per second + CoolingEnabled = True BOILOFFCONFIG { FuelName = LqdHydrogen // in % per hr BoiloffRate = 0.05 + CoolingCost = 0.09 + } + BOILOFFCONFIG + { + FuelName = LqdMethane + // in % per hr + BoiloffRate = 0.005 + CoolingCost = 0.045 } } } From b3dae823bfd7fb12f06d4ece539a17d18fedf165 Mon Sep 17 00:00:00 2001 From: Scialytic <11653155+Scialytic@users.noreply.github.com> Date: Sat, 12 Feb 2022 21:17:13 -0500 Subject: [PATCH 6/8] minor future-proofing --- GameData/CryoTanks/Patches/CryoTanksProceduralWings.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameData/CryoTanks/Patches/CryoTanksProceduralWings.cfg b/GameData/CryoTanks/Patches/CryoTanksProceduralWings.cfg index 3b78f11..b885a37 100644 --- a/GameData/CryoTanks/Patches/CryoTanksProceduralWings.cfg +++ b/GameData/CryoTanks/Patches/CryoTanksProceduralWings.cfg @@ -104,7 +104,7 @@ // AFAICS there's no other way to communicate this info to PWings. @RESOURCE_DEFINITION[LqdMethane] { - volume = 1 + %volume = 1 } @PART[B9_Aero_Wing_Procedural_TypeA,Proceduralwing*]:NEEDS[CryoTanks&!ModularFuelTanks] From fb266fcbb730ed54d0218517ba3124e09c09c850 Mon Sep 17 00:00:00 2001 From: ChrisAdderley Date: Tue, 20 Sep 2022 22:23:36 -0700 Subject: [PATCH 7/8] Fix hydrogen tank shader --- .../hydrogen-inline/hydrogen-375-2.mu | Bin 913883 -> 913843 bytes .../CryoTanks/Versioning/CryoTanks.version | 4 ++-- changelog.txt | 4 ++++ readme.txt | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/GameData/CryoTanks/Parts/HydrogenTanks/hydrogen-inline/hydrogen-375-2.mu b/GameData/CryoTanks/Parts/HydrogenTanks/hydrogen-inline/hydrogen-375-2.mu index 52ad31f1b985d680298d11e4ea08a27f676c781c..2cfe599532eac81995217068316a36c479a58e63 100644 GIT binary patch delta 66 zcmccp*nIP2^M)427N!>F7M2#)7Pc1l7LFFq7OocV7M?AF7M2#)7Pc1l7LFFq7OocV7M?AgG0P1ZSD*ylh diff --git a/GameData/CryoTanks/Versioning/CryoTanks.version b/GameData/CryoTanks/Versioning/CryoTanks.version index 8e37fc9..8c9599b 100644 --- a/GameData/CryoTanks/Versioning/CryoTanks.version +++ b/GameData/CryoTanks/Versioning/CryoTanks.version @@ -6,14 +6,14 @@ { "MAJOR":1, "MINOR":6, - "PATCH":4, + "PATCH":5, "BUILD":0 }, "KSP_VERSION": { "MAJOR":1, "MINOR":12, - "PATCH":2 + "PATCH":3 }, "KSP_VERSION_MIN":{ "MAJOR":1, diff --git a/changelog.txt b/changelog.txt index 76069dd..b14e8ae 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +v1.6.5 +------ +- Fixed shader on 3.75m hydrogen tank + v1.6.4 ------ - Bugfixes diff --git a/readme.txt b/readme.txt index 20845cc..abb11b0 100644 --- a/readme.txt +++ b/readme.txt @@ -1,5 +1,5 @@ ================= -Cryo Tanks v1.6.3 +Cryo Tanks v1.6.5 ================= A mod pack for Kerbal Space Program, specifically supporting my other mods Kerbal Atomics (https://github.com/ChrisAdderley/KerbalAtomics) and Cryogenic Engines (https://github.com/ChrisAdderley/CryoEngines), dealing with cryogenic fuels, their storage and their properties. From 4db9d8bb7f72d4e26a2d55790c6047c08d3f6c9b Mon Sep 17 00:00:00 2001 From: ChrisAdderley Date: Tue, 20 Sep 2022 22:23:36 -0700 Subject: [PATCH 8/8] Fix hydrogen tank shader --- .../hydrogen-inline/hydrogen-375-2.mu | Bin 913883 -> 913843 bytes .../CryoTanks/Versioning/CryoTanks.version | 4 ++-- changelog.txt | 5 +++++ readme.txt | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/GameData/CryoTanks/Parts/HydrogenTanks/hydrogen-inline/hydrogen-375-2.mu b/GameData/CryoTanks/Parts/HydrogenTanks/hydrogen-inline/hydrogen-375-2.mu index 52ad31f1b985d680298d11e4ea08a27f676c781c..2cfe599532eac81995217068316a36c479a58e63 100644 GIT binary patch delta 66 zcmccp*nIP2^M)427N!>F7M2#)7Pc1l7LFFq7OocV7M?AF7M2#)7Pc1l7LFFq7OocV7M?AgG0P1ZSD*ylh diff --git a/GameData/CryoTanks/Versioning/CryoTanks.version b/GameData/CryoTanks/Versioning/CryoTanks.version index 8e37fc9..8c9599b 100644 --- a/GameData/CryoTanks/Versioning/CryoTanks.version +++ b/GameData/CryoTanks/Versioning/CryoTanks.version @@ -6,14 +6,14 @@ { "MAJOR":1, "MINOR":6, - "PATCH":4, + "PATCH":5, "BUILD":0 }, "KSP_VERSION": { "MAJOR":1, "MINOR":12, - "PATCH":2 + "PATCH":3 }, "KSP_VERSION_MIN":{ "MAJOR":1, diff --git a/changelog.txt b/changelog.txt index 76069dd..8582f38 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,8 @@ +v1.6.5 +------ +- Fixed shader on 3.75m hydrogen tank +- Update Procedural Parts patches (Scialytic) + v1.6.4 ------ - Bugfixes diff --git a/readme.txt b/readme.txt index 20845cc..abb11b0 100644 --- a/readme.txt +++ b/readme.txt @@ -1,5 +1,5 @@ ================= -Cryo Tanks v1.6.3 +Cryo Tanks v1.6.5 ================= A mod pack for Kerbal Space Program, specifically supporting my other mods Kerbal Atomics (https://github.com/ChrisAdderley/KerbalAtomics) and Cryogenic Engines (https://github.com/ChrisAdderley/CryoEngines), dealing with cryogenic fuels, their storage and their properties.