Jump to content

[Mod Request] Monopropellant and Crossfeed!


Recommended Posts

So I was in sandbox mode test out, how to setup Satellite array I noticed that my Rcs ports on my launch craft where pulling monopropellant from my Satellites tanks first and not the one nearest to them (they changed it to this in 0.23.5 and I did not notice) and yes I know you can disable the tanks so that fuel can not be pulled from them.

I when't back to the VaB and did some testing using This and found out that 1. Monopropellant is pulled form the upper stages first 2. Even though you can do so, changing the fuel flow priority on monopropellant tanks, does not change any thing

and 3. Monopropellant does not obey the crossfeed rules on decouplers.

So I had some ideas for a mod that would change this and if knew how to do so I would make it myself, but I do not, so I throw myself upon the tender mercies that are the great mod makers in this community.

(these ideas are listed in what I believe would be the most useful to the least useful)

Idea 1. For stock decouplers create an option in the right click menu, i.e when you right click a decoupler there would be an option below crossfeed, that would say Monopropellant Crossfeed and when you clicked it, it would enable/disable monopropellant crossfed and would prevent any rcs ports below the decoupler from being able to pull fuel from the tanks above the decoupler, forcing the rcs port to pull fuel from the neatest tank it can.

Idea 2. Make it so that the fuel flow priority system works for monopropellant tanks. i.e you could set, for example, a satellites monopropellant tanks to -1 and set the main crafts monopropellant tanks to 0 and it would pull fuel from the main crafts tanks first.

Idea 3. Change how monopropellant works back to how it was pre 0.23.5, which in and of it self has some problems and can annoy you just as bad, why am i even listing this one, oh well.

I am not sure how difficult this would be, but I do hop someone takes up the challenge, if anyone has any questions leave a comment.

Thank you for reading this far :D, Kage Sendo.

Edited by Kage Sendo
Spelling
Link to comment
Share on other sites

11 hours ago, Kage Sendo said:

I when't back to the VaB and did some testing using This and found out that 1. Monopropellant is pulled form the upper stages first 2. Even though you can do so, changing the fuel flow priority on monopropellant tanks, does not change any thing

Monopropellant doesn't drain from upper stages first; it drains from the tanks that the game thinks is going to be staged away the soonest, based on the staging order you have set. Whether that stage is "above" or "below" another one doesn't matter. In your picture, the RCS tank on top of the rocket will drain first, because it is on a decoupler that is set to be staged next, and it does not have a probe core. In other words, the game does not identify it as a spacecraft capable of operation by itself, and therefore it must be an expendable stage that's okay to be drained.

The reason why changing the fuel flow priority does nothing, and decoupler crossfeed settings are ignored, is because monopropellant is (and has always been) a vessel-wide resource, similar to EC. It has to be, otherwise placing RCS thrusters would become a major hassle since you'd have to paitr them with tanks that have the right amount of fuel to be balanced with the rest of the RCS ports all over the spacecraft... it would render them borderline unusable for anything except the final, single stages.

Originally, this caused all RCS tanks on the whole ship to drain at the same time. Squad at some point then added the logic with draining the tanks closest to being staged away first so that you don't run into a situation where you using RCS drains tanks on upper stages and deployable satellites you carry. Which is, ironically, exactly the issue you experience now, because of this stage priority flow. The system isn't perfect; it merely works better for 95% of the designs, and worse for the remaining 5%. Your vessel clearly falls into the latter category.

To fix this, you have two options:
1.) Change the way your vessel is built. Give the RCS ports a tank to drain from that is staged away sooner than your deployable satellites - ideally on a stage with no probe control - and it will draw from that one first.
2.) Use a simple Module Manager patch to change the RESOURCE_DEFINITION of monopropellant to a different fuel flow mode that better suits your needs.

 

Edited by Streetwind
Link to comment
Share on other sites

Thank you for reply.

Let me start with this, This is the craft I am using to launch my Satellites (at least the upper stage) and if you could tell me why it works the way it does as it pertains to my craft that would be great.                    

Like I said, I do know that in the VaB i could right click a tank and disable it and my radial tanks where placed with symmetry, so it would disable them all. The problem is however, after launch I have to click on and re-enable each tank separately and having to do this for 3 or 4 satellites (each with one to 4 or 5 tank) gets a little annoying after awhile. I do use Part Commander, but it does not recognize Monopropellant tanks unfortunately, and that is when I had the ideas that I did.

On the subject of the ideas that I had, now that I think about idea 1. could cause some issues of its own, idea 2. on the other hand has promise in the way it would allow you to define which tanks the RCS ports would drain from first, if i knew how to create an MM patch that would give me this functionality I would do so (not to sound rude).

Edited by Kage Sendo
Link to comment
Share on other sites

I would wager your vessel works like that because the satellites are the next thing to be staged away.

As for how to make a patch: I don't have access to a KSP installation here, so I can't give you a full patch to copypaste, but I can tell you where to find the info you need.

First, make an empty text file and save it somewhere in Gamedata or a subfolder thereof, with the extension of .cfg. Then, paste the following into the file:

@RESOURCE_DEFINITION[MonoPropellant]:FINAL
{
	
}

Next, go into GameData/Squad/Resources and open ResourcesGeneric.cfg. Find the entry for liquid fuel.

One of the data fields in Squad's resource definition will set the fuel flow mode - something like "flowMode = SOMETHING". I don't fully remember how it looks, but it's the only thing remotely like it, so you can't miss it. Copy the whole line over into your patch file, in the empty space between the curly brackets, and preface it with an @ symbol.

Save your config and try it out ingame. Provided you have Module Manager installed, your monopropellant should now flow exactly like liquid fuel does, including respecting crossfeed rules and obeying flow priorities. If it doesn't work, paste what you came up with here and I'll look for the error.

Edited by Streetwind
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...