Space Engineers

Space Engineers

159 ratings
Graphical Resource Bars
4
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
254.927 KB
3 Aug, 2024 @ 7:47am
28 May @ 11:14am
14 Change Notes ( view )

Subscribe to download
Graphical Resource Bars

Description
A Script that displays a grids resources as graphical bars.
The colours of the bars are customizable for those (Like me) who like to color code your grids.


UPDATE 25/05/2025: Hydrogen Engines Added.

https://youtu.be/gjx0RVto-Jk?si=eIBouY8rxJ2I2ZuD

NOTES:

To make it display on a screen go to the block in the control panel
Press 'Custom Data'
Paste in this next line

[Graphical Resource Bars]

Then Press 'Recompile' on the Programming Block that has the script in it.

2) There are several more options you can paste in after that line, though they are ALL optional
These are the supported options so far

] To tell the script which LCD screen on the block to use (0 is default, which is the first screen)
ScreenNumber=0

] To Make a screen only use text mode make the following true
TextMode=false

] To choose which Bars are shown on a specific block, use the following (true is default, false means don't show it)
ShowBatteries=true
ShowWindSpeed=true
ShowSunExposure=true
ShowWindTurbines=true
ShowSolarPanels=true
ShowHydrogen=true
ShowHydrogenEngines=true
ShowOxygen=true

] To choose custom colours for each bar, use the following entries (Below shows the default colors)
BatteryColor=255,0,0
WindSpeedColor=255,255,0
SunExposureColor=0,255,0
WindTurbineColor=0,255,255
SolarPanelColor=128,0,0
HydrogenColor=128,128,0
OxygenColor=0,128,0

] To stop it showing the titles between each category, set this to false (defaults to true)
ShowCategoryTitles=true

] To change what the text on the screen says (e.g. put it in your language) change the following
AvailablePowerName=Доступная мощность
BatteryName=Аккумуляторы
WindSpeedName=Скорость ветра
SunExposureName=воздействие солнца
PowerUsageName=Потребление энергии
WindTurbinesName=Ветряные турбины
SolarPanelsName=Солнечные панели
GasStockpilesName=Запасы газа
HydrogenName=Водород
OxygenName=кислород

PLEASE NOTE: I used google translate to get this Russian Text so let me know if it doesn't say what I think it does.

if you want an option to stay as the default value, you can just skip the entry all together.

3) If you use this in Multiplayer on a server - There is known bugs in the game for screen updates.
The only fix for this is to cross your fingers and hope that Keen finally fix it (It's been over half of a decade so far)

4) More settings and features to come... I'll keep you up to date.
It is my hopes to keep updates so they won't need you to adjust anything to keep the same output.
I'll add notes at the top if changes are unavoidable.

5) Let me know in the comments if you want me to do a tutorial video on Youtube for this.
I would have done it already but I hate my own voice hehe.
28 Comments
Maggz 21 Jul @ 12:28pm 
since i am here to resolve the issues from the last poster for bars showing when disabled the fix for this is to put the correct ShowBar index for each option on lines 289, 294, 299 they need to be incremented UP by 1 so if it is showing looking for ShowBar[5] change it to 6. I am assuming the author added some new items and for got to index the new additions in the script
Maggz 21 Jul @ 12:20pm 
had to fix this for the name change for hydrogen engine as you never added a name define for that and had the oxygen actually naming that accomplished this fix by adding

if (_ini.Get(ScriptName, "HydrogenName").TryGetString(out n)) SPrefs.BarTitle[6] = n;
if (_ini.Get(ScriptName, "HydrogenEngineName").TryGetString(out n)) SPrefs.BarTitle[7] = n;
if (_ini.Get(ScriptName, "OxygenName").TryGetString(out n)) SPrefs.BarTitle[8] = n;

this is at or about line 594 in the script. this should fix any custom naming issues
Southern_EVIL 29 Jun @ 5:00am 
you have ShowHydrogenEngines=true here but couldnt get it to disable double checked code and you have "ShowHydrogenEngine" there figured id let ya know so you could correct either one to avoid any hassle with it
Kiasanth  [author] 24 May @ 11:08am 
@bilbobilly I just got back on now that I have my new PC, I bought SE2 so I will be doing scripts for that when it becomes possible. I've added your suggestion to my to do list.
bilbobilly 14 May @ 5:30am 
hi i have been using this script for a while now and was wandering if there was a way to show "time left" of batteries not been able to find anything out yet and im unsure if this script is getting updated. other than that this is a great visual script hope you move across to SE 2 when its released fully
Kiasanth  [author] 4 Feb @ 4:31am 
@Flabi You can name the screen anything you like.
J.O.E.L 1 Feb @ 6:23am 
how do i have to name the screen?
Datarak 8 Jan @ 11:12am 
есть возможность отображать полоску заполнения в процентах - для всех грузовых контейнеров на сетке?
_Dave. 12 Dec, 2024 @ 6:32am 
very nice, i get the 0.8 ver, ill w8 for uppdates, from me: more text formatting
[MUH] FntX 2 Nov, 2024 @ 7:45am 
I noticed that setting the background color to black (which equals "Transparent" on some displays like the holo one) results in no info being displayed. In fact setting anything else for background does not work either. So far I only had luck using the standard background color. The transparent LCD worked once but I had to use a value > 10 for each color channel. It stopped working shortly after. Sometimes it would show up after recompiling.