Jump to content

[0.23.5] Goodspeed Automatic Fuel Pump v2.14.1


Gaius

Recommended Posts

ARE YOU A WIZARD?

Yes. This is why I wear a pointy hat with the word "WIZZARD" emblazoned across it in sequins.

I was trying to learn modding to write something like this, and essentially gave up and resigned myself to not ever having it. Now I can have both (peace of mind AND logically balanced fuel).

Downloading now!

Cool. Enjoy, and feel free to peruse the (poorly commented :blush:) source code.

Link to comment
Share on other sites

Am I the only one, who think that adding options "transfer out" and "transfer in" like in TAC balancer, but in the option list of each tank and able to remember its state will be more simple and helpfull? I mean, yeh, fancy "balancing" options are good, but enabling "transfer out" on a bunch of tanks on a refueling station will lead to the same behaviour. But allow more different solutions. Probably a "rank" of this options can be added, like tanks with "transfer out" of higher rank than some other tanks with lower ranked "transfer out" will be able to transfer fuel in them despite the "transfer out" flag. This will allow asparagus staging. So the fuel will flow like this:

highest "out" rank -> ... -> 2 -> 1 -> 0 -> 1 -> 2 -> ... -> highest "in" rank

For example, the creator of Smart Parts used tweakable "bar" to select some options in his mod, so I'm sure it is doable. This can make a great advantage of this mod over the TAC balancer. The problem with TAC is its inability to quickly select the right tank and remember the state. All other functions it has already. Not to sound rude but I think it is the only missing part in TAC and a different mod that do the same (or lesser) thing as it isn't more than a clone. Now, when many people are already accustomed to TAC, few of them will chose something new if it doesn't provide some really needed new functions. Of course all is up to you, but I guarantee you will get more downloads for such improvements.

EDIT: I should have really done some testing before judging...

So, you've already done the "out" part. Good. I see numbers of the highest tank blickering if it isn't set to be drained first. Not a big deal, but is means that the engine still drains fuel from there, and then the mod quickly moves new fuell in it again. Probably would be beter if the engine drained fuel from the specific chosen tank and then in order set in the mod (like with stock fuel pumps), instead of the stock way "from up to down", but, once again, I'm not a modder to know how difficult it can be to implement. So, how about the "in" part? Can be useful. Also other thing- "balance in" and "balance out" of each level can be added, also often useful with staging.

Edited by Absolute Human
Link to comment
Share on other sites

Just to clear up a misconception (it's in your greyed out text, but it's still there, and worth addressing I think): the tank selection issue wasn't my main issue with TACFB. What TACFB doesn't do that I most wanted is fill my tanks automatically as soon as I dock with my refueling station, or fill the fueling station automatically when I dock my tanker, or let me set up balancing in the SPH and have it saved with the craft so I don't have to remember to monkey with it. In short, this is designed to be used by the kind of person who forgets what he was doing after chasing kids off his lawn and doesn't notice until he's stranded another poor kerbal somewhere that he forgot to fill his tanks before undocking (for the umpteenth time today). I wrote this to do that for me automatically, and, as I noted previously, I still have TACFB installed and I still use that as well. For me personally, this is meant to augment TACFB, not necessarily entirely replace it, although for some people it might do that, if the only things they were using TACFB for are things this does as well. Fine by me either way, but it's not a goal of mine to make this a complete TACFB replacement. Should TAC add these features to TACFB, I'll be overjoyed and stop using my own mod. TAC has permission to merge my code into TACFB, but I can't say for certain when or even if TAC will incorporate these features. Just sayin'... not my goal to do everything TACFB does, there were just a couple things I wished TACFB did that it doesn't, so this handled that. I've since added some configuration options to make different use cases easier, and plan to add at least one more, but ultimately I'm not interested in extending the functionality of this mod beyond what it currently does, just in refinements that make sure it does what it does as well as possible without overly complicating it. Being a complete TACFB replacement is outside of my scope, and pointless since I still have TACFB installed and quite like it, I just wish it did a couple more things that it doesn't (currently) do. That's where this comes in, and probably where it goes out, if/when TACFB gains these features, hopefully making my own mod entirely obsolete.

Link to comment
Share on other sites

Yeah the possibilities of this mod along with TAC FB are mind boggling. Trying to setup something nice for my Grand Tourer (a 2 part ship basically, a nuke engine block for interplanetary and a SSTO module for landings), i already discovered some neat ideas.

Link to comment
Share on other sites

Either i found a bug, im doing it wrong, or it dosnt play well with the modular fuel tanks mod.

I setup a rocket with 1 tank connected to a engine(call this A), another tank connected to the side (call this B) with no fuel lines connecting them.

If i set A to 5, and B to 6, then when i fire the engine fuel drains from tank B, and tank A stays full (as expected)

If i set A to 6 and B to 5, both REFILL and stay full permanently (with engine on 100%)

if i set A to 5 and B to 5, both REFILL and stay full

Edit:

Disabled modular fuels and everything works exactly as expected. modular fuels and real fuels are forks of the same addon so im sure this is related to Ratzap's problem also.

Hope you can fix this, i really dont want to have to choose between Spherical and Toroidal Tank Pack/Modular fuels and this amazing addon!

Edited by Dale.s
Link to comment
Share on other sites

Can I propose a change to the documentation ? Rather than saying this: "This plugin requires ModuleManager to automatically add the pump to existing tanks. Get ModuleManager here. Otherwise, you can manually add it to tanks by adding the appropriate MODULE section to the config."

Can it say this:

"This plugin requires ModuleManager to work automatically on new and existing tanks. Get ModuleManager here. Otherwise, you can manually add it to tanks by adding the appropriate MODULE section to the config."

I tried loading the module without ModuleManager (thinking it was only required for EXISTING tanks) and couldn't get see the menus until I added MM.

Link to comment
Share on other sites

  • 2 weeks later...
Either i found a bug, im doing it wrong, or it dosnt play well with the modular fuel tanks mod.

I setup a rocket with 1 tank connected to a engine(call this A), another tank connected to the side (call this B) with no fuel lines connecting them.

If i set A to 5, and B to 6, then when i fire the engine fuel drains from tank B, and tank A stays full (as expected)

If i set A to 6 and B to 5, both REFILL and stay full permanently (with engine on 100%)

if i set A to 5 and B to 5, both REFILL and stay full

Edit:

Disabled modular fuels and everything works exactly as expected. modular fuels and real fuels are forks of the same addon so im sure this is related to Ratzap's problem also.

Hope you can fix this, i really dont want to have to choose between Spherical and Toroidal Tank Pack/Modular fuels and this amazing addon!

I'm experiencing the same issue when I stack two tanks with an engine on the bottom, and it does indeed seem to be related to Modular Fuel Tanks, as it works fine after I disabled MFT. But it does appear to function properly between two docked vehicles.

Also, I've noticed that when balancing tanks that are already unbalanced, the fuel transfer takes place instantaneously, rather than incrementally pumping fuel from one tank to the other(s).

Link to comment
Share on other sites

Request here, could this be tweaked to add an option to automatically empty the lowest tank first? I've got a thousand-ton space train (engines in front, most fuel at the back, tanks dropped from there as they empty) set to leave for Moho soon and that would really be helpful.

Can't you make the lowest tanks 8, the next lowest 7, etc down to 1? If you have more than 8 levels of tanks, you could either repeat the setup midway through your trip or holy cow where are you going, Alpha Centauri? :D

Link to comment
Share on other sites

I considered having more than eight levels, but eight is the max number I can have and still be able to set the level I want to the exact number I want with a single click in the right spot on the bar. More than that, and I have to fumble with it like a slider to get the number I want as I can't quite judge exactly the right place to hit in a single click. I'll see if I can't make that configurable, though.

And I'll see if I can't figure out what the issue is with Modular Fuels.

Link to comment
Share on other sites

Hey Gaius, this mod seems to be stumbling on Monoprop in capsules. It will happily transfer in to them as if their level is 0 (as if they're unset, which they are) but there's no way to transfer out of them. I have to turn the monoprop pump off of at least one tank so I can pump all monoprop fuel from any capsules I want to be monoprop free.

And I keep finding out cool ways to use this mod. My Kethane mining/refining base is level 8. My fuel lifter is level 7. My orbiting refueler station is level 6. All other ships are 5 or lower. Easy peasy. I've also found that if you only have the pump on for one fuel tank in a set and set the rest to "balance," it's really easy to turn off pumping for special circumstances. Just turn it off on the one tank and all other tanks will stop pumping. Turn it back on, and they'll pump out via the balancing they do with the one tank that actually pumps. Again, easy peasy.

Link to comment
Share on other sites

Can't you make the lowest tanks 8, the next lowest 7, etc down to 1? If you have more than 8 levels of tanks, you could either repeat the setup midway through your trip or holy cow where are you going, Alpha Centauri? :D

I dunno, can I? I honestly haven't even started playing with this mod yet, just going off of what I've skimmed thru this thread. I still have another 10-15 orange tanks to launch before I'm even ready to try moving it under its own power. Alpha Centauri would probably be easier, I've picked about the worst place in the Kerbol System to send ANYTHING to, let alone 350 tons of it!

Link to comment
Share on other sites

Okay, version 2.14.1 is up. It fixes a problem with mods that change what a tank contains, such as Modular Fuel. It also has a sanity check that will hopefully stop it from pumping phantom fuel around should such situations occur. Hopefully this will fix the compatibility issues with those mods. Let me know...

Hey Gaius, this mod seems to be stumbling on Monoprop in capsules. It will happily transfer in to them as if their level is 0 (as if they're unset, which they are) but there's no way to transfer out of them. I have to turn the monoprop pump off of at least one tank so I can pump all monoprop fuel from any capsules I want to be monoprop free.

Yeah, for now you can remove the check in the config where it doesn't add the pump to command modules, so that you can set their level higher so they aren't "downhill" from your pumping monoprop tanks. I shall be adding a config variable to set the default level of parts that don't contain the pump soon.

Even though auto-pump was off on the left tank, it still automatically pumped from right to left when I docked the two together. Is that proper behavior?

It is. The pumps are outgoing, not incoming, so only the tank that it sending the fuel needs its pump enabled, the receiving tank can have its pump off (or not contain a pump at all).

I dunno, can I?

You can. :) When I refer to "lower" tanks, I'm referring to the "Pump Level" setting on the right-click options. They can certainly be physically higher if you like. You set the order you want things to drain by setting the levels as desired. Highest level will drain first, regardless of where it is on the ship.

Link to comment
Share on other sites

Okay, version 2.14.1 is up. It fixes a problem with mods that change what a tank contains, such as Modular Fuel. It also has a sanity check that will hopefully stop it from pumping phantom fuel around should such situations occur. Hopefully this will fix the compatibility issues with those mods. Let me know...
Did some testing today. Looks like it's still having the same issue.
Link to comment
Share on other sites

Did some testing today. Looks like it's still having the same issue.

Can you post a pic of the setup with the issue, with the right-click menus up? I haven't been able to replicate the problem.

Edited by Gaius
Link to comment
Share on other sites

I'm in for the "Dump Fuel" button too.

Please, no! It's already hard enough to click the right button when a ship is rotating, and bad enough when you click the wrong button simply because of this terrible GUI choice. Accidentally dumping all of my fuel in that case would be catastrophic!

Link to comment
Share on other sites

Please, no! It's already hard enough to click the right button when a ship is rotating, and bad enough when you click the wrong button simply because of this terrible GUI choice. Accidentally dumping all of my fuel in that case would be catastrophic!

Perhaps there could be a confirmation dialog. But, seriously, the number of times I've accidentally staged the wrong component... It's practically the Kerbal way.

Link to comment
Share on other sites

Please, no! It's already hard enough to click the right button when a ship is rotating, and bad enough when you click the wrong button simply because of this terrible GUI choice. Accidentally dumping all of my fuel in that case would be catastrophic!

Not sure if I'll add "Dump Fuel", but if I do, it'll appear as a button in the "Pump Options" window, so you'll have to bring that up first. I don't want to clutter up the right-click menu any more than it already is with even more buttons. Four entries (level, pump, balance, and options) is already one more than I initially wanted there. I haven't tested it, but I'm pretty sure the options window doesn't move after it's opened (I open it next to the right click menu when it's first opened, but I don't update its position after opening I don't think, so it should hold still even if the right-click menu is moving).

Edited by Gaius
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...