Jump to content

[1.05] Fusebox - electric charge tracker and build helper. 1.52 released 24th Jan 16


Ratzap

Recommended Posts

I have another feature request: If the darkness time would also work for Reals Solar System that would be great :-)

That has been asked before. Until I can find a way to query KSP itself how big a body is, it's orbital parameters etc it's not going to happen. I asked the RSS people but didn't get an answer.

I found one of the mods adding drain: Biomatic. The default adds an MM config to all pods and probes (I removed that from my save, if I want the feature I'll add the part).

Edit: Try this DLL, it's the latest stable I'm using. https://dl.dropboxusercontent.com/u/71576136/Fusebox.dll

Edited by Ratzap
Link to comment
Share on other sites

From the description of this mod I'm not sure if this is already possible with this mod?

I think it also has to do with being able to assign priorities to parts. E.g. preventing that Alcubierre Drive from sucking up all energy or your probe running out of juice because some generator used it all.

But I'd really like it if it were possible to address the priorities thing without a second unit for electricity. It really does make things more confusing and less compatible.

Easiest way would be to have something like breakers...or a power control system where each EC using element is listed, you can then assign priorities base on the need. So the Alcubere Drive could be priority 5 (Low) while power to the cabin and life support could be (1). If you tossed in the ability to dynamically manage battery levels (Say that batteries must retain a percentage of reserve for Priority # and above) then power concerns would vanish.

If not, would it be possible to achieve somehow?

Link to comment
Share on other sites

From the description of this mod I'm not sure if this is already possible with this mod?

If not, would it be possible to achieve somehow?

No, that would indeed be great but it would need to be implemented by Squad. The way charge (and other resources) works is by parts stating how much they can hold max and how much they are currently holding. Public methods that let other mods know if the part is active and how much charge is it generating or using are not mandatory. What KSP does enforce is to call a method for each part that makes or uses a resource saying how much it wants or creates and KSP keeps track internally. So you would have to override that core function and make every part use yours instead to let you set priorities.

Personally I'm hoping squad revamps the charge system at some point to make it more comprehensive and coherent. Till then we muddle on with what we can do.

Link to comment
Share on other sites

No, that would indeed be great but it would need to be implemented by Squad. The way charge (and other resources) works is by parts stating how much they can hold max and how much they are currently holding. Public methods that let other mods know if the part is active and how much charge is it generating or using are not mandatory. What KSP does enforce is to call a method for each part that makes or uses a resource saying how much it wants or creates and KSP keeps track internally. So you would have to override that core function and make every part use yours instead to let you set priorities.

Personally I'm hoping squad revamps the charge system at some point to make it more comprehensive and coherent. Till then we muddle on with what we can do.

With this information it's no surprise that mods like KSP-I opted to use their own version of electrical charge...

Thanks anyway!

Link to comment
Share on other sites

I don't know if this is because of Realism Overhaul or Near Future Solar but on the three curved panels from Near Future Solar the description says:

Ideal Charge Rate: XX Ec/s"

instead of

Outputs:

-ElectricCharge: XX/sec.

For this reason FuseBox does't recognizes those panels. I don't know if there is any other effect.

Link to comment
Share on other sites

I don't know if this is because of Realism Overhaul or Near Future Solar but on the three curved panels from Near Future Solar the description says:

Ideal Charge Rate: XX Ec/s"

instead of

Outputs:

-ElectricCharge: XX/sec.

For this reason FuseBox does't recognizes those panels. I don't know if there is any other effect.

No, the reason will be it using a custom module for those parts. Something else to look at later.

Link to comment
Share on other sites

Hi. So, using fusebox, it works fine when I have stock batteries and solar panels, but when I attach a KW Rocketry 300 charge battery, the fusebox interface only accounts for the single mk1 capsule at 50 battery, -0.05 charge. It doesn't register any changes in electricity after I add the battery. This is in the VAB, I didn't test a launch.

Don't know whats causing this, but I thought I'd let you know.

Link to comment
Share on other sites

ratzap, thank you for this mod. It's fantastic and I use it all the time. Big thumbs up.

I have a pretty simple request/suggestion. Could you add the "0 in XXm:XXs" indicator to the main panel in the VAB instead of only in flight when the drain exceeds the generation? It's for when I'm building something in the VAB and I want to ensure I've added enough batteries so I don't run out of energy during the orbital dark time.

If this is something that's already available I apologize and would appreciate if anyone could point me to where this info is.

Thanks :)

Link to comment
Share on other sites

@civilwargeeky - Now that's just plain odd, I'll check it out thanks.

@bdito - Glad you like it. The VAB panel should show a drain timer but if you don't filter things like engines and clamps you'll have so much generation you won't notice.

Link to comment
Share on other sites

Just thought I'd drop a comment and let you know that there's an error message that repeats itself in the logs for me. It doesn't seem to be harmful, I haven't had any crashes that seem related to it, but none the less worth taking a look at:


ArgumentOutOfRangeException: Argument is out of range.

Parameter name: index
at System.Collections.Generic.List`1[PartModule].get_Item (Int32 index) [0x00000] in <filename unknown>:0

at PartModuleList.get_Item (Int32 index) [0x00000] in <filename unknown>:0

at Ratzap.Fusebox.OnGUI () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

This repeats ad-infinitum for me.

Edited by Tivec
Link to comment
Share on other sites

Just thought I'd drop a comment and let you know that there's an error message that repeats itself in the logs for me. It doesn't seem to be harmful, I haven't had any crashes that seem related to it, but none the less worth taking a look at:


ArgumentOutOfRangeException: Argument is out of range.

Parameter name: index
at System.Collections.Generic.List`1[PartModule].get_Item (Int32 index) [0x00000] in <filename unknown>:0

at PartModuleList.get_Item (Int32 index) [0x00000] in <filename unknown>:0

at Ratzap.Fusebox.OnGUI () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

This repeats ad-infinitum for me.

Is this in the VAB or in flight and can you tell what part triggers it? I don't explicitly use PartModuleList.get_Item() but I do have a line that says

foreach (PartModule tmpPM in p.Modules)

which may be getting compiled into that. If you had a part with no modules at all declared it might do that. Hmm, worth checking for anyway.

Link to comment
Share on other sites

Hi. So, using fusebox, it works fine when I have stock batteries and solar panels, but when I attach a KW Rocketry 300 charge battery, the fusebox interface only accounts for the single mk1 capsule at 50 battery, -0.05 charge. It doesn't register any changes in electricity after I add the battery. This is in the VAB, I didn't test a launch.

Don't know whats causing this, but I thought I'd let you know.

You've got something wonky there I think, I created a stock + KW GameData then a quick career and it works fine for me. Some other mod doing things.

Link to comment
Share on other sites

Is this in the VAB or in flight and can you tell what part triggers it? I don't explicitly use PartModuleList.get_Item() but I do have a line that says

foreach (PartModule tmpPM in p.Modules)

which may be getting compiled into that. If you had a part with no modules at all declared it might do that. Hmm, worth checking for anyway.

It's when I'm in the VAB. I only noticed it because of a crash (ran out of memory)..

Link to comment
Share on other sites

It's when I'm in the VAB. I only noticed it because of a crash (ran out of memory)..

Try this one https://dl.dropboxusercontent.com/u/71576136/Fusebox.dll

I put in an explicit check to skip the loop if the part has no modules defined (kinda odd part but hey, it could exist). Linked with newer DLLs for mods which updated since the last release and Kethane support has been removed since it's no longer updating or compliant.

I also noticed an oddity with some NERVA engines (KW and NP both have this) where the engine is defined as having charge storage. They drain once and never refill later. It seems like KSPs resource methods will not send charge to be stored in an engine or something which generates.

Link to comment
Share on other sites

  • 2 weeks later...
Raztap,

Any plans to Include KSP-AVC and/or post to this to KerbalStuff?

(That you have a DropBox version available makes the KS request more of a "shiney".)

AVC maybe. I personally hate update checkers and phone homes but I can understand other folk want it so using an existing framework is the simplest method. Kerbalstuff no, without going into detail it's just not going to happen - hence the dropbox alternate.

Link to comment
Share on other sites

Raztap,

Thank you for the honest response.

The AVC thing is what I'm shooting for. I've found it immensely helpful solving problems with my bloated modding. Those who don't want a phone-home just don't install it.

It's your mod; it's your purview. Thanks for keeping the dropbox.

Link to comment
Share on other sites

  • 2 weeks later...

I just found this and it looks like exactly what I need, but I think I found a bug. For some reason the PB-NUK seems to be treated as both an RTG/Gens and a Clamps entry. Turning off clamps drops my power gen to 0 even when RTG/Gens is selected. This is in the SPH on a plane that does not have clamps.

Link to comment
Share on other sites

I just found this and it looks like exactly what I need, but I think I found a bug. For some reason the PB-NUK seems to be treated as both an RTG/Gens and a Clamps entry. Turning off clamps drops my power gen to 0 even when RTG/Gens is selected. This is in the SPH on a plane that does not have clamps.

The stock part right? Do you have any mods with MM configs that alter it perhaps? I'll see if I can replicate the problem tomorrow when I have some time.

0.25 should be out soon and Squad should have fixed the app/launcher area by now. If they have it'll be time for a fairly big re-write.

Link to comment
Share on other sites

I took a mk2 cabin in the SPH and stuck on a PB-NUK - it showed up correctly and only filtered off with RTG/Gen. If you're consistently getting this problem, I think it's something in your mod set or maybe the craft part interact oddly?

Link to comment
Share on other sites

No one else seems to have reported this issue so here goes.

I'm using the SDHI Service Module mod, it adds a Apollo style service module for the mk 2-3 pod which has a power generator. The problem I've run across is that with the generator turned off, Fusebox is still reporting power generation, even though there isn't any and the power levels in the battery's are dropping.

Here's the relevant code for the generator from SDHI::

MODULE
{
name = ModuleGenerator
isAlwaysActive = false
requiresAllinputs = true
activateGUIName = Turn On Fuel Cell
shutdownGUIName = Turn Off Fuel Cell
INPUT_RESOURCE
{
name = LiquidFuel
rate = 0.009
}
INPUT_RESOURCE
{
name = Oxidizer
rate = 0.011
}
OUTPUT_RESOURCE
{
name = ElectricCharge
rate = 10
}
}

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...