Jump to content

[1.7.x] [Release] Automatic Fuel Cells


Xyphos
 Share

Recommended Posts

This plugin will attempt to conserve fuel consumption by automatically toggling Fuel Cells on or off in accordance with a minimum and maximum threshold setting on the Fuel Cell's context menu.

  • Requires "Advanced Tweakables" to be enabled in your game settings.
  • Only works with Stock fuel cells, but additional module manager .cfg patches could make it work with mod fuel cells.

 

ENo2wmy.png

Downloads:
SpaceDock: https://spacedock.info/mod/2248/Automatic Fuel Cells
GitHub: https://github.com/Xyphos/KSP_AutomaticFuelCells/releases/tag/1.0.0.0
Also available via CKAN.

Source Code: https://github.com/Xyphos/KSP_AutomaticFuelCells

Edited by Xyphos
Link to comment
Share on other sites

Just now, zer0Kerbal said:

so what is different / better than On Demand Fuel Cells (ODFC)?

I couldn't tell you the difference, because I can't find your source code to determine the behavior, so take a look at my source code and compare for yourself.
Based on what I can see, Mine uses a Min/Max slider with Axis Groups, and can be toggled into manual mode if needed.

Link to comment
Share on other sites

3 minutes ago, Xyphos said:

I couldn't tell you the difference, because I can't find your source code to determine the behavior, so take a look at my source code and compare for yourself.
Based on what I can see, Mine uses a Min/Max slider with Axis Groups, and can be toggled into manual mode if needed.

Source Code: Github repo.

Link to comment
Share on other sites

7 hours ago, Xyphos said:

*shrug* not much difference, I suppose?
My mod only works for Stock Fuel Cells and not Cockpits.
 I guess it just comes down to personal preference

https://imgur.com/ENo2wmy

*chuckle*

and can't see your  link - don't have an account there.

will add patches supporting this in several mods I have in the works with fuel cells in them.

love the code!

again, congrats on the release!

ENo2wmy.png

Edited by zer0Kerbal
Link to comment
Share on other sites

  • 2 months later...
  • 8 months later...
  • 4 weeks later...

@Rocket Witch It lets you control the fill % where it stops in-game in case you want it to not be the default of 95%. It also adds the abilities to auto-start when EC falls past a certain minimum %, and toggle the Auto functions altogether.

The screenshot in the OP says: "auto start fuel cell when EC is 15% or lower, auto stop when EC is 85% or higher." And the two gray knobs on the "Automatic Threshold" gauge are slider handles. The lower and the higher.

ENo2wmy.png

Link to comment
Share on other sites

37 minutes ago, Rocket Witch said:

the upper bound

The assumption there is that you leave the region above that for solar panels to fill in. Fuel cells with no upper bound and running while solar panels are working will potentially waste their fuel because the solar panels are doing more than enough but power consumers will still give the fuel cells reason to sip on their fuel and contribute to power generation.

59 minutes ago, Rocket Witch said:

I mean, what are some use-case examples?

A great use case is a science station in high orbit of Kerbin or its moons. You have enough solar panel to feed the power demands of the science converter but you don't have enough battery to last during your pass through the body's shadow/night side. You'll have fuel cells around to make up for that. They don't need to fill the batteries but just to keep them from emptying. Filling the batteries is the solar panels' job before any other power source.

If the fuel cell is the best or only power gen method for a certain ship (for whatever reason, like a ship that's too far from Kerbin for solar panels to matter, or the solar panels' combined mass becomes a problem) then you raise the upper bound to 100%.

In fuel cells provided by mods (at the basic level, "nuclear reactors" in KSP are fuel cells. They're all converters that sip some kind of fuel and produce ElectricCharge) you could install this feature and give them a lower and upper bound so they could truly function as "backup generators" for your huge ship or base. They turn themselves on when you need them to. You don't have to reach for, say, the AmpYear UI or the NFE reactor control UI (assuming NFE is compatible with this mod as an example. It's actually probably not compatible).

Another use case is for a nuclear engine (when you're taking a long trip like Kerbin to Sarnus, or even interstellar) whose reactor can switch over and be a power source. In its default state, if left alone, it could waste the nuclear fuel keeping batteries full while solar panels are still usable, and the engine loses a lot more of its half-life than it ought to.

Link to comment
Share on other sites

  • 7 months later...

I have moded stock fuel cell that can do both LFO+Ox and LH2+Ox. However this seem to only trigger LFO+Ox path and I still need to manual LH2+Ox for electric generation, or a Sole-LH2 ship will blackout.

Is it possible to configure this mod to trigger any fuel mode?

Link to comment
Share on other sites

1 hour ago, Ender65535 said:

I have moded stock fuel cell that can do both LFO+Ox and LH2+Ox. However this seem to only trigger LFO+Ox path and I still need to manual LH2+Ox for electric generation, or a Sole-LH2 ship will blackout.

Is it possible to configure this mod to trigger any fuel mode?

I don't think so. Great mod - does one thing simply, elegantly and effectively.

You might want to look at ODFC (On Demand Fuel Cells) (mine) - should still work and it should be getting an update soon™

Link to comment
Share on other sites

On 6/2/2021 at 5:42 PM, zer0Kerbal said:

I don't think so. Great mod - does one thing simply, elegantly and effectively.

You might want to look at ODFC (On Demand Fuel Cells) (mine) - should still work and it should be getting an update soon™

I have actually tried ODFC. The thing is that it introduces a new pathway of H2+Ox, which is different from LH2, and it uses its own conversion ratio.

If you could offer an option to let people to use their own resource conversion that would be great and make it a lot more adaptable.

Link to comment
Share on other sites

4 hours ago, Ender65535 said:

I have actually tried ODFC. The thing is that it introduces a new pathway of H2+Ox, which is different from LH2, and it uses its own conversion ratio.

If you could offer an option to let people to use their own resource conversion that would be great and make it a lot more adaptable.

you can. it (at least to me) just means writting a module manager patch and plugging in your own information - in fact ODFC will let you have many different settings - and can be set to automatically 'hunt' for the one with available fuel. let's not hijack this thread - if you want more information - talk to me in the ODFC thread or on its GitHub discussion

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.

 Share

×
×
  • Create New...