Space Engineers

Space Engineers

Power Management Script
27 Comments
Old Bob 10 Jul, 2024 @ 8:48am 
DONT WORK
KillarOx3487 15 Sep, 2023 @ 8:51am 
@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 30 Aug, 2022 @ 2:54am 
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 11 Jul, 2021 @ 12:23am 
Still working fine for me will update once I have run it for a while.
dogmouth 22 Feb, 2021 @ 2:39am 
Thanks Dr. Zarkon. Confirming this still works as of today. Even without the LCD display it does what it is supposed to.
Gameagerr 11 Aug, 2020 @ 1:46am 
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 18 Jul, 2020 @ 6:49am 
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 15 Feb, 2020 @ 8:36pm 
Dose this still work for anyone I can seem to get it to work?
самовар 24 Aug, 2019 @ 3:29am 
I used this to control a nanite factory from mod, a useful script!
[GG]Nã†ã§-FLM- 29 Mar, 2019 @ 2:15am 
does this work well with wind turbines
Kyr 17 Oct, 2018 @ 6:46am 
Ok.. .something odd is happening. I thought it was just the timer block not working but that doesn't seem to be the case. Checking my batteries manually they seem to be 90%+ but the LCD is reporting 3-4% and turning on the reactors.

If I recompile the script and start it again it suddenly jumps up to the correct 90%+ value but after a little while running it starts misbehaving again.
Kyr 17 Oct, 2018 @ 5:50am 
Never mind.. figured it out. I'd not setup the timer block correctly
Kyr 17 Oct, 2018 @ 5:47am 
Hi. Love this script but I've noticed a problem.

On the LCD the "Current Battery Charge" is at 3.79%

When I check the batteries manually they are all at 100%.

It's like the script is not seeing them as fully charged and so leaves the reactor on all the time.
Albrat 7 Jul, 2018 @ 8:52am 
If you want to control Multiple reactors controlled from the programmable block... You can just name them all "reactor" and they will all work as one.
Reese 15 Feb, 2018 @ 10:08pm 
Had a 'String in wrong format error' preventing script from running. I think it was because there was no uranium in reactor. Maybe something to look at.
Whitehawk 12 Jan, 2018 @ 8:08am 
I recognise that name...have you played HCS planetside?
Beltrán White  [author] 1 Jan, 2018 @ 5:26pm 
Name your reactors similarly, like "Station Reactor 1" and "Station Reactor 2". In the ReactorSearchString variable type in something unique that will capture both reactors like "Station Reactor". Since the "Station Reactor" text exists in both reactors, it will control both.
Lozzie's Friends 22 Dec, 2017 @ 9:43am 
Hello I like this script but i am not certain where to write the second reactor name (and third fourth... my ships are powerhouses). You only provide one String, and i am not certain how you seperate internally, given as it can be spaces. Thank you in advance.
andyt8 25 Nov, 2017 @ 5:30am 
Is there a change for an updated version for the latest major update? I mean a version without the need for a timer block.
UnL3xpected 27 Oct, 2017 @ 9:05am 
I like this script, but it is lacking one major consideration. If the battery output is not powerful enough to power the station, the reactors should be turned on again, regardless of battery capacity. I would like it to be such that when the battery output is greater than 90% of its max power, it turns on the reactors.
laci4321 (HUN) 31 Jul, 2017 @ 2:01am 
Ok I understand, thank you :)
Beltrán White  [author] 30 Jul, 2017 @ 4:35pm 
I omitted the LCD info about the reactors since more than 1 reactor's detailed info doesn't fit on 1 lcd display. I'll get reactor info back on the LCD part later. Maybe i'll just do 1 line per controlled reactor or something. For now, it works.
laci4321 (HUN) 30 Jul, 2017 @ 2:28pm 
It can control multiple reactors, but the LCD doesn't show any info about them.
Did I make a mistake somewhere?
Beltrán White  [author] 29 Jul, 2017 @ 12:38pm 
Ok it's updated now to support multiple reactors
Beltrán White  [author] 29 Jul, 2017 @ 12:03pm 
Just got back from vacation. Should be easy enough.
laci4321 (HUN) 29 Jul, 2017 @ 5:29am 
Hello! Really useful script! But it can manage only 1 reactor. If I use 2 reactors, with same name, the script only controls one of them.
Can you improve your script?