Web Rarely

You have junk mail.

KSP TAC Fuel Balancer mod mod

2015-09-07

The TAC Fuel Balancer mod for Kerbal Space Program is useful, but I found it frustrating to use, so I made some improvements. My biggest frustration was the number of clicks required to do simple tasks. It took about 40 clicks to refuel my lander after docking with the mothership, and refueling the mothership at a space station was even worse. Finding tanks on large ships was also hard, since it takes four clicks per tank to turn highlighting on and off. There was also a bug with electric charge where attempting to use "Transfer Out" or "Balance All" would dump all your energy into a black hole with most engines. I also added experimental support for transferring liquid fuel and oxidizer in correct proportions and for remembering settings when you switch between ships.

Here are the basic features:

1. Select multiple parts and apply an operation to all of them at once. The selection is done by clicking on the name, and it supports using Ctrl to add or remove parts to/from the selection and Shift to select a range, as well as Ctrl+Shift to add or remove a range to/from the selection. Shift-selection only works within a single resource. (If you have throttle controls bound to left shift and ctrl, you can use the ones on the right side of the keyboard.) You can also click the "Select All" button to select or deselect all parts in a resource. (The screenshots below are not updated to show this feature.) To make parts easier to find, selected parts are automatically highlighted. (You can still highlight parts the normal way, in which case they'll remain highlighted even when not selected.)

2. You can select parts by ship, so if you dock a ship with a station or a tanker, you can easily move fuel into or out of all of the ship's tanks at once. You do this by alt-clicking on a part, in which case it'll select all the parts on the same ship. This can combine with Ctrl as well, to add or remove those parts to/from the selection. In the image below, I was able to select all the tanks on my lander with a single click.

Note: The mod determines where ships start and end by looking for docking bays. Parts of the current vessel separated by a docking bay are considered a separate "ship" for the purposes of selecting parts. This works well when you have a mothership and a lander, for instance, or a ship and a space station. However, a space station comprising three modules separated by docking bays will show as three "ships". If you dock a ship with the station, it'll show as a fourth ship. You can still easily transfer resources to/from the station by selecting all the parts in the docked ship and using "Transfer Out" or "Transfer In".

3. You can select all parts of the same type, for instance all FL-T200 tanks. You can do this by alt-shift-clicking on a part. As usual, this combines with Ctrl to modify rather than replace the current selection. In the image below, I was able to select all the fuel tanks in my main engine nacelles with a single click. You can also combine it with alt-clicking to select all tanks of a particular type on a particular ship. For instance, shift-alt-click to select all FL-T200 tanks and then ctrl-alt-click to unselect ships you don't want.

4. Miscellaneous features: 1) You can now sort and group the part list. This may combine well with range selection (i.e. click, shift-click) to choose the biggest, smallest, emptiest, or fullest tanks, etc. 2) I added an option (off by default) to make the resource selector behave like a normal tab control, where clicking one tab "closes" the others, so only one resource is shown at once. 3) I made parts with Highlight active show "H" in the box so they're easier to find and unhighlight. 4) I added shorter and friendlier names for the resource types, to allow smaller windows and/or reduce the need for horizontal scrolling on ships with many resources.

Note: Although it appears you can only sort by one column, the sort control actually allows sorting by multiple columns (i.e grouping and sorting). For instance, if you want to group by ship and sort by name within each group, you first sort by name and then sort by ship. (Basically, if you want to sort by columns X and then Y, choose them in reverse order, i.e. Y and then X, from the menu.)

5. I added experimental support for remembering settings when you switch between ships. It doesn't remember after you quit the game, only in the same session. Also, changes (e.g. balancing) will only be processed for the current ship, though it might be possible to process them for other ships as well if enough people want that.

6. I added support for transferring liquid fuel and oxidizer in the correct 9:11 proportions. This is implemented as a pseudo-fuel type called "Rocket" fuel, which only shows parts that support both liquid fuel and oxidizer. It should work as expected as long as the liquid fuel and oxidizer are roughly balanced in those fuel tanks, but if they're unbalanced it may behave unintuitively. For instance, if one tank has only liquid fuel and another has only oxidizer, both will show as being empty (because neither has any rocket fuel), and attempting to balance them will achieve nothing because both are "empty". To correct this, just balance your liquid fuel and oxidizer individually, and from then on you can use the "rocket" fuel tab as you'd expect. (Implementing this required rewriting all the balancing code, so it was a risky change, but I think I did it correctly.)

7. Finally, I fixed the bug that caused electricity to be dumped into engines and wasted.

The image above shows the bug I'm talking about. The engines, in red, will never fill up and will just absorb all your energy if you use "Balance All" or "Transfer Out". I fixed this by removing the engines from the ElectricCharge list, since they're not actually storing electrical charge. (Internally they have an electric charge resource due to the alternator, but it doesn't work like a battery.)

These changes have now been incorporated into the official version (although I haven't checked to see if the maintainer merged them correctly). If you want to try them, see the official thread.

Comments

TAC Fuel Balancer mod mod 2016-01-24 04:04AM
Adam, excellent ideas for this mod. I've had similar issues with all the button clicks and parts selection. Thank you!

Couple of questions:
1. What version of KSP will this work with? I am currently on KSP v.1.0.5 and unless I missed the reference in the page above (possible) I didn't see a compatibility note.
2. When installing YOUR mod, do I install it OVER TaranisElsu's mod or delete and REPLACE that mod?

NOTE: I don't have a problem with sharing my email address, but I wasn't sure if it would post publicly with the comment so I left it off. Perhaps a note on your page to "pre-answer" poster's concerns?
an anonymous Jon
Additional comments by Jon 2016-01-24 04:14AM
Adam, I had a couple of additional thoughts:

OUTSTANDING pics on your Baking tab. Maybe you'll consider posting a couple of your favorite recipes? Perhaps a comments section on that tab as well?

NOTE: Since this comment is not KSP related, I understand completely if you remove it from this page. :-p

NOW off to Google Maps to discover where the heck Estonia actually is! LOL
an anonymous Jon
RE: TAC Fuel Balancer mod mod 2016-01-27 11:01PM
Hi, Jon. To answer your questions, the mod definitely works with 1.0.4 and almost certainly works with 1.0.5 although I haven't tested it personally. As for installation, it's intended to replace the official mod, although it will almost certainly work to overwrite it as well. Any email address you post is public; if you don't like that you can always send me an email or leave it blank. As per your suggestion, I've added a note about it to the comment form. I hope the mod works well for you. If not, send me an email.

I'm glad you appreciated the baking page. :-P

Add a comment

Note: The information you enter (including your name and email address) will be displayed publicly.




Line breaks are converted to <br>'s, and all HTML tags except b, u, i, tt, and pre are filtered out.