[mod] Empyrion Scripting Mod

Discussion in 'Empyrion API' started by ASTIC, May 25, 2019.

Tags:
  1. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,094
    Likes Received:
    735
    #301
  2. me777

    me777 Commander

    Joined:
    Aug 18, 2020
    Messages:
    406
    Likes Received:
    139
    Ich habe Probleme mit C# Scripten auf meinem server, sowohl ingame (lcd demo obere etage) als auch savegame scripte.
    Eben getestet: in singelplayer creative macht das lcd demo auch die Fehlermeldung, auf allen ausgabe lcds folgendes:
    Code:
    Microsoft.CodeAnalysis.SyntaxTree Microsoft.CodeAnalysis.CSharp.SyntaxFactory.ParseSyntaxTree(Microsoft.CodeAnalysis.Text.SourceText,Microsoft.CodeAnalysis.ParseOptions,string,System.Collections.Immutable.ImmutableDictionary`2<string, Microsoft.CodeAnalysis.ReportDiagnostic>,System.Nullable`1<bool>,System.Threading.CancellationToken) 20:40:03
    kann es am neuen EGS update von heute liegen?
    nach dem update ging mein script nicht mehr und auch ein update auf das neueste es release hat leider nicht geholfen.
     
    #302
  3. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,094
    Likes Received:
    735
    Ja, es liegt am Update :-( - ich schaue mal nach...

    30.01.2022
    Unfortunately I haven't found a way to get this working again after Eleon's changes with 1.7.2 - but I'll keep trying to find a solution.

    06.02.2022
    Still no luck so far :-(
    I create a bug message, maybe the developers know what changed between 1.7.1 an 1.7.2
    https://empyriononline.com/threads/api-bugs.10252/page-8#post-448420

    08.02.2022
    Unfortunately, it is up to Eleon to correct this since I can't do anything here.... her playfield server code is the problem here:
    i added a simple demo mod for this
    https://empyriononline.com/threads/api-bugs.10252/page-8#post-448420
     
    #303
    Last edited: Feb 8, 2022
  4. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,094
    Likes Received:
    735
    #304
  5. _DefLock_

    _DefLock_ Ensign

    Joined:
    Jun 15, 2022
    Messages:
    3
    Likes Received:
    0
    @ASTIC
    Moin, ich würde gerne mit dem Tranfer/Move Script mehrere bestimmte items in eine andere Kiste moven, wie muss ich die Zeile umschreiben im Script?

    Diese Zeile ist gemeint: {{#test Id eq 402, 1395}}. ich habe es mit eq probietr und wollte mit Komma weitere id's einfügen ohne Erfolg, ich habe keine Kenntnisse in Sachen programmieren weshalb ich mich nach langem rumprobieren jetzt hier melde.


    {{fontsize 4}}
    {{#items E.S 'BoxA'}}
    {{#test Id eq 402, 1395}}
    {{move this @root.E.S 'BoxB' 100}}
    {{SourceE.Name}}:{{Source}}->
    {{~DestinationE.Name}}:{{Destination}}
    {{format Count '{0,5}'}} : {{i18n Id}}
    {{/move}}
    {{else}}
    {{move this @root.E.S 'BoxB'}}
    {{SourceE.Name}}:{{Source}}->
    {{~DestinationE.Name}}:{{Destination}}
    {{format Count '{0,5}'}} : {{i18n Id}}
    {{/move}}
    {{/test}}
    {{/items}}
     
    #305
  6. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,094
    Likes Received:
    735
    https://github.com/GitHub-TC/EmpyrionScripting#bedingungen
    Code:
    {{#test Id in '402,1395'}}
    https://github.com/GitHub-TC/EmpyrionScripting#ausgabe-aller-erze-in-der-basisschiffhvcv
     
    #306
  7. _DefLock_

    _DefLock_ Ensign

    Joined:
    Jun 15, 2022
    Messages:
    3
    Likes Received:
    0
  8. etmoonshade

    etmoonshade Ensign

    Joined:
    Aug 18, 2020
    Messages:
    27
    Likes Received:
    21
    So I'm running the newest version of the scripting mod (the one from 12 October - doesn't look like the version number changed?) and it's spamming up my logs and console with errors attempting to do something with the Configuration.json file.

    One error I get near the top of the log is this - I don't know that it's related, but it does seem odd (I checked - the file doesn't exist where it's looking for it, or in any of the releases I looked at back to one for 1.7.2)
    Code:
    21-21:13:18.376 16_13 -ERR- {EmpyrionScripting} CurrentDomain_AssemblyResolve: (E:\Steam\steamapps\common\Empyrion - Galactic Survival\Content\Mods\EmpyrionScripting\Assembly-CSharp.XmlSerializers.dll) Unity Root Domain:Assembly-CSharp.XmlSerializers, Version=4.1.1.0, Culture=neutral, PublicKeyToken=null for  -> System.IO.FileNotFoundException: Could not load file or assembly 'E:\Steam\steamapps\common\Empyrion - Galactic Survival\Content\Mods\EmpyrionScripting\Assembly-CSharp.XmlSerializers.dll' or one of its dependencies.
    File name: 'E:\Steam\steamapps\common\Empyrion - Galactic Survival\Content\Mods\EmpyrionScripting\Assembly-CSharp.XmlSerializers.dll'
      at (wrapper managed-to-native) System.Reflection.Assembly.LoadFrom(string,bool,System.Threading.StackCrawlMark&)
      at System.Reflection.Assembly.LoadFrom (System.String assemblyFile) [0x00002] in <6073cf49ed704e958b8a66d540dea948>:0
      at EmpyrionScripting.CsCompiler.CsCompiler.CurrentDomain_AssemblyResolve (System.Object sender, System.ResolveEventArgs args) [0x00052] in <a005839ace1d42ce933bf10b7847637d>:0 
    It's also spamming the following in the logs (and console,) roughly once or twice a second:
    Code:
    21-21:14:06.107 16_14 -LOG- {EmpyrionNetAPITools} ConfigurationManager load 'E:\Steam\steamapps\common\Empyrion - Galactic Survival\Client/../Saves/Games/NewGame_16\Mods\EmpyrionScripting\Configuration.json'
    21-21:14:06.107 16_14 -LOG- {EmpyrionNetAPITools} ConfigurationManager load 'E:\Steam\steamapps\common\Empyrion - Galactic Survival\Client/../Saves/Games/NewGame_16\Mods\EmpyrionScripting\Configuration.json'
    21-21:14:06.108 16_14 -LOG- {EmpyrionScripting} DB ConnectionString:Data Source="E:\Steam\steamapps\common\Empyrion - Galactic Survival\Client/../Saves/Games/NewGame_16\Mods\EmpyrionScripting\..\..\global.db";Mode=ReadOnly;Cache=Shared
    21-21:14:06.108 16_14 -LOG- {EmpyrionScripting} CheckAddOnAssemblies: #0
    21-21:14:06.108 16_14 -LOG- {EmpyrionScripting} DB ConnectionString:Data Source="E:\Steam\steamapps\common\Empyrion - Galactic Survival\Client/../Saves/Games/NewGame_16\Mods\EmpyrionScripting\..\..\global.db";Mode=ReadOnly;Cache=Shared
    21-21:14:06.108 16_14 -LOG- {EmpyrionScripting} CheckAddOnAssemblies: #0
    21-21:14:06.109 16_14 -LOG- {EmpyrionNetAPITools} ConfigurationManager save 'E:\Steam\steamapps\common\Empyrion - Galactic Survival\Client/../Saves/Games/NewGame_16\Mods\EmpyrionScripting\Configuration.json'
    21-21:14:06.109 16_14 -LOG- {EmpyrionNetAPITools} ConfigurationManager save 'E:\Steam\steamapps\common\Empyrion - Galactic Survival\Client/../Saves/Games/NewGame_16\Mods\EmpyrionScripting\Configuration.json'
    21-21:14:06.110 16_14 -LOG- {EmpyrionNetAPITools} ConfigurationManager save 'E:\Steam\steamapps\common\Empyrion - Galactic Survival\Client/../Saves/Games/NewGame_16\Mods\EmpyrionScripting\Configuration.json' error System.IO.IOException: Sharing violation on path E:\Steam\steamapps\common\Empyrion - Galactic Survival\Saves\Games\NewGame_16\Mods\EmpyrionScripting\Configuration.json
      at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <6073cf49ed704e958b8a66d540dea948>:0
      at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) [0x00000] in <6073cf49ed704e958b8a66d540dea948>:0
      at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions)
      at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00055] in <6073cf49ed704e958b8a66d540dea948>:0
      at System.IO.StreamWriter..ctor (System.String path, System.Boolean append) [0x00008] in <6073cf49ed704e958b8a66d540dea948>:0
      at (wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string,bool)
      at System.IO.File.CreateText (System.String path) [0x0000e] in <6073cf49ed704e958b8a66d540dea948>:0
      at EmpyrionNetAPITools.ConfigurationManager`1[T].Save (System.Boolean changeDetection) [0x000df] in <9d4d71602ad64a66a86796d4d68e5a70>:0
    21-21:14:06.110 16_14 -LOG- {EmpyrionNetAPITools} ConfigurationManager saved 'E:\Steam\steamapps\common\Empyrion - Galactic Survival\Client/../Saves/Games/NewGame_16\Mods\EmpyrionScripting\Configuration.json'
    Any insight into what's broken here? It looks like something's putting a file lock on the configuration.json, but I deleted the mod configuration folder from my savegame and let it recreate, just to make sure the lock wasn't from something I did.

    Full (zipped) log is attached.
     

    Attached Files:

    #308
  9. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,094
    Likes Received:
    735
    It looks like you have installed the MOD twice - can you please check that you have installed it from your
    Empyrion - Galactic Survival\Content\Mods
    directory and unpack the scripting mod fresh from the ZIP file.

    PS: Unfortunately I can't open your attached log file because since the reconfiguration of the forum the file download is always forbidden with "Permission denied".
     
    #309
  10. etmoonshade

    etmoonshade Ensign

    Joined:
    Aug 18, 2020
    Messages:
    27
    Likes Received:
    21
    I'll note that I'm running the experimental version of Empyrion - would've been obvious from the logs, but I should say it out loud now that I think of it - it might be relevant here.

    Doing some further testing, I'll also note that reverting to the 11.0.0 version of EmpyrionScripting (from 26 June) eliminates the error and appears to work fine (or at least, the "idle" animations I have on my recycler LCDs are playing - I didn't do any extensive testing here. Edit: Yup, everything seems to work fine with the 11.0.0 version.)

    Let's try the logs like this:
    https://www.dropbox.com/s/gikoophyogw9nrz/ClientLogs-etmoonshade.zip?dl=0


    The small log is after I removed the existing EmpyrionScripting folder from Empyrion - Galactic Survival\Content\Mods. I ran the game, and the log doesn't appear to be picking up anything from EmpyrionScripting.

    The larger (and more recent) log is after I drag-and-dropped the folder from 7zip over to the above directory. The issue comes back.

    A search through my entire EGS folder only shows the one EmpyrionScripting.dll file, which was recently downloaded:
    Code:
    Search Criteria
    
    File name:        EmpyrionScripting.dll
    Containing text:
    Look in:          E:\Steam\steamapps\common\Empyrion - Galactic Survival\
    
    Search Statistics
    
    Found:      1 item (350.00 KB)     
    Checked:    665,414 items (21.35 GB)
    Status:     Completed (14 secs)     
    Completed:  2022-10-22 15:37:31     
    
    Name                  Location                                                                               Modified            Size   Type                  Hits
    EmpyrionScripting.dll E:\Steam\steamapps\common\Empyrion - Galactic Survival\Content\Mods\EmpyrionScripting\ 2022-10-12 22:44:41 350 KB Application extension
    
     
    #310
    Last edited: Oct 23, 2022
  11. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,094
    Likes Received:
    735
    I have tryed some changes with the https://github.com/GitHub-TC/EmpyrionScripting/releases/tag/11.1.6 on my machine this solved the problem in SP
     
    #311
    etmoonshade likes this.
  12. Roadruner

    Roadruner Ensign

    Joined:
    Jul 5, 2022
    Messages:
    1
    Likes Received:
    0
    Hallo

    Ich wollte grade Mahl schnell ein Skript basteln um Kisten Inhalte vom Schiff zur Base zu schieben leider ohne Erfolg :/


    {{#getswitch @root.E.S 'sw_CargoOut'}}
    {{#if SwitchState}}
    {{#Items E.S 'Box-CargoOut'}}
    {{#entitybyid @Root '6822'}}
    {{Name}}:{{id}}
    {{move ../../. S 'CargoIn*'}}
    {{SourceE.Name}}:{{Source}}
    -> {{~DestinationE.Name}}:{{Destination}}
    {{format Count '{0,5}'}} : {{i18n Id 'Deutsch'}}
    {{/move}}
    {{/each}}
    {{/entitybyid}}
    {{/Items}}
    {{/if}}
    {{/getswitch}}


    Als Ergebnis erschien :

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

    Könnte mir wer verraten was ich falsch mache ? :(
     
    #312
  13. DerTroglodyt

    DerTroglodyt Ensign

    Joined:
    Nov 29, 2022
    Messages:
    1
    Likes Received:
    0
    Mod funktioniert einwandfrei. Allerdings rutschen meine FPS von 60 auf 2 und das Spiel laggt immens, sobald ich auf den Ausgabemonitor meines Testscripts schaue. Wenn ich wegschaue gehen die FPS wieder auf 60.
    Passiert auch, wenn das Script-LCD leer ist.
    Kein Unterschied, ob ScriptLCD an/aus.
    Wenn Ausgabe-LCD aus -> 60fps, kein Lag

    Mache ich etwas falsch?

    SP, Reforged Eden, Empyrion 1.8

    Das Script scheint zu oft zu laufen. Ich sehe bei Ausgabe der Uhrzeit jede einzelne Sekunde. Im Tutorialvideo updated das Display nur etwa alle 4 Sekunden.

    Problem gefunden: Mit normalem Monitor als Ausgabe läuft alles wunderbar. Das Problem tritt nur auf, wenn ich auf einem LCD-Projector ausgebe.
     
    #313
    Last edited: Nov 29, 2022
  14. Mycroft_Groks

    Mycroft_Groks Lieutenant

    Joined:
    Aug 17, 2018
    Messages:
    51
    Likes Received:
    8
    Astic,
    Is it possible to add the ability to use a salvage core with the decon scripts? I get an error message rigft now when I use one. 'Wrong Core type'.
     
    #314
  15. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,094
    Likes Received:
    735
    Can this core keep the structure completely "alive"? That is, can you still access the structure via P or is the structure seen from the game without a "real" core. Because without the structure being "alive" I cannot assign it to a faction etc. and release it for dismantling.
     
    #315
  16. Mycroft_Groks

    Mycroft_Groks Lieutenant

    Joined:
    Aug 17, 2018
    Messages:
    51
    Likes Received:
    8
    Yes, it works just like a normal core, but can be picked up with the F key. RE introduced it in 1.8.
     
    #316
  17. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,094
    Likes Received:
    735
    #317
    Last edited: Dec 27, 2022
    Mycroft_Groks likes this.
  18. Shadowpheonix

    Shadowpheonix Lieutenant

    Joined:
    May 19, 2022
    Messages:
    46
    Likes Received:
    12
    Any chance you could post an example of the HarvestCoreTypes configuration?

    I cannot seem to get it to work - no matter what values I put in the Configuration.json, the script display always reports "No core 'Core-Recycle-1055' found on 1055 wrong type 2773" and nothing is salvaged.

    I am running Empyrion Scripting v11.1.16. The block name according to Reforged Eden's BlocksConfig.ecf is Eden_CoreSalvage, and the debug info in game tells me the block ID is 2773 (which matches what the script error shows).

    I have made changes to the Configuration.json for the Gardeners entry to allow additional consoles and the GardenerSalary entry to change the gardener cost, and those changes are working perfectly for me so I am reasonably certain I am editing the correct file.

    I am completely exiting Empyrion, editing the file, then relaunching Empyrion any time I make a change to EmpyrionScripting's Configuration.json.



    Edit: After further testing, I am convinced the HarvestCoreTypes entry in Configuration.json is not actually working. I have submitted a bug report on the EmpyrionScripting GitHub site.
     
    #318
    Last edited: Jan 6, 2023
    ASTIC likes this.
  19. Mycroft_Groks

    Mycroft_Groks Lieutenant

    Joined:
    Aug 17, 2018
    Messages:
    51
    Likes Received:
    8
    I've noticed that when using this script to fill a pentaxid tank


    {{/fill}}
    {{#fill this @root.E.S 'Pentaxid' 100}}
    Pentaxid: {{SourceE.Name}}:{{Source}}->
    {{~DestinationE.Name}}:{{Destination}}
    {{format Count '{0,5}'}} : {{i18n Id}}
    {{datetime}}
    {{/fill}}

    It will not fill up the anti-matter tank from RE. It's kinda hard to jump the max distance with the vanilla pentaxid tank as its capacity isn't high enough and even with volume/mass turned off, the script won't fill passed 100% capactity. Is there a way we can get the ID for the Antimatter tank recognized as the ship's pentaxid tank? The ID for the Antimatter tank is 2707.
     
    #319
  20. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,094
    Likes Received:
    735
    You can use the "move" command with a named pentaxid tank
     
    #320

Share This Page