Jump to content

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


magico13

Recommended Posts

In my first career play through using SR I have Mun and Minmus biomes half-explored, a few planetary flybys complete, and a mid-7-figure bankroll piled up and racking up cash from contracts seems almost too easy...

Has anyone looked at adjusting game balance to compensate for the SR cash back effect?

I'll agree if you're playing on Easy or Normal, SR can make the game a bit unbalanced in cash flow. Then again you rank up a lot of cash on those difficulties even without SR. Playing on Medium or Hard is a whole different story.

Or, as others suggested just adjust the sliders for yourself.

I would add my opinion that SR is well balanced as is. I am playing an extended career on Medium and I always have to juggle doing more contracts to bring in some cash against launching the stuff I want to, which eats cash :)

Now for the real reason I dropped by... Magico13, have you considered adding support for tweakscaled parachutes? Some of the giant rockets I launch have 30 or more chutes on the lower stages, it would be awesome if I could scale those up to 200% or more (and half the number of chutes), but SR doesn't recognize the scaled up chutes as being more effective.

Edited by MalevolentNinja
Link to comment
Share on other sites

Magico13, have you considered adding support for tweakscaled parachutes? Some of the giant rockets I launch have 30 or more chutes on the lower stages, it would be awesome if I could scale those up to 200% or more (and half the number of chutes), but SR doesn't recognize the scaled up chutes as being more effective.

I can certainly try to add that, but I personally recommend RealChutes when you want any sort of custom parachutes. SR works better with RealChutes than it does with Stock chutes, and you can easily configure them to require a small number of chutes. I'll look into if I can get the total parachute area of tweakscaled chutes though, as that's what SR looks at for estimating the terminal velocity. With RealChute SR doesn't have to estimate anything, so that's why that works better.

Link to comment
Share on other sites

I can certainly try to add that, but I personally recommend RealChutes when you want any sort of custom parachutes. SR works better with RealChutes than it does with Stock chutes, and you can easily configure them to require a small number of chutes. I'll look into if I can get the total parachute area of tweakscaled chutes though, as that's what SR looks at for estimating the terminal velocity. With RealChute SR doesn't have to estimate anything, so that's why that works better.

Thank you for the suggestion. I remember I had looked at RealChute before and decided not to use it, but I didn't remember why. And I'm sure it's changed at least a bit since then, so I just took another look at it in a clean install. And I remember why now :) IMO RealChute is just overkill. It adds a lot of complexity, which isn't necessarily bad. But for me, I can see no reason I need these features. And you can't just ignore them - every time you chute (and with SR that's a lot!) you have to configure the chutes. Being unfamiliar with RC, that means a lot of trial and error testing - and there's no reward in the end.

I don't have a problem with the g-force on chute deployment - KJR takes care of that. And I imagine that Jeb is especially fond of the ride. So that leaves SR and 30 chutes on a lower stage. Which I would rather deal with then add in the complexity of RealChute. This is all just my opinion of course, I can see RealChute is a well though out mod and well implemented and it's obvious why there's a fan base. I took time to explain this just to rationalize why anyone would rather tweakscale up the stock chutes.

Back to SR - thanks for a great mod! It has added a lot of enjoyment to my game. It's the kind of added complexity to KSP I love - I can chose to ignore it, but there's $$$ down the drain if I do. Which is a great incentive to take the extra time to design lower stages that will be recovered.

A recent launch:

X9hKhBZ.png

Link to comment
Share on other sites

I do agree that RealChute can be a bit complex for basic things, so I can understand why you'd elect not to use it. I won't ever not use it because I like setting up my chutes to work perfectly for the payload and thus save on mass, cost, and guesswork. Everybody has their own playstyles and preferences though, which is why I like the KSP modding community: options for everyone! :D

I've opened an issue on GitHub to remind me to look into adding support for TweakScaled parachutes. Skimming through the code I'm not 100% sure why they aren't already being supported, so I'll need to do some research into how TweakScaled parachutes actually work.

Link to comment
Share on other sites

http://www.tiikoni.com/tis/view/?id=75df054

http://www.tiikoni.com/tis/view/?id=cc06451

i think there was a bug of some sort ... 2 of my kerbal out of 3 are ok but the third said mission faillure ...

the 2 that i could save were in the range so i could quick swap between them, the third went a little further than planned but was still ok

my pod containing him was ok but the mission was a faillure

you now own me 70k and some rep ... or fix that thing on the next update plz

Link to comment
Share on other sites

i think there was a bug of some sort ... 2 of my kerbal out of 3 are ok but the third said mission faillure ...

the 2 that i could save were in the range so i could quick swap between them, the third went a little further than planned but was still ok

my pod containing him was ok but the mission was a faillure

you now own me 70k and some rep ... or fix that thing on the next update plz

Hmm, I was a little afraid that sort of issue might happen. StageRecovery doesn't use the normal recovery mechanics and isn't able to prevent the death of a Kerbal, it brings them back to life after the game kills them. I'm not sure if there's a way I can get around that problem. I have an idea, but it will require changing a non-trivial portion of the StageRecovery recovery mechanics. I might be able to prevent them from dying by recovering them separate from the rest of the craft, prior to the craft's destruction, which should fix that issue.

Link to comment
Share on other sites

I thought I read some place a few pages back that if you have a enough chutes for a predicted landing speed below are certain level, you would get full funds back which would also remove the usefulness of Recovery Transponder Fitting strategy. But I have had recovery speeds as low as 2m/s and it is still reduced by distance.

Link to comment
Share on other sites

Speed and distance are both factored separately. Distance can only go up to 98%, which is what you'd get from manually landing at KSC (the runway and launchpad are exceptions and are handled differently). No amount of parachutes can improve the distance measure.

I have never tested the Recovery Transponders strategy, so I'm not sure if SR works properly with it. Assuming it just modifies transactions with the TransactionReason of VesselRecovery, then SR should automatically work it. If it modifies the actual recovery code, then SR doesn't support it because SR has a custom recovery.

Link to comment
Share on other sites

Assuming it just modifies transactions with the TransactionReason of VesselRecovery, then SR should automatically work it. If it modifies the actual recovery code, then SR doesn't support it because SR has a custom recovery.

EFFECT
{
name = ValueModifier

valueId = RecoveryMinimumDelta

effectDescription = to Minimum Vessel Recovery

minValue = 1.05
maxValue = 1.15

}
EFFECT
{
name = ValueModifier

valueId = RecoveryMaximumDelta

effectDescription = from Maximum Vessel Recovery

minValue = 0.94
maxValue = 0.90

}

I don't know what this means, but this it.

Link to comment
Share on other sites

Speed and distance are both factored separately. Distance can only go up to 98%, which is what you'd get from manually landing at KSC (the runway and launchpad are exceptions and are handled differently). No amount of parachutes can improve the distance measure.

I have never tested the Recovery Transponders strategy, so I'm not sure if SR works properly with it. Assuming it just modifies transactions with the TransactionReason of VesselRecovery, then SR should automatically work it. If it modifies the actual recovery code, then SR doesn't support it because SR has a custom recovery.

I was talking about when you are not close to the port. The recover amount goes down like it should, but I thought I read in a post that getting the landing speed below a certain amount nulified distance.

Link to comment
Share on other sites

I was talking about when you are not close to the port. The recover amount goes down like it should, but I thought I read in a post that getting the landing speed below a certain amount nulified distance.

Nope, speed only ever affects the speed %, and distance only ever affects the distance %. There may have been some discussion about gliding recovery, where with enough wings you could glide some distance back (and thus reduce the distance %) but that isn't implemented since I don't know an easy way to calculate the coefficient of drag and the coefficient of lift on a vessel, especially one that isn't physically loaded into the game.

Parachutes will not ever reduce the distance %, but wings and engines might in the future (but do not currently). Hopefully that clears things up a bit :)

Link to comment
Share on other sites

Magico13,

Does this mod simply auto recover once your far away enough from debris?

so if I were to decouple a part with no force and it followed very close by (within 20 m and with parachutes) will it recover? even if I follow it and watch it blow up? (this mod doesn't activate the parachute but only counts it for calculations?)

Edit: Is this Mod compatible with the mod that adds more launch pads and also other planet launch pads (adding recovery on duna for example)

Edit 2: Does this mod really do powered recovery? on download page I saw said it does but scott said differently

Edit 3: Is this compatible with Flight Manager for reusable stages? though I am not even sure it is up to date, I checked it out and it didn't work like it did with Scott...

Final edit 4: Above you wrote that speed affects % what if you added speed 2 variant where you use available delta V to (in calculation) burn towards KSC to reduce the distance %, as for wings use the entire craft lift rating, so the rating added up, and using it in a formula (I had an idea but it slipped) but this formula calculator could help inspire a code...

Hope I helped

Edited by DiamondExcavater
Link to comment
Share on other sites

~~questions~~

Let's see if I can answer everything sufficiently ;)

This mod only activates when a vessel/stage/thing is destroyed by KSP for being unloaded in the atmosphere. The conditions for that are roughly: >22.5km away from the active vessel, <23km altitude on Kerbin, not landed. Once the vessel is destroyed, StageRecovery checks if it has enough parachutes to land slowly and/or an engine with fuel and some sort of pilot to try to land with engines. If it can be recovered, SR "recovers" it. The recovery is a custom written one, so it sometimes has problems with things such as contracts.

If the thing you drop doesn't leave physics range or you focus on it, StageRecovery won't do anything with it.

This mod is compatible with Kerbal Konstructs, but will only allow recovery on Kerbin or Earth (if using RSS). With RSS there may be issues with the distance calculation not using the appropriate launch site. With Kerbal Konstructs the closest open launch site should be the one used for distance calculations.

Yes, this does powered recovery. I, and nobody else, is sure why Scott said it doesn't, because it has clearly said that it does have it since long before he made that video. Check the first post for the requirements for that. Always trust the official sources more than an unofficial thing mentioned by a youtuber.

Last I checked this is compatible with FMRS as I explicitly added support for it. The way it works might seem a bit quirky, but I don't believe SIT89 has been active lately so I can't make them work together any better until he's back. Here's a rough guide for how it works: if FMRS is disabled, StageRecovery will try to recover it (overrides all the things I'm about to mention); if it has a probe core or a kerbal, FMRS gets to recover it; if it has a RealChutes parachute then FMRS gets to recover it; if it has a Stock parachute then StageRecovery gets to recover it; if it has no parachutes or kerbals or probe cores then StageRecovery will politely tell you that it was destroyed because nothing could recover that ;)

Currently powered recover just assumes the fuel is used to stop safely (and inefficiently, a manual landing is more efficient) and doesn't adjust the distance. I have been thinking about using any extra fuel to try to reduce the distance as well, but haven't come up with any solid plans for how to do that. Part of the issue is that SR just uses the position at destruction and doesn't calculate the final landing position (the atmosphere makes things tricky), which would be a prerequisite for trying to adjust that final position. Gliding recovery would be not too hard if I knew the coefficient of drag and the coefficient of lift for the vessel, since then you can compute the glide slope and plug in the altitude and get a rough estimate for how far you can go, but I don't know how to access those variables for a particular vessel and they're dependent on the orientation. It boils down to "these additions are a lot of work for only marginal gameplay gains", so they're low priority. I have other projects that have better gameplay returns for the same amount of work, so those get prioritized first.

Thank you for the link though. I'll bookmark that for later.

Link to comment
Share on other sites

Currently powered recover just assumes the fuel is used to stop safely and doesn't adjust the distance.

You should muck around with a code which checks for parachutes (and if its safe) and if parachute = true, and vessel has delta v/thrust, then ignore Y axis powered decent and adjust x/z axis towards KSC

I personally haven't done heavy programming like this, but somehow the code that I am thinking of might work, but don't trust me as I am only a pro programmer on scratch (a kiddy programming tool, in which I have made a 2 Gigabyte game which was very slow)

No problem for the link :cool::D

Edit: (yes again)

If I put air brakes it will reduce terminal velocity (link to another formula) of craft making it safer to land, I'm not sure if you have the code for terminal velocity or not, or what calculation you use, but if you do use terminal velocity then airbrakes should be included and perhaps wings too, but they can reduce distance. If you really want to test how the gliding works with lift i suggest launching a rocket with wing and watch the bottom controllable stage glide and see how far it goes.

Does this powered landing require control over vessel? i.e. a computer onboard

Edited by DiamondExcavater
Extra info
Link to comment
Share on other sites

Deployed parachutes would be detrimental to the overall horizontal distance you can travel. The way you'd reduce distance would be to thrust as soon as possible to alter the trajectory toward the KSC, overshoot to account for atmospheric drag, then suicide burn/deploy chutes when near the ground (< 1km). You're welcome to take a look at the code on Github if you want to try to make sense of any of it. Most of the "work" is done in RecoveryItem.cs.

Terminal velocity is only calculated for craft with parachutes. In pre-1.0 atmosphere it was also calculated, since that didn't depend on orientation. These stages are typically uncontrolled, so I can't make any assumptions about orientation of the vessel (the two I'd even consider are "forward" or "the last one", both of which aren't correct most of the time). The real problem with calculating the terminal velocity is that I don't know the coefficient of drag (Cd in the formula) and I haven't figured out how to calculate it for a particular vessel. But we run into the orientation problem again, as Cd is orientation dependent. Airbrakes can't be included in calculations until I figure out how to get a reasonable Cd for a vessel. Wings can't really be included until I can get Cd and Cl (coefficient of lift). It's not the calculation of the formulas that are giving me problems, they're all very simple, it's getting the vessel dependent values from the game and in a way that makes sense in a totally generalized manner (every stage is treated identically) so that I can use them in the formulas.

And yes, powered landing requires a point of control (otherwise how would it orient itself properly and know when to fire the engines?). By default it requires a probe core with SAS capabilities or a Pilot kerbal. Basically, it requires SAS to work. There's a way to disable that requirement so that any kerbal or probe core will be enough, but a point of control is always required. And about 300 m/s of atmospheric delta-v (if you add parachutes that goes waaay down).

Link to comment
Share on other sites

This page from the forum has Nathan the squad member talk about the topic, maybe you could ask him kindly for help on the drag/lift issue. As for orientation of the craft can be given because in Kerbal engineer it can tell you heading and that stuff so you can use it for angle of attack, I could ramble on theories but I guess talk to the experts...(not saying your not one).

I mean it would help a lot to ask, and probably in the near future this mod could be implemented in to the career mode as an option...

But TBH the amount of extra money you might get for gliding closer to KSC would be roughly less than the cost for the wings, so might as well make cheap recoverable stages...

let me get this straight, you need a parachute and a command module to allow for recovery or just a simple engine and parachute will do?

Edited by DiamondExcavater
Link to comment
Share on other sites

I bookmarked that thread last night actually, and NathanKell and I frequently chat on IRC ;) As for orientation, if I can get the center of drag as well, then I can assume the vessel is oriented parallel to the vector between the center of mass and the center of drag. For uncontrolled vessels that's the most likely orientation, and for "properly" designed rockets and planes that's also pretty likely. I've looked through some of the documentation on the drag cube system, but I'm not 100% sure on how to get what I need from it.

There's still the issue of the ratio of "amount of effort required to implement" to "gameplay advantages", and there are still many other projects that I'm working on that have a higher ratio. For instance, last night I wrote some code to calculate the estimated terminal velocity of every stage on a ship in the VAB separately and figured out how to highlight the parts green, yellow, and red depending on if they'll land below the velocity cutoffs. So that will make constructing vessels that can be recovered automatically much, much simpler.

Powered recovery requires a probe core/pilot kerbal and engines with fuel and a thrust to weight ratio greater than one. Parachutes are optional and make it require less fuel.

Non-powered recovery requires parachutes, no probe core or anything else is required, nor do they have to be deployed (exception: if you drop the stage below 5km, set them to deploy at 0.5 pressure and stage them with the decoupler. If you drop them between 5km and 10km you might want to do the same. Above 10km you don't need to deploy them. The reason for this is because you might not leave physics range before they hit the ground if you drop them very low, but once you get to 10km you're probably moving fast enough that they won't hit the ground before unloading)

Link to comment
Share on other sites

Small question, where is the stage recovery icon in toolbar on top? also the KCT icon doesn't appear (i have the window so it's okay) BUT i installed stage recovery i got the folder int the right place, it had all it's files within, and i don't think i have it? tell me if you need the player.log and i'll either edit this or send new msg

Edit: i looked into the files and it had some random text files saying ignore.txt with words like potato, and i realised i must have either a dud or old version, but it doesn't show up in my addon version checker..

so after reinstall i checked and again its not appearing, i went into the tracking station where another tool bar plugin appears and i saw that its icon is in the list to show but doesn't show up... so its there but not there? also it doesn't show in flight

Player.log here

Edit 2: Sorry I haven't played with launching a stage and finally i got to actually making a staging rocket (not SSTO silly me) and it pops up with msg that stage was destroyed, i thought there was a menu to change options for KSR looks like i was wrong and the options are in settings file in game data, don't worry about this issue, I'm just silly

Edited by DiamondExcavater
Link to comment
Share on other sites

You have Blizzy's Toolbar plugin installed, so the StageRecovery button will show up in there. You have to configure the toolbar to tell it which buttons to display, currently the SR button is hidden. Just tell it to display the SR button and then you'll see it. If you want it to be in the Stock toolbar you have to either check that setting in-game (after you make the button visible in the toolbar mod), or edit the config file to set UseToolbarMod to false (I don't remember the exact setting, but it should be fairly obvious).

If you're still having trouble after that, let me know :)

(PS: You have the exact same problem with KCT's button)

Link to comment
Share on other sites

Um, it's hard to explain this, but either my blizzy tool bar doesn't want to show it, or there's another issue, I have the icon checked to show it and it doesn't want to appear and the toolbar doesn't show up any where except if i have infernal part, which then it shows the icon for me to move stuff around.

Blizzy doesn't show up in KSC view

KCT only only shows in the tracking station, which only toggles the window, but stage recovery works but it's not showing in both toolbars, i think you should check player.log, and also is there a way to configure button in files?

Edit: when i switch from tracking station back to KSC view, the blizzy tool bar stays on screen as it's loading and it appears with KSR but the whole things goes away soon after loadings done!

Edited by DiamondExcavater
Link to comment
Share on other sites

This might be too complicated to code, but have you considered taking the biome the stage lands into account when calculating how many funds the player gets back? I'd bet that it's harder to recover from mountains than grasslands.

Link to comment
Share on other sites

This might be too complicated to code, but have you considered taking the biome the stage lands into account when calculating how many funds the player gets back? I'd bet that it's harder to recover from mountains than grasslands.

The stage doesn't "land" it gets deleted by the game which this mod takes over and only calculates distance from KSC and its impact speed, but I could be wrong, but my guess is that the biome isn't taken in account in any of the formulas and would be a hassle.

Stages that land in water get water damaged and they are expensive to clean out

Link to comment
Share on other sites

Um, it's hard to explain this, but either my blizzy tool bar doesn't want to show it, or there's another issue, I have the icon checked to show it and it doesn't want to appear and the toolbar doesn't show up any where except if i have infernal part, which then it shows the icon for me to move stuff around.

It still sounds to me like you haven't properly configured the toolbar, but at this point I'd suggest switching to the Stock one for SR and KCT. For SR you'll have to open the config file and find the setting pertaining to "toolbar", then flip that from "false" to "true" (or to "false" if it's already "true", I don't recall what the setting is exactly), like I mentioned earlier.

For KCT, if you can get the window open then go into the Settings and click the "Use Toolbar Mod" button so it isn't selected. You'll likely need a game restart afterward for it to take effect, but exiting to the main menu and then loading the save might work too.

This might be too complicated to code, but have you considered taking the biome the stage lands into account when calculating how many funds the player gets back? I'd bet that it's harder to recover from mountains than grasslands.

Stages that land in water get water damaged and they are expensive to clean out

Biomes aren't currently accounted for, but I could account for them fairly easily I think. There was some discussion in the past to reduce the value of stages that land in water, but I put it off because I wanted to get better trajectory estimates (aka, any trajectory estimates) first. I might as well implement it now for all biomes and it'll still work when I eventually add better estimates.

I like the idea of mountains and water having reduced recovery values. Are there any other biomes you think should have reduced rates? For most I think the distance would be a bigger factor than the biome, but I might reduce the Ice Caps as well and maybe the tundra (possible bad weather making it harder/more expensive to recover).

Link to comment
Share on other sites

Are there any other biomes you think should have reduced rates?

I don't mind how it is now, but if you were to implement biomes, deserts have sand which can easily get into engines and add foreign substances, oceans for water damages, mountains due to rolling down cliff, tundra for weather, ice caps due to sudden freezing temperature and melted ice can damage a hot engine. the only biome that would be good enough is grass lands and flat grass places, lol

all the biomes are deadly for the rockets, and for recovery values, it should only reduce by a small amount, but i think distance is a bigger factor

I will edit this post later on to update on toolbar

Link to comment
Share on other sites

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