Space Engineers

Space Engineers

Not enough ratings
LCD Text Cycler Guide
By whisp
This is a guide for the LCD Text Cycler script, which allows you to display a highly configurable text-slideshow on your LCDs.
   
Award
Favorite
Favorited
Unfavorite
Getting started
  1. Subscribe to the LCD Text Cycler script
  2. Install the script on a Programmable Block
  3. To any LCD you want to cycle through texts, add "cycler" to the name. E.g. "LCD 5 (cycler)"
  4. For each individual LCD, setup the Text-Cycler configuration. See next section, or use this example configuration:
    slide_duration: 3 font: "Monospace" font_size: 1.5 alignment: "CENTER" padding: 35 font_color: [128, 128, 0] texts: - "Text 1" - text: text: "Text 2" font_size: 2 - text: "Text 3"

    Keep in mind, that the indentation is important for the configuration to work.
LCD Configuration
To configure the texts for your Text Cycler LCD, go into its CustomData.

Configurations are in a YAML-like syntax. Indentation is important. It's either TAB or 4 spaces per level of indentation.

Let's start with an example configuration:

slide_duration: 3 font: "Monospace" font_size: 2 texts: - text: text: "Text 1" alignment: "CENTER" padding: 25 font: "GameCredits" font_color: [128, 128, 0] - text: text: "Text 2" alignment: "CENTER" padding: 45 font: "LoadingScreen" font_color: [0, 128, 128] - text_source: source: "ATM (Image Test)" padding: 0 font_size: 0.1 slide_duration: 8 - "Text 4" - text: "Text 5" - "Text 6 spans over multiple lines. Any indentation will be part of the text." - "Text 7"

At the top, you define the default settings that are used for any text that doesn't use an individual setting. In the above example defaults for slide duration, font and font size are defined. Any text will fall back to a default value where it doesn't define its own setting.

If you don't define any defaults, the script's defaults will be used.

Available text settings are:
  • slide_duration: a seconds value, i.e. 1.5 for one and a half second
  • font: the name of the font in quotes, i.e. "Monospace" or "DEBUG", etc.
  • font_size: the size of the font as float, i.e. 2.5
  • alignment: the alignment as text, i.e. "LEFT", "CENTER", "RIGHT"
  • padding: the padding as percent-number, i.e. 35
  • font_color: the color as a list of R, G, and B, i.e.
    font_color: [128, 128, 0]
  • background_color: again a color as list of R, G and B
Under texts you can set and configure each individual text.

In the upper example, we have two configured texts and one configured text source. You only need text sources, if the CustomData of your LCD is too small to hold all the texts you want. I.e. if you use image-data from Whip's Image Converter.

As you see, you can configure each individual text separately, if you want a particular slide to use settings different from the defaults. For texts that have no individual configuration, you can set the actual text on one line, as shown in the example for "Text 4" and "Text 5". And you can create multi-line texts as shown in "Text 6...".

A text source can be any block. The displayed text will be whatever stands in CustomData of that block. In the example above, we get a text from the CustomData of the block named ATM (Image Test). Like for other texts, you can add an individual configuration.
Programmable Block Configuration
There are also a few things you can (but don't need to) set in the CustomData of the Programmable Block:

tag: "cycler" update_mul: 0.5 load_config_mul: 0.3 update_frequency: 10
  • tag: the part you add to the block name of the LCD's you want to cycle through texts
  • update_mul: If you want to spread script execution over multiple executions. At 0.5, in each script execution half of the LDCs will be processed.
  • load_config_mul: This affects over how many executions parsing the LCD configs will be spread. (Each LCD will only be parsed once.)
  • update_frequency: Default is 10, other possibilities are 100 or 1. Currently not recommended to set that value in the config.
You only need to fiddle with the latter 3 values, if you reached your script execution time limit. In that case, reducing the numbers will help.
Commands
The programmable block accepts the following commands:
  • REFRESH LCDS: Reloads and parses the LCDs. Necessary if you change the configuration of a cycler LCD or if you add an LCD. Alternatively you can recompile the script, however, you can run the REFRESH LCDS command via a toolbar-action.
  • RESET: Resets the script. Only useful if you change the Programmable Block's configuration. Also reloads the LCDs. Similar to recompiling the script.