ChrisViral / RealChute

Realistic parachutes for KSP
https://forum.kerbalspaceprogram.com/topic/52931-1
Other
47 stars 39 forks source link

Allow multiple items in capName field of PARACHUTE nodes #80

Closed sumghai closed 6 years ago

sumghai commented 6 years ago

Not sure how feasible this is, but would it be possible to modify the capName field of PARACHUTE nodes to support multiple mesh names in a comma-delimited list, instead of a single string value?

When a parachute is deployed, the method would look through and eject each mesh in the list, and if the mesh cannot be found, it will be assumed that it was ejected earlier by another parachute.

Rationale / Use case

As part of a revamp of my SDHI SMS mod, I designed a parachute-equipped docking port that uses two PARACHUTE nodes:

MODULE
    {   
        name = RealChuteModule
        caseMass = 0.35
        timer = 0
        mustGoDown = true
        cutSpeed = 0.5
        spareChutes = 1
        secondaryChute = true

        // Main chute
        PARACHUTE
        {
            material = Nylon
            capName = cap_mains
            parachuteName = main_chute_baseTransform
            preDeploymentAnimation = SDHI_Parachute_Main_semi_deploy
            deploymentAnimation = SDHI_Parachute_Main_full_deploy
            preDeployedDiameter = 3
            deployedDiameter = 55
            minIsPressure = false
            minDeployment = 1998
            deploymentAlt = 700
            cutAlt = -1
            preDeploymentSpeed = 2
            deploymentSpeed = 6
        }

        // Drogue chute
        PARACHUTE
        {
            material = Kevlar
            capName = cap_cover
            parachuteName = drogue_chute_baseTransform
            preDeploymentAnimation = SDHI_Parachute_Drogue_semi_deploy
            deploymentAnimation = SDHI_Parachute_Drogue_full_deploy
            preDeployedDiameter = 5
            deployedDiameter = 10
            minIsPressure = false
            minDeployment = 12500
            deploymentAlt = 2500
            cutAlt = 2000
            preDeploymentSpeed = 1
            deploymentSpeed = 4
        }
    }

cap_mains is nested inside cap_cover, as it visually makes sense for the outer casing to come off when the drogues are deployed, followed by the inner parachute bags when the mains are deployed. This setup currently works fine for most reentry-to-landing scenarios.

However, if the parachutes are deployed when the altitude is too low to deploy drogues (such as pad aborts with an Escape Tower), which results in the visually jarring situation of main parachutes poking out of the still-intact outer casing.

As an attempted workaround, I tried tuning the deployment altitudes for the drogues to work at lower altitude, but this negates their usefulness at the usual higher altitudes during normal reentry through to landing.

Therefore, if my feature request was implemented, then I can do this:

        // Main chute
        PARACHUTE
        {
            material = Nylon
            capName = cap_cover, cap_mains
            parachuteName = main_chute_baseTransform
            [...snip...]
        }

        // Drogue chute
        PARACHUTE
        {
            material = Kevlar
            capName = cap_cover
            parachuteName = drogue_chute_baseTransform
            [...snip...]
        }
    }

Essentially, the main chute would optionally eject both the outer casing and the main parachute bag, even if the drogues were never deployed. And if the drogues were deployed earlier, then the mains would eject just the main parachute bag.

@StupidChris, @Starwaster - thoughts?

ChrisViral commented 6 years ago

Doable, but will transpose to RC2 as talked about privately. Will keep open though.

ChrisViral commented 6 years ago

Will be fixed In RC2, closing