Jump to content

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


magico13

Recommended Posts

Can you give this an option to use the stock toolbar? It'd be nice to have all my mods in one place. Thanks!

If you don't have the toolbar mod installed then it will automatically use the stock one, but I was just thinking that I should add a manual override into the settings, so I'll get that into the next release.

Link to comment
Share on other sites

Q: Is there a setting that checks for stages burning up!?

I mean i have a shuttle with some parachutes on the dropable tank... i guess it should burn up... but nope -> got recovered.

Edit: The Deadly Reentry Mod is supported? So it does depend on the DR settings?

Edited by StainX
Link to comment
Share on other sites

Q: Is there a setting that checks for stages burning up!?

I mean i have a shuttle with some parachutes on the dropable tank... i guess it should burn up... but nope -> got recovered.

Edit: The Deadly Reentry Mod is supported? So it does depend on the DR settings?

The method by which DR is supported is pretty weird. SR checks if it's installed, and if it is then it looks at the speed the vessel was going when deleted by KSP and assigns a percent chance of burning up based on that speed. It's the DR Velocity (something along those lines) in the settings. By default it's 2000 m/s (remember that KSP doesn't apply physics to unloaded craft, meaning air resistance won't be applied at any time and it isn't destroyed until about 22 km, so it'll be going way faster than it should). If the vessel is going slower than 2000 m/s then it's perfectly fine, if it's going 2100 m/s then there is a 10% chance of burning up, at 3000 m/s there is a 100% of burning up. If you have a heat shield it will reduce the chance by whatever amount of shielding is left, meaning you can be completely safe up to 3000 m/s, but above that you start getting a chance again up to 4000 m/s at which point no heat shields will protect you.

It's a rather arbitrary system but it prevents you from dropping things into the atmosphere at high speeds and taking advantage of the physics not being applied.

If you want to make things burn up more often, just lower that speed in the settings. The chance of burning up should be 100 x 2 x [(srf_speed / DR_Velocity) - 1], which in other words is 2% per 1% that the surface speed is faster than the DR Velocity setting. As an example, if you set it to 1500, then 2000 m/s will have a 67% chance of burning up, rather than 0%.

I should point out that it's totally independent of the actual DR settings since the system is really arbitrary.

Link to comment
Share on other sites

A few days ago StageRecovery just stopped working (no messages, no returns). I deleted the folder and reinstalled today, and I got a message when starting the game at KSC about some recovered stages with "NaN' values in them (was not thinking to take screenshots). When in flight, when a stage should be recovered I get this in my log:

[LOG 23:24:34.728] [SR] Vt: 11.16542[LOG 23:24:34.732] [SR] Trying powered recovery
[LOG 23:24:34.734] [SR] Final Vt: 11.16542
[EXC 23:24:34.739] NullReferenceException: Object reference not set to an instance of an object
StageRecovery.RecoveryItem.SetRecoveryPercentages ()
StageRecovery.RecoveryItem..ctor (.Vessel stage)
StageRecovery.StageRecovery.VesselDestroyEvent (.Vessel v)
EventData`1[Vessel].Fire (.Vessel data)
Vessel.OnDestroy ()

Link to comment
Share on other sites

A few days ago StageRecovery just stopped working (no messages, no returns). I deleted the folder and reinstalled today, and I got a message when starting the game at KSC about some recovered stages with "NaN' values in them (was not thinking to take screenshots). When in flight, when a stage should be recovered I get this in my log:

Hmm, that's a weird place for it to have issues. Can you upload the full log (not the KSP.log but the output_log.txt file from KSP_Data if you're on windows) and a mod list? Did you change any settings at all, or are they on their defaults? The only things that I can think of that could be null when they shouldn't be are the Space Center and the ProtoVessel on the vessel, both of which shouldn't be null, but it's possible that another mod somehow changed one of them (maybe Kerbal Konstructs/Kerbinside, or RSS) or something strange happened that will hopefully be in the log.

Link to comment
Share on other sites

Just to check: If I send say, a lander carry science required for contracts on a re-entry trajectory, and switch out back to KSC, will the science recovered through StageRecovery mark those contracts as complete once it triggers, or am I stuck waiting for my capsule to land as the active vessel?

Link to comment
Share on other sites

Just to check: If I send say, a lander carry science required for contracts on a re-entry trajectory, and switch out back to KSC, will the science recovered through StageRecovery mark those contracts as complete once it triggers, or am I stuck waiting for my capsule to land as the active vessel?

I honestly don't know. Since it gets recovered at 100% science value, it should be considered as "recovered" instead of transmitted, but I'd highly recommend a quicksave first because I don't know for sure that it will work properly. Don't forget you can use Alt-F5 to save multiple quicksaves. Let me know the results if you test it!

Link to comment
Share on other sites

Hmm, that's a weird place for it to have issues. Can you upload the full log (not the KSP.log but the output_log.txt file from KSP_Data if you're on windows) and a mod list? Did you change any settings at all, or are they on their defaults? The only things that I can think of that could be null when they shouldn't be are the Space Center and the ProtoVessel on the vessel, both of which shouldn't be null, but it's possible that another mod somehow changed one of them (maybe Kerbal Konstructs/Kerbinside, or RSS) or something strange happened that will hopefully be in the log.

Here's the log. I noticed the issue probably 2 weeks ago. Wasn't a big concern at the time, thought maybe it was just a bug in the current instance, since I've had issues with stuff just stopping working until a restart. A few restarts didn't fix it. It coincides a bit with the time I was also trying out your Construction Time mod, but not precisely with its uninstallation. I thought it was related to that at first until I looked back at when I used CT.

I guess I need to go through a few at a time and see if removing some mods will fix it, and if so which ones, just haven't had the time for a bit to do that. I'll let you know what I find out.


Name
[+] Action Groups Extended
[+] ActiveTextureManagement
[+] Alternate Resource Panel
[+] AntennaRange
[+] Better Atmospheres
[+] Chatterer
[+] Coherent Contracts
[ ] Color Coded Canisters
[+] Community Tech Tree
[+] Contract Window +
[ ] ContractConfigurator
[+] CrewQ
[+] CrowdSourcedScience
[ ] DeadlyReentry
[+] Distant Object Enhancement bis
[+] DMagic Orbital Science
[+] Docking Port Alignment Indicator
[+] EditorExtensions
[+] Enhanced Navball
[+] EnvironmentalVisualEnhancements
[+] Field Experience
[+] FilterExtension
[+] Final Frontier
[+] ForScience Continued!
[ ] Fuel Tanks Plus
[+] Fusebox
[+] Habitat Pack
[+] Haystack Continued
[+] InFlightWaypoints
[+] K2 Command Pod
[+] Kerbal Alarm Clock
[+] Kerbal Joint Reinforcement
[+] Kerbal NRAP
[ ] Kolonists
[+] KSPX
[+] Mark IV Spaceplane System
[+] MechJeb
[+] MemoryUsage
[+] Modular Rocket Systems - Parts Pack
[+] ModuleRCSFX
[ ] Near Future Electrical
[ ] Near Future Propulsion
[ ] Near Future Solar
[+] Near Future Spacecraft Parts
[ ] Neophyte's Elementary Aerodynamics Replacement
[+] Outer Planets Mod
[+] PlanetShine
[+] RCS Build Aid
[+] RCS Sounds
[+] RealChute Parachute Systems
[+] Rejector
[+] RemoteTech
[+] RemoteTechXF
[+] RLA Stockalike
[+] S.K.B. (Serious Kerbal Business)
[+] ScienceAlert
[+] Sensible Pumps
[+] Snacks
[+] SpaceY Heavy Lifters Parts Pack
[+] StageRecovery
[+] Stockalike Station Parts Expansion
[+] Stock-Revamp
[ ] StockRT
[+] Tantares - Stockalike Soyuz & More
[+] Taurus HCV - 3.75 m Stock-ish Crew Pod
[+] TechManager
[+] Texture Replacer Files
[+] TextureReplacer
[+] Toolbar-1.7.8
[+] TweakableEverything
[+] TweakScale - Rescale Everything!
[+] Zero Point Inline Fairings


Link to comment
Share on other sites

Well, firstly you're running a development version of KCT, and more specifically you're using a development version that wasn't supposed to be used for normal gameplay as it purposefully breaks upgrading buildings. So I would advise either switching to the release version or build 64. Although that log also states that the latest version was the one you were using, which hasn't been the case since January 6th so that must be an old log file.

Looking at that log I otherwise couldn't see anything related to the issue. Let me know if you happen to find anything in your testing.

Link to comment
Share on other sites

Is there anyway to not auto recover stuff? I had a contract early in the game worth alot of funds to do a surface sample and an eva on kerbin.....in the mountains.

So I made a plane that ejected drop pods and then I flew home and went to the space center to switch to the pods. Only to discover the pods had been "recovered"

Link to comment
Share on other sites

If StageRecovery is recovering something, that means KSP deleted it, so turning off StageRecovery would just mean those would be deleted without recovering any parts. If you want to do drop pods without extra mods then you'll need to drop them low to the ground and stay within physics range until they land (by circling and staying within about 2 km). If you want to add extra mods you can either add one that increases the physics range (like BDArmory, which doubles it) or FMRS which will let you switch back to when you dropped the pod so you can land it manually (and then it merges the save states into a final one).

Link to comment
Share on other sites

Hi magico13, can I suggest you a new feature?

Trying to encourage the use of reusable rocket like Falcon 9 or Falcon Heavy, which land safetly on the ground without splashing on the sea, can you penalize the recovery income in case of a splashdown?

In real life recovering engine from the sea is very explensive because of the salt water.

This can be an optional flag in the configuration of your mod.

Link to comment
Share on other sites

Trying to encourage the use of reusable rocket like Falcon 9 or Falcon Heavy, which land safetly on the ground without splashing on the sea, can you penalize the recovery income in case of a splashdown?

Since the stages don't actually ever reach the ground (if they did, StageRecovery wouldn't be needed) it's not as simple to check if they're splashed down or landed on solid ground. However, I have been planning on adding in support for the Trajectories mod for more precise landing calculations, in which case I should be able to check if the predicted location is in the middle of water. Ideally I'll be able to query the PQS system for that, otherwise I'll have to assume that the water biome is entirely water and everywhere else is land.

It should be doable though :)

Link to comment
Share on other sites

Noticed something funky going on - not sure if due to this mod or not, but my distance recovery percentage outside of KSC is always 54% - doesn't matter where I land, be it 1km out into the ocean from the space center, or right at the antipodes.

This doesn't make any changes to normal recovery mechanics, so it's probably not the cause. I'll take a look at any logs you provide if you want, as they might contain some info. Does that happen even if you recover from the launchpad? Also, does it happen on a new save? If so, you can easily figure out which mod is causing it by either randomly guessing which mod it is and removing that from your list, testing, then repeating until you find which one caused it, or you can do it the faster way by using a binary search.

For that, you'd remove half your mods and test. If the problem persists, then the faulty mod is in the installed half, if it goes away it's in the other half (in which case you reinstall that half and remove the currently installed half, so you can keep retesting). Then keep dividing your mods in half and retesting until you find the one mod that causes the issue (or at least you will have narrowed it down quite a bit). If it's an interaction issue then this might not work properly, in which case log files might provide some clue, or you just have to test all combinations.

Link to comment
Share on other sites

This doesn't make any changes to normal recovery mechanics, so it's probably not the cause. I'll take a look at any logs you provide if you want, as they might contain some info. Does that happen even if you recover from the launchpad? Also, does it happen on a new save? If so, you can easily figure out which mod is causing it by either randomly guessing which mod it is and removing that from your list, testing, then repeating until you find which one caused it, or you can do it the faster way by using a binary search.

For that, you'd remove half your mods and test. If the problem persists, then the faulty mod is in the installed half, if it goes away it's in the other half (in which case you reinstall that half and remove the currently installed half, so you can keep retesting). Then keep dividing your mods in half and retesting until you find the one mod that causes the issue (or at least you will have narrowed it down quite a bit). If it's an interaction issue then this might not work properly, in which case log files might provide some clue, or you just have to test all combinations.

Okay, will have a fiddle around and post logs later on.

Link to comment
Share on other sites

Well as I had suspected, it was something in that save. I actually wound up just removing all my mods and starting over with a whole new save, which I had planned on doing anyway. I'll keep my eye out for when/if it happens again though and try to have a better log.

Link to comment
Share on other sites

Since the stages don't actually ever reach the ground (if they did, StageRecovery wouldn't be needed) it's not as simple to check if they're splashed down or landed on solid ground. However, I have been planning on adding in support for the Trajectories mod for more precise landing calculations, in which case I should be able to check if the predicted location is in the middle of water. Ideally I'll be able to query the PQS system for that, otherwise I'll have to assume that the water biome is entirely water and everywhere else is land.

It should be doable though :)

Is there any calculation of delta-V that could be done to see if the powered-landing stage has enough delta-V to return to the launch site and land via chutes and/or rocket power? The return would seem negligible (especially if using the Recovery Transponder Fitting strategy) since the first stages (at least mine) don't fall too far from the KSC. It was just something I was wondering; not concerned about it since most of my recovery percentages are 100% from vertical velocity and 95-98% due to distance.

Link to comment
Share on other sites

I don't personally know how to calculate a trajectory change to land back at KSC (though it's certainly calculable, but I don't know the math orbital mechanics well enough). Delta V is easy enough to calculate, SR already does calculate it and use up the appropriate amount of fuel for powered landings. Maximum distance percentage you can get is 98% (even in the stock game being landed at KSC nets you 98%, only runway/launchpad get you 100%). I agree it would be cool, and I was originally planning some sort of hand wavy system of reducing distance by using fuel, but I feel I should probably do it somewhat accurately if I can.

Link to comment
Share on other sites

What about recovery on other planets with atmospheres? (Laythe, Eve, extra planets added through mods)

I was particularly thinking about Eve, where getting to orbit in a single stage is impossible. What if you had a base there that could re-use the spent parts? You could finally have regular transport to/from the surface, without having to build a totally new rocket for each ascent.

I could use FMRS and just watch every stage fall to the ground.. but that would be incredibly long and boring, especially for an Eve ascent vehicle which is going to have lots of stages.

I was thinking about how this could be done:

* The EPL-oriented option: Delete the ship, and instead of giving funds, give RocketParts or Metal. Build up a counter in the mod, and then when people are controlling their base, allow them to add RocketParts/Metal to the currently-controlled ship. Pro-rate the RocketParts/Metal based on distance, just like funds are currently pro-rated. Also recover the fuel in the ship (if any) and "transport" it the same way (click to add to currently-controlled vessel). The vessel you're adding RocketParts/Metal/fuel to should be on the ground, of course - no mid-flight refueling :)

* The stock-oriented option: Instead of deleting the ship, zero out velocity, set altitude to surface altitude at that spot, turn it upright, and change its situation to landed. Or delete the ship, spawn it again on the ground, landed - either way, put it on the ground. If a parachute landing, spawn with whatever fuel was in the ship when it was despawned. If a powered landing, subtract the fuel that would have been used. Then it would be up to the player to reassemble and refuel the rocket:

The stock-oriented option could still be used with EPL; you'd just have to get a "recycling truck" over there and eat up the ship with a Recycler part to turn it into RocketParts/Metal, and/or tear it apart with KAS. After all, why recycle a battery/solar panel into RocketParts and then rebuild it, when you can just re-use it?

Actually the stock-oriented option would also be useful on Kerbin, for people that want to do their own rescue/recovery, or just want to drop off payloads from a plane and not deal with the 2.4 km physics limit. I see people have asked for that before.

- - - Updated - - -

Actually now that I think about it, the "EPL option" would be useful on Kerbin as well. I'd love an option to get RocketParts/Metal for my ship instead of funds + spare parts in inventory, and have recovery cost me money.

Link to comment
Share on other sites

I actually kind of like the idea of the "Stock oriented" option (which then works for everything else). I may play around with that, since it would alleviate all the issues with people dropping science probes and having them be deleted. It feels really OP in some ways though to assume that a craft would land perfectly, but at the same time when you load it up later if it's on the side of a mountain then it won't really survive.

If I can get that working at all then I'll be concerned with balance, since I'm not sure that I will be able to do it easily and I don't have much time for dev work. The other option is to not have stages unload until after they land, which takes care of all the questionable physics.

Link to comment
Share on other sites

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