SSTU - Shadow Space Technologies Unlimited

SSTU - Shadow Space Technologies Unlimited

98.5k Downloads

SSTU Solar Panels -- adjust catch-up mechanics to be more compatible with stock

shadowmage45 opened this issue ยท 1 comments

commented

In career testing game, the SSTU solar panels appear to not play nicely with the stock resource converter catch-up mechanisms.

Either that, or USI-LS is fubar'd in regards to using fertilizer.

When focused, the station has a surplus of supplies generated; when un-focused, anytime the vessels is returned to, it suddenly loses months worth of supplies, eventually running out, even though it should be generating excess.

Proposed new catch-up mechanic:

  • Ignore current sun location/tracking/etc. -- assume full light for the entire catch up period
    • Might be able to find a simple formula to determine 'dark period' for a specific orbit / point on a body, but I have a feeling that it will take more than a one-liner to get that working, and might not be doable at all without prior knowledge of every body in the system, and even then it won't simulate eclipses but only darkness from orbit or body rotation.
  • Calculate maximum EC output per second for the current orbit location (light attenuation / distance from source).
  • Calculate the total catch-up period.
  • catch-up-time * EC/s = 'catch up pool'.
  • Until 'catch-up-pool' is depleted, or 10s have passed, completely fill up vessel EC every tick.

The 'stock bug' is that stock does not have a centralized, reliable, method for out-of-focus resource processing and that a kludge like this is even needed.

commented

May not actually be a problem. Updated the USI-LS in my game last night, and the station properly gains resources even during un-focused timewarp (or more precisely, the catchup on refocusing works as it should).