Jump to content

[1.12.x] Fusebox Continued - electric charge tracker and build helper


linuxgurugamer

Recommended Posts

I have Near Future Electrics and KSPI-E and Fusebox doesn't recognize electrical inputs, plus it creates some weird bug with actual electrical input - even though I have electricity, probes won't work and a message will indicate they don't work because they don't have power and KSPI tanks leak hydrogen as if they are without power.

I have no idea how much of the bugs caused by the mods interactions come from your end and how much from whatever changes, if any, both mods do to stock electricity.

Link to comment
Share on other sites

1 hour ago, JPLRepo said:

I do not see the point in making this mod like my mod?
Why don't you kep this mod the way it was?
AmpYear is a different mod and I don't understand why you would want to make this mod like it.
Seems to defeat the purpose.
I'd also prefer you didn't use my code in this mod. Of course licenses permit, but I prefer you didn't.
This mod should be it's own.

@JPLRepo To be clear:

  1. I'm not making this like yours.
  2. I just want to make it easy for people to switch from one to the other.  Right now, vessels will be lost if they have a reserve battery installed
  3. I am not going to use your code.
  4. I am not going to use the model.
  5. I will be putting in a dummy AYPart module to stop the errors when loading existing vessels.  Right now, annoying messages are put in the log file
  6. I will create a new battery (will clone existing battery) in order to prevent vessels from being destroyed if they have your reserve battery on
  7. I will be putting in code to prevent Fusebox from running when Ampyear is running

I asked, you said no about copying the models, that is fine.

If anything in what I wrote above is implying that Fusebox will be like AmpYear, please explain it to me.

 

1 hour ago, juanml82 said:

I have Near Future Electrics and KSPI-E and Fusebox doesn't recognize electrical inputs, plus it creates some weird bug with actual electrical input - even though I have electricity, probes won't work and a message will indicate they don't work because they don't have power and KSPI tanks leak hydrogen as if they are without power.

I have no idea how much of the bugs caused by the mods interactions come from your end and how much from whatever changes, if any, both mods do to stock electricity.

KSPI-E is not supported, since it uses something called Megajoule power source, instead of ElectricCharge.

Sorry.

Maybe in the future.

i've updated the OP with info about unsupport mods and AmpYear

Edited by linuxgurugamer
Link to comment
Share on other sites

3 hours ago, linuxgurugamer said:

 

KSPI-E is not supported, since it uses something called Megajoule power source, instead of ElectricCharge.

Sorry.

Maybe in the future.

i've updated the OP with info about unsupport mods and AmpYear

Goes to sniff in a corner :P

 

Now seriously, yeah, I didn't expect it to detect the KSPI reactors, but I hoped they could at least co-exist, with fusebox detecting the stock and maybe the NFT parts. Just in case it wasn't clear, with KSPI (and NFT, I don't know which mod is causing issues) it doesn't detect stock power generators either.

Link to comment
Share on other sites

8 minutes ago, juanml82 said:

Goes to sniff in a corner :P

 

Now seriously, yeah, I didn't expect it to detect the KSPI reactors, but I hoped they could at least co-exist, with fusebox detecting the stock and maybe the NFT parts. Just in case it wasn't clear, with KSPI (and NFT, I don't know which mod is causing issues) it doesn't detect stock power generators either.

That's odd, unless KSPI is actually replacing all of the ElectricalCharge with their own

Link to comment
Share on other sites

New release, 0.1.4:

  • Added detection of AmpYear and a dialog warning to remove one of them
  • Added 3 parts,using MM script:
    • z-1kReserveBattery
    • z-100ReserveBattery
    • z-400ReserveBattery
    • These parts are not visible in the VAB, they are here to allow saves to work when switching from AmpYear to FuseBox.  As such, their internal names match those of the parts from AmpYear.
    • Functionality is identical to a regular battery of the same size
  • Added do-nothing modules: AYPart and AYCrewPart, to replace the modules from AmpYear.
Edited by linuxgurugamer
Link to comment
Share on other sites

(FuseBox_Continued-0.1.4.1, KSP 1.2.2.1622 (WindowsPlayer x64))

Please don't read this as a complaint - it is just info I hope you can use.

I have only used two of the probes sofar on my satellites and the ones with RC-001S Remote Guidance Unit have no problems, but all my satellites with the Probodobodyne OKTO are dead in space with this mod installed.

During launch theres no problem, but changing to another vessel or going back to KSC and then returning to the satellite with the Probodobodyne OKTO probe, will have it dead in space.

I tried a clean install with only this fusebox installed and launched a pretty simple satellite with Probodobodyne OKTO, plenty of battery (1010 EC total), 6 OX-STAT + 2 OX-4W 3x2 and 2 HG-5 High Gain Antennas. Put it in Low Kerbin Orbit then went back to KSC and then via tracking station back to the satellite and it was dead in space.

 

In clean install only modded with FuseBox_Continued-0.1.4.1:

In the VAB Fusebox states a drain from a single Probodobodyne OKTO to 6.02. (Leaving VAB and going back in changed it to 6.11)

According to the describtion it should drain 1.2 EC/min = 0.02 EC/sec.

During flight it seems fusebox reads it right as 0.02 EC/sec.

 

Edited by Mikey_B1974
Link to comment
Share on other sites

47 minutes ago, Mikey_B1974 said:

(FuseBox_Continued-0.1.4.1, KSP 1.2.2.1622 (WindowsPlayer x64))

Please don't read this as a complaint - it is just info I hope you can use.

I have only used two of the probes sofar on my satellites and the ones with RC-001S Remote Guidance Unit have no problems, but all my satellites with the Probodobodyne OKTO are dead in space with this mod installed.

During launch theres no problem, but changing to another vessel or going back to KSC and then returning to the satellite with the Probodobodyne OKTO probe, will have it dead in space.

I tried a clean install with only this fusebox installed and launched a pretty simple satellite with Probodobodyne OKTO, plenty of battery (1010 EC total), 6 OX-STAT + 2 OX-4W 3x2 and 2 HG-5 High Gain Antennas. Put it in Low Kerbin Orbit then went back to KSC and then via tracking station back to the satellite and it was dead in space.

 

In clean install only modded with FuseBox_Continued-0.1.4.1:

In the VAB Fusebox states a drain from a single Probodobodyne OKTO to 6.02. (Leaving VAB and going back in changed it to 6.11)

According to the describtion it should drain 1.2 EC/min = 0.02 EC/sec.

During flight it seems fusebox reads it right as 0.02 EC/sec.

 

That doesn't make sense, this doesn't touch the parts or the resource usage, other than to monitor the EC usage.

Re. the VAB drain, that was a bug which I fixed, the drain should be a maximum of 3.6 (1.2EC/min per axis).  It was doing the calculation wrong, I fixed it in the  0.1.3 release.  If you are still getting more than that being estimated (ie:  >3.6), I'll need to look at it.

You've given me some good info, I should be able to test it this evening

Link to comment
Share on other sites

well, the last 2 versions you uploaded worked just fine for me, but it turns out that i've been having similar problems to Mikey-B1974 with them installed.

 

i mentioned earlier i was having trouble with a modded install, and dead craft was one of them (thought i had nailed down the problem, turns out removing fusebox was why?). 

I was having 2 distinct types of dead craft:

1st) dead probe, everything looks fine ~ just no control input works.

2ne) probe control normal, problem is engines run (animation/throttle/audio), but consume no fuel and produce no thrust.  right click window reports 0 fuel flow, 0 requirements met).

 

removed all versions of fusebox, both continued and modified original, and both types of craft are usable again.

 

both types of errors usually (not always) occur immediately after either a staging event, or a save load (quick or normal).  when it occurs from a staging event, i will know the error is about to be there: the camera stays with the lower uncontrolled/empty stage and will have to jump to the rest of the vessel via map/tracking station.

 

I'm baffled why fusebox would be doing this, but hope this helps find the krakken.

Link to comment
Share on other sites

4 minutes ago, TK421d said:

well, the last 2 versions you uploaded worked just fine for me, but it turns out that i've been having similar problems to Mikey-B1974 with them installed.

 

i mentioned earlier i was having trouble with a modded install, and dead craft was one of them (thought i had nailed down the problem, turns out removing fusebox was why?). 

I was having 2 distinct types of dead craft:

1st) dead probe, everything looks fine ~ just no control input works.

2ne) probe control normal, problem is engines run (animation/throttle/audio), but consume no fuel and produce no thrust.  right click window reports 0 fuel flow, 0 requirements met).

 

removed all versions of fusebox, both continued and modified original, and both types of craft are usable again.

 

both types of errors usually (not always) occur immediately after either a staging event, or a save load (quick or normal).  when it occurs from a staging event, i will know the error is about to be there: the camera stays with the lower uncontrolled/empty stage and will have to jump to the rest of the vessel via map/tracking station.

 

I'm baffled why fusebox would be doing this, but hope this helps find the krakken.

Actually, you might have given me an idea.

The engines running but consuming no fuel, was that with both versions, or just my version?

Link to comment
Share on other sites

1 minute ago, TK421d said:

i believe it started at the same time as i changed to `continued

Ok, that makes sense, since there was a huge change in the background.

I'll figure it out this evening

Just to confirm:  When you launch a ship, and stay with the ship, Fusebox Continued works correctly.  It's only when you change ships that it has problems.

Are these ships inside physics range, or outside (ie:  on rails)?

Link to comment
Share on other sites

If anyone can try this patch:

https://www.dropbox.com/s/9p5bot7su93dczm/FuseBox-patch.zip?dl=0

It may fix the problem.  I found some missing events which I added.  Not able to test, but would appreciate it if someone else could.

Just replace the dll in the FuseBox/Plugins directory with what's in this file

Thanks

Link to comment
Share on other sites

Thanks for working on it and responding so quickly.

I copied the dll from your zip file and overwrote the old one in my clean install (except for this fusebox mod)

Unfortunately the satellite I launched earlier, in the clean install, is still dead in space.  I launched a new one which again launched fine, but when I switched away from and then back to it, it was also dead in space.

Link to comment
Share on other sites

42 minutes ago, Mikey_B1974 said:

Thanks for working on it and responding so quickly.

I copied the dll from your zip file and overwrote the old one in my clean install (except for this fusebox mod)

Unfortunately the satellite I launched earlier, in the clean install, is still dead in space.  I launched a new one which again launched fine, but when I switched away from and then back to it, it was also dead in space.

ok, could you send me the save file, please?

Thanks for testing.  It was a quick fix, which I didn't have time to test.  This will help me figure it out.

Oh, and when switching away, what are you switching away to?  If another vessel, is it local or elsewhere?

Link to comment
Share on other sites

Had this happen to me yesterday, the dead probe thing, anyway I had a mission on return from Eeloo rendezvous with a ship just launched from Kerbin.  The Eeloo ship was launched prior to installing this mod and the dead probe occured within physics range after undocking both landers to dock with the other vessel containing the parachutes for a safe landing.  Upon switching back, the probe was dead the action window showed "Not enough Electrical charge" for both the probe command status and the probe's reaction wheel.  The probe core in this case is the large 2.5 m stack probe core, while the batteries were absolutely full from the RTG.  MechJeb could control the vehicle, but i could not change targets or make other inputs (like controlling debris).  Here is some more info on the situation when it ocurred.

-- It was the only ship with an active extended antenna (HG-5) while in LKO (100x100Km)

-- It was the only stock probe core in the scene, the others were from MRS and SpaceY

-- docking another probe core allowed control of the vessel, but made no difference to the error about EC

-- I recovered other ships from eeloo using the same probe core with no problems

I wasn't sure what caused it but was able to recover the mission critical elements form that particular ship (Jeb, Bill, Bob, and Val), but not the affected part.  That probe core controls a tug which acts as the engines for that mission and can be undocked if the need arises.  Not sure if this info will help with this, but i tried to remember all relevant information during the event.

Link to comment
Share on other sites

Ok, thank you all for your patience.

I was able to reproduce the problem fairly easily, thanks to all who provided assistence and information.

Here is a new file which fixes the issue:

https://www.dropbox.com/s/tvjgtzzug4ma86f/Fusebox-b2.zip?dl=0

I'd appreciate your testing it before I release.

Thanks

 

Link to comment
Share on other sites

I installed your new patch in my 'clean' install and both my satellites are now working &)

Then I installed fusebox with patch in my bit heavily modded install and same thing - satellites that without the patch were dead in space, were now functioning - hurra :)

Thank you

Link to comment
Share on other sites

So... I also encountered the same problem as others, and posted it on other mod's thread.

Removing of this mod has solved the problem for now.

Below is the post I wrote in 'Kerbalism' release thread.

Spoiler

 

It seems that the lockouts are occurring only, and all on 'Unmanned' probes such as relays, sattelite, rovers, etc..

The status UI on the toolbar says '[error] Connection timed-out', although the remote-tech says it's online.

In fact, they respond to any command given through RT's flight computer UI.

Other crewed vessels are doing just fine, including EVA Kerbals.

Here's a screenshot that shows what's happenning on those uncontrollable vessels.

  Reveal hidden contents

efIeuYi.png

Strange thing is, although the vessel holds and generates enough EC to run the entire vessel, the message on the core says 'Not enough electric charge'.

I've search through the logs, but failed to find any execeptions or anything.

Sadly, most of my vessels are unmanned ones. So You can say my entire game is currently locked out.

I may just play with some planes until this one settles down.:confused:

I'll update any news when I encounter one.

Thanks.

EDIT : The problem has come from 'Fusebox' mod. Removing the mod solved all lockout proble. Terribly sorry for bothering you with misinformation.

Cannot try the hotfix right at the moment, but give it a try as soon as I get home.

If you need my sfs or logs or any other information, please let me know.

BTW, thanks for reviving this great mod. Really appreciate it.

Link to comment
Share on other sites

7 hours ago, Acvila said:

i have the same problem, but because i use airpark, i thought it is from that. if i use hyperedit probes come to live again...

With the latest patch or not?

New release, 0.1.5:

  • Fixed issue of losing control of probes after switching away from them and then back.  This also showed up if you put a probe on the launch pad, left the scene and came back
     
Link to comment
Share on other sites

Good to hear about a fix,  I came by to post an error I found when searching the logs, but maybe too late now.

[ERR 14:21:46.894] Exception handling event onVesselWasModified in class VesselStatsManager:System.InvalidCastException: Cannot cast from source type to destination type.
  at TrackResource.VesselStatsManager.Add (.Vessel v) [0x00000] in <filename unknown>:0 
  at TrackResource.VesselStatsManager.Reload (.Vessel v) [0x00000] in <filename unknown>:0 
  at EventData`1[Vessel].Fire (.Vessel data) [0x00000] in <filename unknown>:0 

[EXC 14:21:46.900] InvalidCastException: Cannot cast from source type to destination type.
	TrackResource.VesselStatsManager.Add (.Vessel v)
	TrackResource.VesselStatsManager.Reload (.Vessel v)
	EventData`1[Vessel].Fire (.Vessel data)
	UnityEngine.Debug:LogException(Exception)
	EventData`1:Fire(Vessel)
	Vessel:Initialize(Boolean)
	FlightEVA:onGoForEVA()
	FlightEVA:spawnEVA(ProtoCrewMember, Part, Transform, Boolean)
	FlightEVA:SpawnEVA(Kerbal)
	KSP.UI.Screens.Flight.KerbalPortrait:ClickEVA()
	UnityEngine.EventSystems.EventSystem:Update()

    and this one showed up later

[ERR 14:21:51.377] Exception handling event onVesselWillDestroy in class VesselStatsManager:System.InvalidCastException: Cannot cast from source type to destination type.
  at TrackResource.VesselStatsManager.Remove (.Vessel v) [0x00000] in <filename unknown>:0 
  at EventData`1[Vessel].Fire (.Vessel data) [0x00000] in <filename unknown>:0 

[EXC 14:21:51.382] InvalidCastException: Cannot cast from source type to destination type.
	TrackResource.VesselStatsManager.Remove (.Vessel v)
	EventData`1[Vessel].Fire (.Vessel data)
	UnityEngine.Debug:LogException(Exception)
	EventData`1:Fire(Vessel)
	Vessel:Die()
	KerbalEVA:proceedAndBoard(Part)
	KerbalEVA:BoardPart(Part)
	KerbalEVA:<SetupFSM>m__58()
	KerbalFSM:RunEvent(KFSMEvent)
	KerbalFSM:updateFSM(KFSMUpdateMode)
	KerbalFSM:UpdateFSM()
	KerbalEVA:Update()
    
    and..

[ERR 15:01:22.867] Exception handling event onTimeWarpRateChanged in class VesselStatsManager:System.InvalidOperationException: out of sync
  at System.Collections.Generic.Dictionary`2+Enumerator[Vessel,TrackResource.ResourceStats].VerifyState () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+Enumerator[Vessel,TrackResource.ResourceStats].MoveNext () [0x00000] in <filename unknown>:0 
  at TrackResource.VesselStatsManager.Check () [0x00000] in <filename unknown>:0 
  at EventVoid.Fire () [0x00000] in <filename unknown>:0 

[EXC 15:01:22.874] InvalidOperationException: out of sync
	System.Collections.Generic.Dictionary`2+Enumerator[Vessel,TrackResource.ResourceStats].VerifyState ()
	System.Collections.Generic.Dictionary`2+Enumerator[Vessel,TrackResource.ResourceStats].MoveNext ()
	TrackResource.VesselStatsManager.Check ()
	EventVoid.Fire ()
	UnityEngine.Debug:LogException(Exception)
	EventVoid:Fire()
	TimeWarp:assumeWarpRate(Single, Boolean, Boolean)
	TimeWarp:setRate(Int32, Boolean, Boolean, Boolean, Boolean)
	TimeWarp:FixedUpdate()
    
    then..
    
[EXC 15:34:02.555] ArgumentNullException: Argument cannot be null.
Parameter name: key
	System.Collections.Generic.Dictionary`2[Vessel,TrackResource.ResourceStats].TryGetValue (.Vessel key, TrackResource.ResourceStats& value)
	TrackResource.VesselStatsManager.Get (.Vessel v)
	Ratzap.FuseBox_Core.updateAmValues ()
	Ratzap.Fusebox_Editor.OnGUI ()

The only other errors i found were known errors from Ground Construction.

Link to comment
Share on other sites

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