Space Engineers

Space Engineers

Power Control Program v1.1
154 Comments
Killer Bee Mar 9 @ 5:07pm 
I love this script, I use it all the time.
AlfRomeo80  [author] Jan 15 @ 11:08am 
Hi! I've made the source code publicly available on GitHub for anyone who wants to modify the script. You can find it here: https://github.com/AlfaAlfMedia/SpaceEngineers/blob/main/PowerControlProgram
tindolt Jan 13 @ 5:03pm 
I would like to discuss taking this over please.
CosmicDonut Jan 13 @ 6:48am 
This looks really cool man, thanks for making it!
RogueCmdr Jan 1 @ 1:22pm 
just verfied it does not see these fusion deutrium reactors in the script/screens
RogueCmdr Jan 1 @ 1:20pm 
Any chance the emergency power control for the Deuterium reactors can be added unless it already are..

This is one of the two I use https://steamcommunity.com/workshop/filedetails/?id=2558149005
boblefurieu Sep 22, 2025 @ 9:55am 
Super !
SaitamOnun Sep 11, 2025 @ 2:27pm 
Houston, we have a lift off

it's working again.
boblefurieu May 30, 2025 @ 2:58am 
This script is broken
aaronlukemarshall May 12, 2025 @ 3:07am 
This script is now broken in check code. power producers have changed in the vrage code
raz334 Dec 4, 2024 @ 2:02am 
BROKEN, gives errors when attempting to issue a command. Fails to perform without a command.
CD.Cobra(fr) Nov 25, 2023 @ 3:41pm 
Hello and thank you for this superb script.
Would it be possible for this to also be translated into French?
I tried to do it on my side by changing the German part but it doesn't work.
A language switcher, perhaps!
1 English
2 German
3 Spanish
4 French
AlfRomeo80  [author] Oct 1, 2022 @ 1:36pm 
The script is build at a time without safezones. Sadly I have no time to update the script at the moment!
Sadiq Azeem Sep 29, 2022 @ 4:05pm 
when i use safezone it doesnt realize how much it consumes, so should try using reactor and batteries and having a safezone, it will switch off the reactor and keep the batteries on, the problem is the batteries dont have enough power to keep the safezone. I think it dont understand how much safezone eats in power
Asguard Sep 4, 2022 @ 7:10pm 
the script does not auto update anymore i add two batteries hit recompile and run there was like 5 error messages.
SuperKami Aug 12, 2022 @ 12:14pm 
@alfromeo80 lmao, I figured it was just too much. Really great script man, I love it <3 thanks for the reply!
AlfRomeo80  [author] Aug 11, 2022 @ 1:41pm 
@SuperKami There are several limits to the scripts in Space Engineers. But i can't tell you the amount of blocks you can control with this script. I've never tested the script with such large grid like yours. The amount of problems the code runs into with such large grids is more than painful. The complexity of my script with me missing every background of coding, I'm sorry to tell you I can't imagine a way to handle your case.
I wrote the scipts to learn how coding works, but i never expected such a resonance.
SuperKami Aug 11, 2022 @ 11:32am 
@alfromeo80 I have added about 400 solar panels to my grid, when I go to recompile the script it crashes the game. Is there a limited number of items it can control? great script tho
Zephyroku May 27, 2022 @ 2:48pm 
♥♥♥♥♥♥♥♥♥, this is a masterpiece!
AlfRomeo80  [author] Mar 26, 2022 @ 5:48pm 
Thank you, @McDewgle. A few days ago there was a discussion about his topic on my discord. You can enter the discord by this invite: https://discord.gg/2a52ftDyXX
McDewgle Mar 26, 2022 @ 10:18am 
Love your script! Just started using it today and immediately subscribed to H202 and Room Control programs as well.

Question though, have you added an ability yet to distinguish between the grid the program block is attached to vs connected ships? Right now I can see the reactors of every vessel currently docked to our station which makes things a bit difficult!
AlfRomeo80  [author] Feb 21, 2022 @ 1:13pm 
Hi @vthor.

I really appreciate the work you've done. I think the easiest way would be to upload the individual translations to my Discord. You probably only translated the upper "Settings" area. The script code itself remains unchanged. So you can make this top section available there as .txt for everyone.

What do you think about the idea?
Destro Feb 20, 2022 @ 5:35am 
Great job.Nice script does what it's supposed to. It's a bit tricky to set up, but once you've done it. Then it works perfectly. It's really fun to use
vthor Feb 18, 2022 @ 5:27pm 
Hola y gracias por tu gran trabajo, quería comentarte que yo no soy muy bueno en los idiomas y con la ayuda de traductores, mas un poco de trabajo he traducido el script al español, quería preguntarte si me das tu permiso para publicar tu script en español o pasarte el script y lo publicas tu yo no tengo ningún problema en esos temas, la decisión te la dejo a ti, espero recibir una respuesta gracias de nuevo, att vthor.

Hello and thanks for your great work, I wanted to tell you that I am not very good at languages and with the help of translators, plus a little work I have translated the script into Spanish, I wanted to ask if you give me your permission to publish your script in Spanish or pass you the script and you publish it I have no problem in these issues, the decision I leave it to you, I hope to receive a response thanks again, att vthor.
rottielover Feb 18, 2022 @ 8:49am 
Never mind I found the setup youtube video, the only thing I can't figure out is the commands for activate all and deactivate all on (buttons 8 and 9) on things like the battery screen. The comments have the rest of the commands but I am not sure if I'm supposed to put "changeStatus=BatteryBlock" in both of those slots?
rottielover Feb 14, 2022 @ 3:46pm 
Can someone make an infographic on how the control bar in a cockpit should be setup (and maybe one for a button panel setup)? I managed to get the script installed and I built a regular cockpit, I got that working by putting "@PowerControl" into the custom data, then I started trying to setup the control bar. I dragged the program block Icon down to the list and used Run and typed in menu=1 etc, that swaps the menus. I manged to get one setup with "changeStatus=manualControl" to get the system into auto mode, but I'm not quite sure about the other commands and how the bars should be setup conceptually? Am I supposed to use Slot 1 on Control group 1 for Menu 1 and then slot 1 Control Group 2 Menu 2 etc. ??

I'm also unsure about the "selection=" values to use? 1 to select -1 to deselect ?
Snowman266 Oct 4, 2021 @ 1:56pm 
Any chance this can work with Industrial Overhaul mod , and the difrent engines you have there.
Degrath Aug 22, 2021 @ 4:23pm 
Awesome program, a must have for my game for sure
DigitalVagrant [ZF] Aug 7, 2021 @ 4:59pm 
Any chance this can be gotten working with modded reactors?
Surprise1TsMe Jul 22, 2021 @ 2:36pm 
Hey alfromeo80,

I really love you power control program, it was a bit hard to get into, but once I figured out how to use it it worked like a charm!
I do have one issue though, I sometimes play with some friends, and they can not see the screen updating if they themselves are using the control station. For example, if they want to change from the solarscreen tot the batteryscreen, they can do it, but they will only be able to see it has changed once they leave the control seat. Meanwhile I can see everything fine.
Anyways, mayby you are aware fo this issue and are working around it. (I believe you were rewriting this script based on your experience with you H2O2 program) Or perhaps it can not be fixed.
I hope you are well and am looking forward to your answer!
AlfRomeo80  [author] Jul 19, 2021 @ 1:59pm 
I think I mixed some scripts. The Power Control script doesn't have the same logic the other two have. So the cockpit line does not exist in this script. All screens are updated the whole time.
The line should be ignored by the script, but have you tested the script without the cockpit line?

I made a small test right now. Loaded a world without scitps, build a control seat, loaded the script to a programmable block, entered "@PowerControl" to the custom date field of the control seat, opened the G-menu, entered "changeStatus=manualControl" to abutton and it works.
Deadmeat Jul 14, 2021 @ 6:41am 
Alfromero
Thanks for the great script, I do have a question, I am unable to get the "G" menu arguments to run from the control seat, I think this has to do with the control screens not updating as you suggested on 19 apr, I want to make the suggested change however I can not seem to figure out where to put the control seats name (power control seat) in the custom data fields. This is what I have put in and it does not seem to work:
@PowerControl
Large Display=mainScreen
Top Left Screen=instructionsScreen
Top Right Screen=windTurbineScreen
Bottom Left Screen=NONE
Bottom Right Screen=h2EngineScreen
cockpit=power control seat

Can you point me in the right direction ?
rientelfon Apr 21, 2021 @ 4:14pm 
Nevermind, I had all my batteries set to recharge mod and they needed to be on auto.
rientelfon Apr 21, 2021 @ 3:57pm 
everytime i turn on automatic power control my base loses all power, what am i doing wrong?
Tanker Apr 20, 2021 @ 9:59am 
Not sure what happened but it just started working perfectly again one day. I've not changed a thing to the control area of my base but thanks again for this amazing script
AlfRomeo80  [author] Apr 19, 2021 @ 5:27pm 
Hi and thank you for your kind words.
To increase the performance of the script its only updates the screens if a player is near the screens. The detect the players the script uses sensors. If you are inside a sensor detection area and you enter a cockpit or control seat the game doesn't detect the player anymore. It's the same behavior as you would leave the sensor area.
To fix this the settings at the Coustom Field of any screen have an entry for sensors to detect the player and update the screens and an entry for cockpits.
So if you are inside a cockpit or control seat any display you can see from this position needs to have the seats name entered at the entry "cockpit" of the Custom Data Field.
Then the screens would get updated even if you are inside a cockpit or control seat and the sensor of the room doesn't detect you anymore.
Beastion a.k.a der Nobbi Apr 19, 2021 @ 2:47pm 
Thanks for sharing the script with us!

I have just set up the script according to your instructions.
Now I found out that the buttons I assign with the commands work but the visual effect only changes when I get out of the cockpit.

as an example:
* selection=1 - select next object

the marker around the selected battery changes only when I get out of the cockpit, as long as I don't get out of the cockpit nothing happens.

Is this a known problem? is it perhaps because I play on a dedicated server?
odin1243 Apr 14, 2021 @ 6:42pm 
Love this scrit special display make for noce engineering room
Tanker Mar 29, 2021 @ 6:34pm 
Been using this script for awhile now but the last few days I've not been able to use commands from a cockpit/command chair. I can hit the button but I have to get out of the seat to see an update on any screen. Using button panels as a work around. I've removed the script and put ti back. even rebuild the base its on and still has that issue. any tips that would point me in the direction of fixing it would be great
sniek Mar 28, 2021 @ 7:06pm 
probably one of the best scripts out there! cheers mate
Brain Pudding Mar 23, 2021 @ 1:40pm 
Jesus, this is a God-Tier script right here. Absolutely amazing, thank you! Keep up the great work :D
CombatJoe Feb 8, 2021 @ 4:53pm 
these screens look so wonderful, and setup was easy. Thanks for making this!
Compukit Feb 3, 2021 @ 1:49pm 
whel i agree whit hindsigt2020 its a great scrip whis i coud make somting like that bad the only way how i coud make a script is using some cind of blok builder that makes scrips :)
Hindsight2020 Feb 1, 2021 @ 9:47am 
@Alfredomeo80 That is what I ended up doing it had the same effect, you have made a great script maybe this could be a feature in V1.2.
AlfRomeo80  [author] Feb 1, 2021 @ 7:37am 
No, in this version you can not ignore blocks in auto mode. Perhabs you can use some batteries without the grid name in their names. Then the script wouldn't use them, but of course you won't see them at the displays or at the overall power status.
Hindsight2020 Jan 31, 2021 @ 5:48pm 
Is there a way to ignore certain generators or batteries? I am finding it's turning my ships batteries to auto instead of leaving it in recharge when in automatic mode.
Compukit Jan 29, 2021 @ 7:26am 
wel if i use more then 360 batterys the program stops whit working dont now if it is bekos it can not show anny more on the svreen
a made a littel test rick whit the 360 baterys i shal rebuilt it whit venila baterys and solar cels ant post it when im back to morow avning :)
AlfRomeo80  [author] Jan 29, 2021 @ 7:08am 
As you sad is the screen the problem? With more than 360 batteries the calculation of the symbol size and aragement takes to long for the game. But you can't see any details with this amount of batteries, are you?
Compukit Jan 29, 2021 @ 6:45am 
a made a counting erro its 360 baterys :)