+1
Fixed

Electrical showing "System Offline" after sunrise.

Rob 6 years ago updated by Tyler Owen (Lead Developer) 6 years ago 6

Had a weird scenario that I've spent a few hours on.  At Alpha Hab, slept, woke up at about 04:30, put on EVA suit went outside. As the sun rose the Electrical system didn't come online to charge the Hab battery. Checked everything at 09:30 and all modules were in good repair and at 100 Units local power, but all showing System Offline. Electrical system had Circuit, 5 fuses, 5 wires and 3 panels; all over 90% repair.   Tried replacing parts (even though none were damaged) but nothing; game time by this point was about 11:30.  At about 13:00, still without Hab power, I tried sleeping for an hour. When I woke up Hab power was back online, and at 400 units input. Maybe something screwy with the in-game time events at sunrise?

Under review

Sorry it took me awhile to get back to this. Are you certain that your hab reserve battery was not charging? It may have just been a bug with the status display, but I haven't experienced this so I'm not sure how to reproduce it.

The battery was definitely not charging; I've determined the cause, not sure if it's a bug or 'feature'.  If the Hab's Reserve Power is less than 1% then it stops charging altogether and all the systems go offline, even if the systems themselves have 100 power units being supplied.   I tested this by running down the reserve power overnight, then during the day transferring it between the Hab and my suit to find the threshold value.  In the OP the cause of the low battery was a broken component, but repairing it didn't start generating power again because the Reserve Power was already below 1%.




+1
Fixed

Okay, good catch. I've made the following change. The electrical module will now be able to charge from its own solar panels so long as the power switch to the unit is on and its required components are operational. It will no longer require a reserve charge since that doesn't make much sense. No requirements for the other units have been changed. Fix will be out soon.

+1

To clarify, you still cannot charge from any connected solar panels from other modules if the electrical module is turned off (since all power routes through it), but the electrical module will no longer be considered turned off when there is less than 1% of reserve power.

Is this a possible scenario for the rest of the systems too? As in, can they be individually turned on even when the battery is at zero but there is enough local power to operate the given unit itself, or they also check the battery first and if the battery is at zero they will not power up even when they could run on local power?


How is the power checking/routing logic implemented? All the generated units (if any) are simply sent to the battery first if Electrical is on, then the needed units are drawn back out from the battery if there are enough units available? Or first local drain is substracted from local use and the result is either added to the battery or taken out from it? The second method would work for all four systems uniformly and ensure that when there's enough local power (generated minus used is equal to or greater than zero), the system itself would come online and do its thing regardless if there's charge in the battery or not.


So each system should do something like this per tick:

  1. Power switch off. - Report "offline" status, abort.
  2. Missing/failed components. - Report "failed" status, abort.
  3. Substract current power use from current power generation to calculate a "net power" value.
  4. If battery value + net power would be negative. - Report "offline due to not enough power" status, abort. (As long as net power is not less than zero, and assuming battery value cannot go below zero, which it shouldn't, this won't be true regardless of battery value and the system will work.)
  5. Do production calculations.
  6. Net power is less than one. - Report "drawing" status, "add" (negative or zero) net power to battery value, abort. (Zero means not drawing right now, but not generating reserve either so over a whole day it will use more than it contributes so it's effectively drawing.)
  7. Electrical is offline/failed. - Report "local only" status, abort.
  8. Report "feeding" status, add net power to battery value.

While probably not too common, there could be a situation where the player is unable to keep Electrical operational, causing the battery to sit at 0% charge, but even in this situation the other systems should be able to function and produce during the day while their local power can feed them directly, instead of a dead battery meaning no system can ever run as they always want to take power from the battery and when they can't do that they will simply not run.

I may revisit this at some point, but as it stands right now running the heater, reoxygenator, or water reclaimer does require some charge in the reserve battery and charging the reserve battery at all (even from solar panels connected to other modules) requires the electrical module to be operational. I can understand your reasoning above and I may make those changes, but I'm reluctant to do so until I can be sure that the already implemented changes have not caused other problems elsewhere.