- Downloade die ZIP Datei von https://github.com/GitHub-TC/EmpyrionScripting/releases
- UnZip die Datei in dem Verzeichnis Content\Mods directory
NOTE: Dies ist eine SEHR frühe Version der LCD A10 mod mit der neuen ModAPI !!! beide sind noch vielen Änderungen unterworfen!!!
- Downloade die ZIP Datei von https://github.com/GitHub-TC/EmpyrionScripting/releases
- UnZip die Datei in dem Verzeichnis Content\Mods directory
- Das Spiel MUSS dann ohne EAC gestartet werden damit die Mods geladen werden
Echte Spielinhalte direkt auf einem LCD ausgeben
Eine dem Struktur 'LCDInfo-Demo' findest du im workshop https://steamcommunity.com/workshop/filedetails/?id=1751409371
YouTube video;
-
https://youtu.be/8nEpEygHBu8 (danke an Olly :-) )
Allgemein: Benötigt werden mindestens 2 LCD und mindestens 1 Container
- LCD 1 (Eingabe) wird mit der Abfrage programmiert siehe Beispiele unten. Der Namen des LCDs im ControlPanel MUSS mit "Script:" beginnen.
- LCD 2 (Ausgabe) Muss eindeutigen Namen haben z.B. "LCD Alle Erze"
- Jeder Kontainer der eine Information ausgeben soll, muss einen eindeutigen Namen haben
Wenn ihr die Produktename auf deutsch haben wollt, dann anstatt {{Name}} {{i18 Key 'Deutsch'}}
Unten stehen die ID Nummer für Erze und Barren.
Einige Funktionen benötigen ein Komma"," andere benötigen Simikolon ";".
Alles in "" sind Texte und nicht mit anzugeben.
Einzelne ' sind mit anzugeben.
Man kann eine Information auch auf 2 LCD's anzeigen lassen dann bei Targets:Name LCD;Name LCD2
Man kann eine Information auch auf n LCD's anzeigen lassen dann bei Targets:LCDAusgabe*
Man kann eine Information auch auf n LCD's anzeigen lassen welche schon im ScriptLCD Namen angegeben sind Script:LCDAusgabe*
Man kann auf einem LCD auch den Inhalt verschiedner Kisten anzeigen lassen!
Eine Debugausgabe erhält man mit einem LCD das den Namen "ScriptDebugInfo" hat.
Eingabe im LCD 1 (alles ohne "")
Targets:"NAME DES ANZUZEIGENDEN LCD"
"TEXT Optional"
{{items E.S '"Name der Kiste"'}}
{{Count}}{{Name}}
{{/items}}
Bsp:
Targets:LCD Alle Erze
Meine Erze
{{#items E.S 'Alle Erze'}}
{{Count}}{{i18 Key 'Deutsch'}}
{{/items}}
Eingabe im LCD (alles ohne "")
Targets:"NAME DES ANZUZEIGENDEN LCD"
"TEXT optional"
{{#test ID in '2248,2249,2250,2251,2252,2253,2254,2269,2270,2284,2293,2297'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/test}}
{{/each}}
Bsp:
Targets:LCD Alle Erze
Meine Erze
{{#each E.S.Items}}
{{#test Id in '2248,2249,2250,2251,2252,2253,2269,2270,2284,2297,2280,2254'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/test}}
{{/each}}
Eingabe im LCD (alles ohne "")
Targets:"NAME DES ANZUZEIGENDEN LCD"
"TEXT optional"
{{#each E.S.Items}}
{{#test Id in '2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2285,2294,2298'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/test}}
{{/each}}
Bsp:
Targets:LCD Barren
Alle meine Barren in der Basis:
{{#each E.S.Items}}
{{#test Id in '2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2285,2294,2298'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/test}}
{{/each}}
Eingabe im LCD (alles ohne "")
Targets:"NAME DES ANZUZEIGENDEN LCD"
"TEXT optional"
{{#itemlist E.S.Items '2271;2272;2273;2274;2275;2276;2277;2278;2279;2280;2281;2285;2294;2298'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/itemlist}}
Bsp:
Targets:LCD Alle Barren im Spiel
Alle Barren im Spiel:
{{#itemlist E.S.Items '2271;2272;2273;2274;2275;2276;2277;2278;2279;2280;2281;2285;2294;2298'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/itemlist}}
Eingabe im LCD (alles ohne "")
Targets:"NAME DES ANZUZEIGENDEN LCD"
"TEXT optional"
{{#itemlist E.S.Items '2249'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/itemlist}}
Bsp:
Targets:LCD EISEN ERZ
Meine EisenErz und Barren
{{#itemlist E.S.Items '2249;2272'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/itemlist}}
Hier werden alle Erze angezeigt wo nur 1-1000 auf der Basis vorhanden ist.
{{#itemlist E.S.Items '2248;2249;2250;2251;2252;2253;2269;2270;2284;2297;2280;2254'}}
{{#test Count geq 1}}
{{#test Count leq 1000}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/test}}
{{/test}}
{{/itemlist}}
{#itemlist E.S.Items '2248;2249;2250;2251;2252;2253;2269;2270;2284;2297;2280;2254'}}
{{#test Count leq 0}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/test}}
{{/itemlist}}
Eingabe im LCD (alles ohne "")
Targets:"NAME DES ANZUZEIGENDEN LCD"Eingabe im LCD (alles ohne "")
"TEXT optional"
{{#each P.Player}}
"-" {{Name}}
{{/each}}
Bsp.
Targets:LCD Info W1
Player:
{{#each P.Player}}
- {{Name}}
{{/each}}
Eingabe im LCD (alles ohne "")
Targets:"NAME DES ANZUZEIGENDEN LCD"Eingabe im LCD (alles ohne "")
"TEXT optional"
{{datetime}}
{{datetime 'HH:mm'}}
{{datetime 'dd MMM HH:mm:ss' '+7'}}
Bsp.
Targets:LCD UHRZEIT
Wie spät ist es?
{{datetime}}
{{datetime 'HH:mm'}}
{{datetime 'dd MMM HH:mm:ss' '+7'}}
Wenn zu viele Produkte nicht angzeigt werden können, dann kann man auch Scrollen Hier werden 5 Produkte angezeigt mit 2 Sekunden Scrollgeschwindigkeit, wenn mehr als 5 Items zur Verfügung stehen.
{{#scroll 5 2}}
{{#items E.S '"Name der Kiste"'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/items}}
Bsp.
{{#scroll 5 2}}
{{#items E.S 'Kühlschrank 1'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/items}}
{{#scroll 10 1}}
{{#each E.S.Items}}
- [{{Id}}]:{{Name}}
{{/each}}
{{/scroll}}
Es kann alles in Intervallen angezeigt werden. Hier im Beispiel wäre es ein Pfeil Man kann auch den Inhalt von 2 Kisten anzeigen lassen
{{#intervall 1}}
= = = = = = = = = = = = = = = = >
{{else}}
= = = = = = = = = = = = = = = =>
{{/intervall}}
oder hier sind sind 2 Kisten die abwechselnd angezeigt werden.
{{#intervall 2}}
"Text optional"
{{#items E.S '"Name der Kiste"'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/items}}
{{else}}
"Text optional"
{{#items E.S '"Name der Kiste2"'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/items}}
{{/intervall}}
Bsp.
{{#intervall 2}}
Kühlschrank 1:
{{#items E.S 'Kühlschrank 1'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/items}}
{{else}}
Kühlschrank 2:
{{#items E.S 'Kühlschrank 2'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/items}}
{{/intervall}}
Im folgendem Beispiel wechselt alle 5 Sekunden das Wort "Hallo" und "Welt" dann wechselt auch alle 5 Sekunden die Schriftgrösse Es wechselt jede Sekunde die Schriftfarbe und jede Sekunde der Hintergrund
{{#intervall 5}}
Hallo
{{else}}
Welt
{{/intervall}}
{{#intervall 5}}
{{fontsize @root 8}}
{{else}}
{{fontsize @root 15}}
{{/intervall}}
{{#intervall 1}}
{{color @root 'ff0000'}}
{{else}}
{{color @root '00ff00'}}
{{/intervall}}
{{#intervall 1}}
{{bgcolor @root 'ffff00'}}
{{else}}
{{bgcolor @root '000000'}}
{{/intervall}}
@root/OreIds
- Item Id: 2248, Name: Magnesium Erz
- Item Id: 2249, Name: Eisen Erz
- Item Id: 2250, Name: Kobalt Erz
- Item Id: 2251, Name: Silizium Erz
- Item Id: 2252, Name: Neodymium Erz
- Item Id: 2253, Name: Kupfer Erz
- Item Id: 2254, Name: Promethium
- Item Id: 2269, Name: Erestrum Erz
- Item Id: 2270, Name: Zascosium Erz
- Item Id: 2284, Name: Sathium Erz
- Item Id: 2293, Name: Pentaxid Erz
- Item Id: 2297, Name: Gold Erz
@root/IngotIds
- Item Id: 2271, Name: Magnesiumpulver
- Item Id: 2272, Name: Eisen Barren
- Item Id: 2273, Name: Kobalt Barren
- Item Id: 2274, Name: Silizium Barren
- Item Id: 2275, Name: Neodymium Barren
- Item Id: 2276, Name: Kupfer Barren
- Item Id: 2277, Name: Promethium Pallets
- Item Id: 2278, Name: Erestrum Barren
- Item Id: 2279, Name: Zascosium Barren
- Item Id: 2280, Name: Stein
- Item Id: 2281, Name: Steinstaub
- Item Id: 2285, Name: Sathium Barren
- Item Id: 2294, Name: Pentaxid Kristalle
- Item Id: 2298, Name: Gold Barren
Syntaxdocu:
- http://handlebarsjs.com/
- http://handlebarsjs.com/reference.html#data
- https://zordius.github.io/HandlebarsCookbook/index.html
- https://zordius.github.io/HandlebarsCookbook/0014-path.html
- https://github.com/rexm/Handlebars.Net
- {{#test Select Op Value}}
- Op: eq is =
- Op: leq is <=
- Op: le is <
- Op: geq is >=
- Op: ge is >
- Op: in (Trennzeichen sind: ,;#+ )
- Value: '1,2,3,42'
- Value: '1-3,42'
- Value: 'A,xyz,mag'
- {{#if data}}
- Block ausführen wenn (data) einen Wert (ungleich 'null') hat oder (data) gleich 'true' oder ungleich 0 ist
- anderfalls wird der {{else}} Teil ausgeführt
- {{#intervall sec}}
- Intervall in (sec) Sekunden
- {{#scroll lines delay}}
- Text scrollen mit (lines) Zeilen und einer Verzögerung von (delay) Sekunden
- {{#itemlist list 'id1;id2;id3,...'}}
- Liste der Items (list) auf die Items mit den Ids 'id1;id2;id3,...' filtern. Falls eine Id nicht vorhanden ist wird diese mit einer Anzahl 0 eingefügt.
- {{#i18n Select 'Language'}}
- Language: English,Deutsch,Français,Italiano,Spanish,... das Sprachkürzel kann hier, aus der ersten Zeile, entnommen werden [ESG]\Content\Extras\Localization.csv
- {{datetime}} = Datum und Uhrzeit anzeigen
- {{datetime 'format'}} = gemäß dem 'format' ausgeben
- {{datetime 'format' '+5'}} = N Stunden addieren
DateTime format:
- {{#items structure 'box1;box2;fridge*;...'}} = Alle Items aus den Containers (names)='box1;box2;fridge*;...' ermitteln
- {{format data format}} = Daten (data) gemäß dem Format (format) ausgeben
- {{move item structure names [maxLimit]}}
- Item (item) in die Struktur (structure) in die Container mit den Namen (names) verschieben
- [maxLimit] ist ein optionaler Parameter der die Anzahl im Zielcontainer begrenzt
- {{lights structure names}}
- Lichter der Struktur (structure) mit den Namen (names) auswählen
- {{lightcolor light color}}
- Bei Licht (light) die Farbe (color rgb hex) auswählen
- {{lightblink light interval length offset}}
- Bei Licht (light) das Intervall (intervall) die Intervalllänge (length) und den Intervalloffset (offset) einstellen
- {{lightintensity light intensity}}
- Bei Licht (light) die Lichtintensität (intensity) einstellen
- {{lightrange light range}}
- Bei Licht (light) die Lichtreichweite (range) einstellen
- {{lightspotangle light spotangle}}
- Bei Licht (light) die Lichtspotwinkel (spotangle) einstellen
- {{lighttype light type}}
- Bei Licht (light) die Lichttyp (type) einstellen
- Spot
- Directional
- Point
- Area
- Rectangle
- Disc
- Bei Licht (light) die Lichttyp (type) einstellen
- {{devices structure customnames}}
- (structure) (name;name*;*;name)
- {{devicesoftype structure type}}
- (structure) (type)
- {{setactive block|device active}}
- {steps start end [step] [delay]}}
- Von (start) nach (end) mit optional einer Schrittweite von (step) und einer (delay)-Sekunden geänderten Zeitbasis
- {split string separator [removeemptyentries]}}
- (string) mit dem Trennzeichen (separator) zerteilen.
- [removeemptyentries] falls leere Einträge entfernt werden sollen 'true'
- {{islocked structure x y z}}
- Prüft bei der Struktur (structure) ob das Device (device) oder das Device an der Position (x) (y) (z) gesperrt ist.
- {{gettexture block pos}}
- Liefert die TexturId des Blocks von der Seite T=Top, B=Bottom,, N=North, S=South, W=West, E=East
- {{settexture block pos textureid}}
- Setzt die TexturId des Blocks an den Seiten T=Top, B=Bottom,, N=North, S=South, W=West, E=East es können mehrere durch Komma getrennt angegeben werden
- {random start end}}
- Zufallswert zwischen (start) und (end) liefern und in den Block als {{this}} hereinreichen
- {{bar data min max length [char] [bgchar]}}
+ Erzeugt eine Balkenanzeige für (data) in dem Bereich von (min) bis (max) mit der Länge (length)
- Der Balkensymbole für "gefüllt" (char) und den Hintergrund (bgchar) sind optional
- {{use data}}
- Diesen Datensatz im Inhalt zum direkten Zugriff bereitstellen
- der {{else}} fall wird aufgerufen wenn data == null ist
- {{set @root key data}}
- Die Daten (data) hinterlegen so dass sie per @root.Data.(key) jederzeit wieder abgerufen werden können
- {{setblock @root key}}
- Die Daten des Blockes hinterlegen so dass sie per @root.Data.(key) jederzeit wieder abgerufen werden können
- {{math (lvalue) op (rvalue)}}
- op = +, -, *, /, %
- {{calc (lvalue) op (rvalue)}}
- op = +, -, *, /, %
- Kann mit () inline in anderen Kommandos benutzt werden
- {{distance (lVector) (rVector)}}
- Abstand zwischen (lVector) und (rVector)
- {{concat a1 a2 a3 ...}}
- Fügt die Werte a1 .. aN zusammen
- Wenn ein Wert ein Array von Texten (string[]) ist wird der nächste Parameter als Trennzeichen für diese Einträge gewertet
- {{substring text startindex [length]}}
- Teiltext von dem Text (text) von Index (startindex) mit einer optionalen maximalen Länge von (length) Zeichen
- {{chararray text}} + Text als Array von Zeichen liefern
- {{block structure x y z}}
- Liefert den Block/Device der (structure) von der Position (x) (y) (z)
- {{gettext lcddevice}}
- Liefert den Text des LCD (lcddevice)
- {{gettext lcddevice text}}
- Setzt den Text des LCD (lcddevice) mit dem Text (text)
- {{gettext lcddevice}}
- Setzt den Text des LCD (lcddevice) mit dem Text des innenliegenden Blockes
- {{setcolor lcddevice (rgb hex)}}
- Setzt die Farbe des LCD (lcddevice) auf (rgb hex)
- {{setbrcolor lcddevice (rgb hex)}}
- Setzt die Hintergrundfarbe des LCD (lcddevice) auf (rgb hex)
- {{entitybyname @root name}}
- Liefert die Entiäten, in der Nähe und mit der selben Fraktion, mit Name (name)
- {{entitiesbyname @root names}}
- Liefert die Entiäten, in der Nähe und mit der selben Fraktion, mit Namen in (name;name*;*)
- {{entitybyid @root id}}
- Liefert die Entiäten, in der Nähe und mit der selben Fraktion, mit Id (id)
- {{entitiesbyid @root ids}}
- Liefert die Entiäten, in der Nähe und mit der selben Fraktion, mit IDs in (id1;id2;id3)
- {{deconstruct @root entity container}}
- Baut die Struktur 'entity' ab und befördert die Teile in den Container mit dem Namen welcher mit 'container' angegben wird
- Hinweis: Der Kern der Struktur muss 'Core-Destruct-ID' (wobei ID für die Id der Struktur steht) heißen
Diese besondere Form von Scripten kann im SaveGame hinterlegt werden. Der BasisPfad dafür ist der [SaveGame]\Mods\EmpyrionScripting\Scripts
in diesem Verzeichnis werden nach folgendem Muster Scriptdateien mit der Endung *.hbs gesucht
- EntityType
- EntityName
- PlayfieldName
- PlayfieldName\EntityType
- PlayfieldName\EntityName
- EntityId
Hinweis: EntityType ist BA,CV,SV or HV
- {{readfile @root dir filename}}
- (dir)\(filename) Dateiinhalt wird als ZeilenArray geliefert
- Falls die Datei nicht existiert wird der {{else}} Teil ausgeführt
- {{writefile @root dir filename}}
- (dir)\(filename) Inhalt des Blockes wird in die Datei geschrieben
- {{fileexists @root dir filename}}
- Wenn die Datei existiert dann das Innere ausführen ansonsten den exec Teil auswerten
{{settype @root block typeid}} {{setdamage @root block damage}}
ASTIC/TC
English-Version:
- Download the ZIP file from https://github.com/GitHub-TC/EmpyrionScripting/releases
- unzip the file in the Content\Mods directory
NOTE: This is an EARLY A10 mod with the new ModAPI !!! both are heavily WorkInProgress !!!
- Download the ZIP file from https://github.com/GitHub-TC/EmpyrionScripting/releases
- UnZip the file in the directory Content\Mods directory
- The game MUST then be started without EAC so the mods are loaded
Displays various informations directly and live on LCD screens.
Get the demo structure 'LCDInfo-Demo' from the workshop https://steamcommunity.com/workshop/filedetails/?id=1751409371
YouTube video;
-
https://youtu.be/Wm_09Q-cvh0 (thanks to Olly :-) )
General: At least 2 LCDs and at least 1 container are required
- LCD 1 (input) is programmed with the query see examples below
- LCD 2 (output) Must have unique name, e.g. "LCD All ores"
- Each container that is to output information must have a unique name
If you want the product name in German, then instead of {{Name}} {{i18 Key 'Deutsch'}}
Below is the ID number for ores and ingots.
Some functions require a comma "," others require a simcard ";".
Everything in "" are texts and not to be specified.
Individuals are to be indicated.
One can also display an information on 2 LCD's then at Targets: "Name LCD"; "Name LCD2"
You can also display the content of various boxes on an LCD!
Eingabe im LCD 1 (alles ohne "")
Targets:"NAME DES ANZUZEIGENDEN LCD"
"TEXT Optional"
{{items E.S '"Name der Kiste"'}}
{{Count}}{{Name}}
{{/items}}
Bsp:
Targets:LCD Alle Erze
Meine Erze
{{#items E.S 'Alle Erze'}}
{{Count}}{{i18 Key 'Deutsch'}}
{{/items}}
Input on the LCD (everything without "")
Targets:"NAME DES ANZUZEIGENDEN LCD"
"TEXT optional"
{{#test ID in '2248,2249,2250,2251,2252,2253,2254,2269,2270,2284,2293,2297'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/test}}
{{/each}}
Bsp:
Targets:LCD Alle Erze
Meine Erze
{{#each E.S.Items}}
{{#test Id in '2248,2249,2250,2251,2252,2253,2269,2270,2284,2297,2280,2254'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/test}}
{{/each}}
Input on the LCD (everything without "")
Targets:"NAME DES ANZUZEIGENDEN LCD"
"TEXT optional"
{{#each E.S.Items}}
{{#test Id in '2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2285,2294,2298'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/test}}
{{/each}}
Bsp:
Targets:LCD Barren
Alle meine Barren in der Basis:
{{#each E.S.Items}}
{{#test Id in '2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2285,2294,2298'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/test}}
{{/each}}
Input on the LCD (everything without "")
Targets:"NAME DES ANZUZEIGENDEN LCD"
"TEXT optional"
{{#itemlist E.S.Items '2271;2272;2273;2274;2275;2276;2277;2278;2279;2280;2281;2285;2294;2298'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/itemlist}}
Bsp:
Targets:LCD Alle Barren im Spiel
Alle Barren im Spiel:
{{#itemlist E.S.Items '2271;2272;2273;2274;2275;2276;2277;2278;2279;2280;2281;2285;2294;2298'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/itemlist}}
Input on the LCD (everything without "")
Targets:"NAME DES ANZUZEIGENDEN LCD"
"TEXT optional"
{{#itemlist E.S.Items '2249'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/itemlist}}
Bsp:
Targets:LCD EISEN ERZ
Meine EisenErz und Barren
{{#itemlist E.S.Items '2249;2272'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/itemlist}}
Here all ores are displayed where only 1-1000 exists on the basis.
{{#itemlist E.S.Items '2248;2249;2250;2251;2252;2253;2269;2270;2284;2297;2280;2254'}}
{{#test Count geq 1}}
{{#test Count leq 1000}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/test}}
{{/test}}
{{/itemlist}}
{#itemlist E.S.Items '2248;2249;2250;2251;2252;2253;2269;2270;2284;2297;2280;2254'}}
{{#test Count leq 0}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/test}}
{{/itemlist}}
Input on the LCD (everything without "")
Targets:"NAME DES ANZUZEIGENDEN LCD"Input on the LCD (everything without "")
"TEXT optional"
{{#each P.Player}}
"-" {{Name}}
{{/each}}
Bsp.
Targets:LCD Info W1
Player:
{{#each P.Player}}
- {{Name}}
{{/each}}
Input on the LCD (everything without "")
Targets:"NAME DES ANZUZEIGENDEN LCD"Input on the LCD (everything without "")
"TEXT optional"
{{datetime}}
{{datetime 'HH:mm'}}
{{datetime 'dd MMM HH:mm:ss' '+7'}}
Bsp.
Targets:LCD UHRZEIT
Wie spät ist es?
{{datetime}}
{{datetime 'HH:mm'}}
{{datetime 'dd MMM HH:mm:ss' '+7'}}
If too many products can not be displayed, then you can also scroll 5 products are shown here with 2 seconds scrolling speed if more than 5 items are available.
{{#scroll 5 2}}
{{#items E.S '"Name der Kiste"'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/items}}
Bsp.
{{#scroll 5 2}}
{{#items E.S 'Kühlschrank 1'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/items}}
{{#scroll 10 1}}
{{#each S.Items}}
- [{{Id}}]:{{Name}}
{{/each}}
{{/scroll}}
Everything can be displayed at intervals. Here in the example it would be an arrow You can also display the contents of 2 boxes
{{#intervall 1}}
= = = = = = = = = = = = = = = = >
{{else}}
= = = = = = = = = = = = = = = =>
{{/intervall}}
or here are 2 boxes that are displayed alternately.
{{#intervall 2}}
"Text optional"
{{#items E.S '"Name der Kiste"'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/items}}
{{else}}
"Text optional"
{{#items E.S '"Name der Kiste2"'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/items}}
{{/intervall}}
Bsp.
{{#intervall 2}}
Kühlschrank 1:
{{#items E.S 'Kühlschrank 1'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/items}}
{{else}}
Kühlschrank 2:
{{#items E.S 'Kühlschrank 2'}}
{{Count}} {{i18n Key 'Deutsch'}}
{{/items}}
{{/intervall}}
In the following example, the word "Hello" and "World" changes every 5 seconds. then the font size also changes every 5 seconds The font color changes every second and the background every second
{{#intervall 5}}
Hallo
{{else}}
Welt
{{/intervall}}
{{#intervall 5}}
{{fontsize @root 8}}
{{else}}
{{fontsize @root 15}}
{{/intervall}}
{{#intervall 1}}
{{color @root 'ff0000'}}
{{else}}
{{color @root '00ff00'}}
{{/intervall}}
{{#intervall 1}}
{{bgcolor @root 'ffff00'}}
{{else}}
{{bgcolor @root '000000'}}
{{/intervall}}
@root/OreIds
- Item Id: 2248, Name: MagnesiumOre
- Item Id: 2249, Name: IronOre
- Item Id: 2250, Name: CobaltOre
- Item Id: 2251, Name: SiliconOre
- Item Id: 2252, Name: NeodymiumOre
- Item Id: 2253, Name: CopperOre
- Item Id: 2254, Name: PromethiumOre
- Item Id: 2269, Name: ErestrumOre
- Item Id: 2270, Name: ZascosiumOre
- Item Id: 2284, Name: SathiumOre
- Item Id: 2293, Name: PentaxidOre
- Item Id: 2297, Name: GoldOre
@root/IngotIds
- Item Id: 2271, Name: MagnesiumPowder
- Item Id: 2272, Name: IronIngot
- Item Id: 2273, Name: CobaltIngot
- Item Id: 2274, Name: SiliconIngot
- Item Id: 2275, Name: NeodymiumIngot
- Item Id: 2276, Name: CopperIngot
- Item Id: 2277, Name: PromethiumPellets
- Item Id: 2278, Name: ErestrumIngot
- Item Id: 2279, Name: ZascosiumIngot
- Item Id: 2280, Name: CrushedStone
- Item Id: 2281, Name: RockDust
- Item Id: 2285, Name: SathiumIngot
- Item Id: 2294, Name: PentaxidCrystal
- Item Id: 2298, Name: GoldIngot
Syntaxdocu:
- http://handlebarsjs.com/
- http://handlebarsjs.com/reference.html#data
- https://zordius.github.io/HandlebarsCookbook/index.html
- https://zordius.github.io/HandlebarsCookbook/0014-path.html
- https://github.com/rexm/Handlebars.Net
- {{#test Select Op Value}}
- Op: eq is =
- Op: leq is <=
- Op: le is <
- Op: geq is >=
- Op: ge is >
- Op: in (Delimitters are: ,;#+ )
- Value: '1,2,3,42'
- Value: '1-3,42'
- Value: 'A,xyz,mag'
- {{#if data}} * Execute block if (data) has a value (not equal to 'null') or (data) equals 'true' or not equal to 0 * otherwise the {{else}} part will be executed
- {{#intervall sec}}
- intervall in seconds
- {{#scroll lines delay}}
- Text scroll block with (lines) od text, scrolls with (delay) seconds
- {{#itemlist list 'id1;id2;id3'}}
- Itemlist the the selected items (ids) even if they don't in the list (list)
- {{#i18n Select 'Language'}}
- Language: English,Deutsch,Français,Italiano,Spanish,... look at [ESG]\Content\Extras\Localization.csv at the first line
- {{datetime}} = Display the Datetime
- {{datetime 'format'}} = uses the formatstring
- {{datetime 'format' '+5'}} = adds N hours
DateTime format:
- {{move item structure names [maxLimit]}}
+ Item (item) into the structure (structure) in the container with the names (names) move
- [maxLimit] is an optional parameter which one is limited the amount in the target container
- {lightsign names}} + Select lights of the structure with names
- {{light color light color}} + For light, select the color (color rgb hex)
- {{lightblink light interval length offset}} + In the case of light, set the interval (interval), the interval length (length) and the interval offset (offset)
- {{light intensity light} + Set the light intensity for light
- {{lightrange light range}} + In the case of light, set the light range
- {{lightspotangle light spotangle}} + Set the light spot angle (spotangle) for light
- {{lighttype light type}}
+ For light, set the type of light
- spot
- Directional
- Point
- Area
- rectangle
- disc
- {{devices structure customnames}}
- (structure) (name;name*;*;name)
- {{devicesoftype structure type}}
- (structure) (type)
- {{setactive block|device active}}
- {{steps start end [step] [delay]}}
- From (start) to (end) with optional (step)-width and (delay) extends the 1 second per 1 counter add
- {{random start end}} + Deliver a random value between (start) and (end) and submit to the block as {{this}}
- {{split string separator [removeemptyentries]}}
- (string) split with the delimiter (separator).
- [removeemptyentries] if empty entries should be removed 'true'
- {{substring text startindex [length]}}
- Substring from the Text (text) from Index (startindex) with optional maximum (length) characters
- {{chararray text}} + Split the Text into an array of characters
- {{bar data min max length [char] [bgchar]}}
+ Displays a bar for (data) in the rage of (min) to (max) with the total bar length of (length)
- The string for filled signs (char) and background signs (bgchar) are optional
- {{use data}}
- Use this data for direct access
- the {{else}} case will call when data == null is
- {{set @root key data}} + The data (data) are stored so that they can be recalled at any time via @ root.Data. (Key)
- {{setblock @root key}} + The data of the block are stored so that they can be recalled at any time via @ root.Data. (Key)
- {{math (lvalue) op (rvalue)}}
- op = +, -, *, /, %
- {{calc (lvalue) op (rvalue)}}
- op = +, -, *, /, %
- Can be used with () inline in other commands
- {{distance (lVector) (rVector)}}
- Distance between (lVector) and (rVector)
- {{block structure x y z}}
- {{concat a1 a2 a3 ...}}
- Concatenate the values of a1 .. aN
- If a value is an array of texts (string []), the next parameter is considered the separator for those entries
- {{islocked structure device|x y z}}
- Checks at the structure whether the device (device) or the device is locked at the position (x) (y) (z).
- {{gettexture block pos}}
- Get the TexturId of the block from the side T=Top, B=Bottom,, N=North, S=South, W=West, E=East
- {{settexture block pos textureid}}
- Set the TexturId of the block at the sides T=Top, B=Bottom,, N=North, S=South, W=West, E=East it could be many sides declared, komma separated
- {{gettext lcddevice}}
- Gets the text from the LCD (lcddevice)
- {{settext lcddevice text}}
- Set the text of the LCD (lcddevice) with (text)
- {{settext lcddevice}}
- Set the text of the LCD (lcddevice) from the nested block
- {{setcolor lcddevice (rgb hex)}}
- Set the color of the LCD (lcddevice) with (rgb hex)
- {{setbrcolor lcddevice (rgb hex)}}
- Set the bgcolor of the LCD (lcddevice) with (rgb hex)
- {{entitybyname @root name}}
- Get nearby Entity (with same faction) with (name)
- {{entitiesbyname @root names}}
- Get nearby Entity (with same faction) with Names in (name;name*;*)
- {{entitybyid @root id}}
- Get nearby Entity (with same faction) with (id)
- {{entitiesbyid @root ids}}
- Get nearby Entity (with same faction) with IDs in (id1;id2;id3)
- {{deconstruct @root entity container}} + Deconstruct the entity 'entity' and moves parts to container named as 'container'' + Note: The core of the structure must be called 'Core-Destruct-ID' (where ID stands for the id of the structure)
This special form of scripts can be stored in the SaveGame. The basic path for this is the [Savegame]\Mods\EmpyrionScripting\Scripts
in this directory script files with the extension *.hbs are searched for according to the following pattern
- EntityType
- EntityName
- PlayfieldName
- PlayfieldName\EntityType
- PlayfieldName\EntityName
- EntityId
Note: EntityType is BA,CV,SV or HV
- {{readfile @root dir filename}} + (dir)\(filename) file content is supplied as a LineArray + If the file does not exist, the {{else}} part will be executed
- {{writefile @root dir filename}} + (dir)\(filename) Content of the block is written to the file
- {{fileexists @root dir filename}}
- If exists then templane oterwirse exec else part
ASTIC/TC