Jump to content

When a stage has both decoupling and engine activation, make it work better.


Recommended Posts

When a stage has both a decoupling AND an engine activation in it, it seems (as far as I can tell) to be using this ordering of events:

Search for any decouplers in this stage step. Do them FIRST. Then *After* that, perform any engine activations that may be in the step.

The problem with this logic is that while it works when the purpose is to decouple a stage of debris and then fire the next engine up the stack that's still attached to the control capsule, it fails when the purpose is to do it the other way around and fire an engine on the bit of debris you're letting go (i.e. to make a forceful separation of the debris with sepratron boosters.) The problem is that when the engine you're trying to activate is on the bit that's about to become detached debris, the game's insistence on completing all detachments FIRST before doing any engine firings means that it fails to execute the engine activation that's in the same stage step as the decoupling. I *think* that what's happening is that by the time it gets around to executing the engine activation, the piece is now detached and no longer has a path to the command capsule, and therefore the engine is treated as unresponsive debris. This isn't fair since the staging list instructions said to perform the engine activation WITH the decoupling, not a moment after it.

It would be better if the check dealt with this scenario, otherwise sepratrons aren't really usable. I tried making an Apollo-style escape tower and it had the problem that when the tower had been unnecessary on that launch and the launch worked fine and it was now time to jettison the tower partway into the flight, I had to jettison it as a two-stage process - first fire its engines in one stage and then a couple of seconds later hit the next stage to jettison it. When I tried to do the sensible thing and make it one stage (or one action group with an ALT-key) the decoupling always happened first and the engine activation never occurred.

My proposed change - make it work like this:

Make a queue for "engines being activated in this step". BEFORE doing any decoupling, run through and populate the queue, performing the "is it attached?" check THEN at the beginning of executing the staging step. Then execute the decouplings, and then go back and execute the engine activations that are in the queue. That way the "is it attached?" check happens before the decoupling happens, but the actual firing happens right afterward (This approach handles both the fact that the separation must come first for engines attached "above" the separator, but also handles the fact that the check for "is it attached" to see if the instruction to fire the engine can happen must come first before the separation for other types of engine activations.)

Link to comment
Share on other sites

But... Isn't that how it works right now?

Here, I made a simple craft that has both separatrons and parachutes in the same stage as the radial decouplers and they all get activated at the same time:

oEzu997.png

*EDIT* As far as I can tell, it works for separatrons, parachutes and SRBs. It doesn't work for liquid fuel engines - if you try to activate a LFE at the same time the stack it is on decouples it will not work, but if you need a LFE just for a decoupling event, you are doing something wrong...

Edited by Awaras
Link to comment
Share on other sites

But... Isn't that how it works right now?

Here, I made a simple craft that has both separatrons and parachutes in the same stage as the radial decouplers and they all get activated at the same time:

oEzu997.png

*EDIT* As far as I can tell, it works for separatrons, parachutes and SRBs. It doesn't work for liquid fuel engines - if you try to activate a LFE at the same time the stack it is on decouples it will not work, but if you need a LFE just for a decoupling event, you are doing something wrong...

See original post. I was doing the escape tower of the Apollo missions. And to have the thrust to pull a capsule up, sepratrons isn't enough. That was the first thing I tried. After putting 16 of them on STILL didn't pull the capsule off the ground, I gave up on them and went with the tiny liquid engines because the sepratrons didn't have the thrust.

Link to comment
Share on other sites

Slapping a probe core on there fixes it. It's because the detached part has no control method, and separation rockets work fine.

If you decouple a stage before its fuel is gone, it continues to fire at its previous throttle setting even though it's just debris with no core.

Link to comment
Share on other sites

Except that that is NOT what happens when I do it. It detaches without firing.

AFAIK all staging commands execute simultaneously. I've never had a problem with sepratrons firing if their firing command is in the same staging group as the separator. If the sepratrons are assigned to a stage after the separator/decoupler triggers, then of course they don't fire as they're no longer connected with the command pod and are no longer treated as part of the craft.

-- Steve

Link to comment
Share on other sites

See original post. I was doing the escape tower of the Apollo missions. And to have the thrust to pull a capsule up, sepratrons isn't enough. That was the first thing I tried. After putting 16 of them on STILL didn't pull the capsule off the ground, I gave up on them and went with the tiny liquid engines because the sepratrons didn't have the thrust.

Sorry about the misunderstanding then. You never did mention anything about LIQUID engines specifically, you only mentioned separatrons by name.... :/

Link to comment
Share on other sites

Sorry about the misunderstanding then. You never did mention anything about LIQUID engines specifically, you only mentioned separatrons by name.... :/

True. But I cannot see ANY logical reason for there to be a difference in how the game works for SRBS versus liquid engines in regards to whether or not you can fire them in the same stage as a separation happens. I presumed I would get the same behavior from sepratrons so I mentioned them as a shorthand way of saying "firing an engine so a part will separate when it detaches." I had no idea it made any difference because it doesn't make any SENSE that it makes a difference.

Link to comment
Share on other sites

AFAIK all staging commands execute simultaneously. I've never had a problem with sepratrons firing if their firing command is in the same staging group as the separator. If the sepratrons are assigned to a stage after the separator/decoupler triggers, then of course they don't fire as they're no longer connected with the command pod and are no longer treated as part of the craft.

-- Steve

As I found out from another commenter, there's a difference in this behavior for SRBs versus liquid engines, for no apparent good reason. Not knowing that, I assumed I'd get the same behavior from any engine since all the engines I tried it with failed. The reason I didn't use SRB sepratrons is that they didn't have the power to lift the capsule as an escape mechanism, as I'd found out from earlier tests before I'd attached the rest of the rocket to the capsule, so I stopped trying to use them. So it works ONLY for sepratrons and not if you use the small little 20-thrust engines on a tiny fuel tank to supply them for a few seconds. So I guess I could change my title to "make liquid engines work right when in the same staging step as a decoupling, like SRBs do."

Link to comment
Share on other sites

The fire-while-stage-is-decoupling behaviour is (or at least was) determined by the "ActivatesEvenIfDisconnected" config parameter.

This is present in the sepratron, but not in the parachutes. It doesn't appear to be in the solid rocket booster or liquid engine configs either.

Link to comment
Share on other sites

Uhm, hey I just tested a craft in which the engines being fired in the decoupling stage were sepratron SRBS. They STILL didn't fire. To get the sepratrons to fire I had to put them in their own seperate stage that fires prior to decoupling. I press spacebar, wait a second, and press it again. Others have asserted that the problem is that I was using liquid engines, but the problem is there regardless of the type of engine.

Link to comment
Share on other sites

Curiouser and curiouser..... In this case, it appears that you have encountered a bug, as that is most certainly NOT the intended behaviour!

The sepratrons are supposed to fire when staged, ESPECIALLY when the part they are attached to is being jettisoned. Because, you know, they're primarily for SEPARATING STUFF.

To solve this, I would suggest posting at least a craft file that can be made to misbehave as described, with any special instructions for making the problem happen.

Additional information that would be helpful includes (but is not necessarily limited to): your system specs, a copy of your output.log file, which version of KSP you are using, and as complete as possible a list of mods you have installed, if any. That's my "short version" of the standard "how do i report a bug" stuff.

However, my curiosity has been piqued, and I have serious problems understanding how this specific type of malfunction could happen.

If you do manage to figure out what went wrong and/or how to fix it, I'm sure I'm not the only one who would be interested in the story.

Link to comment
Share on other sites

Since the purpose of sepratrons is to pull spent stages away after decoupling, and since I've used them this way hundreds of times, I would definitely say that you have a bug.

And parachutes work the same way, you can see it in that picture, so they don't seem to need that parameter. I've never tried liquid engines this way though. But it seems odd that they wouldn't fire after decoupling as long as you are throttled up. I do see that line Supernovy mentioned in the sep .cfg file, but that seems to be the only part with that line, at least the only one that I could find.

Link to comment
Share on other sites

Yes, very curious. I do remember the devs mentioning something to do with activating things simultaneously in stages a couple of patches ago, I'll see if I can dig anything up.

EDIT: It may have been eaten by the Forum Kraken.

Edited by Supernovy
Link to comment
Share on other sites

Uhm, hey I just tested a craft in which the engines being fired in the decoupling stage were sepratron SRBS. They STILL didn't fire. To get the sepratrons to fire I had to put them in their own seperate stage that fires prior to decoupling. I press spacebar, wait a second, and press it again. Others have asserted that the problem is that I was using liquid engines, but the problem is there regardless of the type of engine.

Then there's something odd going on either with your installation (i.e. mods) or with your craft design.

Every time *I* put a Sepratron or a KW Rocketry ullage motor (or any other SRB I've put on for retros) on a stage that's being decoupled it's never failed to fire. I have designs that depend on that behavior to prevent damage to the next rocket stage or payload. I have one rocket that has six SRBs that separate and each one of them has four motors (2x top & bottom) that push the spent SRBs away and down. The stage consists of ullage motors on SRBs & radial decouplers joining SRBs to main rocket body & next stage motor so it gets activated and propels next stage... all activated on one spacebar press, no having to time between multiple presses or anything

Link to comment
Share on other sites

You know, one way to prevent damage to stages still in use by Separatrons is to use the technique NASA did with its stage-separation retrofire motors... put them at the *bottom* of the stage they're pulling off. (The retromotors on the Saturn V's first stage, for example, were buried in the fairings for the outboard engines, adjacent to the fins.) That way, the only thing their thrust impinges on is the already-dead stage you're jettisoning.

For sidemount ones, you can always use my technique of two Separatrons pointed "sideways" to the booster, just far enough around from opposite the core stage to avoid them contacting each other. Generates enough thrust to get a clean separation without thrust ever impinging on anything.

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...