Jump to content

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


Ratzap

Recommended Posts

I've tried turning the warp watcher option off after it has popped up, but that does not work unfortunately. I tried switching it off in the VAB, but that setting didn't carry to flight it seems.

The warp watcher popped on me yesterday and I just left it up till I had battery back. I'm testing a new version later today which might be able to do this automatically. And no, switching it off in the VAB wouldn't help as that is what KSP calls a different 'scene'. If the new version does what it should I'll put it up later.

Link to comment
Share on other sites

I'll put up 0.8a now. I've spent the evening playing, making changes, testing the new etc and this is worth putting out. You will need to delete the old version (changes in config.xml again) for safety.

1) Warp watcher should de-activate after popping up the warning window until battery level goes above the threshold again.

2) When minimized, the toolbar icon will still change and show the rough battery state.

3) Added another filter for remote tech 2 antennae so you can switch off the data transmission portion and just see the constant RT2 drain.

4) Various cosmetic cleanups including the window shrinking after having been draining.

Now if I could only find out how to use a smaller font or make the vertical font spacing smaller...

Link to comment
Share on other sites

Looks like Fusebox currently doesn't display the remaining days and years, only hours and minutes. Could you add those two?

I didn't think anyone would care about times that long and adding more than 2 displayed time units makes the window expand in a mess. Are you trying to make something that can do an entire trip with no generation or something? I could make the 'sliding window' go up to years I suppose. I'll put it in the list. I also noticed a bug with the commutron 88-88 from RT2. It seems to think it has a very high consumption but in actual fact doesn't draw that much. I'll check out the cfg file for the part first as that could have a typo.

Link to comment
Share on other sites

Well, I'm running my own set of realism patches (kinda like realism overhaul) and my manned pods use about 10k ec per day and kerbal and the batterys have way higher capacity. So i was irritated when the 1 man pod (wich should last about 3 days) only had 4 hours calculated.

Fusebox kinda replaces my calculator when you fix it :wink:

Link to comment
Share on other sites

Look in KSP.log, search for 'Fusebox' and see if there are errors loading it. Then search for 'FB -' and see what mods it detected. Lastly look for 'Wrong <mod name> library version'.

Apart from that, the obvious one would be did you click the Fusebox icon on the toolbar to open it? And is there at least a pod/cockpit/core? If there are no parts at all, fusebox doesn't bother opening since there's nothing to measure.

Link to comment
Share on other sites

Interesting, I checked and if you've not used Fusebox in the VAB it won't show in the SPH plus it's not in the toolbar list. I think this is down to toolbar distinguishing between the VAB/SPH as scenes rather then just 'Editor' mode. I'll have to find what toolbar calls the SPH scene and register that too on startup.

Edit: it was a as simple as that, try this DLL: https://dl.dropboxusercontent.com/u/71576136/Fusebox.dll

Edited by Ratzap
Link to comment
Share on other sites

Interesting, I checked and if you've not used Fusebox in the VAB it won't show in the SPH plus it's not in the toolbar list. I think this is down to toolbar distinguishing between the VAB/SPH as scenes rather then just 'Editor' mode. I'll have to find what toolbar calls the SPH scene and register that too on startup.

Edit: it was a as simple as that, try this DLL: https://dl.dropboxusercontent.com/u/71576136/Fusebox.dll

now shows up in SPH but does nothing right now in the VAB OR SPH

[LOG 04:33:39.896] Load(Assembly): Fusebox/Plugins/Fusebox

[LOG 04:33:39.897] AssemblyLoader: Loading assembly at F:\Steam Games\steamapps\common\Kerbal Space Program\GameData\Fusebox\Plugins\Fusebox.dll

[LOG 04:36:04.249] FB - Checked for mods

[LOG 04:36:04.250] FB - Aviation Lights present

[LOG 04:36:04.251] FB - KAS present

[LOG 04:36:04.251] FB - SCANSat present

[LOG 04:36:04.252] FB - Telemachus present

[LOG 04:33:41.599] [ModuleManager] Processing Node Switch. Avaiable DLL are Assembly-CSharp ModuleManager aaa_Toolbar ActionGroupManager AviationLights TextureCompressor Chatterer CrewManifest EditorExtensions EditorHotkeys Engineer EngineerToolbar EnhancedNavBall Firespitter Fusebox HLAirship HLBallast RasterPropMonitor KAS HyperEdit KineTechAnimation km_Lib InfernalRobotics MechJeb2 MechJebMenuToolbar MechJebRPM PartCatalog ProbeControlRoom RCSBuildAid RCSBuildAidToolbar RealChute Romfarer RomfarerHSTWlaser SCANsat SCANsatRPM Targetron Servers Telemachus TacFuelBalancer Tracks KSPAlternateResourcePanel Ballshark Basicpropscript VesselView VesselViewRPM FrementGUILib VanguardTechnologies EVAParachutes FrementGUILib VanguardTechnologies

[LOG 04:34:00.997] Load(Texture): Fusebox/TB_icons/1of3green

[LOG 04:34:01.016] Load(Texture): Fusebox/TB_icons/1of3red

[LOG 04:34:01.031] Load(Texture): Fusebox/TB_icons/2of3green

[LOG 04:34:01.049] Load(Texture): Fusebox/TB_icons/2of3red

[LOG 04:34:01.065] Load(Texture): Fusebox/TB_icons/3of3green

[LOG 04:34:01.083] Load(Texture): Fusebox/TB_icons/3of3red

[LOG 04:34:01.098] Load(Texture): Fusebox/TB_icons/draining

[LOG 04:34:01.116] Load(Texture): Fusebox/TB_icons/emptyred

[LOG 04:34:01.131] Load(Texture): Fusebox/TB_icons/posgen

[LOG 04:36:04.151] AddonLoader: Instantiating addon 'Fusebox' from assembly 'Fusebox'

Here you can see I have batteries and solar panels and some lights installed and no plugin screens are appearing even if i click the button!

screenshot45_zpscacd0fb8.png

Edited by Mechrior
Link to comment
Share on other sites

now shows up in SPH but does nothing right now in the VAB OR SPH

Here you can see I have batteries and solar panels and some lights installed and no plugin screens are appearing even if i click the button!

That's pretty odd. Was it a fresh install or did you have an older version before? The only thing I can think of is that it has an old or corrupt config.xml with co-ordinates for the window that are not visible. However, that is not supposed to be possible because it checks every frame and should move the window back onto the visible screen if it's not visible. It's certainly working and the startup debugs look fine. Try a clean install - delete what you have and unpack fresh. If that doesn't fix it try this DLL, it will print into KSP.log whether it is minimized or not plus it's x/y/width/height. That will let us see where the box should be. This is what I get for example: [LOG 20:40:00.124] FB - False 1886 23 120 127

https://dl.dropboxusercontent.com/u/71576136/Fusebox.dll

Looks like it is working as supposed. Thanks alot!

You're welcome.

Link to comment
Share on other sites

That's pretty odd. Was it a fresh install or did you have an older version before? The only thing I can think of is that it has an old or corrupt config.xml with co-ordinates for the window that are not visible. However, that is not supposed to be possible because it checks every frame and should move the window back onto the visible screen if it's not visible. It's certainly working and the startup debugs look fine. Try a clean install - delete what you have and unpack fresh. If that doesn't fix it try this DLL, it will print into KSP.log whether it is minimized or not plus it's x/y/width/height. That will let us see where the box should be. This is what I get for example: [LOG 20:40:00.124] FB - False 1886 23 120 127

https://dl.dropboxusercontent.com/u/71576136/Fusebox.dll

You're welcome.

OK I think I have some sort of answer........ on its own your mod works fine, as does Telemachus.......... THE SECOND I add your mod into the same install as telemachus your mod refuses to work and the edited dll you linked does NOT parse the "FB - False 1886 23 120 127" line to the KSP.log and telemachus throws this error "[EXC 02:15:56.976] FileNotFoundException: Could not load file or assembly 'Telemachus, Version=1.4.12.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies."

And this also spams the log as well [EXC 02:15:36.752] NullReferenceException: Object reference not set to an instance of an object

Whatever interaction your mod has with telemachus is breaking BOTH when it tries to access it. I deleted and completely re-installed BOTH addons with the latest updates just to check!

Link to comment
Share on other sites

Whatever interaction your mod has with telemachus is breaking BOTH when it tries to access it. I deleted and completely re-installed BOTH addons with the latest updates just to check!

I figured it out, it's the way C# works unfortunately. I had a try/catch pair round the first reference to Telemachus code but that was never being evaluated because C# pre-compiles the next complete block before going into it. Meaning it failed before the code to check for it could run. I moved the try/catch and fiddled the code around a bit, it now works as intended - "Wrong Telemachus library version." is printed in the KSP.LOG and it simply ignores Telemachus parts. This requires a re-build of Fusebox compiled against the newest DLL from Telemachus but the intent is that Fusebox continues working in such cases.

How it stops Telemachus from working I have no idea, the code to call into the Telemachus DLL doesn't even get evaluated

if (mode == 1 || (mode ==0 && global::Telemachus.TelemachusPowerDrain.isActive))

am_use += global::Telemachus.TelemachusPowerDrain.powerConsumption;

Even if it did reach that and execute, how would it kill Telemachus? It must be something with the C# runtime again. I'll change the zip packages and pop this here

https://dl.dropboxusercontent.com/u/71576136/Fusebox.dll

Oddly enough the antenna returns a drain of 0 in the VAB/SPH but 0.01 in flight - that's Telemachus though, so /shrug

Link to comment
Share on other sites

Hi,

may I ask you for support of the TAC Life-Support mod. I just get alway, when I go on EVA the threshold warning, just when I leave my capsule. It's a bit annoying :)

Ah, and are you thinking about an option to toggle this warning? If I have an unmanned scanning probe, lets say doing some kethane scanning, I don't really care, about running out of charge for some amount of time.

Link to comment
Share on other sites

Hi,

may I ask you for support of the TAC Life-Support mod. I just get alway, when I go on EVA the threshold warning, just when I leave my capsule. It's a bit annoying :)

Ah, and are you thinking about an option to toggle this warning? If I have an unmanned scanning probe, lets say doing some kethane scanning, I don't really care, about running out of charge for some amount of time.

As I wrote somewhere (the readme?), you can toggle the warp warning in settings and also the threshold. What you wrote about TACLS I don't understand, there is nothing to support as he makes all charge internally to his plugin.

Link to comment
Share on other sites

You might be able to toggle this, by using the "Warp halt toggle" radio button in the settings - but I am not able to uncheck that one.

I always get the warning while leaving my capsule. So it seems that the warning referes to the electric charge of the EVA-suit, what I guess is part of TACLS.

Link to comment
Share on other sites

You might be able to toggle this, by using the "Warp halt toggle" radio button in the settings - but I am not able to uncheck that one.

I always get the warning while leaving my capsule. So it seems that the warning referes to the electric charge of the EVA-suit, what I guess is part of TACLS.

Ah, now I see. I fixed the first one, part of the new logic was switching the toggle back on as soon as it was off. The second one is going to mean I will need to find out how to distinguish when an EVA has started. EVA is not a special game scene, it counts as FLIGHT so I will need to find something else.

Link to comment
Share on other sites

hi i just wanted to comment on the most recent version of the plugin that its now compatible with most mods again.

there is still the minor issue with that one time spam (semi)loop i reported earlier. but not sure if its possible to fix it as i understand its caused by calling the buggy ksp api to recurse the parts.(happens also in vanilla ksp+fusebox)

NullReferenceException: Object reference not set to an instance of an object

at EditorLogic.recurseShipList (.Part part, System.Collections.Generic.List`1 shipList) [0x00000] in <filename unknown>:0

at EditorLogic.getSortedShipList () [0x00000] in <filename unknown>:0

at EditorLogic.get_SortedShipList () [0x00000] in <filename unknown>:0

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

(Filename: Line: -1)

all the other problems like the gui flicker appears to be solved.

EDIT:

Fusebox creates a framerate killing spam loop if the new version of KAS is installed "wrong version of kas installed". i traced it back to this plugin tho it was hard because of no plugin name in the debug print. i had to remove my plugins one by one to find out wich one was causing it.

Edited by landeTLS
Link to comment
Share on other sites

Interface options? I'd like to change the green text to the same font as the other 9000 MechJeb windows and the red text to same font and size, just red (or plain white works too).

The font is the same as MJ windows because we're both using the same KSP supplied skin. However the font spacing seems to change at the GUILayout procs whim. The last time I read the Unity3d documentation there was nothing about fonts so this is unlikely to happen any time soon.

hi i just wanted to comment on the most recent version of the plugin that its now compatible with most mods again.

there is still the minor issue with that one time spam (semi)loop i reported earlier. but not sure if its possible to fix it as i understand its caused by calling the buggy ksp api to recurse the parts.(happens also in vanilla ksp+fusebox)

all the other problems like the gui flicker appears to be solved.

EDIT:

Fusebox creates a framerate killing spam loop if the new version of KAS is installed "wrong version of kas installed". i traced it back to this plugin tho it was hard because of no plugin name in the debug print. i had to remove my plugins one by one to find out wich one was causing it.

The NREs are indeed stock KSP, nothing at all I can do about that except put a try/catch round it to make it quieter.

I didn't even know there was a new KAS, I'll use it to try and debug C#s behaviour a bit better, I've moved the mod version controls up a level again and see if that helps. I added 'FB - ' to the debug output too. It's only printing it once now.

[LOG 20:22:05.335] FB - Wrong KAS library version - disabled.

I'll compile with the new KAS and wrap up 0.8f but the way C# works means every time a mod DLL changes it'll need to be relinked.

Link to comment
Share on other sites

The font is the same as MJ windows because we're both using the same KSP supplied skin. However the font spacing seems to change at the GUILayout procs whim. The last time I read the Unity3d documentation there was nothing about fonts so this is unlikely to happen any time soon.

The NREs are indeed stock KSP, nothing at all I can do about that except put a try/catch round it to make it quieter.

I didn't even know there was a new KAS, I'll use it to try and debug C#s behaviour a bit better, I've moved the mod version controls up a level again and see if that helps. I added 'FB - ' to the debug output too. It's only printing it once now.

[LOG 20:22:05.335] FB - Wrong KAS library version - disabled.

I'll compile with the new KAS and wrap up 0.8f but the way C# works means every time a mod DLL changes it'll need to be relinked.

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.

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