[MOD EXT] Empyrion Scripting - Scripts

Discussion in 'The Hangar Bay' started by Ephoie, Mar 22, 2020.

  1. Khas

    Khas Ensign

    Joined:
    Oct 18, 2020
    Messages:
    7
    Likes Received:
    4
    Yes i added them myself, i underlined the missing ones in the posted code for purpose of pointing them, but apparently the forum format didn't like it.
    You say the oxygen was always like that? I'm pretty sure it took small and emergency bottle with the script in the past.
    Anyway thank you
     
    #221
  2. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,085
    Likes Received:
    731
    Here is a 'small' example - change the door lockcode dynamic in the "Lost Colony"
     
    #222
    |LG|Judge and Thodin O Gondrafn like this.
  3. |LG|Judge

    |LG|Judge Lieutenant

    Joined:
    Sep 9, 2015
    Messages:
    19
    Likes Received:
    1
    Hallo Astic, kleine Frage kann es sein das der ScriptMod, auf den Playfield Server direkt zugreifft ? ( abghänig der Aktuallisierungsrate ? ). Warum ich frage, wir hatte letztens ein PlayfieldServer der sich komplett aufgehängt hat.

    Wollte fragen ob der Script mod da irgendwie eingreiffen kann. ( unter Umständen durch nicht korrekt konfiguriert )
     
    #223
  4. Thodin O Gondrafn

    Thodin O Gondrafn Lieutenant

    Joined:
    Mar 14, 2019
    Messages:
    55
    Likes Received:
    14
    @Judge: Jedenfalls reagieren die Scripte auf die admin.yaml. Ich weiss, war nicht die eigentliche Frage... ;)
     
    #224
    Germanicus likes this.
  5. me777

    me777 Commander

    Joined:
    Aug 18, 2020
    Messages:
    406
    Likes Received:
    138
    If i may add what litle insight i have:

    The mod runs on (each of) the playfieldserer, also the scripts are executed from there.
    normally a userscript should not crash the server, but a savegame script can (as i experianced)
    Also when the server has too litle resources a playfield server can crash / useres get wired disconnects wit sync errors. (and the scrips also need resources increasing this problem)

    ganz übersehen das die frage deutsch war XD

    das mod und die scripte laufen auf dem playfieldserver.
    die benutzer (lcd) scripte sollten den server nicht crashen, mit savegamescripts kann man das schon bewirken.
    wenn die serverleistung nicht reicht passieren crashes/disconnects und die scripte brauchen ja auch leistung.
     
    #225
  6. |LG|Judge

    |LG|Judge Lieutenant

    Joined:
    Sep 9, 2015
    Messages:
    19
    Likes Received:
    1
    Also ich hab einen sehr leistungsstarken Server, daran liegt es nicht ;) Wir stellten nur fest das sich ein Playfield server aufgehängt hatte. daruch das sich die Playfielddatei noch in use war, könnte ein spieler der daraufhin gejoint ist nicht auf besagtes Playfield landen, ergro hat der Playfieldserver ein neues Playfield generiert. -wipe- in diesemfall da in diesem neuen Playfield die strukturen nicht mehr enthalten waren. Und deswegen suchen wir nach dem fehler, den neben Eden haben wir nur den ScriptMod drauf =)
     
    #226
  7. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,085
    Likes Received:
    731
    Die Datei liegt in der Hoheit des PF Servers, da hat die Mod keine Verbindung zu. Dazu kommt das ein PF Server mehrere Playfields bearbeitet und die Frage währe was mit den anderen im selben PF Serverprozess passiert ist?
    Die Mod greift nur über die API zu und setzt alles daran - bei Userscripten - nichts zu tun was dinge blockieren könnte. Savegamescript haben natürlich die ganze API mit allen (auch blockierenden Funktionen im Zugriff und können auch per Endlosschleifen den Prozess blockieren).
    Doch höre ich das Fehlerbild zum ersten mal das eine PF Datei blockiert ist und dann eine neue erzeigt wird (P.S: mit welchem Namen wurde die denn dann erzeugt???)
     
    #227
  8. |LG|Judge

    |LG|Judge Lieutenant

    Joined:
    Sep 9, 2015
    Messages:
    19
    Likes Received:
    1
    Hallo ASTIC,

    Er hat das Playfield mit dem exakten gleichen namen erzeugt, wodurch dann das Orginiale Playfield überschrieben wurde. Wie das jedoch zustande kam ist mir unklar.
     
    #228
  9. Wakfu

    Wakfu Commander

    Joined:
    Apr 19, 2017
    Messages:
    47
    Likes Received:
    32
    new to this, are these scripts compatible with your client in multiplayer? dont break anything?
     
    #229
  10. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,085
    Likes Received:
    731
    Client in MP without EAC is not recommended !!!!!
    The mod has to be installed on the server,
     
    #230
  11. Tempus X

    Tempus X Ensign

    Joined:
    Mar 1, 2021
    Messages:
    11
    Likes Received:
    5
    I'm having difficulty using the EmpyrionScripting mod as well. Up front, I'm not very sure how to actually use the functions I'm trying to use. I downloaded ASTIC's empyrion scripting from Git and installed it into the egs / mods / empyrionscripting folder as instructions said. and it loads just fine in SP (Project Eden). But I can't make it work.

    I have two LCDs, one is named "Script:DestructInfo" and a second just named "DestructInfo". tied to a signal on the main panel called "Decon. Info". The idea was to have the ability to toggle the two LCDs on/off to use the script. In a workshop ship (perses refit) this works just fine. but in my own personal ship, it does not, which means I'm doing something stupid and do not know what. Here's the ingame snap of both in/out screens in my ship. The ID in the green box is my own ship ID< not the ID of the ship i was attempting to recycle down into parts. When I spawned the workshop ship, and flip the switch, that one works perfectly.
    Any suggestions on how to make the deconstruct / recycle scripts work properly from an on/off control panel trigger?

    script:DestructInfo* panel:
    {{#entitiesbyname '*'}}
    {{#each .}}
    {{Name}}:
    {{#recycle . 'Finished Products}}
    min: {{MinPos}}
    max: {{MaxPos}}
    current X: {{X}}
    current Y: {{Y}}
    current Z: {{Z}}
    TotalBlocks: {{TotalBlocks}}
    CheckedBlocks: {{CheckedBlocks}}
    RemovedBlocks: {{RemovedBlocks}}
    {{else}}
    - {{/recycle}}

    {{/each}}
    {{/entitesbyname}}


    Also, recycle seems to take everything down to the ingot level and destruct just saves things as Alien Block Corner, etc and doesnt always give the full RMB option to re-use... is there another option that will reduce all blocks back to their base RMB option? ie taking a corner and returning it back to a full RMB option cube? Right now I'm recycling and just making them again. The deconstruct seemed good but i had to run it through a factory of deconstructors and constructores to get the blocks back to basic.
     

    Attached Files:

    #231
  12. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,085
    Likes Received:
    731
    The recycle script command can only process what is in the ECF files for the blocks/items - everything that comes to nothing there is discarded. See it simply as "processing residues" which are caused by the automatic and which are the price for this automatic ;-)
     
    #232
  13. bbk.3164

    bbk.3164 Commander

    Joined:
    May 17, 2016
    Messages:
    235
    Likes Received:
    87
    I am very much THANK YOU to the author for this mod (script) ... BUT ...:
    - on your screen - all information is shown ON THE HOLOGRAPHIC SCREEN (!)
    - but for me - the holographic screen DOES NOT WORK (!)
    i applied this script FOR BASE, result:
    + on regular LCD screens == WORKS
    - on the holographic screen == DOES NOT WORK (!)

    Why is that ??

    -------------------------

    ... I changed the name of the LCD screens - from ShipInfo -> to BazaInfo ... IT WORKED))

    Now there are a few other questions left :

    1) HOW to change the "transparency" of the bar scale - the part that remains unpainted (half-transparent) ??
    2) WHY do you have the color of the inscriptions on the screen - GREEN, and mine - WHITE (?!)
    3) how to move the label?
    For example: the line has an inscription:
    88.5% = 125/200
    the "=" symbol is very close to the number (!)
    I want the caption to look like this:
    88.5 % = 125 / 200
    oops - the system does not display SPACEBARS
    I'll write it differently:

    88.5 (space)% (space) (space) (space) 125 (space) (space) / (space)(space) 200


    4) HOW to make an automatic change of the text color when the "fuel remaining" value drops to the minimum level (10%) = I want the color RED ... from 50 to 11% = the color YELLOW

    How do I do this in code ??
     
    #233
    Last edited: Mar 27, 2021
    Ephoie likes this.
  14. Tempus X

    Tempus X Ensign

    Joined:
    Mar 1, 2021
    Messages:
    11
    Likes Received:
    5
    ASTIC - That is, a very fair trade off, I think, all things considered for the recycle/deconstruct script. I'm still happy with that because it means I do not need to sit here for hours to salvage a POI/Ship I take over. Two extra automated steps for my constructor farm is easy :)

    Can you help with making it work, reliably, in SP? I'm not sure how to make it work from a command in the console. And when I attempted to make it into an LCD I could use (like one guy did in the workshop), it never works. If I spawn his workshop ship blueprint, then it works for his ship, but not mine. I'm not sure what I am doing wrong =( I think I'm perhaps very bad with Empyrion and a VERY large amount I do not understand (like ship building, signals, etc). Quite confusing for a new user :)
     
    #234
  15. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,085
    Likes Received:
    731
    In SP you have installed it in the mods folder similar to a server BUT mods are only loaded by EGS when you turn off the EAC ;-)
     
    #235
    Ephoie likes this.
  16. Tempus X

    Tempus X Ensign

    Joined:
    Mar 1, 2021
    Messages:
    11
    Likes Received:
    5
    Yep! Steam \ Common \ EGS \ Content \ Mods \ EmpyrionScripting
    I have not tried to install on a server yet (I only play co-op sometimes).

    If I use my own CV, it does not work. If I use the trigger that was used in https://steamcommunity.com/sharedfiles/filedetails/?id=2183276347 then it works fine. So I think I have done something incorrectly. But, to be fair, I do not understand signal logic and may have did something wrongly when I set it up in my ship :)
     
    #236
  17. Zernon

    Zernon Ensign

    Joined:
    Mar 31, 2021
    Messages:
    2
    Likes Received:
    0
    NewGame_4_2021-03-30_21-37-42.png Hi first of all thanks ASTIC for the awesome mod! I love the scripts, and am learning a lot from reading others. So I have questions, and if I am posting this in the wrong spot please forgive me. I am trying to use 2 different scripts that I just love. One is Dynamic Transfer/Sorting System. I noticed an extra {{/test}}} in the script. I assume there should be an even number of {{/test}} and {{test}}, although I may be wrong. I removed it on my script and it still will only sort to about half of my containers. One for each ingot, 1 for all ores (goes to furnace) 1 for components, 1 for med supplies, 1 for each Personal Weapon, 1 hv ammo, cv ammo .... you get the point. Also it will not sort to the Constructor Input as mentioned. Not a huge issue, just a bug I have noticed. Second I can not get Recycle to work. It will hang on the Core. I have let it run for 3 hours on a test. I have tried both creative, and survival. I get an error that it can not enumerate .... Not sure what that is (not a scripter or coder) I just dable. I can post the code for Dynamic Transfer if you want and show where the extra {{/test}} is. Its the last one before all the if checks at the bottom. There are 2 in a row, and the last one doesn't seem to close anything. Once again Awesome MOD!! Love all the scripts! Especially the multi hud!
     
    #237
    Last edited: Mar 31, 2021
  18. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,085
    Likes Received:
    731
    @Zernon
    The "test" command must always appear in the block {{#test ...}} ... {{/test}} , which script on the demo CV has this error?
    Recycle/Destruct both leave the core and this has to be dismantled by hand.
    - on the one hand, I don't dare to remove it using a script
    - on the other hand, this may only be removed at the end, since access to this structure is no longer "allowed" afterwards
    - If this breaks away by itself due to the SI (Structural Integrity), the whole process also stops
     
    #238
  19. Zernon

    Zernon Ensign

    Joined:
    Mar 31, 2021
    Messages:
    2
    Likes Received:
    0
    Dynamic Transfer/Sorting System is the script that has the extra {{/test}}.



    {{fontsize 2}}{{~set 'F' '1'}}
    {{~set 'I' 'Input'}}{{set 'CI' 'Constructor Input'}}{{set 'O' 'Constructor Output'}}{{set 'U' 'Unsorted'}}
    {{~devices @root.E.S 'SorterDB'}}{{set 'DB' .0}}{{gettext .0}}{{split . '\n'}}{{set 'C' .}}{{/split}}{{/gettext}}{{/devices}}
    {{~#devicesoftype @root.E.S 'Container'}}{{#each .}}{{set 'T' ''}}{{set 'M' 0}}
    {{#split CustomName '-'}}{{set 'n' .}}{{/split}}
    {{~#test @root.data.n.0 in (concat @root.Data.I ',' @root.Data.O ',' @root.Data.U)}}
    {{~#items @root.E.S CustomName}}{{set 'G' @root.data.U}}
    {{#each @root.data.C}}{{#split . ':'}}{{~#test ../../Id in .1}}{{~#test @root.data.CI neq .0}}{{set 'G' .0}}{{/test}}{{/test}}{{/split}}{{/each}}
    {{~#test ../CustomName neq @root.Data.G}}
    {{~move this @root.E.S (concat @root.Data.G '*')}}{{set 'M' 1}}
    {{set 'T' (concat @root.data.T '
    ' ../Name ' - ' Count '<indent=55%>❲' Source ' ➤ ' Destination '❳</indent>')}}
    {{/move}}{{/test}}{{/items}}{{else}}{{set 'x' ''}}
    {{~#each @root.Data.C}}{{#split . ':'}}{{#test @root.data.n.0 eq .0}}{{set 'x' .1}}{{/test}}{{/split}}{{/each}}
    {{~items @root.E.S CustomName}}{{#test Id in @root.data.x}}{{else}}{{set 'x' (concat @root.data.x Id ',')}}{{/test}}
    {{~#test Id in @root.data.CID}}
    {{~move this @root.E.S (concat @root.Data.CI '*') 50}}{{set 'M' 1}}
    {{set 'T' (concat @root.data.T '
    ' ../Name ' - ' Count '<indent=55%>❲' Source ' ➤ ' Destination '❳</indent>')}}
    {{/move}}{{/test}}{{/test}}{{/items}}
    {{~#if @root.data.x}}{{#if @root.data.n.1}}{{else}}{{set 'D' (concat @root.data.D @root.data.n.0 ':' @root.data.x "
    ")}}{{/if}}{{/if}}{{#test @root.data.n.0 eq @root.data.CI}}{{set 'CID' @root.data.x}}{{/test}}{{/test}}
    {{#if @root.data.M}}
    <align=center><color=#FFD><size=120%>Transfer - {{datetime 'HH:mm'}}</size></color></align>
    {{@root.data.T}}
    <align=center><color=#FFD><size=4>{{bar 1 0 1 10 '╼╾'}}</size></color></align>
    {{/if}}{{/each}}{{/devicesoftype}}
    {{settext @root.Data.DB @root.Data.D}}


    The red underlined Bold Italics {{/test}} Seems to be the extra one if I am right, or thats the last one in line. I did my best to go through it an look so I may be worng. There are a total of 17 "{{test}} {{/test}} which means one extra as far as I can tell. One again I only dabble with coding so I may be wrong. Just something I noticed. Also this cod causes a bit of lag. Love it though. I get one input container and just dump everthing there and let the sorter do the trick... As far as the recycle bug, turns out my HD was crashing, and losing data... So that issue is fixed.
     
    #239
  20. Bloodfire2k

    Bloodfire2k Ensign

    Joined:
    May 12, 2021
    Messages:
    14
    Likes Received:
    0
    Hi,

    also ich bin echt am verzweifeln. Habe vor 2 Tagen das Script gefunden und schon einiges probiert und auch super hin bekommen. Allerdings schaffe ich es nicht die Übersicht der Barren oder Erze in meiner Basis anzeigen zu lassen. Kann mir jemand sagen was ich falsch mache? Er zeigt bei mir die id und eine 0 an bei jeder Ressource, aber weder einen Namen noch die Menge?

    Hi, So I'm really desperate. I found the script 2 days ago and tried a lot and got it great. However, I am unable to display the overview of the bars or ores in my base. Can anyone tell me what I am doing wrong? It shows me the id and a 0 for every resource, but neither a name nor the amount?
     
    #240

Share This Page