Space Engineers

Space Engineers

1,058 lượt đánh giá
Power Graphs
3
5
4
   
Giải thưởng
Yêu thích
Đã yêu thích
Bỏ thích
Kích cỡ file
Đã đăng
Đã cập nhật
497.113 KB
15 Thg08, 2018 @ 11:31pm
28 Thg01, 2023 @ 5:00pm
53 ghi chú thay đổi ( xem )

Đăng ký để tải xuống
Power Graphs

Mô tả
This programmable block script uses LCDs to display power statistics over time as graphs.

This script is not currently under active development. New features are unlikely to be added however it will still be updated with fixes if any Space Engineers update happens to break it.

Graph types that can be displayed, not case sensitive:
usage - Total power usage / required power
usageScaled - Same as usage but scaled to the total max required power
battery - Battery charge
batteryIn - Battery input
batteryOut - Battery output
batteryInOut - Combined battery input and output
batteryInOutAuto - Same as batteryInOut but scaled by peak value.
solar - Solar power output / used solar power
reactor - Reactor power output
h2engine - Hydrogen engine power output
wind - Wind turbine power output
storedOxygen - Stored Oxygen*
storedHydrogen - Stored Hydrogen*

* Must be enabled in the configuration (which is in the Custom Data of the program block).

Setup
- First make sure that Ingame Scripts are enabled for your world. This will require Experimental Mode to be turned on in the game settings.
- Once in a world, add the script to a programmable block on the grid you want to monitor.
- Add the name tag (default is [PowerGraph]) into the names of any display blocks you want to show graphs on.
- The displays should automatically start cycling between graphs.
- To show only specific graph types on a display, write the names of the graph types (shown above) that you want into the CustomData of the display block, one type per line.

Configuration
There are additional usage instructions at the beginning of the script text inside the PB. These include how to show graphs on specific screens in multi-screen blocks.

Important! After the program first runs it generates configuration text inside the Custom Data of the programmable block. There are many important configuration options there along with their descriptions. Please read through them as they may be very important for your use case. The script must be recompiled to apply configuration changes.

To reset the saved data of a program block run the script with the argument "resetData" without the quotes.

Timing
By default the script collects data after every update interval (default 60 seconds) up to 100 data points (200 if using long history). At default settings this will give about 1.6 hours of data.
Reducing the update interval (the Data_Update_Interval_In_Seconds setting in the script) will reduce the span of time that a graph covers. For performance reasons values under 10 seconds are not recommended. Using default resolution settings the amount of time covered by a graph on a standard LCD can be calculated as (100 * update interval seconds). Eg: when using an interval of 30 seconds the graph will span 50 minutes.

Sensor LCD Culling
This feature allows the script to only update LCDs when a player is in range of a sensor. It is useful for servers and worlds where players are often not near LCDs since the script then doesn't need to update the displays.
Using sensor LCD culling is recommended for maintaining performace when many script instances are being used.

Help
I installed the script but my screens show nothing!
If you want to display graphs on LCDs that are on connected grids you will need to enable support for this in the script configuration. Look for the option called Display_On_LCDs_Of_Attached_Grids.

I have solar panels/gas tanks but the graph says there are none!
If your solar panels/gas tanks are on a sub-grid (ie. connected via rotors, etc) you will need to enable the option for reading the power of connected grids in the script configuration (which is in the program block Custom Data, not the script code). Look for the lines that start with Include_Data_From_Attached_(Small/Large)_Grids. There are different options for small and large grids. If you also want to read power of grids attached via connectors there are additional options for doing so.

I made changes to the configuration but it doesn't seem to work!
Starting with Power Graphs version 1.8.6 all configuration options have moved to the Custom Data section of the program block. Trying to change the settings inside the script code will not work. Once you have edited the config in Custom Data you will need to recompile the script for the changes to take effect.

Notes / Known Issues
- Pausing the game may record power values of zero unless Zero_Fill_Missing_Values is set to false.
- Enabling long history will use more performance and if using on a server more network bandwidth.

If you still want to use the old bitmap version of the script you can find it here: https://steamoss.com/sharedfiles/filedetails/?id=1710076979
594 bình luận
DarkAngel2096 27 Thg01 @ 8:16am 
@Remaarn fair enough :) I guess I could take a look at it and see if I'd be able to get something done along those lines and let you know if I find something out :)
Remaarn  [tác giả] 26 Thg01 @ 10:15pm 
@DarkAngel2096 It's a nice idea but I don't really have the time to work on this currently. Maybe in the future.
DarkAngel2096 26 Thg01 @ 6:02am 
Hi, I've been using this script in my own world, there is one thing I'd like to have added to this, mainly to the Battery screen.
Currently it at the very top shows the "Charge: xx.xMWh" and the Peak and Max values, would it be possible to add in a percentage of full after the charge value?
Basically so that the "Charge: xx.xMWh (yy.y% full)" would be how it'd show it?
This percentage value would be the total of all the current batteries charge added up divided by the total charge all of them could have, so if you have 2 batteries, one with 1MWh stored, one with 1.5MWh stored, both capable of 3 would then be "Charge: 2.5MWh (41.7% full)"
Alexis The Calico Yokai 20 Thg01 @ 1:11pm 
so just the name of the graph you want to show?
Remaarn  [tác giả] 19 Thg01 @ 8:53pm 
I have updated the description to help clarify the setup instructions.
Alexis The Calico Yokai 19 Thg01 @ 9:49am 
how do I set up the display to show a specific graph?
Sockan 5 Thg01 @ 7:25am 
@Remaarn That's alright, I seemingly missed that setting when I were scrolling through the script! I think that it is enough for what I need it to do :steamthumbsup:
Remaarn  [tác giả] 4 Thg01 @ 7:44pm 
@Sockan There is a Margin setting in the configuration of the programmable block that you could use, however it applies to all displays handled by that PB. There isn't currently a way to change it for individual displays and I don't have the time to work on the script currently, sorry.
Sockan 4 Thg01 @ 7:37am 
First off, lovely script, I love having more than just text and numbers on the various LCD screens. Second, would there be a way to add and padding to the LCD's? On some LCD screens (i.e Captain's Desk) some of the text and such gets cut out. I also do like having a bit of an 'bleed zone' between what's on the screen and the edge of the screen.
aether.tech 22 Thg11, 2024 @ 7:13am 
Perfect, it worked. Thank you. Awesome.