Jump to content

[1.12.x] StageRecovery - Recover Funds+ from Dropped Stages


linuxgurugamer

Recommended Posts

  • 6 months later...
On 5/12/2023 at 9:35 AM, Mark L said:

Hi, I have a problem that has also been mentioned in this thread. It's when Stage Recovery and Real Chutes are both installed together, causing lag/stuttering in the VAB.

 

On 5/14/2023 at 10:44 AM, linuxgurugamer said:

Stage Recovery is doing lots of calculations, trying to keep track of all the chutes.  What I see happening is the following:

You select a part

You then start waving that part around.  Notice how, when you move the mouse over the rocket, it actually puts down 8 parachutes for a moment, then removes them

It's that moment when KSP creates 8 new parachutes, and calls all the modules which are in each part.  There are at least three modules in each RC part, so you now are initializing 24 modules, and then almost immediately destroying all those modules.  If you don't have a fast computer, you are going to see the lag.

Regarding Stage Recovery, it doesn't add any modules to the parts, but, it is doing calculations anytime the ship is modified.  With what you are doing, I believe it is being called numerous times per second while your mouse is moving over the ship.  Notice that there isn't any lag when the mouse is not over the vessel.

The only think I can suggest doing is to increate the VAB Autocalculation delay a bit to try to avoid all the multiple recalculations

 

I've hunted down the source of the issue here. It seemed to be a drastic overuse of Reflection calls to obtain the RealChute assembly, calling it quite literally every time any singular chute part was iterated over!

I've opened a pull request that solves this issue by caching the obtained Reflection info. With an i7-13700K I've gone from horribly stuttering for a good 1.5-3.0s every time I pick up/place down a part on large crafts to being buttery smooth.

Link to comment
Share on other sites

22 hours ago, TuckMeIntoBread said:

I've hunted down the source of the issue here. It seemed to be a drastic overuse of Reflection calls to obtain the RealChute assembly, calling it quite literally every time any singular chute part was iterated over!

I've opened a pull request that solves this issue by caching the obtained Reflection info. With an i7-13700K I've gone from horribly stuttering for a good 1.5-3.0s every time I pick up/place down a part on large crafts to being buttery smooth.

Good job, hope it gets a fix.

Link to comment
Share on other sites

New release, 1.9.7

  • Thanks to github user @TuckMeIntoBread for this:
    • Optimize Reflection Usage in ProcessRealchute Method.  This pull request introduces optimizations to the ProcessRealchute method, significantly improving performance and all but eliminating VAB hiccup/lags related to StageRecovery + RealChute being used in combination.
       
Link to comment
Share on other sites

  • 4 months later...

Hi, Im having an issue with the mod and tweakscale, in the VAB tweakscaled parachutes are calculated correctly in the tweakscale window, but when recovering the stage the scale seems to be ignored. ie. In the vab it says 5 m/s but when recovering it says 20 m/s.

Is this a bug or am I doing something wrong? Both mods are installed with CKAN on the latest version with stock parachutes.

Thanks in advance!

Link to comment
Share on other sites

  • 1 month later...
On 5/23/2024 at 10:08 AM, ODSTjoker said:

Hi, Im having an issue with the mod and tweakscale, in the VAB tweakscaled parachutes are calculated correctly in the tweakscale window, but when recovering the stage the scale seems to be ignored. ie. In the vab it says 5 m/s but when recovering it says 20 m/s.

Is this a bug or am I doing something wrong? Both mods are installed with CKAN on the latest version with stock parachutes.

Thanks in advance!

2 months have gone by and I see no one replied. Tweakscale seems to interact inconsistently with Stage Recovery. It's not only parachutes; sometimes other tweaked parts can cause a craft to be heavier or lighter than expected at recovery time and the chutes or engines are inadequate for safe recovery.

There are 2 active forks of Tweakscale, one maintained by Lisias and another by JonnyOThan. In CKAN, one is called "TweakScale - Rescale Everything!" and the other is "TweakScale Rescaled". I think parts tweaked with either one don't work perfectly in Stage Recovery.

Link to comment
Share on other sites

  • 2 weeks later...
On 7/14/2024 at 11:59 PM, DeadJohn said:

2 months have gone by and I see no one replied. Tweakscale seems to interact inconsistently with Stage Recovery. It's not only parachutes; sometimes other tweaked parts can cause a craft to be heavier or lighter than expected at recovery time and the chutes or engines are inadequate for safe recovery.

There are 2 active forks of Tweakscale, one maintained by Lisias and another by JonnyOThan. In CKAN, one is called "TweakScale - Rescale Everything!" and the other is "TweakScale Rescaled". I think parts tweaked with either one don't work perfectly in Stage Recovery.

This mod does not have any knowledge of Tweakscale (TS), therefore when recovering vessels, it doesn't know anything about the change TS makes.  It has to do with the way it gets the info, and would probably require a lot of work to make it able to contact either version of TS.  Add on to that the headache of trying to support two different versions of TS, and it's just not going to happen anytime soon, sorry

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...