[MOD EXT] Empyrion Scripting - Scripts

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

  1. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    Unfortunately no, because the API offers no functions for this
     
    #801
  2. UncleBadTouch

    UncleBadTouch Ensign

    Joined:
    Dec 19, 2023
    Messages:
    1
    Likes Received:
    1
    @ASTIC

    Is the Trigger Plate Teleport in your sample BP super buggie? I appears to work correctly in your BP. However, when I copy identically down to the LCD names, trigger plate name and sensor logic name, in to my CV, it doesn't work, at all. When I pull all the logic out except for the Dialog, it almost never pops up, but a couple of times in the beginning. Am I missing something more that needs to be done that is not mentioned in your displays? Also, the immediate teleport to pilot seat is the same result.

    And, the Debug output is blank.

    =[

    I am pulling my hair out.

    UPDATE:

    Never mind. Works now!!!! However, after 5hrs of trying to figure this out, I figured out that there is a top and bottom to the trigger plate. You have to make it flush with the level of the floor. You cannot rotate it to be a simple 3 inch step up to it.

    Would be SUPER kind of Eleon to disclose this information in the Trigger plate Detail Description......DOH!!!!!
     
    #802
    Last edited: Dec 22, 2023
    Sephrajin likes this.
  3. Sephrajin

    Sephrajin Rear Admiral

    Joined:
    Dec 22, 2017
    Messages:
    916
    Likes Received:
    2,918
    Yes that plate is super annoying... defaults to bottom side up. Like what?!

    Be warned, it can get a bit messy if you want every trigger to be a teleporter. (Multiple scripts)
     
    #803
  4. SolarTails

    SolarTails Ensign

    Joined:
    Jun 1, 2022
    Messages:
    5
    Likes Received:
    4
    Question. Is anyone else having severe delays with the scripts lately or know what may cause it? Basically, in the past script would update quickly. The Recycle/Deconstruct would be relatively quick due to the scripts updating at a good pace. Lately, scripts have been delaying more and more. For example: The Autofill Docked Ships script, when I turn it on, doesn't update and register that I turned it on for 10-30 seconds. In the past, it used to update within 1-2 seconds tops. Another example is, as a team, we could scrap a downed dreadnaught in a matter of minutes. Now, it can take up to a half hour. So we gave up trying after we core one.

    The game runs fine otherwise. I'm not seeing delays or lag anywhere else. Some playfields suffer this delay worse than others, but it's everywhere. I've tried reinstalling the mod fresh after clearing it out from the server, clearing cache, using EAH to find/clean old structures. I even rolled back the scripting mod to an older version that I knew worked, but that didn't help either, so I don't think it's the mod itself, but something in the save game perhaps? Hopefully something I can clean/clear up.

    Any help or tips would be greatly appreciated.

    Game: Dedicated MP Server
    Scenerio: Reforged Eden
    Max Players: Just 3 of us
    Scripts used: Deconstruct/Recycle
    Docked Ships
    Auto Fill Docked Ships
    Ship Stats (Fuel, Air, Pentax, Shields)
    Playfield Stats (Playfield name, type, Gravity, Temp Range, ect..)

    The three of us use the Autofill Docked Ships and Recycle/Deconstruct scripts, but only our Mothership/Carrier really deals with anything else, and that usually stays parked in our home system or at stars. We don't take that one into combat or salvage operations.

    Update: Our current playthrough isn't that old. IDs of ships are just hitting 300,000. But our old playthrough, ships are around 1,600,000. We just loaded our old playthrough and can verify that everything works fine on the old save game, but not on the current playthrough. Both old and current games are Reforged Eden.
     
    #804
    Last edited: Feb 1, 2024
  5. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    Set execution and performance of the scripts
    • "InGameScriptsIntervallMS": 2000,
      At what intervals is the script execution started in the background
    • "DeviceLockOnlyAllowedEveryXCycles": 10,
      Scripts that require a "DeviceLock" are only executed every X cycles
    • "SaveGameScriptsIntervallMS": 10000,
      At what intervals is the script execution of the savegamescripts started in the background
    • "UseEveryNthGameUpdateCycle": 10,
      Only every Nth GameUpdate call is used for script execution
    • "ScriptsSyncExecution": 2,
      How many scripts are executed per cycle in the GameUpdate
    • "ScriptsParallelExecution": 2,
      How many scripts are executed per cycle in background processing
     
    #805
    Xyberwolf and SolarTails like this.
  6. SolarTails

    SolarTails Ensign

    Joined:
    Jun 1, 2022
    Messages:
    5
    Likes Received:
    4
    Thank you! Adjusting those lines of code definitely helped. Scripts are running smoothly again. Thank you not only for your help, but all the hard work you do on this mod. I truly appreciate you.
     
    #806
    Xyberwolf, NeedMore and ASTIC like this.
  7. meigrafd

    meigrafd Ensign

    Joined:
    Jan 23, 2024
    Messages:
    6
    Likes Received:
    0
    Hallo.

    Gibt es mittlerweile die Möglichkeit Constructor via Script zu steuern?
     
    #807
  8. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    Noch nicht, ich hoffe das die Entwickler nach dem Launch des DLC zeit finden die API hierfür zu erweitern
     
    #808
  9. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    #809
    meigrafd likes this.
  10. meigrafd

    meigrafd Ensign

    Joined:
    Jan 23, 2024
    Messages:
    6
    Likes Received:
    0
    #810
  11. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    Ja wobei die dafür benötigten API Funktionen stehen zu auf einem dedicated server und nicht im SP zur verfügung
     
    #811
    meigrafd likes this.
  12. meigrafd

    meigrafd Ensign

    Joined:
    Jan 23, 2024
    Messages:
    6
    Likes Received:
    0
    Seit dem heutigen Update funktionieren manche Scripte nicht mehr, ein Harvest Script lief erst wieder als ichs neu ins LCD copy&pasted habe, ein weiteres will nach gleicher Prozedur nicht wieder anlaufen.
    Zudem taucht nach Durchlauf des ersten Harvest Scripts in der Console folgende Meldung auf:
    [​IMG]
     
    #812
  13. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    Mit der v1.11 war ein Update notwendig
    https://github.com/GitHub-TC/EmpyrionScripting/releases/tag/12.0.3
    im Multiplayer betrieb funktionieren die Harvestscripte. Die WeakReference Exceptions treten immer dann auf wenn ein Playfield entladen wird und sind in dem Kontext ok. Ob wir mit der v1.11 neue Probleme mit der API im SP Modus bekommen haben will ich natürlich nicht ausschließen, denn Eleon legt hier keinen Fokus drauf
     
    #813
    meigrafd likes this.
  14. meigrafd

    meigrafd Ensign

    Joined:
    Jan 23, 2024
    Messages:
    6
    Likes Received:
    0
    Ich hab leider ein Problem mit dem Harvest Script im MP was ich irgendwie nicht gelöst kriege :(

    [​IMG]

    Das dazugehörige Script:
    Code:
    {{#blocks E.S  11 157 -35 32 157 -27}}
        {{~#each .}}
    {{Id}} {{i18n Id}}
    X: {{~Position.X}} // Y: {{~Position.Y}} // Z:{{~Position.Z}}
    --
        {{/each}}
        {{~#harvest @root.E.S . 'Harvest Container 1' 9 157 -31 false}}
    Harvest:
    {{i18n Id}}➔ {{~i18n ChildOnHarvestId}} get {{DropOnHarvestCount}}: {{~i18n DropOnHarvestId}}
    --
        {{/harvest}}
    {{/blocks}}
     
    #814
    Last edited: Feb 9, 2024
  15. PYOGENESiS

    PYOGENESiS Ensign

    Joined:
    Apr 7, 2016
    Messages:
    3
    Likes Received:
    0
    Ich hätte mal eine generelle frage zur Performance auf Servern. Nehmen Scripte einfluss auf die Performance oder kann man dies auschließen?
     
    #815
  16. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    Wie JEDE Funktion die etwas macht benötigen auch die Scripte Zeit. Jedoch sind die Standardeinstellung so gewählt das der Einfluss möglichst gering ist. Man kann aber über die configuration.json selber auch noch die Parameter verändern - mehr Leistung für die Scripte oder mehr Leistung für das Spiel
     
    #816
  17. moy11

    moy11 Ensign

    Joined:
    Aug 28, 2022
    Messages:
    2
    Likes Received:
    0
    Respected ASTIC, after the DF update and the corresponding EmpyrionScripting update - 12.03 version 1.11 Dark Faction DLC - the scripts in my single-player game stopped working, even just {{DateTimeNow}} does not work. I tried to clear the cache, reboot, reinstall the game - it doesn't help
    Please tell me (or give me a link to the instructions) what needs to be done to make everything work?
     
    #817
    Last edited: Feb 14, 2024
  18. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    It works fine, i have tested it with SP (EAC must be off) and the scripts on the Vega AI running
     
    #818
    Last edited: Feb 14, 2024
  19. moy11

    moy11 Ensign

    Joined:
    Aug 28, 2022
    Messages:
    2
    Likes Received:
    0
    I checked it out. Thanks -It Worked.
     
    #819
    Last edited: Feb 14, 2024
  20. kkin形影

    kkin形影 Ensign

    Joined:
    Oct 17, 2022
    Messages:
    23
    Likes Received:
    0
    {{#blocks E.S -4 156 -44 -19 156 -65}}
    {{#harvest @root.E.S . '五楼a' -15 135 -41 true}}
    Harvest: {{i18n Id}}➔
    {{~i18n ChildOnHarvestId}}
    get {{DropOnHarvestCount}}:
    {{~i18n DropOnHarvestId}}
    {{/harvest}}
    {{/blocks}}


    {{harvest}} error Object reference not set to an instance of an object

    After the update, an error message appears and it cannot be run.
     
    #820
    Last edited: Feb 16, 2024

Share This Page