Jump to content

[1.3] Smartstage, intelligent VAB reset button 2.9.7


xytovl

Recommended Posts

Have you ever tried to build a massive asparagus rocket and messed up the staging ?

Here is SmartStage, just put many tanks, decouplers, fuel lines and engines, click the magic "Smartstage" button and optimal staging is done.

The plugin only rearranges stages, no part is added or removed..

Get the plugin here.

Example of staging with default reset button:

8GPM8rv.jpg

Example of Smart stage staging:

qjo1XYf.png

Sources are available at https://github.com/xytovl/SmartStage under GPLv3, feel free to submit improvements.

Edited by xytovl
Link to comment
Share on other sites

No Pics no clicks.

Is this a bot ? No images found, post added ? :huh:

The plugin only rearranges stages, no part is added or removed.

What the point of having a picture showing nothing relevant and/or useful ? I think I'll put myself on top of some rockets and enjoy the peace in deep space... :confused:

Thanks xytolv, but what is your definition of "optimal" ? (it may be useful, as I usually forgot staging when I add decoupler and engines in a random order KSP don't like too much).

Link to comment
Share on other sites

Here is the algorithm followed by the plugin:

It first activates launch clamps and all engines that have nothing attached at the bottom.

Then it folloew fuel flow, as described in http://forum.kerbalspaceprogram.com/threads/64362-Fuel-Flow-Rules-%280-23-5%29

Each time a tank is fully depleted it checks if a decoupler only has empty children (ignoring sepratrons). If it is the case, the decoupler is fired as well as all its attached sepratrons.

Available engines are recalculated and we loop to the fuel flow step.

Once we do not detect any tank depletion event the algoruthm terminates.

To be simple the idea is to turn on all the engines you can, and arrange the decouplers not to waste any fuel.

Link to comment
Share on other sites

Here is the algorithm followed by the plugin:

It first activates launch clamps and all engines that have nothing attached at the bottom.

Then it folloew fuel flow, as described in http://forum.kerbalspaceprogram.com/threads/64362-Fuel-Flow-Rules-%280-23-5%29

Each time a tank is fully depleted it checks if a decoupler only has empty children (ignoring sepratrons). If it is the case, the decoupler is fired as well as all its attached sepratrons.

Available engines are recalculated and we loop to the fuel flow step.

Once we do not detect any tank depletion event the algoruthm terminates.

To be simple the idea is to turn on all the engines you can, and arrange the decouplers not to waste any fuel.

Well then something like Delta II with 3 SRBs that are ignited in the mid of air won't work well.

I would consider taking TWR into consideration, though that will make the algorithm MUCH MUCH more complicated.

Link to comment
Share on other sites

Looks cool, will give this a go. It may, as some people pointed out, mess up some situations, but it would be easy enough to check everything yourself afterwards. Hopefully this will save me some of those annoying ungroup;click the one you want;drag the crap to where it needs to go sort of thing.

Link to comment
Share on other sites

As you may have noticed the project is very young, there must be bugs.

If you have any ship that misbehaves with my plugin, please open an issue on github with the craft file, the description of what staging you get and what you expect and required plugins.

You can also add feature requests but at the moment I do not plan to add any configuration, I first have to make sure the base algorithm works well.

Link to comment
Share on other sites

I see an even brighter future if you could provide a staging lock: Parts (I/we) connect are often placed in the wrong stage, sometimes in a really ridiculous way. Like you add a parachute for stage 7 and it winds up in 1 when you don 't want it.

I want to decide where parts go, not leave it to some tequila fuzzy logic (pun) and then have to reshuffle for minutes, every time.

Your mod would be the ultimate VAB mod!

Link to comment
Share on other sites

I have just released an important bugfix in V0.5, the formula for fuel consumption was wrong and it would fail if you mixed solid and liquid or if you had too different ISPs.

I think I have implemented my original idea and can start adding features, I will need some hints.

I want to add the possibility to lock an item to a specific stage, but I have no idea on how to add the UI. Is it possible to add a right click menu to existing parts, or directly on the staging icons?

An even more advanced feature would be to force a part to be in the same stage as an other one, I imagine it like the fuel transfer system, where you select part 1, part 2 and say that part 1 is locked to part 2 stage. Is this possible ? Where can I find the API for this kind of features ?

Link to comment
Share on other sites

Well does it recognize upper stage engine that have nothing attached to their nozzle? Because I do engine clusters all the time, and since KSP does not understand what a proper loop is... I use girders to balance one tank atop another. If it does, I am speechless once again, if it doesn't then... well, there's only so much one can automate, right?

Sincerely

Marrus

Link to comment
Share on other sites

Well does it recognize upper stage engine that have nothing attached to their nozzle? Because I do engine clusters all the time, and since KSP does not understand what a proper loop is... I use girders to balance one tank atop another. If it does, I am speechless once again, if it doesn't then... well, there's only so much one can automate, right?

Sincerely

Marrus

I am not 100% sure of what you propose, would it be to calculate exhaust damage and ignite engines only once it is safe ? I don't know how it is calculated ingame, I will have a look and see if I can add that.

You could also add some heuristics, like for example assume that launch clamps should always go in the lowest stage and parachutes on the highest.

Launch clamps are already in the lowest stage, git version has parachutes on a separate 0 stage.

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
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...