magico13

[1.4] StageRecovery - Recover Funds+ from Dropped Stages - v1.8.0 (March 11, 2018)

Recommended Posts

I apparently packaged the wrong version in the zip. I just went through and fixed it so the new download should fix all the recovery issues. One of my plans for today is to get StageRecovery onto my normal build routine, which will fix issues like this, which I think I've done twice now :/

Share this post


Link to post
Share on other sites
Same happening here, these two SRBs were destroyed because of high terminal velocity.

I'm having this issue as well, everything being destroyed by high terminal velocity even though the builder helper in the VAB says they'll land successfully for 85-98% value.

Downloaded and installed via CKAN @ 8:13 AM Central Standard Time.

Share this post


Link to post
Share on other sites

Try downloading it manually. I wonder if the CKAN didn't detect the hotfix for the hotfix. If on Windows, go to the StageRecovery folder and right click on the StageRecovery.dll, then go to properties. Under the info tab (something like that) you should be able to view the File Version which should read 1.5.2.1 if you're on the latest one (just checking the SR.version file won't work, since that's changed manually).

If you're on 1.5.2.1 and it's not working then there's something weird going on and I'll need to take a look at an output_log file.

Edit: The NetKAN bot seems to have pulled the correct one about an hour ago (I wish GitHub gave an exact time) so it's possible it did it after you installed through CKAN. Check CKAN again to see if there's an update.

Edited by magico13

Share this post


Link to post
Share on other sites
I apparently packaged the wrong version in the zip. I just went through and fixed it so the new download should fix all the recovery issues. One of my plans for today is to get StageRecovery onto my normal build routine, which will fix issues like this, which I think I've done twice now :/

Thanks :) Working perfectly now

And a question, how do i "test" a stage in the VAB ? When i click the button i get a "mail" with some test results, but that seems to be for the entire vessel.

Share this post


Link to post
Share on other sites
Try downloading it manually. I wonder if the CKAN didn't detect the hotfix for the hotfix. If on Windows, go to the StageRecovery folder and right click on the StageRecovery.dll, then go to properties. Under the info tab (something like that) you should be able to view the File Version which should read 1.5.2.1 if you're on the latest one (just checking the SR.version file won't work, since that's changed manually).

If you're on 1.5.2.1 and it's not working then there's something weird going on and I'll need to take a look at an output_log file.

Edit: The NetKAN bot seems to have pulled the correct one about an hour ago (I wish GitHub gave an exact time) so it's possible it did it after you installed through CKAN. Check CKAN again to see if there's an update.

Checking the version on Details in the StageRecovery.dll shows Product Version of 1.5.2.0. I must've downloaded just before the version was picked up by CKAN. I'll check CKAN again for an update and if it finds nothing, will download manually. Thanks for the quick help magico13! Rep for you sir!

Edit: An update IS available now on CKAN, thanks again!

Share this post


Link to post
Share on other sites

I would like to ask a question i'm sorry if it has been answered before. In stock KSP you do not get any funds for parts that fail to land before you leave "Physics range" (2km?) So this will allow you to get refunds for basically everything, instead of some stuff? I'm not even sure if I asked the question right. ><

edit: I looked up on KSP wiki. Found this. So I guess i'm asking what this mod does besides change the already existing system. Like are you not getting money back for parts that are not attached to the final vessel after you recover? (spent booster stages ect?)

  • A fraction of the cost in funds of every part recovered will be returned. The fraction returns depends on the distance the craft landed from the Space Center. Recovery of a craft sitting on the Launch Pad will deliver a full refund, so that aborting a launch does not result in a loss of funds.

Edited by LuvSicGrl

Share this post


Link to post
Share on other sites
Thanks :) Working perfectly now

And a question, how do i "test" a stage in the VAB ? When i click the button i get a "mail" with some test results, but that seems to be for the entire vessel.

Due to the fact that programmatically determining what a "stage" is is difficult (and also I just haven't had the time) it check the entire vessel as one entity. Easiest way (especially now that we have SelectRoot as stock) is to test just the stage itself. With 0.90 you should be able to set the primary part of the stage as the "root part" (so for a stack based stage it might be the decoupler or top-most fuel tank, for a radial stage like an SRB, I'd just go with the SRB. Though radial ones you may want to test completely separate due to symmetry issues, in which case there is always subassemblies) and pick up the rest of the ship so it isn't attached. Then run the test on just that stage.

It requires a bit of work, but it's easier than doing a bunch of test flights generally and once you know a configuration works (like if a booster always recovers fine with two radial chutes but not one) then you can just use that configuration in the future without worries.

Maybe one day I'll see about splitting it into stages automatically, but I don't have the time currently.

Share this post


Link to post
Share on other sites
I would like to ask a question i'm sorry if it has been answered before. In stock KSP you do not get any funds for parts that fail to land before you leave "Physics range" (2km?) So this will allow you to get refunds for basically everything, instead of some stuff? I'm not even sure if I asked the question right. ><

edit: I looked up on KSP wiki. Found this. So I guess i'm asking what this mod does besides change the already existing system. Like are you not getting money back for parts that are not attached to the final vessel after you recover? (spent booster stages ect?)

  • A fraction of the cost in funds of every part recovered will be returned. The fraction returns depends on the distance the craft landed from the Space Center. Recovery of a craft sitting on the Launch Pad will deliver a full refund, so that aborting a launch does not result in a loss of funds.

In regards to your original question: It is correct that Stock KSP won't let you recover anything that falls outside of physics range while still in the lower atmosphere. StageRecovery is designed to circumvent that issue by checking if there are enough parachutes for it to land safely (or if the vessel is controlled and has fuel+engines). If the part wouldn't land safely then StageRecovery won't recover it.

This mod doesn't change anything in the current recovery system, so if you land a craft yourself it will function exactly as it would in Stock KSP. In fact, StageRecovery uses the exact same distance requirements as Stock KSP, so if you drop a booster on the other side of Kerbin you won't receive as many funds back as if you had dropped it right on the KSC (but you'll never actually get 100%, just 98%).

In short, StageRecovery only supplements the current system and does nothing to impede it.

Edit: Also, "drop a booster" or a "stage" are just colloquialisms of mine. StageRecovery works on any type of vessel. If you have a space station full of Kerbals and Science that has parachutes on it, you could deorbit it and StageRecovery will recover it (and all the science and kerbals, though there's a bug right now that will cause the kerbals to lose their experience). The "normal" usage is recovering spent stages/dropped boosters (or for some people, fairing halves. Yes, you heard correctly, some people recover their fairings... :D ), so that's what I tend to use in conversation. (Also, the original code came from KCT where it was referred to as the "Booster Recovery Code")

Edited by magico13

Share this post


Link to post
Share on other sites

Thanks for the detailed answer magico13 ;)

I guess it isn't even really needed then, didn't thought about the new root part feature that can be used for it ^^

Share this post


Link to post
Share on other sites

For anyone who's considering this mod for career mode, USE IT!!

I must hate myself, because I started a new 0.90.0 career mode with only 10k starting funds... and I'm having to grind like mad to make enough money to upgrade my VAB (almost 400k funds!). If I could build an airplane to run around and do a few of the surveys I'd be golden, but I don't have any landing gear yet!

So, being able to recover ~60-98% of any stages lost as I hop about trying to fall through survey areas is really helping me gain funds rather than lose them.

I just wonder why this isn't part of Stock KSP yet? With the new career mode it seems impossible to GAIN funds if you have to stage anything, yet it is not possible to build SSTO's early on. In my mind, this mod is a requirement.

HUGE thanks to magico13 for updating so quickly! I'm not even mad about the accidental mistake in packing. I noticed my stuff wasn't recovering, came here, saw that there was a fix, viola! Kudos!

Share this post


Link to post
Share on other sites
If I could build an airplane to run around and do a few of the surveys I'd be golden, but I don't have any landing gear yet!

As i just had the same problem while building a VTOL plane without any gears and there is a solution to that ;) Land it with parachutes, take an engineer as pilot and then repack the chutes after landing. Just needs careful chute placing so its landing upside and can launch again. (not that it comes far without a jet engine, but better then nothing for some contracts)

Share this post


Link to post
Share on other sites
As i just had the same problem while building a VTOL plane without any gears and there is a solution to that ;)

If it's a VTOL why couldn't it land on landing legs? :P Hence the "L" part of VTOL.

Share this post


Link to post
Share on other sites
If it's a VTOL why couldn't it land on landing legs? :P Hence the "L" part of VTOL.

too much delta-v for landing on kerbin :D

Btw for that calculation of droping stages in VAB above i just had an idea: If it's possible to readout parts that are placed in the VAB inactively (not attached to the vessel), would it be possible to make two informations in the "email", one test for the active vessel and one for the inactive ? That way it would be enough to just detach the part i want to know if it has enough chutes, click the button and voila

Edited by thyriel

Share this post


Link to post
Share on other sites

If it is possible (surely it is somewhere) it's definitely not as easy. Currently it's something along the lines of EditorLogic.fetch.ship.Parts to get the current vessel. But I suppose I could take a look and see if I can grab the inactive parts as well. They've got to be stored somewhere if you can reattach them without needing to reconfigure anything.

Share this post


Link to post
Share on other sites

awesome thanks for the epic response! Cleared up all my questions. People recover their fairings? Oh my god. I must do this now. great mod once again, thanks.

Share this post


Link to post
Share on other sites

Not sure whats going on I'm doing a career mode in .90 on 32b KSP. and was unable to get stage recovered said terminal velocity 100.2m/s so I added 4 more chutes the next time and the Terminal velocity number in the message went up to 122.3 m/s instead of down.

So I added just a radial chute to a radial decoupler on the next launch and got terminal vel of infinity on just a chute

Index.php?cmd=image&sfpg=U3RhdmVsbC8qU3RhdmVsbCAyMDE0LTEyLTE2LTA3LTUzLTAxLnBuZypkZmFkZTI1YThhNTM1NDIxZTViZmExMzkyYzhjYmI3NQ

I forgot to save log so I'm going to do it again and then post log.

LOG:

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Vessel Space Test Debris was on-rails at 0.0 atm pressure and was destroyed.

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

[SR] Error occured while trying to determine terminal velocity.

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

FormatException: Unknown char: <
at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0

at System.Single.Parse (System.String s) [0x00000] in <filename unknown>:0

at StageRecovery.RecoveryItem.GetParachuteDragFromPart (.AvailablePart parachute) [0x00000] in <filename unknown>:0

at StageRecovery.RecoveryItem.DetermineTerminalVelocity () [0x00000] in <filename unknown>:0
UnityEngine.Debug:Internal_LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
StageRecovery.RecoveryItem:DetermineTerminalVelocity()
StageRecovery.RecoveryItem:.ctor(Vessel)
StageRecovery.StageRecovery:VesselDestroyEvent(Vessel)
EventData`1:Fire(Vessel)
Vessel:OnDestroy()

(Filename: Line: -1)

[SR] Vt: 200.2578

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Awarding 42424 funds to player for contract completion

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Awarding 41 science to player for contract completion

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Awarding 530 reputation to player for contract completion

Edited by Stavell

Share this post


Link to post
Share on other sites

If you didn't download the update within the past 4 to 5 hours then make sure you do. That sounds like the bug I fixed this morning (well, it was supposed to be lsat night but I packaged the zip incorrectly and had to do a hotfix for a hotfix)

Share this post


Link to post
Share on other sites

Probably would be better raising the version number for the hotfix-hotfix, i think else CKAN isn't recognizing that there is an updated version available.

Share this post


Link to post
Share on other sites
Probably would be better raising the version number for the hotfix-hotfix, i think else CKAN isn't recognizing that there is an updated version available.

It should be. There's a different ckan file for 1.5.2.1_2 than 1.5.2.1 which is newer, so CKAN should be seeing it as an update (assuming you refresh the package database)

Share this post


Link to post
Share on other sites

So when can we expect the fix for loosing crew experience? I know i can EVAs kerbals out, but it's tiresome.

Share this post


Link to post
Share on other sites
So when can we expect the fix for loosing crew experience? I know i can EVAs kerbals out, but it's tiresome.

I think I need to word that warning better. If you recover a vessel the normal way (with the recover button, tracking station, etc) then the experience isn't lost. It's only when vessels are "recovered" by StageRecovery (aka, dropped into the atmosphere and destroyed), since SR doesn't use the normal recovery mechanics in that instance. I'll go fix that wording.

Share this post


Link to post
Share on other sites

StageRecovery may be having a problem with parts that do not have parachutes. I've sent several spent stage crashing to the surface, only to see StageRecovery indicate they landed safely. what files do you need from me to debug? At the very least, I'll get screenshots.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.