[MOD EXT] Empyrion Scripting - Scripts

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

  1. Lt.Fenix

    Lt.Fenix Lieutenant

    Joined:
    Aug 28, 2025
    Messages:
    42
    Likes Received:
    14
    How does this work?
    Do you name the ammo containers in the docked SV/HV's "Ammunition [something]" and also on the CV/BA the containers should be "Ammunition [something]"?
    Is there anything else you have to configure? Because the script doesn't seem to be working for me.
     
    #1041
  2. BloodAngel099

    BloodAngel099 Lieutenant

    Joined:
    Jan 24, 2023
    Messages:
    48
    Likes Received:
    3
    Where can I edits/update this mod for RE2 blocks?

    For example when I go to use the harvester feature of this mod it doesn't give me the correct crops for the newer RE2 changes. I would also like to change Foundation blocks to give concrete instead.

    I do believe a long time ago I remember seeing this conversation somewhere but I can't seem to find that conversation now.
     
    #1042
  3. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,136
    Likes Received:
    745
    Harvest works "out of the" box and my tests with the 1.16.1 + RE2 works fine.
    Note in SP you have to configure the path to the scenario with OverrideScenarioPath so the mod can found the RE2 files
    For deconstruct you can configure the DeconstructBlockSubstitutions in the configuratiojn.json file of the mod in your savegamepath
     
    #1043
  4. BloodAngel099

    BloodAngel099 Lieutenant

    Joined:
    Jan 24, 2023
    Messages:
    48
    Likes Received:
    3
    I added the path for the RE2 mod to my configuration.json file in the save, but it didn't work.

    I have recently converted to gaming on Linux. Would my file path being Linux based be a problem? Do you know/have any experience in Linux?

    "OverrideScenarioPath": "/mnt/ce91f421-ae7c-4743-a53d-87c0cf9a2a5c/SteamLibrary/steamapps/workshop/content/383120/3143225812/",
     
    #1044
  5. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,136
    Likes Received:
    745
    It should work, but I've never actually been able to test it on Linux.

    Take a look at the EGS log files to see what the scripting is outputting there regarding the paths

    -LOG- {EmpyrionScripting} EmpyrionScripting ReadConfigEcf: ....
     
    #1045
  6. Myrmidon

    Myrmidon Rear Admiral

    Joined:
    Mar 26, 2016
    Messages:
    1,709
    Likes Received:
    2,004
    I have moved to Linux since '19 when I first tested Empyrion and made sure it plays well there. I have always installed it on a seperate partition with other games under steam. The workshop is also there too. I noticed you have /mnt on your path. I suggest you try the /media/(your username here).../SteamLibrary/steamapps/ etc. At least this is what it works for me for Empyrion and also for mods or tools I have installed (i.e save game transfer tool, galaxy navigato, EPD etc).

    In general if you have installed Empyrion you open the folder where the files are from steam at least to know where exactly is the path on your OS. It works the same way for Heroic Epic too, which is from where you can play Empyrion if you have it from Epic Game Store. I have both versions so I know.

    /mnt folder holds manually mounted media, by admins, such as CDRoms USB sticks NAS etc and are temporary. Also the contains are invisible while the media is mounted and visible once unmounted.

    /media folder holds the automatic mounted of HDD partitions, CDRoms USBs NAS etc, usually during start up, or when the user plugs them on the PC,and users with the proper rights can access them right away.
     
    #1046
    Last edited: Apr 14, 2026
    ASTIC likes this.
  7. Toruk

    Toruk Ensign

    Joined:
    Thursday
    Messages:
    1
    Likes Received:
    0
    Script have been tinkering with. Structure has 10 docks and have "pads" can dock with structure to land CV's on, so it also displays landed but undocked CV's.

    LCD Input name:
    C#: DockDirectory

    LCD output name:
    DockDirectory


    LCD OUTPUT DIMENSIONS
    WIDTH: 1.00
    HEIGHT: 1.00

    LCD Input Script:

    Code:
    using System;
    using System.Linq;
    using System.Text;
    using Eleon.Modding;
    using EmpyrionScripting.Interface;
    
    public class Dock
    {
        public char off, on;
        public double left, right, near, far;
        public string name;
        public bool docked;
    
        public Dock()
        {
        }
    
        public Dock(char off, char on, double left, double right, double near, double far)
        {
            this.off = off;
            this.on = on;
            this.left = left;
            this.right = right;
            this.near = near;
            this.far = far;
            this.docked = false;
            this.name = "";
        }
    }
    
    public class ModMain
    {
        public static void Main(IScriptModData rootObj)
        {
            if (!(rootObj is IScriptSaveGameRootData r)) return;
            Dock[] dockDefs = new Dock[10];
    
            // The numbers will have to be adjusted for your structure
            // They represent right, left, near, far x,y coordinates of your docks
            dockDefs[0] = new Dock('➀', '➊', -190, -98, 33, 69);
            dockDefs[1] = new Dock('➁', '➋', -103, -67, 73, 191);
            dockDefs[2] = new Dock('➂', '➌', -19, 17, 73, 191);
            dockDefs[3] = new Dock('➃', '➍', 67, 103, 73, 191);
            dockDefs[4] = new Dock('➄', '➎', 117, 237, 33, 69);
            dockDefs[5] = new Dock('➅', '➏', -190, -97, -172, -40);
            dockDefs[6] = new Dock('➆', '➐', -103, -67, -191, -73);
            dockDefs[7] = new Dock('➇', '➑', -19, 17, -191, -73);
            dockDefs[8] = new Dock('➈', '➒', 67, 103, -191, -73);
            dockDefs[9] = new Dock('➉', '➓', 117, 237, -172, -40);
    
            r.Console.WriteLine($"<color=green><align=center>{r.E.Name}</align>");
    
            var EEnums = r.CsRoot.EntitiesByName("*");
    
            // Figure out who's "docked" where
            foreach (var e in EEnums)
            {
                var shipPos = r.E.S.GlobalToStructPos(e.Pos);
    
                if ( e.EntityType == EntityType.CV )
                {
                    for (var dockID = 0; dockID < 10; ++dockID)
                    {
                        if (shipPos.x > dockDefs[dockID].left && shipPos.x < dockDefs[dockID].right)
                        {
                            if (shipPos.z > dockDefs[dockID].near && shipPos.z < dockDefs[dockID].far)
                            {
                                if (e.DockedTo != -1)
                                {
                                    dockDefs[dockID].docked = true;
                                    dockDefs[dockID].name = e.Name + " - " + dockDefs[dockID].name;
                                }
                                else
                                {
                                    if (shipPos.y < 170)
                                    {
                                        dockDefs[dockID].name += e.Name + " ";
                                    }
                                }
                            }
                        }
                    }
                }
            }
    
            r.Console.WriteLine($"← Dock 1 - 5");
            for (var dockID = 0; dockID < 10; ++dockID)
            {
                if (dockID == 5)
                {
                    r.Console.WriteLine($"→ Dock 6 - 10");
                }
                if (dockDefs[dockID].docked)
                {
                    r.Console.WriteLine($"  {dockDefs[dockID].on} {dockDefs[dockID].name}");
                }
                else
                {
                    r.Console.WriteLine($"  {dockDefs[dockID].off}");
                }
            }
        }
    }
    
     
    #1047
    Last edited: Apr 17, 2026 at 6:54 PM
  8. BloodAngel099

    BloodAngel099 Lieutenant

    Joined:
    Jan 24, 2023
    Messages:
    48
    Likes Received:
    3
    Thank you for the responses,

    @ASTIC
    Here is what I have in my log, sorry I do not fully understand a lot of this and am learning as I go, does this look like it worked?
    21-01:36:20.492 18_36 -LOG- {EmpyrionScripting} EmpyrionScripting ReadConfigEcf: ContentPath:S:\common\Empyrion - Galactic Survival/Content Scenario:/mnt/Partition 2/SteamLibrary/steamapps/workshop/content/383120/3143225812/
    21-01:36:20.492 18_36 -LOG- {EmpyrionScripting} EmpyrionScripting ReadConfigEcf: ContentPath:S:\common\Empyrion - Galactic Survival/Content Scenario:/mnt/Partition 2/SteamLibrary/steamapps/workshop/content/383120/3143225812/

    I just tried it with the following and it still doesnt work.
    "OverrideScenarioPath": "S:\common\Empyrion - Galactic Survival/Content Scenario:/mnt/Partition 2/SteamLibrary/steamapps/workshop/content/383120/3143225812/",

    @Myrmidon
    I will work on trying to convert my drive back to media. From what I read I was of the understanding MNT was used for permanent storage drive, where as MEDIA was for removable.
     
    #1048
  9. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,136
    Likes Received:
    745
    The path is already syntactically incorrect because of the two colons

    that part needs to be removed
    S:\common\Empyrion - Galactic Survival/Content Scenario:

    and the second one probably needs to be something like home/...... as @Myrmidon suggested

    You can also try copying the directory
    /mnt/Partition 2/SteamLibrary/steamapps/workshop/content/383120/3143225812

    to
    S:\common\Empyrion - Galactic Survival\Content\Scenarios\RE2
    and then specifying that as the OverrideScenarioPath
     
    #1049

Share This Page