Jump to content

[BUG] Jet engines drawing fuel through decouplers first


Recommended Posts

Whoops, my mistake, threads de-merged, there's two different issues here.

Okay I'm confused now. There's comments in my thread that read like their out of context, and general confusion. I appreciate the de-merge, but now I got a mess to untangle.

EDIT:

To update:

This new fuel flow mechanic is an intentional change, but it causes the detrimental side effect of draining upper stages before lower stages due to how the part tree check works. This thread is specifically about the draining through decouplers first. There exists another thread about getting the mechanic reverted in general elsewhere. I'm updating the OP with this info.

Edited by Captain Sierra
Link to comment
Share on other sites

The STAGE_PRIORITY_FLOW mode is supposed to group tanks according to which stage they are in. This basically comes down to how many decouplers are found when searching up the part tree from the tank to the root part. I suspect the OP has the root part somewhere in his jet stage which will cause the fuel to be drained from the upper stage tank (and only that tank) at first. Simply changing the root part to be the pod at the top should make it behave as expected.

Not sure why you assume that he has his root anywhere but the cockpit but I duplicated what he made with the cockpit as the root. In fact, the root doesn't really matter. You should have tried making the craft he made and seeing how it behaved for yourself

I remember reading posts that explicitly said that the reasons the jet flow mode was changed were to make CoM balancing easier and to allow fuel flow from and through wings, so that is entirely his point.

That's why the jet engine's flow mode was changed, yes. I'm referring to the flow mode itself and why it exists and how it works. Remember that it existed before jet engines were changed to use it.

It is not supposed to ensure that resources are drawn from the "current stage", it is supposed to draw resources from the tanks that will be decoupled earliest in the staging sequence. If the root part is in a part of the vessel that gets decoupled then the mechanic doesn't work as expected.

Ok if you want to get technical

STAGE_PRIORITY_FLOW draws from the highest numbered stage which you can find referencing part.inverseStage. Instead of theorizing I decided to write up something simple to show me what stage each part thinks it is. Note that this has doesn't necessarily correspond with the staging queue displayed on the side and it is possible for a part with no staging icon to have a stage assigned to it.

On the subject of root placement I changed the root on OP's example craft to something bizarre and made it one of the jet engines itself. The effect on staging was zero. No impact whatsoever. Regretably I don't have screenshots for each of these little situations.

Compare the two example craft. The tanks should show staging 2 except for the ones above the decouplers. Image #2 demonstrates this for the tank directly above the engine which is stage 0 because I crammed everything into one stage. So even though all stageable parts were 0, the tanks between the engine and decoupler were 2.

However, for the one using spaceplane parts this is not the case. Everything except the payload tank was 0 and the payload tank was stage 2. The highest part. This is why fuel is drawn from it and it alone. Ignoring the bicoupler tank which should have been stage 2 and the payload stage 0. (only because I crammed them all together)

I'm starting to think this is actually an issue with the code that determines stage location. Maybe because of the way the cargo bay nodes are placed. Or maybe because of the bicoupler part which uses a different crossfeed mechanism.

Javascript is disabled. View full album

- - - Updated - - -

Okay I'm confused now. There's comments in my thread that read like their out of context, and general confusion. I appreciate the de-merge, but now I got a mess to untangle.

EDIT:

To update:

This new fuel flow mechanic is an intentional change, but it causes the detrimental side effect of draining upper stages before lower stages due to how the part tree check works. This thread is specifically about the draining through decouplers first. There exists another thread about getting the mechanic reverted in general elsewhere. I'm updating the OP with this info.

It's not supposed to drain upper stages first though, and usually doesn't do that.

Link to comment
Share on other sites

I'm starting to think this is actually an issue with the code that determines stage location. Maybe because of the way the cargo bay nodes are placed. Or maybe because of the bicoupler part which uses a different crossfeed mechanism.

You're kind of right. I did some digging and here's what I found:

The STAGE_PRIORITY_FLOW queries once from the root part to identify a part's stage (which you were monitoring with your plugin), unlike STACK_PRIORITY_SEARCH which queries from the engine, respects decouplers, and searches every time the engine runs out of a resource from its current source.

STAGE_PRIORITY_FLOW tries to drain fuel based on what it thinks is the lower stages (remember, this was designed for monopropellant/RCS, not jet engines). On rockets, where your root part is almost always on the payload (or, in less frequent cases, on the uppermost stage), this works just fine. However, as my OP demonstrates, the system breaks down for cargo-carrying planes. Since a plane's root part is usually the cockpit, or at the least, on the plane, the game mistakes the payload for a lower stage drop tank and is pulling fuel from it thinking you'll jettison it mid-flight.

As a sidenote, I considered proposing making the flow mode respect occlusion as a fix. This would prevent tanks in cargo bays and fairings from being drawn off of, but would also prevent the stowage of monopropellant tanks inside service bays (which is a perfectly legitimate and commonly used engineering strategy).

- - - Updated - - -

It's not supposed to drain upper stages first though, and usually doesn't do that.

Which is why this is the bug. Technically, as much BS as it is, drawing across decouplers is a "feature" of this flow mode.

Link to comment
Share on other sites

It doesn't matter where the root is. It's like you said, it's the tree. You can re-root it to the payload and it won't make any difference at all.

But I just tried the reverse, first I made my payload then saved it as a subassembly. Then reloaded the test vehicle that I based off of yours in the first post. Removed the payload from there and then loaded in my subassembly payload. That worked. You don't even have to reroot to the payload even. (though I did the first time around just to be safe, but it didn't really care)

Here's the finished craft. https://www.dropbox.com/s/9qz8aa7lzf8vzx0/STAGE_PRIORITY_FLOW%20issue%205.craft?dl=1

Payload subassembly : https://www.dropbox.com/s/bnr8ekb3ayzqrpo/payload.craft?dl=1

Ahhh that's technically using Real Fuels, but with stock resources. If you don't have MFT or RF then it might whinge in the logs about the missing modules but should load up.

Edited by Starwaster
corrected censored word
Link to comment
Share on other sites

Since the two posts de-merged,it made confusion.We are talking about same problem,but different design.

I'm not aware of any changes to the fuel flow in 1.0.3/1.0.4. You said in your OP:

...but are now saying that this happens after the bottom stage has run out of fuel.

Yes,1.0-1.0.2 the fuel flow was as reported in my post,1.0.3/1.0.4 the bug was more or less corrected in the way i described earlier.

Instead to drain fuel from right away now engines drain fuel from 1st stage and when resource is depleted then start to use fuel from next stage through decoupler!

Edited by sebi.zzr
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...