[MOD EXT] Empyrion Scripting - Scripts

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

  1. FelixRuss

    FelixRuss Ensign

    Joined:
    Jul 23, 2024
    Messages:
    4
    Likes Received:
    0
    Your version must be downloaded; it won’t be possible to run it on a dedicated server?
     
    #861
  2. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    #862
    Ephoie likes this.
  3. Shadowpheonix

    Shadowpheonix Lieutenant

    Joined:
    May 19, 2022
    Messages:
    46
    Likes Received:
    12
    What happens when you attempt to download it from the forum?
     
    #863
  4. Shadowpheonix

    Shadowpheonix Lieutenant

    Joined:
    May 19, 2022
    Messages:
    46
    Likes Received:
    12
    #864
  5. FelixRuss

    FelixRuss Ensign

    Joined:
    Jul 23, 2024
    Messages:
    4
    Likes Received:
    0
    #865
  6. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    Yes, all Mods are only have to installed/copied on the dedicated server.
    The client have nothing to do.

    It is even bad/problematic if mods are also installed on the client
     
    #866
    Ephoie likes this.
  7. me777

    me777 Commander

    Joined:
    Aug 18, 2020
    Messages:
    405
    Likes Received:
    138
    Output of Autominers with the deposit type:
    https://steamcommunity.com/sharedfiles/filedetails/?id=3300949782

    custom db Querry (add to Configuration.json in savegame)
    Code:
          "TerrainPlaceables2": {
            "Description": "Provides the data of the TerrainPlaceables of the player and the faction with resource type",
            "CacheQueryForSeconds": 600,
            "Query": "\r\nSELECT * FROM TerrainPlaceables\r\nJOIN PlayfieldResources ON (PlayfieldResources.pfid = TerrainPlaceables.pfid AND abs(PlayfieldResources.blockx - TerrainPlaceables.blockx) <= 20 AND abs(TerrainPlaceables.blockz - PlayfieldResources.blockz) <= 20)\r\nJOIN Entities ON TerrainPlaceables.entityid = Entities.entityid\r\nJOIN Playfields ON TerrainPlaceables.pfid = Playfields.pfid\r\nJOIN SolarSystems ON SolarSystems.ssid = Playfields.ssid\r\nWHERE (isremoved = 0 AND ((facgroup = 1 AND facid = @FactionId) OR (facgroup = 1 AND facid = @PlayerId) OR (facgroup = 0 AND facid = @FactionId))) {additionalWhereAnd}\r\n"
          }
    Ingame LCD Script:
    Code:
    TerrainPlaceables:
    {{#db 'TerrainPlaceables2' 10 "" 'SolarSystems.name = @1' P.SolarSystemName}}
    {{#each .}}
    {{i18n TerrainPlaceables.blockid}}:
    {{~Entities.name}}:
    {{~i18n PlayfieldResources.blockid}}➠{{~Playfields.name}}
    {{/each}}
    {{/db}}
    (I still have the problem it only works if Structure is set to faction, ASTIC might help to fix this when he has time)(I stole his example including this problem)
     
    #867
    Ephoie likes this.
  8. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    Cool idea, may I include the SQL and the standard?
     
    #868
    Ephoie likes this.
  9. me777

    me777 Commander

    Joined:
    Aug 18, 2020
    Messages:
    405
    Likes Received:
    138
    Sure, its 90% stolen from you anyways ;)
    might need some fine tuning, but it did rather well in my tests.
     
    #869
    Ephoie and ASTIC like this.
  10. Antonio_RU66 2

    Antonio_RU66 2 Ensign

    Joined:
    Oct 9, 2023
    Messages:
    13
    Likes Received:
    1
    ASTIC, When stopping the server, this line appears in the console, I think it's an error in the code.
    Code:
    {EmpyrionScripting} StopScriptsEvent:System.NullReferenceException: Object reference not set to an instance of an object
      at EmpyrionScripting.EmpyrionScripting.Shutdown () [0x00012] in Z:\Projekte\C#\Empyrion\EmpyrionScripting\EmpyrionScripting\EmpyrionScripting.cs:348 
     
    #870
  11. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    #871
    Ephoie likes this.
  12. Melaywen

    Melaywen Ensign

    Joined:
    Feb 18, 2021
    Messages:
    6
    Likes Received:
    2
    #872
  13. me777

    me777 Commander

    Joined:
    Aug 18, 2020
    Messages:
    405
    Likes Received:
    138
    I remember there were special tags for the script lcd name, like run only so often and append output.
    Just I can't seem to find those in the documentation, and my old stuff sadly only lives in a old server savegame that would be a pain to run again...

    Someone can either tell me or point me to the docu?
     
    #873
  14. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    The LCD must have a special name like
    Code:
    Floor:0;-1;0;100%;l;0.6em
     
    #874
    Ephoie likes this.
  15. Melaywen

    Melaywen Ensign

    Joined:
    Feb 18, 2021
    Messages:
    6
    Likes Received:
    2
    #875
  16. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    #876
    Ephoie likes this.
  17. Melaywen

    Melaywen Ensign

    Joined:
    Feb 18, 2021
    Messages:
    6
    Likes Received:
    2
    Leider will es noch nicht.
    Zur Sicherheit:

    1. Version 13.2.2 (link von oben) genommen und hier entpackt: \gameserver\Content\Mods\EmpyrionScripting
    2. Die Floorplan (und ActiveAntenna) von deinem Link geladen und hier abgelegt: \gameserver\Saves\Games\OE Atlantis\Mods\EmpyrionScripting
    = Der Floorplan und der Scan aktualisieren sich nicht (Zeit unten bleibt auch stehen, Current Position wird nicht angepasst)
    = Andere Scripte laufen toptop (z.B. Fuel stand, Automatic disassembly usw)
    3. Habe noch die Configuration und sCompilerConfiguration aus dem Saves Verzeichnis genommen und Server neu gestartet
    =Keine Änderung
    4. Lokal probiert, geht eider auch nicht.

    Stimmen meine Pfade? Oder hab ich hier was übersehen / verdreht'

    Und vielen Lieben Dank für die Arbeit! Nach wie vor sehr nice wie schnell und gut du das machst! :D
     
    #877
    Ephoie likes this.
  18. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,074
    Likes Received:
    729
    So ähnlich müsste es aussehen

    [​IMG]

    Laufen die Scripte überhaupt oder ist bei der Installation der Mod etwas schief gelaufen?
    [​IMG]
     
    #878
    Ephoie likes this.
  19. Melaywen

    Melaywen Ensign

    Joined:
    Feb 18, 2021
    Messages:
    6
    Likes Received:
    2
    Ich habe meinen Fehler gerade entdeckt. Ich habe mir den Pfad aus der ReadMe kopiert und blind eingegeben...
    Aber das kleine /Scripts fehlt da, habe ich dank deinem Bild gerade bemerkt:)

    Jetzt läuft es!
    Vielen Dank :D
     
    #879
    Last edited: Aug 13, 2024
    Ephoie likes this.
  20. BloodAngel099

    BloodAngel099 Lieutenant

    Joined:
    Jan 24, 2023
    Messages:
    31
    Likes Received:
    2
    I am having problems with my Auto Fuel script. I was working on setting up an Auto Fueling script for my docked vessels when I noticed that it was using more fuel than it should have been. I ended up doing a test and found that when I completely unloaded a ships fuel tanks and let the script refill it it would take all of the fuel cells but only fill the ship to 50%. I repeated this test a few times with the same results. It taking all my fuel but only using around half of it. It had been awhile since I updated my scripting mod so I thought maybe that was my problem but now the script wont work at all. Is auto fueling not a thing any more?

    Here is one of the two scrips I am using but both have the same problem.

    <align=center><color=yellow><size=4>{{!Auto Fuel}}</size></color></align>

    {{#items E.S 'RSTCE1*'}}
    {{~set 'FillUp-RST' ''}}
    {{~set 'Amount' ''}}

    {{#test Id in '4314,4335,4421'}}
    {{~set 'FillUp-RST' 'Fuel'}}
    {{~set 'Amount' 100}}
    {{/test}}

    {{#test Id in '4176'}}
    {{~set 'FillUp-RST' 'Oxygen'}}
    {{~set 'Amount' 100}}
    {{/test}}

    {{#test Id in '4342'}}
    {{~set 'FillUp-RST' 'Pentaxid'}}
    {{~set 'Amount' 100}}
    {{/test}}

    {{#ok @root.Data.FillUp-RST}}
    {{~fill ../. @root.E.S @root.Data.FillUp-RST @root.Data.Amount}}
    {{datetime}}
    {{Source}} -> {{Destination}}
    {{format Count '{0,5}'}}:
    {{/fill}}
    {{/ok}}
    {{/items}}
    {{/items}}
     
    #880

Share This Page