From 258cbb0afaaaff110bcac42284dab64dcd18612b Mon Sep 17 00:00:00 2001 From: Capkirk123 Date: Sat, 30 Mar 2024 00:57:29 -0400 Subject: [PATCH] Add adjustable HIAD Add adjustable inflatable heat shield with squad and restock models --- .../ROHeatshield.restockwhitelist | 2 + .../Data/ModelData-Heatshields.cfg | 40 ++++ .../Data/TextureSets-Heathshields.cfg | 35 ++++ GameData/ROHeatshields/Heatshield-Presets.cfg | 7 + .../ROHeatshields/Parts/AdjustableHIAD.cfg | 192 ++++++++++++++++++ GameData/ROHeatshields/Parts/Upgrade.cfg | 9 + 6 files changed, 285 insertions(+) create mode 100644 GameData/ROHeatshields/Parts/AdjustableHIAD.cfg diff --git a/GameData/ROHeatshields/Compatibility/ROHeatshield.restockwhitelist b/GameData/ROHeatshields/Compatibility/ROHeatshield.restockwhitelist index 6838e78..e82736f 100644 --- a/GameData/ROHeatshields/Compatibility/ROHeatshield.restockwhitelist +++ b/GameData/ROHeatshields/Compatibility/ROHeatshield.restockwhitelist @@ -1,2 +1,4 @@ Squad/Parts/Aero/HeatShield/HeatShield1 Squad/Parts/Aero/HeatShield/heatshield +Squad/Parts/Aero/InflatableHeatShield/HeatShield +Squad/Parts/Aero/InflatableHeatShield/HeatShield_NRM diff --git a/GameData/ROHeatshields/Data/ModelData-Heatshields.cfg b/GameData/ROHeatshields/Data/ModelData-Heatshields.cfg index d27905d..2643121 100644 --- a/GameData/ROHeatshields/Data/ModelData-Heatshields.cfg +++ b/GameData/ROHeatshields/Data/ModelData-Heatshields.cfg @@ -76,3 +76,43 @@ ROL_MODEL:NEEDS[ReStock] disableTransform = HeatShield125Brown disableTransform = HeatShield125Red } + +ROL_MODEL +{ + name = HIAD-Stock + title = Squad + description = Squad Style HIAD + modelName = Squad/Parts/Aero/InflatableHeatShield/HeatShield + orientation = CENTRAL + diameter = 10.0 + upperDiameter = 10.0 + lowerDiameter = 10.0 + minVerticalScale = 0.5 + maxVerticalScale = 1.5 + mass = 0.0 + cost = 1 + height = 2.1 + verticalOffset = -0.350 + volume = 0.0 + disableTransform = Fairing +} + +ROL_MODEL:NEEDS[ReStock] +{ + name = HIAD-ReStock + title = ReStock + description = ReStock Style HIAD + modelName = ReStock/Assets/Aero/restock-heatshield-inflatable-1 + orientation = CENTRAL + diameter = 10.0 + upperDiameter = 10.0 + lowerDiameter = 10.0 + minVerticalScale = 0.5 + maxVerticalScale = 1.5 + mass = 0.0 + cost = 1 + height = 2.1 + verticalOffset = -0.350 + volume = 0.0 + disableTransform = Fairing +} diff --git a/GameData/ROHeatshields/Data/TextureSets-Heathshields.cfg b/GameData/ROHeatshields/Data/TextureSets-Heathshields.cfg index c247110..35043df 100644 --- a/GameData/ROHeatshields/Data/TextureSets-Heathshields.cfg +++ b/GameData/ROHeatshields/Data/TextureSets-Heathshields.cfg @@ -87,3 +87,38 @@ } } } + +@ROL_MODEL[HIAD-Stock]:FOR[ROHeatshields] +{ + KSP_TEXTURE_SET + { + name = ROH-HIAD-Stock + title = Squad + recolorable = false + + MATERIAL + { + shader = TU/Metallic + texture = _MainTex, Squad/Parts/Aero/InflatableHeatShield/HeatShield + texture = _BumpMap, Squad/Parts/Aero/InflatableHeatShield/HeatShield_NRM + keyword = TU_STOCK_SPEC + } + } +} +@ROL_MODEL[HIAD-ReStock]:NEEDS[ReStock]:FOR[ROHeatshields] +{ + KSP_TEXTURE_SET + { + name = ROH-HIAD-ReStock + title = ReStock + recolorable = false + + MATERIAL + { + shader = TU/Metallic + texture = _MainTex, ReStock/Assets/Aero/restock-heatshield-inflatable-1 + texture = _BumpMap, ReStock/Assets/Aero/restock-heatshield-inflatable-1-n + keyword = TU_STOCK_SPEC + } + } +} diff --git a/GameData/ROHeatshields/Heatshield-Presets.cfg b/GameData/ROHeatshields/Heatshield-Presets.cfg index 5ff3d68..f366543 100644 --- a/GameData/ROHeatshields/Heatshield-Presets.cfg +++ b/GameData/ROHeatshields/Heatshield-Presets.cfg @@ -4,6 +4,7 @@ PART { name = ROHS_PresetTransfer_EarlyLunar } PART { name = ROHS_PresetTransfer_Gemini } PART { name = ROHS_PresetTransfer_Mercury } PART { name = ROHS_PresetTransfer_Heatsink } +PART { name = ROHS_PresetTransfer_Inflatable } @PART[ROHS_PresetTransfer_*]:BEFORE[RealismOverhaul_HeatShield] { heatShieldTag = #$name$ @@ -42,6 +43,11 @@ ROHS_PRESET description = Rated for interplanetary reentries. } ROHS_PRESET +{ + name = Inflatable + description = Rated for Mars or very gentle Earth reentries. +} +ROHS_PRESET { name = default description = base part @@ -53,6 +59,7 @@ ROHS_PRESET @ROHS_PRESET[GeminiHS]:AFTER[RealismOverhaul_HeatShield] { #@PART[ROHS_PresetTransfer_Gemini] {} } @ROHS_PRESET[EarlyLunarHS]:AFTER[RealismOverhaul_HeatShield] { #@PART[ROHS_PresetTransfer_EarlyLunar] {} } @ROHS_PRESET[LunarHS]:AFTER[RealismOverhaul_HeatShield] { #@PART[ROHS_PresetTransfer_Lunar] {} } +@ROHS_PRESET[Inflatable]:AFTER[RealismOverhaul_HeatShield] { #@PART[ROHS_PresetTransfer_Inflatable] {} } !PART[ROHS_PresetTransfer_*]:AFTER[RealismOverhaul_HeatShield] {} diff --git a/GameData/ROHeatshields/Parts/AdjustableHIAD.cfg b/GameData/ROHeatshields/Parts/AdjustableHIAD.cfg new file mode 100644 index 0000000..621fe20 --- /dev/null +++ b/GameData/ROHeatshields/Parts/AdjustableHIAD.cfg @@ -0,0 +1,192 @@ +// =========================================================================== +// All work here was originally from Shadowmage and SSTU. I have adapted their +// work to be more usable for our purposes in Realism Overhaul, but all credit +// should be given to Shadowmage for the great work! +// =========================================================================== + +PART +{ + module = Part + name = ROH-AdjustableHIAD + author = Shadowmage, Pap + + RSSROConfig:NEEDS[RealismOverhaul] = True + + // ============================================================================ + // Model and Dimensions + // ============================================================================ + + MODEL + { + model = ROLib/Assets/EmptyProxyModel + } + + scale = 1.0 + rescaleFactor = 1.0 + + //node_stack_mid = 0.0, 0.34, 0.0, 0.0, 1.0, 0.0, 1 + node_stack_bottom = 0.0, 1.4, 0.0, 0.0, 1.0, 0.0, 2 + node_stack_top = 0.0, -0.9, 0.0, 0.0, -1.0, 0.0, 2 + + // stack, srfAttach, allowStack, allowSrfAttach, allowCollision + attachRules = 1,0,1,1,0 + + // --- FX definitions --- + fx_gasBurst_white = 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, decouple + sound_decoupler_fire = decouple + + // ============================================================================ + // Title, Description, Category, Techs + // ============================================================================ + + title = Adjustable HIAD + manufacturer = Generic + description = This hypersonic inflatable aerodynamic decelerator can have its diameter and configuration changed to fit many different craft sizes and reentry profiles. + + tags = ablate, reentry, heat, shield, heatshield, procedural + + mass = 0.01 + + category = Thermal + + TechRequired = start + cost = 150 + entryCost = 1 + + maxTemp = 1 + skinMaxTemp = 2 + leaveTemp = true + + // ============================================================================ + // DO NOT CHANGE (Normally) + // ============================================================================ + + crashTolerance = 10 + breakingForce = 200 + breakingTorque = 200 + fuelCrossFeed = false + subcategory = 0 + emissiveConstant = 0.6 + thermalMassModifier = 1.0 + skinMassPerArea = 4 + buoyancy = 0.95 + + // ============================================================================ + // Modules and Resources + // ============================================================================ + + MODULE + { + name = ModuleROHeatshield + heatShieldType = Inflatable + presets = Inflatable + } + + MODULE + { + name = ModuleROTank + + // Dimension Settings + diameterLargeStep = 1.0 + diameterSmallStep = 0.1 + diameterSlideStep = 0.001 + minDiameter = 0.5 + maxDiameter = 100.0 + + // V.Scale-Mass-Cost + enableVScale = true + scaleMass = true + scaleCost = true + + // Attach Node Settings + topNodeName = top + bottomNodeName = bottom + noseNodeNames = none + coreNodeNames = none + mountNodeNames = none + topInterstageNodeName = none + bottomInterstageNodeName = mid + + // Fairing Settings + topFairingIndex = -1 + bottomFairingIndex = -1 + + // Default Values + currentDiameter = 10.0 + currentVariant = Heatshield + currentNose = Model-None + currentCore = HIAD-Stock + currentMount = Model-None + currentNoseTexture = default + currentCoreTexture = default + currentMountTexture = default + + CORE + { + variant = Heatshield + model = HIAD-Stock + model:NEEDS[ReStock] = HIAD-ReStock + } + + NOSE + { + model = Model-None + } + + MOUNT + { + model = Model-None + } + } + + MODULE + { + name = ModuleDecouple + ejectionForce = 100 + isOmniDecoupler = true + menuName = Jettison Heat Shield + stagingEnabled = False + stagingEnableText = HS Jettison Not Staged + stagingDisableText = HS Jettison Staged + } + + //ReStock and Squad use different animation names + //So, make two animate modules. It's not pretty, but it works... + MODULE + { + name = ModuleAnimateGeneric + animationName = InflatableHS + isOneShot = false + startEventGUIName = Inflate Heat Shield (Squad) + endEventGUIName = Deflate Heat Shield (Squad) + actionGUIName = Inflate Heat Shield (Squad) + allowAnimationWhileShielded = False + restrictedNode = top + disableAfterPlaying = true + } + MODULE + { + name = ModuleAnimateGeneric + animationName = Inflate + isOneShot = false + startEventGUIName = Inflate Heat Shield (ReStock) + endEventGUIName = Deflate Heat Shield (ReStock) + actionGUIName = Inflate Heat Shield (ReStock) + allowAnimationWhileShielded = False + restrictedNode = top + disableAfterPlaying = true + } + + MODULE + { + name = ModuleToggleCrossfeed + toggleFlight = true + toggleEditor = true + crossfeedStatus = false + } + + MODULE + { + name = SSTURecolorGUI + } +} diff --git a/GameData/ROHeatshields/Parts/Upgrade.cfg b/GameData/ROHeatshields/Parts/Upgrade.cfg index dc93959..7a75310 100644 --- a/GameData/ROHeatshields/Parts/Upgrade.cfg +++ b/GameData/ROHeatshields/Parts/Upgrade.cfg @@ -43,3 +43,12 @@ PARTUPGRADE title = Lunar Heatshields description = Unlocks lunar and interplanetary capable heatshield technology } + +PARTUPGRADE +{ + name = Inflatable + partIcon = ROH-AdjustableHIAD + techRequired = engineering101 + title = Hypersonic Inflatable Aerodynamic Decelerator + description = Unlocks hypersonic inflatable aerodynamic decelerator technology +}