Jump to content

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


Ratzap

Recommended Posts

RT 1.6 has changed the structure of the DLL slightly (he's moved some of the modules around). RT 1.5 is still used a lot so for now, try this DLL and let me know if it's picking up his changes.

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

First thank you for your attention and agility of reply.

The new DLL solve the whole problem, is now making the reading of antenna RT2 1.6.0.

Thank U !!!!

Link to comment
Share on other sites

First off, fantastic utility!

I'm guessing it is a result of RT2 1.6.0 but I'm getting flawed estimates from fusebox on batteries and charge (my values compute to being too much charge for the time I'm behind a planet/moon), I'll try the new dll and see if that fixes the charge issue (Having too much power isn't really a bad thing though). Thanks again for all the great work!

Link to comment
Share on other sites

Have you noticed that when you are in the right position for a solar eclipse by the mun that the solar panels pick up zero energy until the eclipse is over. There is no percent gradient it is simply all or nothing. I am currently struggling with getting my probes to stay in a position that optimizes solar energy gain. I'm in career mode and I am stuck using the basic panels. I like using fusebox to optimize the angle.

Link to comment
Share on other sites

Is there a mod to see what is draining/Powering what?

I.e. is there a way to know at a glance how much I am getting from each solar panel and how much an antenna is costing me?

In the VAB no, in flight maybe. The way KSP handles charge makes it very difficult, there is no API specified. Anything which can store charge has a config section and 2 variables: how much it can store and how much it has right now. Things that want to use charge make a call to a KSP function saying 'give me X amount of charge', the function passes back how much of the request was fulfilled and removes that amount from storage. The same in reverse for generators. At no time does any object say what it is using or generating, only the KSP core knows what objects are calling it's functions and it doesn't track it or make it available. That means that the only real fact you can calculate is how much change happened since you last looked for the entire vessel but that doesn't help you a whole lot. I have some more ideas to test but I'm not overly hopeful at this stage.

Every mod maker seems to ignore charge interoperability and handles things their own way, almost always without outside access. So Fusebox makes guesses based on config files and hard coded values for various objects, some things are simply impossible to deal with because nothing of their workings is exposed to external components (reaction wheels, the lab). A minimal API would need to exist with 3 variables per object instance:

isActive: boolean

isGenerator: boolean

amount: float

That would make life easy and you'd have a dozen mods overnight letting you track everything. Squad probably doesn't see it as a problem and certainly not a priority so I wouldn't hold your breath waiting for changes soon ;)

Link to comment
Share on other sites

I deleted and re-installed Fusebox (latest DLL) and I'm still not seeing a config file show up after the game is run. Same behavior with the window in game I noted earlier.

Log file

The config file gets written when you leave a scene that Fusebox is active in. So if you go to the VAB and switch to the launchpad, it writes the config out to the path I put in an earlier post (the standard path plugins write to with KSP.IO). Mind you if you deleted the one you had it should be back to defaults anyway.

Nothing much in your log except you seem to be running RT2 1.6 right? The latest DLL is linked with RT2 1.7 and the log shows the RT2 switching off due to version conflicts.

I wonder if one of your other mods is trying to use the same window ID that I use for the main window (8631). That's about the only thing I can think of that could be happening because when minimize is set false, the method to set the window up doesn't even get called. Nothing gets calculated or drawn, not even the frame. But if something else told Unity to display window ID 8631 then it would show up and a minimal sized frame like that.

Link to comment
Share on other sites

RT 1.6 has changed the structure of the DLL slightly (he's moved some of the modules around). RT 1.5 is still used a lot so for now, try this DLL and let me know if it's picking up his changes.

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

Hi, I'm using RT 1.6.1 and even with this new DLL, Fusebox does NOT show RT's antennas consumption. Is there something I could do to fix it?

Link to comment
Share on other sites

Hi, I'm using RT 1.6.1 and even with this new DLL, Fusebox does NOT show RT's antennas consumption. Is there something I could do to fix it?

That might be the problem, Fusebox is linked to 1.6.0. Check your output log for something like

FB - Wrong Remote Tech 2 library version - disabled.

That message appears when the call to the RT2 library fails due to version conflicts. Otherwise check under filters to make sure you should be seeing anything.

Link to comment
Share on other sites

That might be the problem, Fusebox is linked to 1.6.0. Check your output log for something like

FB - Wrong Remote Tech 2 library version - disabled.

That message appears when the call to the RT2 library fails due to version conflicts. Otherwise check under filters to make sure you should be seeing anything.

I've found this line. So it's confirmed I have a version problem. Is there something I can do (besides waiting)?

Link to comment
Share on other sites

I also have this problem with RT 1.6.1.

Do you have to update fusebox.dll every time RT2 is updated? That is impractical.

What about other Mods like Infernal robotics, ScanSat... Do you have to update fusebox.dll for everyone every time??

Link to comment
Share on other sites

I also have this problem with RT 1.6.1.

Do you have to update fusebox.dll every time RT2 is updated? That is impractical.

What about other Mods like Infernal robotics, ScanSat... Do you have to update fusebox.dll for everyone every time??

That is exactly the big problem with being on the top of the pyramid. Anything supported that changes requires a new update to work again - it took a fair bit of effort to code this mod in such a way that it doesn't simply crash or refuse to load when dependencies change. C# is a strict language meaning it enforces everything at compile time and run time. If there was an API for charge that all parts had to use it would be easy, there is however no such thing. Every mod writer does their own stuff which makes it a nightmare. Even stock parts don't all follow the same pattern.

There is hope though, Greys has written a Part extension which I will try and get Fusebox to use but that is going to take time while I recode everything. For now, use this updated lib for 1.6.1

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

Link to comment
Share on other sites

Thank you very much, Ratzap! I wish mods didn't need that compiling part... I have worked with C a few times in the past but don't know C# and, I've migrated to Linux and to wrb programming a few years ago and haven't installed the programing libraries for local compiling yet.

I know it's a programming friendly OS but I haven't even checked what libraries are necessary... Time is short in marriage ;)

Anyway, thanks!

Link to comment
Share on other sites

RemoteTech v1.6.2 was released and it includes this change:

Reverted a change of the AssemblyVersion from 1.6.1 to 1.6.0 to prevent issues with other mods that use our API (thx jrossignol)

Does this change anything for fusebox? Which DLL wil work with this version?

edit:

I am testing it, and it doesn not work with a DLL from post #363, also not working with original DLL from Fusebox 1.2.

sooooo... new DLL? :)

Edited by sralica
Additional testing
Link to comment
Share on other sites

RemoteTech v1.6.2 was released and it includes this change:

Does this change anything for fusebox? Which DLL wil work with this version?

edit:

I am testing it, and it doesn not work with a DLL from post #363, also not working with original DLL from Fusebox 1.2.

sooooo... new DLL? :)

That DLL from post 363 still works for me, even with mod antennas from boxsat.

Link to comment
Share on other sites

That DLL from post 363 still works for me, even with mod antennas from boxsat.

I downloaded 1.6.2 and checked the assembly - the layout is the same as in 1.6.1 so it should work yes. Remote tech has quite a history of fiddling with the method names ;) At first it was RemoteTech.ModuleRTAntenna, then RemoteTech2.ModuleRTAntenna, then RemoteTech.Modules.ModuleRTAntenna, 1 version back to RemoteTech.ModuleRTAntenna then reverted to RemoteTech.Modules.ModuleRTAntenna currently.

In other news, I spoke to a friend who is a professional C# code monkey about the whole woeful story of trying to get charge information from mods. We both agreed that the best thing would be able to extend Part or override RequestResource. Greys on this forum has been working in the direction of extending Part which I was looking into when Dred came back with a suggestion. He'd written up some code examples of hooking an event into RequestResource in an efficient/performant way. He presented it to Maxmaps and asked if Squad would consider adding that or something like it to allow modding of generic resouce tracking. Maxmaps replied that he'd tasked it to the team and it shouldn't be too much hassle. So cross your fingers chaps, it's a simple thing but if it gets added there will be no more dependancies and *everything* will be supported.

Link to comment
Share on other sites

Hi, seems like it keeps crashing on load for me. Worked fine on Windows, not working since I moved to Linux x86-64. Which is a shame because I really like the mod:)

EDIT: Nevermind! Fix was using voidi's configuration script as detailed in the Linux Compatibility thread (and possibly applying the PNG fix from the same thread). Will leave this post here for other folks with issues :)

Edited by Sinsis
Link to comment
Share on other sites

Nifty, I've never really been interested in IVA flight and RPM so yeah I'll look at merging it into 2.0. But as I wrote a few posts ago, I'm waiting now for Squad to make the change in RequestResource. That will be a whole rewrite and a good opportunity for this to be added in. That will be version 2.0 when it comes out. In between I'll put out 1.X based on the current design. I might squeeze it into the current if it's simple and I get bored.

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