Space Engineers

Space Engineers

215 ratings
Fancy Status Displays Guide for FSD v2
By Ekuah
Introducing the Fancy Status Displays script and the changes implemented into FSD v2
9
4
2
3
2
2
2
   
Award
Favorite
Favorited
Unfavorite
Disclaimer
Yes,
I know,
This guide is epic.
Sorry

But FSD v2 has accumulated so many functions by now, that this size is unavoidable.
Writing it took me several days.
From the morning to deep in the night.
Also English is not my native language.

So please be lenient with me, if you find a brain fart of mine in it.

Of course I will try to correct any mistakes you point out to me.


Yours truly
Ekuah

Initial Setup
  • Place down a programmable block. (will be called PB from here on)
  • Load the script by selecting the block in the terminal GUI and click Edit and then Browse Scripts.
  • The Fancy Status Displays v2 script should be in the list if you have subscribed to it.
  • Select it, click Copy to editor than hit OK.

A single PB running Fancy Status Displays v2 can support multiple connected grids.

Caution when running multiple instances of Fancy Status Displays v2:
  • when on different, non-connected grids It will run fine

  • when on a single grid It will lead to issues.
    Don't do this. A single instance of FSD can control dozens of screens.

  • when on different, but connected grids Special precautions have to be taken
    • (recommenced solution) Insert the line
      "FSD options:nosubgridLCDs"
      into the CustomData field of all the
      Programmable Blocks running FSD
    or
    • Change the FSD trigger word in the script
      from "ShowStats" to something different.
      So that every instance of FSD would react
      to other trigger words.

      (Caution, this can break the script!)
Usage
This script is for displaying certain information of various blocks on the any screen.
To define which information is to be shown you enter a list (a.k.a. Data-Set) into the the CustomData field of the block that provides the screen.
This can be any block that has a screen:
  • LCDs
  • Text panels
  • Programmable blocks
  • any Cockpit
  • Flight seats
  • Control stations

In the CustomData ShowStats indicate the beginning of the Data-Set.
This keyword tells the script to act on the screens of this block. Do a line break after it.
Caution:
Do a line break after it. ShowStats must stand alone in it's line.
Also observe the two capital 'S' in ShowStats.
This is one of the few keywords that is case sensitive.


Anything above ShowStats will be ignored and can be used for other purposes.

Into the next lines, you can type the list what should be displayed on this screen.

After the list you can close the Data-Set with EndStats
This was added for FSD being compatible to other scripts.
Caution:
The same rules as with 'ShowStats' apply to 'EndStats'.
EndStats must stand alone in it's line.
Observe the capital 'E' and 'S' in EndStats.


The basic Data-Set in the CustomData field of the block will be look like this:
ShowStats things to be displayed ...

Or when using with other scripts:
Stuff for different Script ... ShowStats also things to be displayed other things to be displayed etc. pp. ... EndStats (optional) Stuff for another Script ...
How to define what to display
After the line with the ShowStats keyword you can start the list in the next lines defining what should be displayed on this screen.

You can use the full name of a block group:
(a partial name of a group will not recognized)
MyGroup
Displays all blocks contained in a group called "MyGroup".

Or you can use a part of the block name.
(the script searches for all blocks which contain the given string:)
Battery
Displays all blocks containing "Battery" (e.g.: Battery 1, Battery 2, Miner Battery)

The script will first try to find a block group with a matching name in all connected grids.
If that can't find any matches, it will try to find blocks with the string as part of the block name.
(Also in all connected grids.)

You can also string together different names with the '+' sign.
(the script make multiple searches for all blocks which contain the different strings:)
Battery 2 + Battery 3
Displays all blocks containing ether "Battery 2" or "Battery 3"

Examples
Given are six batteries.
The 1st, 2nd and 5th battery are combined into a group also named 'Battery'.
The 1st, 3rd, 5th and 6th are located on the same grid as the PB.
The 2nd and 4th are located on a different grid than the PB.


Battery

Since the script looks first for the a group with the name 'Battery',
only the status of the 1st, 2nd and 5th will be displayed.
(The other batteries are not part of the group 'Battery')

Battery 2

Only the the status of the 3rd and 4th battery will be displayed.



Battery 3

Only the the status of the 5th and 6th battery will be displayed.
('Battery 3' is a part of 'Battery 32')



Battery 2 + Battery 3
Only the the status of the 3rd, 4th, 5th and 6th battery will be displayed.
('Battery 3' is a part of 'Battery 32')






Currently these types of blocks are supported.
Air Vents
Assemblers *
Batteries *
Beds *
Benches
Cargo Containers
Cockpits *
Collectors
Connector
Cryo Chambers
Doors
Drills
Ejectors
Gates
Gatling Guns
Grinders
Hangar Doors
Hinges
Hydrogen Engines
Hydrogen Tanks *
Jump Drives
Missile Launchers
O2/H2 Generators *
Oxygen Tanks *
Parachute Crates
Pistons
Projectors
Reactors *
Refineries *
Rotors
Seats *
Sensors
Solar Panels
Sorters
Thrusters
Toilets
Turrets
Welders
Wind Turbines
(* these blocks offer a second data source)
Modifiers or using the option keywords
You can refine the search or modify the way something is displayed by using several modifier keywords.
These keywords must be separated from the Block/Group name(s) by a special character (lets call it the Separator). This can be ether a comma ',' or a colon ':' Upper / lower case of the keywords will be ignored.
Battery ,widebar Battery :WideBar
(both work equally)

You only need the separator once.
There is no need to separate the keywords other than with a single space.
Battery, Optional WideBar Battery, Optional, WideBar
(both work equally)

Only the keywords after the Separator are recognized.
Keywords before the Separator will be ignored.
So you can use Blocks/Groups whose names match a keyword.
WideBar, widebar
(Shows a Block/Group with the name "WideBar" with the modifier WideBar)

Only Blocks/Groups names containing the Separator will pose a problem.
    like:
  • "Thrustergroup:up"
  • "Reactor 17,5"


Here are the Keywords that are recognized by FSD v2
  • AddInfo
  • AddSize
  • AltCalc
  • AltInfo=
  • AltSymbol=
  • AnalogBar
  • BarColor
  • center
  • Clone:
  • DigitalBar
  • EndLine
  • EndStats
  • fastmode
  • Filter(
  • Fontsize=
  • FrameColor
  • Framerate=
  • FSD options:
  • Gap
  • gfxEnd
  • gfxStart
  • Health
  • IconColor
  • IconCount=
  • InfoColor
  • Invert
  • Layoutrate=
  • left
  • Length=
  • NoCR
  • NoGroups
  • NoHeadline
  • noIcons
  • NoLineBreak
  • NoNames
  • NoPercentage
  • NoScrolling
  • NoStatus
  • nosubgridLCDs
  • NoSubGrids
  • OnlySubGrids
  • Optional
  • Panel
  • PercentColor
  • Position
  • Reference=
  • right
  • Scale=
  • ScrollSpeed=
  • sequence
  • ShortBar
  • ShowStats
  • SingleIcon
  • SmallBar
  • SolidBar
  • Sprite:
  • SymbolColor
  • TallBar
  • Text:
  • TextColor
  • verbatim
  • WideBar

The different modifiers will explained later.
Refining the selection process
You can narrow down the search by several methods.

By putting the block name in quotation marks
you will limit the search to block with exact name matches.
"Battery"
Will only show blocks with the name "Battery" (but not: Battery 1, Battery 2, Miner Battery)
There will also skips the search for groups. (since those require an exact name match anyway)

Adding the NoSubGrids keywords to prevent the search on subgrids
Battery, NoSubGrids
The keyword NoSubGrids will restrict the search to those blocks which are on the same grid as the programmable block running FSD v2 (PB).

Adding the OnlySubGrids keywords to restrict the search only on subgrids
Battery, OnlySubGrids
The keyword OnlySubGrids will restrict the search to those blocks which are not on the same grid as the programmable block running FSD v2 (PB).

Adding the NoGroups keywords to skip the search for groups
Battery, NoGroups
The keyword NoGroups will ignore all groups in the search.

Examples
Using the situation from before, given are the six batteries.
The 1st, 2nd and 5th battery are combined into a group also named 'Battery'.
The 1st, 3rd, 5th and 6th are located on the same grid as the PB.
The 2nd and 4th are located on a different grid than the PB.


"Battery 3"

Only blocks with an exact name match will be shown.
In this case only the 5th battery.



"Battery"

Only blocks with an exact name match will be shown.
In this case only the 1st and 2nd battery.



Battery, NoSubGrids
Since the script looks first for the a group with the name 'Battery' and display only those blocks which are on the same subgrid as the PB, in this case the 1st and 5th battery.
(The other batteries are nether part of the group 'Battery nor on the same subgrid as the PB')
Battery, NoGroups
Will skip he search for groups and only looks for individual blocks with "Battery" as part of the name.
(Since all batteries have "Battery" as part of the name all of them will be displayed)
Battery, NoSubGrids NoGroups
Will skip he search for groups and only looks for individual blocks with "Battery" as part of the name and are on the same grid as the PB.
(in this case the 1st, 3rd, 5th and 6th battery)


Battery 2, NoSubGrids or Battery 2, NoSubGrids NoGroups
Only the the status of the 3rd battery will be displayed.
(since there is no Group named "Battery 2" and the 4th battery is on a different grid)




Battery 3, NoSubGrids Battery 3, NoGroups Battery 3, NoSubGrids NoGroups
All the same. The status of the 5th and 6th battery will be displayed.
There is no Group named "Battery 3"
The 5th and 6th battery are on the same grid as the PB.
And 'Battery 3' is a part of 'Battery 32'



"Battery", NoGroups
The status of the 1st and 2nd battery will be displayed.
The NoGroups is unnecessary.
(Since the use of quotation marks will automatically the search for groups)


"Battery", NoSubGrids
Only the status of the 1st battery will be displayed.
(all other batteries are ether on a different grid or have no exact name match)

Blocks with multiple screens
If a block with has multiple screens, you can define which information is shown on which screen.
By using the keyword Panel you will assign the following commands to a specific screen.
(Do a line break after it)
Panel 0 something
Shows you something at the first screen.

Panel 1 something different
Shows you something different at the second screen and so on - you get the point.

Without this, everything will be shown on the first screen.
So can skip this if this block has only a single screen.

The different display modes
FSD v2 supports seven different display modes changing the way the information is displayed
These different modes are also triggered by keywords. Like in Refining the selection process these keywords must be separated from the Block/Group name(s) by the Separator character. Upper / lower case of the keywords will be ignored.

The (default) MultiIcon view
Welder
The Default view. Shows a line of icons representing each a single block individually.
Depending on how many blocks have to be displayed, the icons can take up several lines.




The SingleIcon view
Welder, SingleIcon
Shows only a single icon as a summary, instead of each block individually.







The WideBar view
Welder, WideBar
Shows a single wide bar as a summary, instead of each block individually.



The SmallBar view
Welder, SmallBar
Shows a single small bar as a summary, instead of each block individually.




The TallBar view
Welder, TallBar
Shows a single vertical bar as a summary, instead of each block individually.




















The ShortBar view
Welder, ShortBar
Shows a single shorter vertical bar as a summary, instead of each block individually.









The NoIcons view
Welder, NoIcons
Displays the information only as a single textline without icons.



Modificators for display modes with bargraphs
The bargraph display modes (SingleIcon, WideBar, SmallBar, TallBar, ShortBar and MultiIcon view)
normally segregate the bargraphs into bars.
There are the three ways to modify this behavior:

The default bargraph
Each single bar indicates a value of 10% (20% in SingleIcon and MultiIcon view). The remaining rest-value will be indicated as a partial bar.
Container, ShortBar
The digital bargraph
Each single bar indicates a value of 10% (20% in SingleIcon and MultiIcon view). The remaining rest-value is rounded to decide if an additional full bar will be show or not.
Container, ShortBar DigitalBar
The analog bargraph
The bargraph will be not segregated. Instead a single bar will be show. It's size and color will be proportional to the value.
Container, ShortBar AnalogBar
The full bar
The is no real bargraph. Instead the area will be filled by a single bar. Only it's color will indicate the value.
Container, ShortBar SolidBar


The Invert option
Color of the bargraph itself usually changes from green over yellow to red.
On blocks with a critical low value the bar will start red at 0% and end green at 100%
(like the charge state of a battery)
On blocks with a critical high value the bar will start green at 0% and end red at 100%
(like the power load of a reactor)
The usage of the Invert keyword will flip this coloring scheme around.


The look of the vert. bargraphs can also be modified with NoPercentage and AltSymbol= keywords
NoPercentage
In the MultiIcon view you can suppress the percentage display with the keyword 'nopercentage'. Thisworks in the TallBar and ShortBar view too.

AltSymbol=
With the 'altsymbol=' command you can exchange the used symbol with one of the vanilla
Texture Sprites provided by KeenSWH.

Caution: The name of the used sprite should be put into quotations marks '"'.
Those two modifiers are not avaiable for the horizontal bargraphs, since these nether show a separate percentage number nor a symbol




Here are some of the vanilla Texture Sprites currently provided by KeenSWH
You can find the listing of the vanilla sprites here: github.com/malware-dev/MDK-SE/wiki/Sprite-Listing
Selecting which types of items should be counted
In blocks with regular inventories you can refine the counting process by the usage of the filter option.
It's function have been expanded with the FSD subversion v37x.
The respective keyword is 'Filter('.

There are two different syntax version of this option.
One with only one filter condition:
Container, Filter(+Ore)
And one with multiple filter conditions:
Connector, Filter(or,+component,*ium)
In the latter case, the first parameter must be the boolean operation that links the all filter conditions.
These can be:
  • and (all filter conditions have to be met before the item is counted)
  • & (same as 'and')
  • or (one of the filter conditions have to be met before the item is counted)

The filter conditions are compared to the item types / namespaces.
You can find a list of the vanilla item types / namespaces here:
https://github.com/malware-dev/MDK-SE/wiki/Type-Definition-Listing#components

There are several available comparisons variants:
  • +thingy (Item.Type must contain "thingy")
  • -thingy (Item.Type must not contain "thingy")
  • =thingy (Item.Type must be identical to "thingy")
  • -=thingy (Item.Type must not be identical with "thingy")
  • *thingy (Item.Type must end with "thingy")
  • -*thingy (Item.Type must not end with "thingy")
  • thingy* (Item.Type must start with "thingy")
  • -thingy* (Item.Type must not start with "thingy")
  • *thingy* (Item.Type must contain "thingy")
You have to choose one variant for each filter condition, but each condition can have a different variant.

Examples:
Container, Filter(+Ore)
Counts only the volume of the ores in the blocks named Container

Connector, Filter(and,+ingot,-Stone)
counts the volume all ingots except the stone-ingots (a.k.a. Gravel) in the blocks named Connector

Refinery, Filter(or,+ingot,+ore)
counts the volume all ingots and all ores in the blocks named Refinery

The filter option string have be closed with a closing parentheses.
Modifying how the values are calculated
Normally the individual percentage values ​​and bar sizes in the bar graphs refer to the maximum value of the displayed unit. After that the average of the percentage values ​​and the bar sizes are calculated.
((Value 1 / Max_Value 1) + (Value 2 / Max_Value 2) +...+ (Value n / Max_Value n)) / n
This (old) calculation method can result in misleading bar sizes and values when using it on blocks with different maximum values.
(a 10% filled small reactor plus a 90% filled large reactor would result in a false combined 50% fill rate)

The AltCalc option
The old (legacy) method to calculate the average bar sizes and values should only be used on identical blocks. When averaging blocks with different maximum values the AltCalc keyword should be used. This will change the method of calculation to:
(Value 1 + Value 2 +...+ Value n) / (Max_Value 1 + Max_Value 2 +...+ Max_Value n)
Now even averaging blocks with vastly different maximum values will result in correct values and sizes.
The old calculation method is only left in for legacy reasons.

The Reference= option
With Reference= you can change the reference value for any block.
(Caution: only values > 0 are accepted)
This reference value has to given ether in liters, watts or watt-hours, depending on the used unit.
Optional data sources.
The Optional option
Some types of blocks have two different output modes displaying alternative data sources.
Batteries - Reactors - Hydrogen Engines - Refineries - Assemblers - Doors - Gates
By adding Optional to second data source will be shown.

Batteries, Reactors and Hydrogen Engines will switch from the 'power' load to the 'Fuel / Charge'.

Refineries and Assemblers will switch from the input inventories to the output inventories.

Doors and Gates will switch from the opening rate to the closing rate.

Block type
normal data displayed
Blockname
optional data displayed
Blockname,optinal
Batteries
Charge state of the battery
Power input and output (% power load)
Reactors
Fill rate of the fuel inventory
Relative power output (% power load)
Hydrogen Engines
Fill rate of the fuel inventory
Relative power output (% power load)
Oxygen Tanks
O2 gas fill rate
Fill rate of the tank inventory
Hydrogen Tanks
H2 gas fill rate
Fill rate of the tank inventory
Refineries
Fill rate of the ore (input) inventory
Fill rate of the ingot (output) inventory
Assemblers
Fill rate of the ingot (input) inventory
and number of items in the production queue
Fill rate of the item (output) inventory
and completion rate of the current item in queue
Doors / Gates
The opening rate of the Door / Gate
The closing rate of the Door / Gate
Rotors / Hinges
How much the rotor / hinge is to the left
How much the rotor / hinge is to the right
Cockpits / Seats
The fill rate of the inventory.
Only if the block has a inventory
Shows if the cockpit / seat is empty or occupied
Connectors
The fill rate of the inventory.
Shows the connection status
0% = not connectable
50% = ready to connect
100% = connected



The AddInfo option
In old version of FSD you sometimes couldn't really distinguish which mode is shown.

In the MultiIcon view mode and the SingleIcon view mode you can add AddInfo to the options behind the Separator character.
Battery , AddInfo
That will help telling the two output modes (alternative data sources) apart, by putting one of the following small texts between the central symbol and the percentage value.

Thedefault info texts are:
  • Charge / Load
  • Fuel / Load
  • Ores / Ingots
  • Ingots / Items
  • open / closed
  • left / right
  • Filled / occupied / empty


The AltInfo= option
You can define an alternative info text by using AltInfo= followed by the desired text.
Container, AltInfo=Stuff
In this case, you don't need to use the AddInfo keyword. The AddInfo option is activated automatically.
Caution:
Due to the limited space available, the info text should be kept short.

Seat occupancy
A specialty to the optional data sources are the many varieties of occupiable blocks.
Those can come with an own inventory:
  • Beds
  • Cockpits
  • Control Seats
  • Control Stations
  • Crypods
  • Flight Seats
  • Passenger Seats
Without the Optional keyword the fill rate of the inventory will be displayed.
With the Optional keyword it will switch to the occupancy. 100% if the block is occupied, 0% if the block is not.

And then there are those blocks without an inventory:
  • Benches
  • Desks (with chairs)
  • Toilets
  • Bathrooms
Without the Optional our the Health keyword these wont be listed or displayed.
Only when you add the Optional keyword these will be listed/displayed as Cockpits.
As with the other occupiable blocks 100% means the block is occupied, 0% if the block is empty.

Formatting options for the default view mode
There are several options to spruce up the MultiIconview mode.

If there are more items than would fit in the width of the display, FSD will (in the default settings) display the items in several line. This line breaks can be suppressed by two methods.

The NoLineBreak option
When adding NoLineBreak behind the Separator, FSD will stop drawing icons at the end of the first line.

The noCR option
(this also works with all the other view modes)
Adding noCR behind the Separator will suppress the check if the end of the line is reached and will continue to draw even if it can't be shown anymore.

This is great way to 'squeeze' a last item into the line which would have been otherwise been mover to the next line.



The number of icons to be displayed can be adjusted in two ways.

The legacy method is done by just adding a number of # directly behind the block name you will set the number of icons to be displayed equal to the number of # used.

The # MUST be before the Separator (colon ':' or comma',')

The use of # directly behind the block name had lead to problems in some cases.
(Like when you had blocks with the names 'Thruster #1' and 'Thruster #2' and wanted to address them with 'Thruster #') In such a case use the IconCount option.





The new method uses the IconCount= option. It overrides the legacy method and ignores any # in the block name.
The integer number directly behind the = will set the number of icons to be displayed.
If you use 'IconCount=0' the number of icons will not be modified, but any # in the block name
will be ignored.
Caution: There has to be no space between 'IconCount', the equals sign '=' and the value.

If the number of icons to be displayed is higher than the number of blocks available, then the number of icons will be padded with missing block icons. (Red cross in a gray frame)

Both methods are a great way to highlight missing or destroyed blocks, which would be else be present


Bonus
The color of the frame around the bargraph indicates the status of the represented block
  • Cyan means:
    Block is functional and working

  • Dark Cyan means:
    Block is functional but not working

  • Dark Red means:
    Block is non functional / damaged

  • Gray with a Red Cross means:
    Block is destroyed or does not exist



The Health option
By adding ',health' to the options the additional bargraph will be displayed.

This bargraph indicates the integrity of the represented block.

This work with any block types.
No matter if the block type is supported or is unknown.



The AddSize option
Another additional information you can display in the default view mode are small indicators displaying the block size and their grid size.

The grid size is shown on the top right
and the bottom left corner.
  • 1 big square indicates that it is large grid.
  • 4 small squares mean that it is small grid.

If there are also block size variants available
(per given grid size), tiny letters on the top left and the bottom right corner indicate the variant.
  • L stands for Large
  • M stands for Medium
  • S stand for Small
Formatting options for the bargraph view modes
If a bargraph does not fill out the width of a display, and an identical bargraph would fit beside it, FSD will position the bargraphs in a line next to each other.

The EndLine option
Adding EndLine behind the Separator will prevent the positioning of the next bargraph next to the current one. Instead a new line below will be started.

The noCR option
As said before noCR also affects the bargraph view modes.
Adding noCR behind the Separator will suppress the check if the end of the line is reached and will continue to draw even if it can't be shown anymore.
Positioning and gaps
Free positioning:
You can freely position all the icons, bars and texts with the Position(x,y) keyword.
The X/Y coordinates have to be separated with a comma and enclosed in round brackets.
Caution: There has to be no space between 'Position' and the opening bracket '('
This works with all the different display modes.
Keyword
Function
Custom Data Example
Position(x,y)
Defining the position where
the next object will be drawb.
ShowStats
Battery,Position(80,100)
(The next item in the display list will be located on the left screen border again.)



Spacing between icons:
You can leave a gap between icons or bars that you have chained together with the '+' sign
This works only with in the default view mode
Keyword
Function
Custom Data Example
Gap x
Make a gap with a length of x
and chain objects (groups/blocks)
together in one line.
ShowStats
Gap 20 + Battery + Gap 20 + Solar


Scaling and resizing
Apart from changing the font size, you can adjust the size of icons and the length of the bargraphs within certain limits.

The length of bargraphs can be adjusted with Length=(followed by a decimal number).
The used value will represent the length in pixels.
All bargraphs have different minimum lengths and length values below them will be ignored.
When not using Length= option or using it wrong the bargraphs will revert to their default length.
Those length are:
Bargraph Type
default length
minimum length
Widebar
501.12
188.8
SmallBar
241.92
83.04
TallBar
501.12
123.12
ShortBar
239.04
89.04
Caution: There has to be no space between 'Length', the equals sign '=' and the value.
From the scripts point of view the maximum length value would be 3.4*10^38.


The icon sizes in the MultiIcon view and the SingleIcon view can be changed by adding Scale=(followed by a decimal number) to the options set after the separator.
While the minimum scale is 0.5 , values below will be ignored.
It is highly recommended to keep the scale at 1.0 or above, because the readability decreases sharply below 1.
Caution: There has to be no space between 'Scale', the equals sign '=' and the value.
From the scripts point of view the maximum scale value would be 3.4*10^38.





Additionally in the MultiIcon view, the SingleIcon view, the NoIcons view and the just Text mode, you can set the the available width for the textlines with Length=(followed by a decimal number)

The Textline / Headline
You can change the way the Textline (Headline) is displayed.
Headline modificators:
Keyword
Function
Custom Data Example
NoScrolling
Doesn't scroll the headline, even if it is too long to fit
into the space available
ShowStats
Battery, NoScrolling
NoHeadline
Displays group/block without the headline above the icons
or the textline inside the bargraphs.
ShowStats
Battery, NoHeadline
NoNames
Cuts blocktype names and group names out of the headline
above the icons or the textline inside the bargraphs.
ShowStats
Battery, NoNames
Fontsize=
Changes size of the used font in the Headline or the Textline
ShowStats
Battery, Fontsize=1.8
left
Aligns the headline/textline left
(doesn't apply for TallBar and ShortBar mode)
ShowStats
Battery, left
center
Centers the headline/textline
(doesn't apply for TallBar and ShortBar mode)
ShowStats
Battery, center
right
Aligns the headline/textline right
(doesn't apply for TallBar and ShortBar mode)
ShowStats
Battery, right
Caution: There has to be no space between 'Fontsize', the equals sign '=' and the value.

All modifiers can be combined with each other.

Center and Right work only with:
default view, SingleIcon, WideBar,
SmallBar and NoIcons views.
(there is no left/center/right on a vertical bar)

All other modifiers work with all display modes.
Additional text in the Textline / Headline
Additional text:
You can add a custom text to the textline / headline by using the Text: keyword.
Note the colon at the very end of the Text:

The Text: keyword must be the very last of the used keywords, because everything between Text: and the end of line will be used as text.

This can also be combined with NoHeadline option. Then only the characters after Text: will shown in the textline / headline.

When using just ,Text: without using any block/group name, only a simple textline / headline will be shown.
This can also be combined with Fontsize, left, center, right, Length= and individual coloring.
In those cases the modifiers/keyword must be placed between the Separator character and Text:

Inserting the content of other text displays
FSD can clone the text content of other displays. These texts can be fixed or could be generated by other scripts (like Automatic LCDs 2 by MMaster or Isy's Inventory Manager)

To select the text surface to be cloned, you address the display block by name, add the separator char and use the keyword Clone:.
(Caution: only text displays can be cloned, but not images or sprites)

If the block has more than one display surface and you want to clone from a different screen than from surface 0, then you can add the display number directly after the colon.
(Caution: There has to be no space between 'Clone' the colon ':' and the number)
(The surface count starts with 0)


The Position, FontSize and TextColor can be individually adjusted with the respective keywords.

Example:
LCD Panel, clone:0 position(100,50) fontsize=0.5 TextColor(255,128,0)
This would clone the text contend of the first screen of the block 'LCD Panel' to the position (x=100 y=50) in an orange color with a font size of 0.5.


Hint: You can even clone the running status display of FSD itself onto any other display.

Insertion of graphics
You can insert monospace graphics created with Whips image-converter:
The graphics section starts with:
,gfxStart(X-position,Y-position,fontsize)
The coordinates and fontsize have to be separated with commas and enclosed in round brackets.

gfxEnd indicates the end of the graphics section.

Caution: There has to be no space between 'gfxStart' and the opening bracket '('
Also there have to be a ',' or ':' in front of
'gfxStart' and 'gfxEnd'
The decimal point '.' can be used for all three values.
'gfxStart' and 'gfxEnd' are not case sensitive

You can find Whips image converter here: https://github.com/Whiplash141/Whips-Image-Converter

You can also build composite images out of the vanilla Texture Sprites provided by KeenSWH.
The command for this is:
,Sprite:"Name of the Sprite" X-position,Y-position width,height red,green,blue rotation

Caution: There has to be no space between 'Sprite' and the colon ':'.
Also there have to be a ',' or ':' in front of 'Sprite'.
The name of the sprite should be put into quotations marks '"'.
The decimal point '.' can be used for the position, height, width and rotational values.
The color components must be specified as integers with values ​​between 0 and 255.
'Sprite' is not case sensitive

Keyword
Function
Example
gfxStart(x,y,size)
[graphic]
gfxEnd
x,y = the coordinates of the top left corner of the graphics
size =the size of the pixels (optional)
ShowStats
:gfxStart(10,10,0.2)

gfxEnd
,Sprite:'name x,y w,h r,g,b rot
name = name of the sprite
x,y = the coordinates of the center of the sprite
w,h = the width and height of the sprite
r,g,b = the color in red, green and blue
rot = the rotation of the sprite (optional)
,Sprite:LCD_Frozen_Poster01
500,250 100,100 255,255,255 0

Here are some of the vanilla Texture Sprites currently provided by KeenSWH
You can find the listing of the vanilla sprites here: github.com/malware-dev/MDK-SE/wiki/Sprite-Listing
Individual Coloring
You can define individual colors to every single element of every object on the screens.
Every color channel can have values between 0 - 255 so there are 16.7 million colors to choose from.

In the default view mode and the SingleIcon view mode the Texts, Icons, Percentage numbers, Frames and Bargraphs can be colored separately for single icons

By adding one or more of these keywords to the options behind the Separator character, the normal color will be overridden.

TextColor(R,G,B)
for the color of the Headline
SymbolColor(R,G,B)
for the color of the small Symbol
InfoColor(R,G,B)
for the color of the small Info text
PercentColor(R,G,B)
for the color of the Percentage nr
FrameColor(R,G,B)
for the color of the Frame
BarColor(R,G,B)
for thecolor of the Bargraph

The RGB values have to be separated with commas and be enclosed in round brackets,
and have to be integer numbers between 0 and 255 (a.k.a. no floating point numbers)

Caution:
There has to be no space between '...Color' and the opening bracket '('









In the WideBar view mode and the SmallBar view mode only the Texts, Frames and Bargraphs can be colored separately, since there are no Icons or separate Percentage numbers are in these modes.

By adding one or more of these keywords to the options behind the Separator character, the normal color will be overridden.

TextColor(R,G,B)
for the color of the Headline
FrameColor(R,G,B)
for the color of the Frame
BarColor(R,G,B)
for the color of the Bargraph

The same rules about the RGB values, brackets, the missing pace between '...Color' and the opening bracket '(' etc. like for the default view mode and the SingleIcon view mode apply here too.


In the NoIcons view mode there is only the Headline to be displayed. So logically only TextColor(R,G,B) shows any result.


This also true when only using Text: after the Separator character without using any block/group name. (resulting in only a simple text line with the specified color)


Assigning different display layouts to a single Screen/Panel
You can assign several different display layouts to a single Screen and choose between them.
This way you can ether reduce the number of LCD Panels needed or greatly enhance the amount of information you can display with a given set of screens/panels.


To split the Data-Set into into different layouts, you encapsulate the relevant chunks each with ShowStats and EndStats.
Adding a number directly to ShowStats (within the same line but separated with a space from ShowStats) will indicate which layout is defined.
Example: ShowStats Battery ,Addinfo Reactor ,Addinfo Hydrogen Engine ,Optional Addinfo Solar Panel + Wind Turbine EndStats ShowStats 1 Container, AddSize NoLineBreak Connector + Collector + Ejector Grinder + Gap50+ Welder + Gap50+ Drill EndStats ShowStats 2 Oxygen Tank ,addsize Hydrogen Tank ,addsize O2/H2 Generator Vent EndStats ...
Hint:
'ShowStats' and 'ShowStats 0' mean the same layout and will indicate to the default display layout.


To change the display layouts, you have to define the sequence in which the layouts should be shown.
For this purpose (and many others) you can add a special keyword line starting with 'FSD options:' into the Custom Data field of the PB (running FSD v2) itself.
(you find more about this in the chapter Global Override Options)

The sequence is set by adding Sequence(layout sequence) to the 'FSD options:' line.
(since the PB has itself display panels, the 'FSD options:' line must be above any 'ShowStats' line)
Example: FSD options: sequence(0 1 2 7 5 3) ShowStats (optional) Stuff to be displayed on the display of the PB itself
This sequence will be valid for all displays controlled by this instance of FSD v2
If one of the layouts in the sequence is not defined in the Data-Set of a display, it will show the default layout (started by ShowStats or ShowStats 0).

The display layouts usually change automatically but can also be switched manually.
see the following chapter

Manual change of display layouts and adjusting the change rate
You can manipulating the sequencer by starting the PB running FSD v2 with arguments.
(you find more about it in the chapter Controlling FSD v2 by running the PB with arguments)

There are four arguments influencing the active screen layout and the sequencing.
layoutrate=... Caution: There has to be no space between 'layoutrate' and the equals sign '='
This will set the rate of changes for the screen layouts. (in changes per minute)
It will also override the default change rate or the rate set via FSD options:
A layout rate of 0 will stop the automatic change of layouts.

layout=... Caution: There has to be no space between 'layout' and the equals sign '='
This will set the which screen layout will be displayed.
If this layout is not defined in a Data-Set the default layout will be shown.

layout+ Caution: There has to be no space between 'layout' and the plus sign '+'
This will switch to the next set of screen layouts.
If the last set was already displayed the layout number will wrap around to the first.

layout- Caution: There has to be no space between 'layout' and the minus sign '-'
This will switch to the previous set of screen layouts.
If the first set was already displayed the layout number will wrap around to the last.
Optimizing the sequencing of screen layouts
With a little trick, you can use one and the same layout on multiple positions of the sequence.
To so, add a additional 'ShowStats' line (with a different number) after the first 'ShowStats' line.
CustomData in 1st LCD panel block
CustomData in 2nd LCD panel block
CustomData in 3rd LCD panel block
ShowStats ShowStats 1 ,Text:Layout AAA EndStats ShowStats 2 ShowStats 3 ,Text:Layout BBB EndStats ShowStats 4 ShowStats 5 ,Text:Layout CCC EndStats
ShowStats 0 ShowStats 3 ,Text:Layout 111 EndStats ShowStats 1 ShowStats 4 ,Text:Layout 222 EndStats ShowStats 2 ShowStats 5 ,Text:Layout 333 EndStats
ShowStats ShowStats 1 ShowStats 2 ,Text:Layout OOO EndStats ShowStats 3 ShowStats 4 ShowStats 5 ,Text:Layout ### EndStats
This trick is especially handy when having different counts of layouts in different displays.

FSD options: sequence(0 1 2 3 4 5) (CustomData in the PB running FSD v2)

Resulting outputs of the displays
#
1st LCD panel
2nd LCD panel
3rd LCD panel
0
Layout AAA
Layout 111
Layout OOO
1
Layout AAA
Layout 222
Layout OOO
2
Layout BBB
Layout 333
Layout OOO
3
Layout BBB
Layout 111
Layout ###
4
Layout CCC
Layout 222
Layout ###
5
Layout CCC
Layout 333
Layout ###
Global Override Options
You can overide individual LCD/Cockpit screen settings by using a special keyword line starting with 'FSD options:' in the Custom Data field of the Programmable block itself.
All keywords for this override options must be in a single line and this line must be located above an optional 'ShowStats' line or else the used keywords affect only the LCD panels of the Programmable block.

Avaible overide option keywords
Only 'FSD options:' is case sensitive. All other keywords for the overide options are not case sensitive. Different keyword can be strung together but must be seperated with ' ' , ',' or ':'
Keyword
Function
Custom Data Example
NoLineBreak
setting the NoLineBreak option on all controlled LCD screens
(the icons in the default display mode will only occupy one line)
FSD options: nolinebreak
NoHeadline
setting the NoHeadline option on all controlled LCD screens
(Displays group/block/bars without the textline)
FSD options: noheadline
NoScrolling
setting the NoScrolling option on all controlled LCD screens
(the textline will not scroll if it is too long)
FSD options: noscrolling
NoNames
setting the NoNames option on all controlled LCD screens
(Cuts blocktype names and group names out of the textline)
FSD options: nonames
Right
setting the Right alignment option on all controlled LCD screens
(all text will be right aligned)
FSD options: right
Center
setting the Center alignment option on all controlled LCD screens
(all text will be centered)
FSD options: center
Optional
setting the Optional option on all controlled LCD screens
(will show the optional data, where avaible)
FSD options: optional
AddInfo
setting the AddInfo option on all controlled LCD screens
(will show the AddInfo tags, where avaible)
FSD options: addinfo
AddSize
setting the AddSize option on all controlled LCD screens
(will show the AddSize icons, where avaible)
FSD options: addsize
Health
setting the Health option on all controlled LCD screens
(will show the additional Health bargraph, where avaible)
FSD options: health
NoSubgrids
setting the NoSubgrids option on all controlled LCD screens
(only blocks on the same grid as the programmable block
running FSD will be shown)
FSD options: nosubgrids
NoGroups
setting the NoGroups option on all controlled LCD screens
(skipping the search for matching group names)
FSD options: nogroups
Verbatim
narrows down the block search only to exact name matches
FSD options: verbatim
NoSubgridLCDs
FSD will only manage LCD screens on the same grid as the
programmable block running FSD
FSD options: nosubgridLCDs
Framerate=
This will set the rate the screen will be updated
(in frames per minute)
FSD options: framerate=45
Layoutrate=
This will set the rate the screen layouts will be changed
(in changes per minute)
FSD options: layoutrate=15
Fastmode
This will activate the Fastmode of FSD
The maximum framerate will change from 60 to 600 fpm
but will result in a higher CPU load
FSD options: fastmode
Sequence
This indicates the start of the definition of the screen layout sequence
FSD options:
sequence(0 1 2 3 5 7)
Caution: There has to be no space between the equal sign and 'Layoutrate' or 'Framerate'.

Options can be combined like in this example:
FSD options:optional noheadline nolinebreak no groups nosubgrids nosubgridLCDs verbatim

When using FSD options: the following keywords in the ShowStats section will act as toggle switches (a.k.a. inverting the setting again):
  • optional
  • addinfo
  • addsize
  • health
  • noheadline
  • nonames
  • nolinebreak
  • noscrolling
  • nosubgrids
  • nogroups

Example:
ShowStats Welder Grinder, NoNames Drill, AddInfo AddSize
FSD options:
FSD options:NoNames AddInfo AddSize

Controlling FSD v2 by running the PB with arguments
The programmable block running FSD v2 can be controlled via arguments:
  • Open the terminal GUI, select the PB running FSD v2, type the argument into the textbox named 'Argument' and hit "Run".
  • Select a button panel, sensor, timer etc. and in it's GUI, click "Setup actions", drag & drop
    the PB running FSD v2 into the toolbar and type in the argument.

shutdown
This will shut down the programmable block and switches all screens
controlled by this instance of FSD black
powerup
This will turns the programmable block and all the relevant screens back on
refresh
This switch all relevant screens black for a moment and then refreshes them
This can be used to counter potential multiplayer issues
framerate=...
This will set the rate the screen will be updated (in frames per minute)
It will also override the default update rate or the rate set via FSD options:
Caution: There has to be no space between 'framerate' and the equals sign '='
layoutrate=...
This will set the rate the screen layouts will be changed (in changes per minute)
It will also override the default change rate or the rate set via FSD options:
Caution: There has to be no space between 'layoutrate' and the equals sign '='
layout=...
This will set the which screen layouts will be displayed
Caution: There has to be no space between 'layout' and the equals sign '='
layout+
This will switch which screen layouts will be displayed to the next set
Caution: There has to be no space between 'layout' and the plus sign '+'
layout-
This will switch which screen layouts will be displayed to the previous set
Caution: There has to be no space between 'layout' and the minus sign '-'

Modifying keyword and default values in the script
In the config-section of the script, you can change some settings.
Open the programmable block via "Edit" so you can see the config and the code of the script.

The tags
Tags should only be changed if
  • There is a conflict with another script
  • You don't like the name and want to use other keywords

If you for example want to change the lcdtag from 'ShowStats' to 'DisplayStatus', the line must be modified like this:
string lcdtag = "DisplayStatus";

Script updates - how fast the script runs
If you want to save performance, you could change this line:
int FpM = 60; //How often the displays will be updated (In frames per minute)
to
int FpM = 30; //How often the displays will be updated (In frames per minute)
So the script will only update your screens every 2 seconds.

The same is true for the rate of display layout changes
You can turn the rate up or down. But it due to visual reasons it should remain a fraction of the FpM.
int LpM = 12; //How often the display layouts switch (In changes per minute)

The Separators
These characters are used to separate the 'names' part from the 'option keyword' part in the Data_sets. Change these at your own risk!!!
char[] seperators = {'\n' , ',' , ':'};

The default colors
You can change every color listed here. I've provided you with a list of colors you can use above the config-section.

If you want to change the headline from white to orange, make the line look like this:
Color headlineColor = Color.Orange;

You could also use RGB-values:
Color headlineColor = new Color(255, 255, 255);
313 Comments
orcaman98 6 May @ 9:34pm 
Well, cool! Thanks! The second link isn't viewable by me, but I'll definitely dig into the first the next time I can play!
Ekuah  [author] 2 May @ 11:55pm 
@orcaman98
You need the experimental version of FSD
You can find it here:
https://sp.zhabite.com/sharedfiles/filedetails/?id=2801918566
And here:
https://sp.zhabite.com/sharedfiles/filedetails/?id=2801930962
command:
ShowStats
Railgunname, optional

The experimental version of FSD is not openly published because
I was just never motivated enough to write a guide for all the new features.

Have fun
orcaman98 2 May @ 8:15pm 
Hello! I want to add railgun state of charge as an optional data. Do you have this on Github somewhere I can contribute if I figure out how to do it? An I right in thinking that the "pattern" thing at the end of each block type is designating the icon to use on the screen?
PimpMyDog 19 Apr @ 4:32pm 
@Ekuah

Looks like it was an user mistakse.

Here is a screenshot of the problem I had:

https://i.imgur.com/W6wBeR4.jpeg

Both LCDs' items that are circled were displaying the same group of blocks but on LCD slope they were on separate lines and on corner LCD they were on the same line, I wanted the LCD slope items to be on the same line same as in corner LCD but now that I looked I just forgot to add "SingleIcon" to the slope LCD's first item. All good now :) Sorry for the confusion. Epic script, thanks for the creation!!
Ekuah  [author] 17 Apr @ 1:02am 
@PimpMyDog
Im not sure if I'm understanding your request.
Can you give a visual example?
PimpMyDog 16 Apr @ 11:18am 
I think I figured out a workaround, I'm not going to reference groups but an individual sample block from each group, then I can use the "+" to list them into one line.
PimpMyDog 16 Apr @ 11:11am 
@Ekuah

Perhaps you could feed the code to ChatGPT and let it write the documentation for you haha.

Also I have a question. Is there any way to display multiple groups of blocks grouped by group in one line?

Currently when I try to look reactors and thrusters ON/OFF state in a single line I only have the option to either:

A) combine the reactors and thrusters into one graphic/tile (not good)
B) display them in separate lines (not ideal)
C) use tallbar, shortbar etc (doesn't fit, am using corner LCD)
ticklemyiguana 5 Apr @ 12:39pm 
@Ekuah
You're a champion. I'll be trying it out tn. Thanks.
Ekuah  [author] 5 Apr @ 12:12am 
@ticklemyiguana
The last Public update of FSD2 predates railguns.
That is why it doesn't distinguish between railguns or rockets.
But there is new version of FSD that does.
I was just never motivated enough to write a guide for all the new features.
So I never published it publicly. (if that makes sense)
You can find it here:
https://sp.zhabite.com/sharedfiles/filedetails/?id=2801918566
And here:
https://sp.zhabite.com/sharedfiles/filedetails/?id=2801930962

Have fun
ticklemyiguana 4 Apr @ 7:03pm 
@Ekuah - while I've got you here, I believe this is a bug, not a feature. Help please? Apologies if it's already covered in the guide, I haven't found it.

(Says rockets, should monitor railguns. Also IS monitoring RGs, just not under that name. No rockets on vessel.)

https://sp.zhabite.com/sharedfiles/filedetails/?id=3458151942

https://sp.zhabite.com/sharedfiles/filedetails/?id=3458152043