KSP-RO / ProgramsIssueTracker

2 stars 0 forks source link

Plane recovery time / caps is busted #23

Closed lpgagnon closed 2 years ago

lpgagnon commented 2 years ago

rocketplane takes 88d to build, capped at 20 engineers

Possibly something to do with engine refurb (the more the engine is used, the less it's worth?), but the discrepancies seem too big for that. And in any case, pristine recovery taking 43% of build time is silly

lpgagnon commented 2 years ago

data! immediate recover:

progress = 259083.354862276
effectiveCost = 1409.846634
buildPoints = 129541.677431138
integrationPoints = 129541.677431138
cost = 809.846619
integrationCost = 0
mass = 7.0617547
kscDistance = 3417215.75

recover after full flight:

progress = 163520.7773192212
effectiveCost = 1059.317
buildPoints = 81760.388659610602
integrationPoints = 81760.388659610602
cost = 809.317017
integrationCost = 0
mass = 1.760831
kscDistance = 3336514.25
lpgagnon commented 2 years ago

After a second flight and recovery (xlr11, total run time ~14min): no change, values stay exactly the same as after first recovery. Possibly because this is indeed refurb-related, and the engine is already considered as used up as it can get after one continuous-rated-time increment

Meanwhile, if I build the same plane without engine, put it on the runway and recovery it right away, I get 20d, cap=15, suggesting it's actually considered more valuable than the plane with fully-used engine. But its progress is much lower at 112,423 (vs 163,520). So there's more going on here than just the BP/cap relationship

NathanKell commented 2 years ago

So something is breaking effectiveCost calculation on recovery. Interesting.

NathanKell commented 2 years ago

Yes, this is the engine refurb formula at work. It halves the effectiveCost for engines that have run.

The hard cliffs on cap I'm going to fix as part of #22 though.

lpgagnon commented 2 years ago

again, I don't believe engine refurb is adequate to explain all the numbers.

Possibly something to do with engine refurb (the more the engine is used, the less it's worth?), but the discrepancies seem too big for that. And in any case, pristine recovery taking 43% of build time is silly

Meanwhile, if I build the same plane without engine, put it on the runway and recovery it right away, I get 20d, cap=15, suggesting it's actually considered more valuable than the plane with fully-used engine.

NathanKell commented 2 years ago

Update KSCSwitcher. If you haven't, there's a bunch of randomness with recovery because distance is factored in but distance is Very Wrong without the update.

lpgagnon commented 2 years ago

with kscswitcher updated, and the staffing updates

1- building plane: 79d/33staff 2- recovering pristine plane from runway: 31d/32 staff 3- recovering plane from runway after a few seconds of burn: 23d/27 staff 4- recovering plane from water just off the runway after a few seconds of burn: 14d/26staff 5- recovering plane from water 300km away after full burn: 20d/19staff

This still seems like nonsense.

RCrockford commented 2 years ago

I'm also getting crazy talk recovery. I have a starter plane that recovers in a few seconds. Junkers cockpit with first XLR11 config. Take off from runway, fly around until fuel exhaustion. Land back at runway. SPH recovery, by the time I have clicked through the crew debrief etc. screens it is recovered.

Seems insanely fast for a rocket plane.

ryanc55 commented 2 years ago

Some of these issues seem to stem from used engines being assigned lower effective cost for the purpose of refurbishment calculation, and that EC is getting used for the recovery formula. With a plane that otherwise has very few cost modifiers and a used engine, the EC can actually be lower than the base cost.

One way to fix that would be to only discount the EC of used engines in the editor scene. This will make recovery times a bit longer, more toward the #3 case give above by LPG. But that could be taken care of if needed by modifying the KCT recovery formula. I'll make a PR for this.

The distance penalty hardcoded into KCT is surprisingly small and linear: {distance to SC}/.5*body circumference. There perhaps should be more benefit given to runway landings.

ryanc55 commented 2 years ago

The effective cost fix as well as a 25% recovery time discount for recovering from a runway are now in the artifact build.

NathanKell commented 2 years ago

Closing this again. If there is more weirdness, please open a new issue rather than commenting here.