Space Engineers

Space Engineers

评价数不足
Power Management Script
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
1.227 KB
2017 年 7 月 19 日 下午 7:03
2017 年 7 月 29 日 下午 12:38
2 项改动说明 ( 查看 )

订阅以下载
Power Management 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 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, a reactor, and LCD panel.


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. You also want the LCD panel to get summarized feedback on what's going on.



5 steps to set up:

1) Looped Timer block to trigger the script every 10sec or so.

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

3) Set Variable: lcdName = The name of the LCD you want info on

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

5) Set Variable: batteryHighThreshold = A decimal value of the battery capacity percentage you want the reactors to turn off at (Example, 75% battery capacity = .75)


Enjoy!
热门讨论 查看全部(2)
2
2017 年 7 月 30 日 下午 5:45
Multiple reactors
Orion
0
2018 年 3 月 1 日 下午 3:12
"caught exeption during execution of script:input string was not in a correct format"
MasterNibbz
27 条留言
Old Bob 2024 年 7 月 10 日 上午 8:48 
DONT WORK
KillarOx3487 2023 年 9 月 15 日 上午 8:51 
@Beltrán White, I have updated your "Power Management Script" for SE. I was wondering if you had a problem with me posting it and leaving a link to your original scrip.
WolfKakashi 2022 年 8 月 30 日 上午 2:54 
I cant get it to work.
Can someone conform that this mod could still work after last updates?
In the Programmable Block i get the info: "string in wrong format"
I would totally like to use this mod so i can save some uran
FolkBear 2021 年 7 月 11 日 上午 12:23 
Still working fine for me will update once I have run it for a while.
dogmouth 2021 年 2 月 22 日 上午 2:39 
Thanks Dr. Zarkon. Confirming this still works as of today. Even without the LCD display it does what it is supposed to.
Gameagerr 2020 年 8 月 11 日 上午 1:46 
In the last line of code where it has:

lcd.WritePublicText(outputToLCD);

Removing the "Public" worked for me. (Though you will need to manually switch the LCD panel's content type to Text and Images).

Replace with: lcd.WriteText(outputToLCD);

It seems to be working with this small change. I don't know much else about the script as I am new to it.
DaehKcid 2020 年 7 月 18 日 上午 6:49 
This stopped working for me, when I click check code I get an Error Program(99,0):warning:'IMyTextPanel.WritePublicText(string, bool)' is obsolete: 'LCD public text is deprecated'
HeavyDeception 2020 年 2 月 15 日 下午 8:36 
Dose this still work for anyone I can seem to get it to work?
самовар 2019 年 8 月 24 日 上午 3:29 
I used this to control a nanite factory from mod, a useful script!