Space Engineers

Space Engineers

Power Display Script - Sleepless Knights Studios
43 Comments
Typhon Plume 10 Nov, 2021 @ 12:02am 
Gave this a try recently, tons of errors and the PB keeps saying it needs to be recompiled
Runner 15 Aug, 2019 @ 2:02am 
Still broken :(
ASparoWitAGun  [author] 18 Jul, 2019 @ 12:08am 
@Mysticwolve Well, it was designed to use in-game so...it's a lot easier for people to just download it from the workshop and add it in their PB once there in-game than having them cut/paste it in. The YouTube video was more about how I wrote it/how to use it. Though I should note, due to the various game updates my scripts have been broken for quite a while. But usually you can download whatever scripts you want and then add them to specific PB's in your world with the in-game menu option. So as far as I know having more than one script shouldn't be affected by servers. There's always exceptions though, obviously. Hope that helps. :)
Mysticwolve 16 Jul, 2019 @ 11:41am 
instead of using workstop to have people download just the script why not past it onto your youtube channel that you were talkin about the program? how does downloading work as a script if you have other scripts on your server???
Patchouli 26 Nov, 2018 @ 12:05am 
its useless! you better work with Automatic LCDs from MMaster
Maobuff /A/ 24 Aug, 2018 @ 5:00am 
Well its an easy fix (at least it works for me)
You cant put nothing else than uranium in to reactor so no need to check if item located in a reactor is indeed an uranium ingot.
Remove if(...) at line 334
ASparoWitAGun  [author] 20 Jul, 2018 @ 9:10am 
@entwine2 - As far as I knew, it's actually been broken for a while now since they did some major changes to the scripting API. I intend to go back and update it eventually but haven't found the time yet. :(
entwine2 20 Jul, 2018 @ 3:14am 
Not working after last game update
Slip-86 30 Mar, 2018 @ 2:03pm 
can you help me with Auto mining script
Chloe 22 Mar, 2018 @ 3:35am 
ok
ASparoWitAGun  [author] 22 Mar, 2018 @ 12:12am 
If you're meaning like how much time is left, I thought I already had. But if not, then it's definitely something I'd like to put into v2.0. Not to mention with the API changes this script probably doesn't work anymore, so it needs an update anyway lol. :P
Chloe 21 Mar, 2018 @ 9:17am 
ASparoWitAGun you can add PowerTime ?
ASparoWitAGun  [author] 10 Nov, 2017 @ 9:09pm 
Yep. I was literally JUST reading about the next major update that's supposed to break more scripts but will use a better API as well. So it will probably break my scripts even further lol. Though I am considering returning to scripting to fix some of these things, so I'll have to see how the API looks after the update. :)
Kronic Offender 8 Nov, 2017 @ 7:22pm 
Drats. When I checked the code in the PB it gave me a list of warnings that many parameters are now obsolete. :(
Artenius 3 Sep, 2017 @ 8:01am 
Yep, It was the reactor rotation script that i was thinking of. I'll just have to watch the video and follow along to see if it still works!
Thanks!
ASparoWitAGun  [author] 1 Sep, 2017 @ 8:07pm 
@Artenius I don't...think so. I think you are meaning the reactor rotation script? I'm honestly not sure I ever uploaded that unless it became part of the Sleepless OS. This one is just for getting a power usage readout on an LCD.
Artenius 1 Sep, 2017 @ 3:46pm 
Hey there! I was wondering if this was the reactor/ rotor script that you created a few years ago, and if so, does it still work?
NorthWestTrees 12 Apr, 2017 @ 2:42pm 
ok thanls
ASparoWitAGun  [author] 11 Apr, 2017 @ 3:51pm 
It should download into your workshop files for SE. I believe when you're in-game, you go into the PB and there's an option for "workshop" scripts, when you click that a sidebar with all your subscribed scripts should appear and when you select the one you want it should "paste" into the PB's code area.

DISCLAIMER: I'm 99% ALL of my scripts are broken as of right now. They were written on an older version of the game's in-game scripting so they will more than likely not work correctly.
NorthWestTrees 10 Apr, 2017 @ 9:12pm 
where dose it download to when I subscribe, you should also have a link for a paste bin site or place where people can get the code without having to fuss with steam.

any help would be great if you have the time.
ASparoWitAGun  [author] 1 Apr, 2017 @ 1:24pm 
Oh yeah, I have two active SE series on my YouTube channel, just haven't gotten around to the programming side again. :)
S☉L 31 Mar, 2017 @ 7:47pm 
Ah great no worries. Dunno if you been playing but they have been doing a lot of updates. Beta is pretty good!!
ASparoWitAGun  [author] 31 Mar, 2017 @ 2:54pm 
I do intend to update this but it's definitely in the "eventually" category. I've just been super busy and hadn't made it back to doing in-game scripts. But I do want to go back and revamp/update a lot of my scripts I just don't have a specific idea of when I'll get around to it. :/
S☉L 31 Mar, 2017 @ 12:11pm 
any update on this?
ASparoWitAGun  [author] 29 Nov, 2016 @ 2:03am 
Yes, as I've said before, since they made some major changes to the in-game programming API most, if not all, of my codes are probably broken pretty bad at this point. :/
MrFox 28 Nov, 2016 @ 3:50pm 
Broken in so many ways...
ASparoWitAGun  [author] 9 Jul, 2016 @ 2:19pm 
@muffin <3 - Thanks! Yeah this was kind of the foundation for a whole OS I was designing but it kind of got shelved for now. And they've done a lot of updates to the PB so I wasn't even sure this still worked lol. :P
muffin <3 9 Jul, 2016 @ 12:08pm 
Nice script. The display text is a bit lengthy so I went in and chopped it up so I could increase the font size, but otherwise it's great. Thank you.
innesbrad 28 Apr, 2016 @ 3:58pm 
but yeah im a CE/EE in RL so once i get the parts for this power stuff detecated i should be able to rig the AI to manage the batteries pretty quick, disabling and enabling systems might take a bit lol
innesbrad 28 Apr, 2016 @ 3:53pm 
yeah power is my stage 2 of this design i think i got a pretty good handle on air managment...

batteries are a very tricky animal in one sense... that stored power has to be acounted for because some of the stuff i have my AI controling do not have reactors.... and it needs to manage the power outputs to keep all batteries in a simi balence to wait out the end of the night cycle on planets or moon bases.... if you want ill keep you posteded, i just wanted reach out because i liked yor do to measue power of conveyers on a grid... it was a nice way toteach people how to look at SE code... it shoudl be upted because thhe new functions they change will likely cause it too crash when a world starts up after a save....
ASparoWitAGun  [author] 28 Apr, 2016 @ 1:44pm 
It's definitely an interesting idea. I haven't worked with the PB for quite a few updates now so I'm a bit behond on some of the changes made to it. But off hand I'd say that sounds like a good idea to use the total power output as your baseline. That way you know what's coming out even if you can't know exactly from where.

Just be sure to account for all reactors, batteries, & solar panels when you total your outputs & remember to factor in that batteries can be in recharge so output can be 0. I think that should get you past the undetectable blocks like conveyors.

A project like that, sounds like something that can be as simple or complex as you'd like, from this simple display script to micro managing all kinds of things. You're best bet is to work on each pocket of functionality until you get it where you want, then move to a different function.

At least that's how I'd break it down lol. Hope that helps. :)
innesbrad 28 Apr, 2016 @ 8:34am 
thanks sleepless, i am going to try something a bit crazy... I'm trying ot teach a Program to manage power Effectively so that it turns off unneeded devices and thinks all the time about stuff like management... i tried to solve the power equation from how much each device is using and then add it all up... problem happened when i had devices like conveyor tha i can't count in the program block. so im going to use the power output and subtract what i do know to solve for the parts i can't call from the program block to measure... do you have a better idea on how to solve problems like this or would you be interested in helping me fine tune this project?
ASparoWitAGun  [author] 11 Oct, 2015 @ 11:20am 
Interesting, I'll have to look into that, cause that would definitely be something I'd like to include in all of my scripts from now on if I could! :)
Morphik 10 Oct, 2015 @ 2:02pm 
I am sure you can adapt the process into your script.
Morphik 10 Oct, 2015 @ 2:02pm 
It's a process to make a script language neutral.
If you want to probe around my Jump Drive script. It's written to be language neutral.
http://gtm.steamproxy.vip/sharedfiles/filedetails/?id=495341698
ASparoWitAGun  [author] 3 Oct, 2015 @ 11:57am 
I don't really have any ideas on how to get the code to return the info in a different language than what it's been set for (in your case german). The only thing I could think of would be to use like google translate or something to "convert" all of the string info into english or convert your conditional strings to german so that the whole code would still function. But I don't off hand know of a way to actually tel the PB to return a translated version or anything. Sorry :(
LordTylus 3 Oct, 2015 @ 5:06am 
Hi,

I also wrote a script similar to yours, but it appears we have the same problem. Do you have any idea, of how to make the script work in different languages? My game is set to english, but today I played on a private world where the hosts game was set to german.

The DetailedInfo returned by reactors, batteries and solar panels was also german on that world. Now I am wondering, if there is any possibility to get the DetailedInfo in english there too.

Do you have any idea of how to do it?
ASparoWitAGun  [author] 11 Jun, 2015 @ 10:53am 
Yes, feel free to check out my channel for more Programming 101 as I usually try to put up an episode per week.

As for the codes on the workshop, I have a couple more from that series to add I just haven't had the time yet. :)
Psychotrop 10 Jun, 2015 @ 1:28am 
Will there be more of your code in the workshop and will there be more of Programming 101?
ASparoWitAGun  [author] 10 Mar, 2015 @ 3:17pm 
Yes, most of this code was done through manual calcualation. Unfortunately there isn't a way to access like the cockpit block & get a "hud_data" value & see everything displayed on the HUD. I wish they would do that though, it would make this SO much easier.
Sharblue 9 Mar, 2015 @ 11:50pm 
Ok, so it is not currently possible to add a "copy" of what is displayed in our HUD?
You have to make a manual calculation?
ASparoWitAGun  [author] 9 Mar, 2015 @ 2:38pm 
It is "possible" I'm sure. That's one reason this is listed as v1.0, I may go back and add to this. The difficult part is you'd have to do some ratio calculations for how much uranium is being used in each reactor, etc. so I left it out for now. :)
Sharblue 8 Mar, 2015 @ 4:39am 
Is it possible to display the remaining autonomy in hours/minutes?