Or is the "new line" not a simple \n but a full CRLF \r\n ? P.s. Note: Distinct removes duplicated entries Vielleicht kannst du auch so die Texte bereinigen sOutput = System.Text.Encoding.ASCII.GetString(System.Text.Encoding.ASCII.GetBytes(sInput)); Ggf. Musst du in der csconfiguration.json noch die entsprechenden Dinge freischalten
Thanks to you both. After being directed to additional characters I hit delete and backspace "everywhere" and got the first positiv result. I would assume this "magical" characters are the lcd-auto-inserted line breaks if the line hits the end of the lcd textbox. Maybe mixed up with some \cr and/or \lf relics. I especially used the '\n' character to avoid \cr\lf issues.... But Trim() does the job. I copied the polluted text back in the lcd and read it in with "Trim" and the string compare works flawless.
I noticed to gather rather quickly a bunch of "standard methods" I use in several c# savegamescripts again and again. Will there be (one shiny day ) the possibility to have libraries, includes or some sort of makro-handling to maintain such methods (with paramters and arguments) at one central place and just tell the script to load the actual one from this place? (Or maybe it is already and I don't notice it?!)
Ich habe das selber noch nicht ausprobiert aber in der Datei [EGS]Saves\Games\[SaveGame]\Mods\EmpyrionScripting\CsCompilerConfiguration.json kannst du in dem Abschnitt "AssemblyReferences" deine DLL hinzufügen und im Abschnitt "Usings" das using auf deinen Namespace eintragen. Dann kannst du in den SaveGame scripten das benutzen (für die anderen Scripte müsstest du noch die "erlaubten" Namen in die "SymbolPermissions" eintragen)
I had no luck upto now to use a .dll. I wrote a simple class and build a .dll: I copied the .dll to the save game path: (I tested the mod root path, too) I added the entries to the configuration like you said: (I tested the reference entry without the file extension, too) All savegamescripts do not run any more, probably with the same error which occurs at ingame scripts: In the ingame testscript is no call to my namespace at all. This message occurs even at an empty script. Do I have to set special dependencies in visual studio to build a suitable .dll? I choosed "C# ClassLibrary for .Net Standard" Or do I miss something else?
Please try this: Compile your DLL for .NET 4.6 AssemblyReferences add your DLL without the extension Masne Maybe your DLL have in the mod directory
I had to recreate a new project as "C# class library for desktop" to be able to select .Net 4.6: I corrected the configuration: And copied the new .dll to both directories: With the same result. I even restarted the server to prevent possible .dll loading issues. The empty script says:
Ok, habe zurzeit leider keine Idee mehr dazu. Ich bin ab dem Wochenende wieder zu Hause und werde das dann mal selber ausprobieren und sehen warum es nicht funktioniert.
Would it be possible to use IEntity.Position in combination with IStructure.GlobalToStructPos to determinate where a player is located on a structure? This would be really cool.
If you get that working let me know - I tried a while back to do the same with a docked sv on a cv. I wanted to work out the SV's position on the CV's internal coordinate grid so I could show which docking platform it was on/turn on landing lights. Tried a few variations with looking at the global position of both ships cores and comparing the offset with the offset of a light (on the landing pad) from the core. I had it partially work on a base as the offset never changed, but on a Cv as soon as the parent moved all the coordinates changed so abandoned it as impossible. Hope you have better luck
After the last mod update the configuration.json in the savegame folder seems to be ignored. I updated the mod files and deleted the configuration file in the savegame folder to see at which place the mod recreate it. Then I changed the savegame script intervall to 5000ms but the mod still cycles in 10000ms steps. Would you have a look, please?
With the new "InGame" info data you can also see the values of the mod in the game. With DetailedScriptsInfoData = true even per script as shown in the screenshot here. Version: https://github.com/GitHub-TC/EmpyrionScripting/releases/download/5.7.2/EmpyrionScripting.zip
Ich vermute du greift auf ein Device zu so das ein DeviceLock notwendig ist und damit Diese (zentrale) Einstellung benötigt einen Neustart des Spieles.
Ah, ok. Because even the Ids table in this file is changeable at runtime I assumed that this should be possible with this setting, too. I restarted the server and the new intervall settings is used, thanks. I uploaded my configuration file if you want to add my added groups to the standard file. The "Component" group is not nearly complete. I had no time until now to let my script pick the missing ids. But the other new groups should be complete by config file.
Hi ASTIC, I have a question about the deconstruct script. Would it be possible to change it to break it down to the mats, instead of the specific blocks? Thanks
It would of course be much more complex and time-consuming (and less error-prone) to analyze the blocks down to the recipes - but feasible. But actually you have the deconstructor for exactly that ;-)
Version 5.8.1: recycle & resourcesfor id https://empyriononline.com/threads/mod-ext-empyrion-scripting-scripts.92458/page-9#post-414709