magico13

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

Recommended Posts

Output_log.txt. The visual might show a crash but there can still be a successful recovery because of the way KSP unloads craft to trigger recovery so may not actually be a bug.

Share this post


Link to post
Share on other sites

Like JeffreyCor stated, the output_log.text file is the defacto "having issues, need help" file for any mod. Usually I see reports saying that SR isn't recovering things it should be, not the opposite, so this is very intriguing! Those stages wouldn't happen to have probe cores and fuel on them would they? In which case they are probably being recovered through powered recovery.

How low are you when you're crashing them? Are they still loaded and you see the physical explosion but are getting a message about them being recovered? Screenshots would definitely clear things up, if possible. Thanks for your help in advance!

Share this post


Link to post
Share on other sites

I'll get that output_log.txt for you. I am not low...about 15km+. There are no probes on them. They are spent stages I'm dumping off the command module prior to opening chutes on command module. I'm getting the message that they were recovered, such as landed at 4 m/s where they must land at 12 m/s or less. There are no chutes on the stages I dump.

What is odd, though, is that I'll get messages on other parts whereby they are reported as destroyed (as they should be).

Share this post


Link to post
Share on other sites
I'm getting the message that they were recovered, such as landed at 4 m/s where they must land at 12 m/s or less. There are no chutes on the stages I dump.

Hmm, I wonder if that's caused by the change I made to use the protovessel.WasControllable (something along those lines) instead of manually parsing the ship for command pods and probes. 4 m/s is what they should land at for powered recovery, so it might be erroneously thinking they're controlled. I guess that's what I get for relying on the stock functions to work how I expect them to! I'll have to switch back to doing it manually.

Share this post


Link to post
Share on other sites

Is there a way to temporarily disable this plugin? Or maybe a way to set it to not recover certain stages of specific craft? In the 0.9 Career Mode, I have quite a few missions that require me to have a crew landed on Kerbol at some specific location to do a crew report, and I'd like to be able to have a fly-over craft that carries and drops a lander at those locations. But at the moment, with stage recovery installed, those landers get recovered and disappear before I can do the crew report. For now, I'm exiting the game and uninstalling/reinstalling the plugin every time I go from one mission type to another, which is a bit of a pain. I tried unchecking "Recover Kerbals", but that didn't help, I'm guessing it must mean kerbals who are not inside a ship/lander.

Share this post


Link to post
Share on other sites

@Apollo13 Are the stages being dropped before running out of fuel? I see that they're having fuel refunds. Does the mechjeb part provide control like a probe core? If it does, then that explains why they're being recovered. Two things: 1) try without a mechjeb or any other mod parts on the stage. You can do the test in Sandbox, since SR works there as well, otherwise just launch a test craft and revert after seeing the result. 2) Check the actual SR gui that is available through the toolbar button while in flight. You can see more data there and in a nicer format. It should tell you if it attempted powered recovery (it did) and how much fuel it used.

There are definitely some other parts that are being dropped that aren't being recovered, so I'm starting to lean toward the mechjeb case providing control.

Edited by magico13

Share this post


Link to post
Share on other sites
and I'd like to be able to have a fly-over craft that carries and drops a lander at those locations. But at the moment, with stage recovery installed, those landers get recovered and disappear before I can do the crew report.

By "Kerbol" I'm going to assume you mean Kerbin and not the Sun, cause dropping anything into the sun won't survive :D

That won't work in KSP without a mod like FMRS or Romfarer's Lazor Plugin (EDIT: Or by circling around the dropped craft until it lands, which is what I did when dropping RemoteTech ground stations from planes). Any craft that goes outside of about 2.5km of the active craft and isn't landed will be deleted by KSP, which SR then attempts to recover them only after they've been deleted. Without SR you'd just be dropping the craft and having them get deleted, thus killing the kerbals and losing the funds that the craft is worth.

At a later point it is likely that I will make it so SR will actually *enable* you to do what you are trying to do, but that code isn't in yet.

Now, if I'm perhaps misunderstanding what you mean, and you can 100% ensure to me that the craft you're dropping is landed by the time it goes out of range of the flyover craft (with logs and either screenshots or video), then we have a serious bug. SR only kicks in after KSP deletes the craft, so it is unlikely but not impossible.

"Recover Kerbals" makes it so the kerbals aren't killed when SR recovers a craft. Turning it off means that if you drop a craft with a kerbal in it (for instance, an escape pod) then they will be killed even though the parts will be recovered.

Edited by magico13

Share this post


Link to post
Share on other sites

I just want to say "Thank You!" for incorporating the changes I requested into the new version. It has been making things so much easier for me!

1) Thank you for including the "Total Refunds" information on the Info tab. Now I have all the info about a recovered stage in one screenshot!

2) Thank you for adding the "Right clicking on a stage in the flight GUI will now delete it" function. Now I can delete stages from the GUI after I've documented the info and it makes things much easier to track.

3) Thanks for fixing the accuracy error for stages dropped close to KSC! I dropped a stage right on top of the launch pad and I'm getting 98% recovery now, as opposed to the ~60% recovery in the last version. Excellent fix!

Again, thanks for the work on this mod. I really hope that the next mod that Squad decides to incorporate into the game is this one...you deserve all the credit!

Share this post


Link to post
Share on other sites

3) Thanks for fixing the accuracy error for stages dropped close to KSC! I dropped a stage right on top of the launch pad and I'm getting 98% recovery now, as opposed to the ~60% recovery in the last version. Excellent fix!

Hmm, I didn't actually fix anything with regards to that, yet... So I'm glad it's working better at least! I've generally found the inaccurate recovery percents to be a random occurrence, so it's likely they'll pop up again, but there's a chance Squad fixed whatever issues were causing it before. I think I know a way of testing if they did since I got consistently bad recovery rates when implementing the launchclamp recovery code using the STOCK recovery functions! I ended up writing my own, but if I switch back to the stock ones I should see pretty quickly if they're working better in 0.90.

You may have also noticed that when you select a stage now it actually makes it clear which one is selected! :D Though I may need to make some adjustments to that for long names.

Share this post


Link to post
Share on other sites

Your suggestion that MJ may have probe functionality may be on target. with stock only (no mods installed, except MJ and SR), I launched the vehicle twice (with MJ both times) and dropped the stage:

1) with fuel remaining:

Ofi5JQ5.jpg

2) without fuel remaining:

j8feAd1.jpg

I also launched and dropped without MJ. Vehicle destroyed with no value recovered.

It may be something you wish to investigate. Or not...

thanks, again, for this excellent mod.

Share this post


Link to post
Share on other sites

It may be something you wish to investigate. Or not...

Well, it seems like it's actually working exactly as intended! StageRecovery has powered recovery using rocket engines to land, rather than (or in addition to) parachutes. I just wasn't aware that mechjeb counted as a control source, but I suppose it makes sense that an autopilot would be able to land a craft. Do you happen to know if you can control a ship with just mechjeb? For instance, can you control it if you take all the kerbals out and remove all the probe cores? If so, then things are most certainly working as intended.

Share this post


Link to post
Share on other sites
Well, it seems like it's actually working exactly as intended! StageRecovery has powered recovery using rocket engines to land, rather than (or in addition to) parachutes. I just wasn't aware that mechjeb counted as a control source, but I suppose it makes sense that an autopilot would be able to land a craft. Do you happen to know if you can control a ship with just mechjeb? For instance, can you control it if you take all the kerbals out and remove all the probe cores? If so, then things are most certainly working as intended.

A standard mechjeb does indeed, from the part.cfg for the MJ part

MODULE

{

name = ModuleCommand

minimumCrew = 0

RESOURCE

{

name = ElectricCharge

rate = 0.005

}

}

Share this post


Link to post
Share on other sites
Do you happen to know if you can control a ship with just mechjeb? For instance, can you control it if you take all the kerbals out and remove all the probe cores? If so, then things are most certainly working as intended.

You cannot control it with just MechJeb. There must be a command module or probe. Unless something has changed recently.

So, this gives me an idea. I used to have MJ on the command module or probe. No more. I'll just leave some fuel and no parachutes on the stage and put MJ on the stage I'm dropping. I'll get the funds. Unless somebody *cough*magico13*cough* closes that loophole. LOL...

Share this post


Link to post
Share on other sites
So, this gives me an idea. I used to have MJ on the command module or probe. No more. I'll just leave some fuel and no parachutes on the stage and put MJ on the stage I'm dropping. I'll get the funds. Unless somebody *cough*magico13*cough* closes that loophole. LOL...

Well, if you use up all the fuel in that stage it won't get recovered, and typically people will use all of a stage up before dropping it. The dV requirements for landing w/o parachutes is about 250 m/s (at atmosphere ISP) which is quite a bit to be leaving behind. If what @Ratzap posted is correct, then the mechjeb part does in fact act as a probe core, so that's totally valid. ModuleCommand is the exact same thing that probes and command pods use. There's not actually any loophole here.

There is a bug present though if those stages being dropped are empty and are still being recovered, but since there's a small amount of funds being returned for fuel it looks like they've still got some juice in them.

If you really don't like it for some reason, you can either remove the ModuleCommand from the mechjeb part, or disable powered recovery in the settings ;)

Share this post


Link to post
Share on other sites
If you really don't like it for some reason, you can either remove the ModuleCommand from the mechjeb part, or disable powered recovery in the settings ;)
I'll go with it the way the developer (i.e., you) intended for it to work. So, as not to cheat, I will add chutes to the stages I drop, even if they do have MJ and some fuel.

thanks for a great mod.

Share this post


Link to post
Share on other sites
So, as not to cheat, I will add chutes to the stages I drop, even if they do have MJ and some fuel.

What I'm trying to say is that it isn't actually cheating, I actually had to add a bunch of code (thanks to Malkuth for making it much easier) for powered recovery to work at all (and had to solve some fun linear equations to make it work for arbitrary fuel types). There's a whole section about it on the first post. StageRecovery isn't specific to parachutes, we're an equal* opportunity recovery mechanism :D

*Excluding planes with TWR < 1. Nobody likes planes anyway. Go back to your hangars!**

**Ok, I do actually need to find a way for powered plane recovery to work without requiring a TWR > 1, but that only comes up with AJE.

Share this post


Link to post
Share on other sites
By "Kerbol" I'm going to assume you mean Kerbin and not the Sun, cause dropping anything into the sun won't survive :D

Yes, I did mean Kerbin. I get my different kerbs confused.

Any craft that goes outside of about 2.5km of the active craft and isn't landed will be deleted by KSP, which SR then attempts to recover them only after they've been deleted. Without SR you'd just be dropping the craft and having them get deleted, thus killing the kerbals and losing the funds that the craft is worth.

I was going to say "Well, what if the flyover craft is a spaceship in orbit, carrying multiple landers." And then I realized that it is pretty trivial to make sure that whenever something is coming down to Kerbin, I just switch to it and fly it, with everything else just waiting in space until later. Unfortunately, I won't be able to drop three landers rapidly over three nearby points. But, as you explained that's a problem with base KSP, and it really isn't that big of a hassle to drop them one at a time. So problems solved. I don't actually need the feature I was requesting.

Share this post


Link to post
Share on other sites
Yes, I did mean Kerbin. I get my different kerbs confused.

Haha, no problem. Happens to all of us! It was just an entertaining tidbit to me :D

I was going to say "Well, what if the flyover craft is a spaceship in orbit, carrying multiple landers." And then I realized that it is pretty trivial to make sure that whenever something is coming down to Kerbin, I just switch to it and fly it, with everything else just waiting in space until later. Unfortunately, I won't be able to drop three landers rapidly over three nearby points. But, as you explained that's a problem with base KSP, and it really isn't that big of a hassle to drop them one at a time. So problems solved. I don't actually need the feature I was requesting.

Yeah, FMRS is better suited to things you actually want to land, but for general things like boosters it can be a hassle to have to fly them all manually. It'd be cool to see this and that merge so that the approximation method this uses can cover uncontrolled vessel while that can handle controlled ones. Maybe I'll see about adding some features to make them work better together, such as not triggering when FMRS is installed (or active?) on controllable craft, but still triggering for uncontrolled stages.

Reflection is starting to get fun for me to mess with :P

Share this post


Link to post
Share on other sites

I have a weird bug.

I had a stage (early career vessel, can just make orbit), which had two radial parachutes (stock). I got a warning "parachutes unsafe to deploy" briefly. When I staged, it was set to deploy the parachutes on that stage at the same time. SR reported stage destroyed (velocity 100m/s).

That one I'm not too worried about yet, I figured I did something wrong.

Second time, I'm reentering after orbiting. I get down to about 7km, and stage again (drops orbit stage and deploys chutes). This time it deploys (probably since still in physics range and slow).

My pod landed before the stage, so I used time warp to speed it up (not thinking it wasn't going to use physics warp after landing). The stage immediately disappeared and was reported destroyed, terminal velocity of infinity. It was going about 7.4 m/s before I time warped.

Migyjfz.png?1

If it matters, I'm using FAR and DRE.

Edited by Phoenix84

Share this post


Link to post
Share on other sites

magico13, have you yet thought about altering the maximum part count in VAB/SPH with the mod ? Having like 33 instead 30 parts would help a lot balancing things again as the 30 part limit is pretty much what you need to get to mun or so, it's ending then with either flying to mun or recovering stages with all the additional parachutes. It's just, i'm finding myself more and more not using it because of the part count limit

Share this post


Link to post
Share on other sites
I have a weird bug.

How long ago did you download SR? If it was more than a day or two ago, I'd first recommend redownloading. It's possible that you managed to download the broken 1.5.2 version, or the 1.5.2.1 that was mispackaged, which both could exhibit those symptoms. I'm also assuming this is on 0.90

magico13, have you yet thought about altering the maximum part count in VAB/SPH with the mod ? Having like 33 instead 30 parts would help a lot balancing things again as the 30 part limit is pretty much what you need to get to mun or so, it's ending then with either flying to mun or recovering stages with all the additional parachutes. It's just, i'm finding myself more and more not using it because of the part count limit

Hmm, I don't think I'm going to mess with the part count at all. The extra design challenge of having to decide between reusability and shear power isn't, in my mind, a bad thing. Even SpaceX has that problem with the falcon 9 that can land itself. You can take a smaller payload to orbit but keep the bottom stage, or you can take a larger one to orbit and lose the stage.

In fact, we were discussing making recovery work at a lesser value when you've got low tier buildings, and improve as you upgrade them (mostly the tracking station), which is kind of the opposite of making it easier in the beginning. I'll need to think about that and maybe have some trial runs.

Share this post


Link to post
Share on other sites

I see thyriel's point, but the thing is, SR actually makes the game easier even without increasing part counts. If you play without SR, all dropped stages are a complete loss to your bottom line anyway. Giving players the choice between reusability and sheer power is an interesting choice and the true goal of good gameplay.

The MechJeb posts got me thinking about .90 integration again - is it possible to link powered recovery with a building upgrade? Maybe Mission Control or R&D needs to be level 2 or so before powered recovery is an option. Also, I think the weird thing about using MJ for powered recovery is that the MJ parts don't provide any attitude control. There's no baked-in SAS or anything that the stock probe cores have.

This is a tangent, but I still don't understand the point of powered recovery. Sure, SpaceX put out a really sweet video, but is it cheaper than other real-world recovery methods? Maybe you save enough money on transporting stages back to your base. Maybe it's not an economic issue and has to do with dropping stages over populated areas or something.

Share this post


Link to post
Share on other sites

The SpaceX designs are set up so that the first and second stages can be re-used within hours of return, rather than requiring a naval vessel to recover parts dropped into oceans halfway around the world.

Stage one returns to the launchpad within minutes, stage two re-aligns after a full orbit and returns. Check out the info here.

I would also guess that the tanks dropped by NASA Space Shuttles required repairs and refits due to impact forces with the water.

As of yet, I do not believe there is a working prototype of a real-life SSTO. I could be wrong.

Share this post


Link to post
Share on other sites

You're right, no real life SSTO yet and only two in development (Skylon and Kankoh-maru). A lot cancelled and /or failed SSTO projects where around, but none made it so far out of design phase.

Share this post


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