Space Engineers

Space Engineers

Not enough ratings
Power Management 2.0
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
5.020 KB
1 Jul, 2024 @ 8:35pm
1 Change Note ( view )

Subscribe to download
Power Management 2.0

Description
Stem id = 3280021070
Modio id = 4666638
This is a updated version of Beltrán White's Power Management Script link to there script:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1082621269
I have permission from Beltrán White to post this updated script.

Purpose:

- Bottom line, this script's primary purpose is to conserve uranium on your station / mobile base in survival.


What does it do?

- This script calculates the average power charge of all batteries on a grid and compares it against the user defined upper and lower battery capacity thresholds. If the low average battery capacity threshold is reached, the script turns on the user defined reactors. If the high threshold is reached, it turns off the reactors to conserve uranium and lets the batteries/solar panels handle the power load. It then displays diagnostic information about the station's power on the Programming Blocks Screen or (Optional) a user defined LCD panel.


Do I need to install any additional Mods/Scripts?

- Nope. This one's completely independent and vanilla friendly.


Ideal Configuration:

- Station / Mobile base with solar panels, batteries, and reactor.


Why is this ideal?

- Theoretically, you want your solar panels and batteries to do the majority of the heavy lifting on powering your station / mobile base while conserving Uranium. On the flip side, if you're not getting enough sun, you want your reactors to kick in.

OPTIONAL

5 Easy steps to change settings:

1) Set Variable: ReactorName = A string of text like "Station Reactor" for 1 or mulitple reactors

2) Set Variable: BatteryName = A string of text like "Station Battery" for 1 or mulitple batterys

3) Set Variable: batteryLowThreshold = A decimal value of the battery capacity percentage you want the reactors to turn on at (Example, 10% battery capacity = 0.1)

4) Set Variable: batteryHighThreshold = A decimal value of the battery capacity percentage you want the reactors to turn off at (Example, 75% battery capacity = 0.75) Note: 1.0 would be 100%

5) (Optional) Set Variable: lcdName = "The name of the LCD you want info on"



Enjoy!
11 Comments
Alienicon 3 Mar @ 1:41am 
hank you kindly for explaining this. I understand now, and will use your script as I am in desperate need of ways to save on PCU with my old PC. So, again, thank you.
KillarOx3487  [author] 28 Feb @ 10:31am 
And with the optional LCD setup you can get all the information on your grid charge state and scrip settings with out the need to enter the block configuration menu.
KillarOx3487  [author] 28 Feb @ 10:26am 
You could use an event controller. But the issue with that is the event controller only allows for one target.

So say you have a event controller set to turn your reactors on when your batteries are less than 25%. An then off when above that target.
So your batteries will never charge above 25%.

You could add a second event controller to turn you reactors off at a different target, say 75% charge. But in my experience this can cause a lot of lag and drop you simulation speed to unplayable levels, as you now have 2 event controllers trying to controller the same thing.

This script only requires one block to controller every thing and is easier to set up. (In my opinion). It also prevents the lag and simulation speed issue from happening.
Alienicon 28 Feb @ 2:44am 
How is this any different than using a event controller doing the same thing? Sincerely curious.
KillarOx3487  [author] 21 Jan @ 1:40pm 
I will continue to try and update the steam version.
KillarOx3487  [author] 21 Jan @ 1:38pm 
@2016 Toyota Corolla S, I have a updated version of the script on "Mod.io". I am have issues With updating the script on steam.

It was a math issue were if you had less than 1MW of power on a grid it would not calculate properly.

if you have any other issues plz let me know.
KillarOx3487  [author] 20 Jan @ 8:21pm 
I will look in to it more i have not been playing or modding SE for awhile. I do not recall but hydrogen engines may use the reactor class. I will try to get the small grid hydro engine fixed asap.
2016 Toyota Corolla S 20 Jan @ 7:25pm 
it did turn off hydrogen engines on large grids when the target was reached, just had to change ReactorName
KillarOx3487  [author] 20 Jan @ 5:25pm 
@2016 Toyota corolla 5, now that I have had a chance to refresh my self on the code. and re read your comment you are right it dose not turn off any thing other than reactors. This script is for conserving uranium. It does not work with custom power creation devices from mods unless they are mode with the reactor class, and it does not turn off hydrogen engines. It looks for reactors only.
KillarOx3487  [author] 20 Jan @ 11:34am 
I will have to look in to that, most of my testing was on large grid.