yes please...automated energy management would be wonderful!
and even not too difficult.
currentenergyneeded=x
currentenergyproduced=y
if reactoravailable(zenith)
turnonreactor(zenith)
endif
while(reactoravailable(mark2)&&x-y>35000)
turnonreactor(mark2,1)
endwhile
//turn on MK2 until MK1's are more efficient.
if(reactoravailable(mark1)>=roundup(x-y/5000)
//see if we can bridge the remaining gap with MK1's, no matter if it's only 35k or smaller or we run out of MK2 and there are enough MK1's.
turnonreactor(mark1,roundup(x-y/5000)
//is so, turn on sufficient MK1 reactors.
else if(reactoravailable(mark2) turnonreactor(mark2,1)
//otherwise, instead add another mark2 if available(say you need 30k energy but only have 5 MK1 reactors).
else
while (x>y&&reactoravailable(mark3))
turnonreactor(mark3,1).
if(reactoravailable(mark1)>=roundup(x-y/5000)
turnonreactor(mark1,roundup(x-y/5000)
endwhile
turnonreactor(mark1,all)
//only if no mk2 are available and the remaining mk1 are not sufficient to cover: turn on 1 MK3 and see if we can cover the rest with MK1's.
if (y-40000>x)
turnofreactor(MK2,1).
//if we are running a redundant MK2 at this point, courtesy of MK3 reactor online, turn it off.
To sum it up:
This way, the game would do the following steps in "human speech":
Zenith Power Generator, if available, is automatically running. If you would get away with
fewer than 5 MK1 reactors after having build a Zenith, your game is ending soon, anyway.
Start up as many MK2 reactors as needed to bring energy coverage within 35k of whats needed.
Then, if possible, start enough MK1 reactors to cover the remainder.
If there's not enough MK1s, it starts up another MK2 instead.
If theres not enough MK1's, and no MK2's left, it instead starts 1 MK3, then takes another
look at wether, if energy is still needed, there's enough MK1's to do the job, and starts them
if possible. Otherwise, it starts another MK3 and looks again if MK1's are sufficient, until it
runs out of MK3's or the MK1's can take over. If we run out of MK3's, all MK2's are already running,
and so we also start all remaining MK1's, because even if we are negative, when stuff
gets killed, we may get back to positive faster...
Then, courtesy of low reactor count, we could be running 1 redundant MK2, so we check if it's
save to turn that off and there we go.
Naturally, to not impact other stuff, energyneeded should be a value that not only takes energy into account, but leaves a little buffer(and of course, golems would need a way to be considered here) and when you try to "activate" something from low-power mode, it should recalculate with the new need inmediately(so getting a fortress or low-powered golem online again would not be problematic). If you leave a little "buffer" you could probably get away with only running this calculation whenever you would get into negatives or once every 30 seconds or so(or only when you deviate from the "buffer" value by, say, 20k energy)
Note that this does not "cover" turning on or off reactors. It just takes a look in regular intervalls that would "activate" the most efficient set of reactors available for your current energy needs. Which, in my book, is totally fine for a automated energy management system, and less work.
I would absolutely LOVE that. If you could "set" the buffer to a certain size as players per CTRLS, then even golems would be unproblematic(even if your reactors would go haywire for a second, when the golem just came online and it attempts to get the huge energy buffer anew)