Jump to content

[WIP] RealChute parachute systems - development thread v0.3.3


stupid_chris

Recommended Posts

RealChute Parachute Systems development thread

Alright, so I've been wanting to go back to C# for a while and thought modding KSP would be a nice way to do it. The first idea that came to me and that was a thing annoying me a lot about the game is how parachute works. So I thought I might as well go and completely redo them!

Javascript is disabled. View full album

Release thread

Features:

  • Gradual deployment: The chutes deploy gradually over a given amount of time following an exponential function to have a more realistic deployment and to prevent sudden +15Gs, it can even hold on at 4x time warp!
  • Completely reworked deployment clauses: Chutes now deploy in dramatically different conditions. Parachutes can now be deployed either according to atmospheric density or altitude! Parachutes will also not deploy "on hold" in space or where you can't deploy them like on the ground when staged, but they can be manually armed to be on hold!. You can also set an autocut at a certain altitude to cut certain chutes while other deploy!
  • Parachutes on the ground: Parachutes will not autocut anymore if you come to a near stop in mid air or as soon as you touch the ground, allowing for drag chutes for planes!
  • Parachutes return to staging: Once a parachute is cut, if you repack it with a Kerbal, the part can be reactivated with the staging list by putting it in a further stage!
  • New type of parachutes: alongside main and drogue chutes now comes along drag chutes, who deploy at really low altitude to help airplanes come to a stop when landing!
  • Fully customizable: You can play with the values of the parachutes yourself to edit them how you like them! Modders can also add the plugin to their packs and make their parachutes use the plugin!
  • Two parachutes on one part: Tired of adding both drogues and main parachutes on your ship? What about having both of them in one single part, without the bugginess than the stock parachute module gives? RealChute now supports having more than one parachute on the part, and makes them work both simultaneously!
  • Custom parts: Thanks to sumghai, this pack now has it's very own parts! you have a selection of 15 chutes to use for any parachute need you may have!
  • Vessel hangs from the parachute: When deploying a parachute, it will hang from the parachute directly, even if it's a nose parachute!

Known issues:

No know issues right now. If you find anything, write it in the thread or PM me with as much information as you can. A video is great for example.

PartModule code:

MODULE
{
name = RealChuteModule
cutSpeed = 0.5 //Speed at which the parachute will autocut when on the ground
material = Nylon //Material of the parachute
caseMass = 0.3 //Mass of the parachute case (what you would put at the "mass = xx" line (put it there too))
timer = 0 //Time before deployment after the part has been activated in seconds
mustGoDown = true //Whether or not the craft has to be going downwards to deploy (true/false)
spareChutes = 5 //Number of times a parachute can be repacked (set to -1 to remove this limit)
reverseOrientation = false //Only put this line if you reversed the orientation of the parachute transform, else do not include this line (true = reversed)
secondaryChute = true //Whether or not there are two chutes on the part (needs double the elements on the model)

//Main chute
capName = cap //String name of the cap of the main parachute
parachuteName = canopy //String name of the canopy of the main parachute
preDeploymentAnimation = preDeploy //String name of the predeployment animation of the main parachute
deploymentAnimation = fullyDeploy //String name of the deployment animation of the main parachute
preDeployedDiameter = 2 //Drag of the main parachute on predeployment
deployedDiameter = 50 //Drag of the main parachute on full deployment
minIsPressure = false //Whether the value of minDeployment is altitude or pressure (true/false)
minDeployment = 40000 //Minimal altitude or pressure to deploy the main parachute
deploymentAlt = 700 //Altitude at which the main parachute will fully deploy
cutAlt = -1 //Altitude at which the main parachute will automatically cut (set to -1 to remove this feature)
preDeploymentSpeed = 2 //Speed of the predeployment of the main parachute in seconds
deploymentSpeed = 6 //Speed of the deployment of the main parachute in seconds

//Secondary chute
secCapName = sec_cap //String name of the cap of the secondary parachute
secParachuteName = sec_canopy //String name of the canopy of the secondary parachute
secPreDeploymentAnimation = secPreDeploy //String name of the predeployment animation of the secondary parachute
secDeploymentAnimation = secFullyDeploy //String name of the deployment animation of the secondary parachute
secPreDeployedDiameter = 5 //Drag on predeployment of the secondary parachute
secDeployedDiameter = 10 //Drag on full deployment of the secondary parachute
secMinIsPressure = false //Whether the value of secMinDeployment is pressure or altitude (true/false)
secMinDeploymentAlt = 45000 //Minimal altitude or pressure to deploy the secondary parachute
secDeploymentAlt = 2500 //Altitude at which the secondary parachute will fully deploy
secCutAlt = -1 //Altitude at which the secondary parachute will automatically cut (set to -1 to remove this feature)
secPreDeploymentSpeed = 1 //Speed of the predeployment of the secondary parachute in seconds
secDeploymentSpeed = 4 //Speed of the deployment of the secondary parachute in seconds
}

Code of MATERIAL nodes:

MATERIAL
{
name = Nylon //Name of the material
areaDensity = 0.000067 //Area density of the material (t/m²)
dragCoefficient = 1 //Drag coefficient of the material (should be between 0.5 and 2)
}

Code of the EFFECTS nodes:

EFFECTS
{
rcpredeploy //predeploy sound
{
AUDIO
{
channel = Ship
clip = sound_parachute_deploy
volume = 1
}
}

rcdeploy //deploy sound
{
AUDIO
{
channel = Ship
clip = sound_parachute_single
volume = 1
}
}

rccut //cut sound
{
AUDIO
{
channel = Ship
clip = RealChute/Sounds/sound_parachute_cut
volume = 1
}
}

rcrepack //repack sound
{
AUDIO
{
channel = Ship
clip = RealChute/Sounds/sound_parachute_repack
volume = 1
}
}
}

Roadmap:

v1.0

  • Add a window in the editor to allow in game editing of the stats of each parts and allow the modification of the drag of a parachute according to the payload it will carry and to its destination (some sort of procedural parachutes).

Someday? (More like if I ever get there and figure out how to do this, aka unlikely but still thinking about it)
  • Make the parachutes repulse each other.
  • Allow the parachutes to break and/or malfuction if deployed too fast.
  • More career implementation with different materials being purchased at different times
  • Storing parachutes in the pod

Changelog

January 8th 2014
v0.3.3.1
*Hotfix*
-Fixed a bug where single parachutes would still not arm propoerly
-Fixed stack main chute configs to have the right canopies so they actually work
-Fixed a problem with staging reset bugging the staging list
-Changed the default drag values of parts to 0.32 to actually match the real stock values
-Changed altitude detection to a faster, safer system
-Hopefully, the change above to altitude detection fixes parachutes deploying too early

January 7th 2014
v0.3.3
-Fixed a bug where dual chutes would not arm
-Changed default predeployment altitudes to 30km for drogues and 25km for mains
-Changed predeployment on drags to 100m and full deployment to 50m
-Switched triple canopies to single canopies on the stack 1.25m main chutes
-Fixed forced orientation so that it actually follows vessel orientation
-Fixed forced orientation remaining even if only one parachute is deployed.
-Small tweaks to attachement notes on stack chutes (thanks to eggrobin)
-Fixed caps being inverted on stack chutes (thanks to eggrobin again for making me notice)
-Changed behaviour or repacked chutes, if not in the last stage, they might not need to be moved to e reactivated.
-Moved the random deployment timer to OnStart() for future MechJeb implementation
-Various tweaks to the tweakables UI controllers
-Fixed a bug where dual chutes with the same material would show "empty" as a second material
-Fixed a bug where full deployment shortly after deployment would result in the animations skipping
-Fixed an annoying and unreliable bug where parachutes would make your craft spin out of control by making the force applied to the part once more

December 18th 2013 (take two)
v0.3.2.1
*Hotfix*
-Fixed the bug where dual parachutes would take mass forever
-Fixed a bug with combo chutes having ridiculous starting weight
-Finally fixed the bug with the FASA and Bargain Rocket parachutes, they will now animate properly (big thanks to sirkut)
-All the ModuleManager files are now included with the main download, remove those you don't want.

December 18th 2013
v0.3.2
KSP 0.23 compatibility update!
-Added combo chutes which contain both a drogue and a main for soft landings in one part
-Added the ability to define a second material for the second parachute
-Added the ability to force the parachutes partially in one direction, thus eliminating clipping chutes on dual parts!
-The force is now applied on the whole vessel, so no more weird hangings if the part origin is weird
-Tweakables! Nearly every value that can be changed in the editor can now be. This is only until I set the editor window up on my side.
-Fixed a bug with parachutes facing downwards on reentry
-Added a random deployment delay for parachutes! They will now take between 0 and 1 second to deploy. This is chose randomly for every parachute
-Every parachute now has random "movement noise" different from every other parachutes currently active
-Said random noise will now appear to be much smoother than before
-Usage of the new EFFECTS node has permited to get rid of FXGroups and to remove all those nasty .wav files all around!

Decemer 7th 2013
v0.3.1
*Hotfix*
-Fixed a bug with the mustGoDown/timer clauses
-Fixed a bug with dual chutes not cutting properly
-Fixed yet another bug with predeployment of main chutes always having the same drag
-Added an "reverseOrientation" clause in case a modeller builds the parachute transform the wrong way
-Parachutes no create drag from the very area where they originate from. This means a chute on the side will hang realistically without a CoM offset
-Rescaled all the parachutes to have the real size in game. If you find this too big, tell me on the forum and I'll revise them (note, this is not procedural yet, if you change the part yourself, you need to change the scale)
-New ability to cut both parachutes if both are deployed.
-Fixed a bug with the calculator when calculating the diameter of multiple chutes
-Added a sound on repack, thanks to ymir9 once again

December 4th 2013
v0.3
-Completely removed stock drag dependancy. The parachutes now calculate drag according to real drag equations
-Given the above, the drag parachutes generate is irrelevant of the mass of the part and now depends of the diameter of the parachute
-Parachutes are now made of different materials, defined in cfg files
-Parachute canopies now weight something which depends on which material they are made of and what is it's area density
-Optimization of the code by about 300 lines as the module is pretty much complete
-New parts with the pack, thanks to sumghai! You can now select between many different parachutes for the job you want to accomplish
-It is now possible to arm a parachute to deploy as soon as it can through action group or part GUI
-Minimal deployment can now be defined by altitude or pressure
-Added FXGroups to parachute cut and repack, and providing a cut sound with the parachutes, offered by ymir9!
-A small program made to help calculating parachute diameters is also included with the download!
-Fixed the bugs related to action groups/part GUI and the deployment of dual parachutes

November 24th 2013
v0.2.1
*Hotfix*
-Fixed a bug where single parachutes don't show the right icon colours
-Fixed the weird glitchiness of the parachute's orientation in some occasions
-Fixed parachutes not working if not on the current active vessel

November 23rd 2013
v0.2
-Added a compatibility mode for a second parachute on the same part! Can only be used if the parachute has a a
second set of parachute transform/animation
-Reworked deployment code from the ground up to allow the above feature

November 16th 2013
v0.1b
-Fixed the issue where deploying the parachute below the full deployment height would play the second animations faster
-Added sounds on both predeployment and deployment
-Added a deployment timer that will show a countdown on the flight screen
-Added a clause that the ship must go downards to deploy and that will show status on the flight screen
-Fixed a few remaining deployment bugs
-Changed the behaviour of the part GUI to only show when the action is available

November 13th 2013
v0.1.1a
-Hotfix of a few deployment bugs that could cause weird unresponsive parachutes
-Added a "cutAlt" feature to automatically cut a parachute below a certain altitude.

November 12th 2013
v0.1a
-Initial release

Special thanks to UbioZur, r4m0n, Majiir, Sarbian, Cilph, and the rest of #kspmodders for helping this mod happen :)

Source

88x31.png

Edited by stupid_chris
v0.3.3.1 update
Link to comment
Share on other sites

Good to see it uploaded my post XD (When I pressed reply the forum I got an error 502 xD) I guess this is probably for the stock parachutes only? Or do you have plans for the future concerning modded part support? Because I normally use the stick parachutes but now it am often using the Nova punch mk16 sized parachute us it is able to attach stuff on its top which is in my opinion far more practical, because I don't always want to use radial parachutes when I use a LES for my manned flights . either way, I must say great work there

Edit : just saw on the release thread (Ehm at first totally missed that there is already a release thread on the showcase section xD) that sumghai apparently made some good progresses in adding your parachute to his mod. Well I guess I will just tell tiberion about your mod maybe he finds some time adapt his parachutes too

Edited by DasBananenbrot
Link to comment
Share on other sites

Good to see it uploaded my post XD (When I pressed reply the forum I got an error 502 xD) I guess this is probably for the stock parachutes only? Or do you have plans for the future concerning modded part support? Because I normally use the stick parachutes but now it am often using the Nova punch mk16 sized parachute us it is able to attach stuff on its top which is in my opinion far more practical, because I don't always want to use radial parachutes when I use a LES for my manned flights . either way, I must say great work there

Edit : just saw on the release thread (Ehm at first totally missed that there is already a release thread on the showcase section xD) that sumghai apparently made some good progresses in adding your parachute to his mod. Well I guess I will just tell tiberion about your mod maybe he finds some time adapt his parachutes too

For now this uses stock models without replacing the stock parts. So you will have nine new parts in your part list, but the stock chutes will be intact.

I'm going to upload a bunch of ModuleManager files tonight to add compatibility with other parachutes :)

Link to comment
Share on other sites

November 14th 2013 progress report:

I've managed to assign sounds to the parachute's predeployment and deployment! Eventually I could add sounds for repack and cutting chutes or for an unsuccessul activation, but I would need someone to make these sounds first. If anyone is interested, let me know!

Link to comment
Share on other sites

Checked both of those, didn't find anything interesting unfortunately :l

Though new version up, v0.1b!

Changelog:

November 16th 2013
v0.1b
-Fixed the issue where deploying the parachute below the full deployment height would play the second animations faster
-Added sounds on both predeployment and deployment
-Added a deployment timer that will show a countdown on the flight screen
-Added a clause that the ship must go downards to deploy and that will show status on the flight screen
-Fixed a few remaining deployment bugs
-Changed the behaviour of the part GUI to only show when the action is available

From now on I'll be working on adding more than a parachute to the module, to allow drogue/main combos on one part.

Link to comment
Share on other sites

I don't know if requests are allowed here but i do have one: Very big parachutes.

One of the problems i encounter when trying to land something heavy (f.e. a Rockomax Jumbo 64 plus Mainsail) is that it requires a large number of parachutes. It would be nice if there would be a specialised parachute for heavy loads, compressed in parts about the same size as the current ones but with an enormous chute when deployed. The weight of those parts should be (much) larger than the current ones to compensate for the extra size of the chute. Would you be able to create something like that?

Link to comment
Share on other sites

I don't know if requests are allowed here but i do have one: Very big parachutes.

One of the problems i encounter when trying to land something heavy (f.e. a Rockomax Jumbo 64 plus Mainsail) is that it requires a large number of parachutes. It would be nice if there would be a specialised parachute for heavy loads, compressed in parts about the same size as the current ones but with an enormous chute when deployed. The weight of those parts should be (much) larger than the current ones to compensate for the extra size of the chute. Would you be able to create something like that?

You sure can take requests :) cutAlt, the timer and the mustGoDown clauses are all requests and the ability to have more than a chute per module that I should be adding soon also is. Concerning your request it's planned in a way. Once I add the editor window to control the stats of the parachutes, you will be able to dictate the drag of a parachute according to it's payload, thus not needing multiple parachutes to land an object :)

Link to comment
Share on other sites

Fair enough. It might be useful to have a notgoingup clause (vertical speed < = 0) replace mustgodown in the future, but it's fully workable as is for now. Thanks!

Well that's pretty much the same thing, and I just checked my code, it's actually a >= 0. So a vertical speed of zero will deploy it too :)

Link to comment
Share on other sites

I was trying some time ago to make realistic chute fluttering animations, also opening that looks like actually blowing air inside and not just scaling up. The problem was making the anim loop, for which I needed more time. If I manage to find some time (which I doubt I will soon) I might go back and experiment a bit more. IF I do (ever), maybe you could help me implement those into the game =)

Link to comment
Share on other sites

I was trying some time ago to make realistic chute fluttering animations, also opening that looks like actually blowing air inside and not just scaling up. The problem was making the anim loop, for which I needed more time. If I manage to find some time (which I doubt I will soon) I might go back and experiment a bit more. IF I do (ever), maybe you could help me implement those into the game =)

Sure thing! Though to do what you speak of, I'm pretty sure that setting the animation to actually look this way would be much, much easier. It would be harder than creating the current parachute animations, but it would probably have an end result better looking and without more lines of code.

Link to comment
Share on other sites

Sure thing! Though to do what you speak of, I'm pretty sure that setting the animation to actually look this way would be much, much easier. It would be harder than creating the current parachute animations, but it would probably have an end result better looking and without more lines of code.

Yeah, mine was more simple in this sense, but the animation itself was more complex as I was doing the animation entirely in 3dsmax and don't intend to use the "wiggling" or scale up that the game itself does, the only thing I'd need is the orientation and speed of animation according to the speed of the craft. I hope it could look good.

Link to comment
Share on other sites

Yeah, mine was more simple in this sense, but the animation itself was more complex as I was doing the animation entirely in 3dsmax and don't intend to use the "wiggling" or scale up that the game itself does, the only thing I'd need is the orientation and speed of animation according to the speed of the craft. I hope it could look good.

Those two are rather easy to obtain. Keep me updated on this, my knowledge in modeling/texturing/animating is low to existent, but I'm interested by that idea :)

Link to comment
Share on other sites

V0.2 is on, changelog below

November 23rd 2013
v0.2
-Added a compatibility mode for a second parachute on the same part! Can only be used if the parachute has a a
second set of parachute transform/animation
-Reworked deployment code from the ground up to allow the above feature

I'll now start working on implementing real drag. Parachutes will now be dependant of the area of the chute and use real drag equations. Some brand new parts specifically for the mod should also be available at the same time :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...