SSTU - Shadow Space Technologies Unlimited

SSTU - Shadow Space Technologies Unlimited

98.5k Downloads

Solar Panels are not Recognized in Engineers Report as Providing Power

Joker58th opened this issue ยท 16 comments

commented

The solar panels work fine, however, they do not show as providing power in the engineers report in the VAB.

Steps to recreate:

  1. Clean 1.3.1 install
  2. Add SSTU 7.39.149 and dependencies
  3. In VAB build a pod with a battery ,EC consumer part and an SSTU solar panel
  4. Engineers report shows "ElectricCharge required but not generated" and "Electric charge stored but not generated"

I confirmed that stock solar panels do update the report as expected.

I installed Fusebox for a test and it does show correctly there. I saw in the forum that Linuxgurugamer made changes specifically for SSTU.


Dev Notes

This is a 'bug' caused by stock code only checking for stock part-modules, and not offering any method or interface for custom part-modules to register themselves as being a power provide/generator/etc.

Not a problem that can be solved by SSTU -- Please file a report on the stock bug-tracker if you want this to be solved.

commented

AFAIK this is caused by stock code not giving any method for me to say 'yes, this is a solar panel, it generates EC'. Stock code has special handling for their own solar panels, but do not expose such methods for mods to use (at least not last I looked at it).

Likely not solvable, but I'll take a look at it (maybe).

commented

As a side not, sstu panels are not recognised by mods like mechjeb to deploy automatically either (other mod panels do react). Any relation? Not sure if they all use the stock module or not.

commented

I don't know if this helps but I installed Near Future Solar and US and Soviet Solar Panels and they both work with the stock system as well as Kerbalism.

commented

ok, that explains it.

commented

From one of NF-Solar's panels

MODULE
{
	name = ModuleDeployableSolarPanel

	animationName = ExtendPanels

	sunTracking = true
	raycastTransformName = Panel003
	pivotName = pivot
	isBreakable = true

	resourceName = ElectricCharge

	chargeRate = 5
	extendActionName = #autoLOC_6001805 //#autoLOC_6001805 = Extend <<1>>
	retractActionName = #autoLOC_6001806 //#autoLOC_6001806 = Retract <<1>>
	extendpanelsActionName = #autoLOC_6001807 //#autoLOC_6001807 = Toggle <<1>>
}
commented

Yeah, as I was afraid, that is the stock solar-panel part-module. Which means it gets special treatment from stock code, which is why it 'works' while the SSTU ones don't.

Chances are that I will not be able to solve this for SSTU solar panels, as stock code really doesn't play nicely with custom classes/modules (they expect everyone to use theirs, regardless of if their modules are crap and unsuited for anything but the most simplistic of parts).

commented

I don't know if this helps but I installed Near Future Solar and US and Soviet Solar Panels and they both work with the stock system as well as Kerbalism.

It might. I'm not sure if any of those mods use custom part-modules or not (which is what SSTU does); likely that they use the stock module.

Will take a look at NF to see how Nertea is handling it, but again, no guarantees that this is solvable.

commented

To answer your question, I'm afraid it is all solar panels whether they be integrated or stand alone. I verified the probecore, shipcore and stationcore as well as stand alone panels do not report to stock engineer or Kerbalism.

That is what I was afraid of. Apparently those mods/functions don't respect the same interfaces that the stock contracts use. The contracts -should- recognize SSTU solar panels as valid 'power generation', but it seems that doesn't carry over to elsewhere. I guess its just too much to ask for consistency from stock code =\

commented

Well, that is disappointing for me. I really really like your work in this mod and your endeavor to create fantastic looking parts with low part counts. I also want to try out Kerbalism for a realistic'ish type career. So my next question is, respectfully, is there a way or a MM config that I could just remove the solar panels off the stationcore parts for example? I guess I could just leave them on and add more solar panels from other mods but that might be a bit to cluttered.

Or, do I have to beg the Kerbalism guys to add support for your panels? As I mentioned before, Linuxgurugamer did for Fusebox.

commented

Quick question -- do the stand alone SSTU solar panels get recognized properly? If it is just a problem with the StationCore parts, then it may already have been solved for the stand-alones, and I can find and re-use the solution. (I remember that I did solve this issue for stock satellite/etc contracts at one point, but apparently the VAB report/etc doesn't use that information)

In the current versions, yes, you should be able to remove the solar panels. The parts already have a 'none' option, so simply remove all options but that, and change the 'default' or 'current' specification in the config to the 'none' option as well.

Otherwise, yes, the only way those modules will be recognized is if those other mods add specific code for it. The stock API does not expose any sort of proper 'I'm a generator' interface for modules, so there is no way to tell without special handling on a per-module basis.

commented

I totally missed the "none" option. Thanks for mentioning that!

To answer your question, I'm afraid it is all solar panels whether they be integrated or stand alone. I verified the probecore, shipcore and stationcore as well as stand alone panels do not report to stock engineer or Kerbalism.

And thanks again for your time and efforts!

commented

Ok, I think I got it. Here is what is working for all parts that have integrated panels except the Station Service Module. It appears to not be configurable.

@part[]:HAS[@module[]]:NEEDS[SSTU]
{
@module[*]
{
@currentSolarSolar = Solar-DOS-None
@currentSolar = Solar-DOS-None
}
}

commented

Did a quick look, it seems to be tied specifically to ModuleDeployableSolarPanel and ModuleGenerator

commented

Perhaps the best option is to ask the other modmakers if they can add support for the sstu modules?

commented

Sure. Only I don't use those mods though, and have zero compulsion to bug them about it. Should also wait until after the 1.4 update, as all of the code will be changing, and they would need to adapt to the changes anyway.

I also don't use the stock 'engineer report', for exactly this reason -- it is most often simply wrong. And nothing other mods can do to fix that one -- the solution must come from stock code. Good luck there...

commented

I was refering more to mechjeb deploying your panels like it does stock panels ;)