Jump to content

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


Ratzap

Recommended Posts

Thanks for the quick fix:)

It would be nice if it was possible to catch/handle the exceptions thrown. It does cause an issue in some rare situations with the missioncontroller extended plugin that cause the custom prices to not get applied to parts.

You'll soon find out. I put a try/catch round the EditorLogic.getSortedShipList in 0.8f but short of starting to add delays as well there's not much more that can be done until KSP gets fixed.

Link to comment
Share on other sites

Looking forward to trying this, though one feature I'd love to see is being able to choose a celestial body and input estimated orbit to see the craft's orbit darkness time.

After a bit of grumbling and grunting, I've got a basic hardwired dark time calculation going in my dev version. Next the hard part of adding all the planets/moons and the GUI crap to pick them plus input an orbit.

Link to comment
Share on other sites

You'll soon find out. I put a try/catch round the EditorLogic.getSortedShipList in 0.8f but short of starting to add delays as well there's not much more that can be done until KSP gets fixed.

I guessed that. I guess we just have to wait for squad to fix it. Thanks for the fixes.

Link to comment
Share on other sites

I've got the list of bodies with their constants in now and a function to return the darkness time then checked them against the calculator web site:

[LOG 22:29:07.517] FB - Moho - 802.393834841193 sec of darktime

[LOG 22:29:07.518] FB - Eve - 533.378196675337 sec of darktime

[LOG 22:29:07.518] FB - Gilly - 3042.37269873671 sec of darktime

[LOG 22:29:07.519] FB - Kerbin - 641.801407291574 sec of darktime

[LOG 22:29:07.519] FB - Mun - 939.624099609523 sec of darktime

[LOG 22:29:07.520] FB - Minmus - 1170.89768733641 sec of darktime

[LOG 22:29:07.520] FB - Duna - 859.016518112182 sec of darktime

[LOG 22:29:07.521] FB - Ike - 972.501220495358 sec of darktime

[LOG 22:29:07.521] FB - Dres - 979.914859038082 sec of darktime

[LOG 22:29:07.522] FB - Jool - 2490.83651081084 sec of darktime

[LOG 22:29:07.522] FB - Laythe - 653.721009577142 sec of darktime

[LOG 22:29:07.523] FB - Vall - 942.015258250691 sec of darktime

[LOG 22:29:07.523] FB - Tylo - 717.555787379495 sec of darktime

[LOG 22:29:07.524] FB - Bop - 1088.41583638479 sec of darktime

[LOG 22:29:07.524] FB - Pol - 1263.24299538373 sec of darktime

[LOG 22:29:07.525] FB - Eeloo - 941.830165624377 sec of darktime

These are for 100km equatorial circular orbits and they match up with the website meaning all the gubbins is done. I just need to put some sort of interface on it to let people pick a body and type in an orbital height.

Link to comment
Share on other sites

great tool! However can you add support for VOID? That mod has an option to enable resource consumption - I like to enable it when I use the data logging functionality. It adds a 0.20 drain to electrical supply.

Also I have a Reflectron DP-10 (from RemoteTech2) attached to my craft which has a drainage of 0.01 when active and toggling the filter for RemT2 Antennae doesn't change the Drain value of my craft in build mode, which just reads me out the 0.03 drain of the command module. Although the time until 0 charge does change.

However when I'm on the launchpad and enable the antenna the Drain value does show me 0.04. But if I then enable the VOID resource consumption the drain will jump to 0.24 on the resource display but the Fusebox drain value will remain at 0.04

edit: don't have solar panels unlocked yet but when I do the darkness timer will be an excellent addition. Good stuff!

Edited by Gaiiden
Link to comment
Share on other sites

great tool! However can you add support for VOID? That mod has an option to enable resource consumption - I like to enable it when I use the data logging functionality. It adds a 0.20 drain to electrical supply.

Also I have a Reflectron DP-10 (from RemoteTech2) attached to my craft which has a drainage of 0.01 when active and toggling the filter for RemT2 Antennae doesn't change the Drain value of my craft in build mode, which just reads me out the 0.03 drain of the command module. Although the time until 0 charge does change.

However when I'm on the launchpad and enable the antenna the Drain value does show me 0.04. But if I then enable the VOID resource consumption the drain will jump to 0.24 on the resource display but the Fusebox drain value will remain at 0.04

edit: don't have solar panels unlocked yet but when I do the darkness timer will be an excellent addition. Good stuff!

I'll look into VOID sometime. I just checked my RT2 GameData - the DP-10 shows info of 0/s on the part so that is correct VAB behaviour. The amount it uses is less than 0.01 so rounding errors kill it off but it makes enough difference to the time left to see the change. VOID is not supported so your experience on the pad is to be expected.

Link to comment
Share on other sites

Nice, work! Dowloading the update now. Fusebox has really helped me to build better craft. No more guessing at how much power I need. Or forgetting to open my solar panels on my Autonomous probes. The "stop warp" bit was inspired, by the way. Really great job on that. If I find any issues I'll report them.

Kinda wish it supported Interstellar, but you can't have everything.

Link to comment
Share on other sites

Nice, work! Dowloading the update now. Fusebox has really helped me to build better craft. No more guessing at how much power I need. Or forgetting to open my solar panels on my Autonomous probes. The "stop warp" bit was inspired, by the way. Really great job on that. If I find any issues I'll report them.

Kinda wish it supported Interstellar, but you can't have everything.

Glad it's helping you. As for interstellar there isn't much to support. Everything has gobs of charge and all the work happens inside the warp plugin, I doubt the necessary methods are public facing to be queried but I'll admit I haven't bothered checking either ;)

Hmm, since the update, Fusebox won't appear in the toolbar anymore. At least in mine, of course. :(

What's your toolbar version? I have the latest toolbar and I use the same Fusebox DLL as is in the 0.9 zip - works for me. You have to tell toolbar to show it though since a few toolbar versions back. Also check KSP.log for loading errors.

Link to comment
Share on other sites

Just finished reading through the whole thread. Love the 'box! I keep installing and uninstalling other mods but Fusebox is always installed! The new orbital darkness calculator is awesome!

Feature Request: ability to change font colors. The red can be hard to read in some situations. Green can get a bit fuzzy on my eyes as well.

Bug Report: I forgot to test it with 0.9 however with previous versions if the Fusebox window is closed via the toolbar button, and I press F2 to hide the gui and then F1 to take a screenshot, then F2 again to bring back the gui, if I press the toolbar button to bring Fusebox back up it doesn't appear. However if I press F2 to hide the gui, then Fusebox is visible when the other gui elements are hidden. Press F2 and Fusebox hides itself when the other gui elements are visible. I can't get to my PC to show some screenshots, however I will try to post some once I get back home.

Link to comment
Share on other sites

Just finished reading through the whole thread. Love the 'box! I keep installing and uninstalling other mods but Fusebox is always installed! The new orbital darkness calculator is awesome!

Feature Request: ability to change font colors. The red can be hard to read in some situations. Green can get a bit fuzzy on my eyes as well.

Bug Report: I forgot to test it with 0.9 however with previous versions if the Fusebox window is closed via the toolbar button, and I press F2 to hide the gui and then F1 to take a screenshot, then F2 again to bring back the gui, if I press the toolbar button to bring Fusebox back up it doesn't appear. However if I press F2 to hide the gui, then Fusebox is visible when the other gui elements are hidden. Press F2 and Fusebox hides itself when the other gui elements are visible. I can't get to my PC to show some screenshots, however I will try to post some once I get back home.

Thanks for the feedback. Font colours, hmm, the hard part would be designing some sort of picker plus there are a very limited number of pre-defined colours to choose from. Free style colour creation would be quite a lot of effort I suspect, see this URL http://docs.unity3d.com/Documentation/ScriptReference/Color.html. The bug you describe is entirely possible, I'll check it later but it could easily happen if the logic around minimization gets confused.

Link to comment
Share on other sites

Feature Request: ability to change font colors. The red can be hard to read in some situations. Green can get a bit fuzzy on my eyes as well.
Interface options? I'd like to change the green text to the same font [white, no bold] as the other 9000 MechJeb windows and the red text to same font and size [red, no bold], just red (or plain white works too).

Yep... I love the mod itself but it looks like one of Santa's elves took a dump on my screen. The text in the main window looks to be a bold text and isn't as fine as the more readable text in the "filters" window (see jpeg in first page of this thread).

Link to comment
Share on other sites

The bug you describe is entirely possible, I'll check it later but it could easily happen if the logic around minimization gets confused.

I couldn't replicate the bug as previously described. However I was able to replicate it by pausing the game with ESC, pressing F2, then F1, then F2 again. I have a Google Drive folder with a snipped KSP.log and some images. Fortunately for this bug, KSPClock doesn't hide with F2 at all so it shows the time the images were dumped into screenshots which should match the log.

The Google Drive folder is located here.

Now it is bedtime for me. No more KSP till later. :(

Edit: I was able to bring the Fusebox window back by turning off the Fusebox window with the toolbar button while the game was paused with ESC, then turning the Fusebox window on with the toolbar button after the game was unpaused.

Edited by BjornKerbannigan
Forgot to add info
Link to comment
Share on other sites

Just a little heads up - I love this mod so much but it doesn't factor in engine alternators. Is it even possible to do so? Or is along the same lines as reaction wheels in that there's no way to know when they're running?

It is possible yes but I think something recently broke it. They should be under alternator filters but the problem with showing engines in the VAB is you wouldn't see per stage, just the total sum. I'll get it going again in the next version.

This plugin doesn't seem to detect the drain of probes from BTSM (Better Than Starting Manned). It would be great to get support for it because energy management is a huge part of that mod.

I played 1.46 BTSM recently (I didn't like it for precisely that reason though. Making energy important is one thing but no generation is an arbitrary difficulty hurdle which sucked all the fun out for me. Other trees did the whole 'no solar till late' and they were just as little fun to grind through. But I digress) and the probes showed drain properly. Most of BTSM is module manager alterations meaning the stock methods are still used which in turn means Fusebox can read it. Anything going through the BTSM DLL will be masked though and unless those methods are public (which I doubt since he stated he wants no other mods near his) then you can't read the usage. I'll check it again with whatever BTSM version is current.

For the colour and font style people, I thought of a way to let folk change it that won't cost me hours of coding. I'll put the defaults in the saved config.xml and if desired it can be edited and the values changed.

Link to comment
Share on other sites

Since I installed Fusebox KSP started to crash roughly every hour in VAB or 1.5 - 2 hours in space without intermission. I can avoid that by switching to the space center every once in a while but I think this isn't how it's supposed to be.^^

After some further investigation the memory allocation error causing the game to crash seems to be related to Fusebox.

I use only a few mods, so just tried it out by removing one mod while using the other mods. I took some time because I had to wait around an hour per mod. The only time it did not crash after approximately one hour was when I removed Fusebox. (Yeah, you already guessed that^^') Even after two hours the game was running fine. While doing these tests I had an eye on KSP's memory usage. Without Fusebox the memory usage eventually settled down to a certain level (around 1500 MB), with Fusebox it kept constantly growing and causing CTD after reaching KSP's memory limitations.

It might be not only caused by Fusebox on its own, but being a side effect of a combination of mods. I didn't have enough time to figure that out.

The mods I use (besides Fusebox) are:

Chatterer

TextureReplacer

Targetron

Kerbal Alarm Clock

Toolbar

Lazor System

Kerbal GPS (Figaro Global Navigation Satellite System)

SCANsat

some very basic part mods (meaning they only consist of part.cfg, model and texture so it's unlikely they have anything to do with that problem)

Edited by Crimsonraziel
Link to comment
Share on other sites

Yes hfbs, that would be a fairly minor addition. To Crimsons problem, dunno mate. Fusebox doesn't keep any data structures and C# has a garbage collection which removes unused objects. There's no way I can see to check memory usaged based on namespace, only for an application as a whole. I personally have no trouble and I run with 37 mods (CBA listing them) but I don't use most of the ones you have. I'll scan my code and see if there's anything obvious going wrong but it's more likely to be a stock function that Fusebox calls or a combination of mods.

Link to comment
Share on other sites

After a very minor amount of testing, Fusebox seems to be causing a ridiculous amount of lag in the VAB. Without it everything is perfectly smooth, with it, I get about 5 frames per second. I have far too many mods to check if there is any conflict there, but it's definitely not a memory issue, as removing fusebox and installing more mods worked fine.

Link to comment
Share on other sites

After a very minor amount of testing, Fusebox seems to be causing a ridiculous amount of lag in the VAB. Without it everything is perfectly smooth, with it, I get about 5 frames per second. I have far too many mods to check if there is any conflict there, but it's definitely not a memory issue, as removing fusebox and installing more mods worked fine.

Pull up your debug meny and check if its throwing nre's or other loops. That was an issue a few versions ago. Maybe its reappeared somehow. Also check your ksp and unity debug logs. One in the root of the ksp installation folder and one in the ksp_data folder. If you could post the segement of messages that seems to be looping it might help the developer to fix the issue.

Link to comment
Share on other sites

For additional support in the next release, in addition to the .20 drain from VOID when power consumption is enabled there is also the amount of electrical drain from TACLifeSupport, which is user-configurable but hopefully those values can be pulled?

Link to comment
Share on other sites

... To Crimsons problem, dunno mate. Fusebox doesn't keep any data structures and C# has a garbage collection which removes unused objects. There's no way I can see to check memory usaged based on namespace, only for an application as a whole. I personally have no trouble and I run with 37 mods (CBA listing them) but I don't use most of the ones you have. I'll scan my code and see if there's anything obvious going wrong but it's more likely to be a stock function that Fusebox calls or a combination of mods.

I can confirm that there is a definitely a memory leak problem present in 0.9 that was not present in 0.8f. The memory usage climbs at a steady rate in any scene where the UI and/or toolbar icon is present, it seems to be independent of any changes in the fusebox settings. The memory usage is cleared if the scene is changed between flight/tracking center/VAB/SPH but if there is no scene change the memory usage will climb until KSP crashes, and the only thing the logs reveal is the memory exhaustion. I've verified this with no other mods present and watching the memory usage climb in task manager. I don't currently have time to examine the changes in the source to see if I can spot the issue, but it's clearly related to the darkness calculator update.

For the present I've gone back to using 0.8f because it's too useful a mod to be running KSP without :) - thank you for providing it.

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