Skip to content

Commit

Permalink
Merge pull request #13 from KSP-RO/HIAD
Browse files Browse the repository at this point in the history
Add adjustable HIAD
  • Loading branch information
Capkirk123 authored May 9, 2024
2 parents a7ed260 + 258cbb0 commit c748aee
Show file tree
Hide file tree
Showing 6 changed files with 285 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
40 changes: 40 additions & 0 deletions GameData/ROHeatshields/Data/ModelData-Heatshields.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
35 changes: 35 additions & 0 deletions GameData/ROHeatshields/Data/TextureSets-Heathshields.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
7 changes: 7 additions & 0 deletions GameData/ROHeatshields/Heatshield-Presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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$
Expand Down Expand Up @@ -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
Expand All @@ -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] {}
Expand Down
192 changes: 192 additions & 0 deletions GameData/ROHeatshields/Parts/AdjustableHIAD.cfg
Original file line number Diff line number Diff line change
@@ -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
}
}
9 changes: 9 additions & 0 deletions GameData/ROHeatshields/Parts/Upgrade.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit c748aee

Please sign in to comment.