[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,154
    Likes Received:
    751
    Which scenario are you using?
     
    #1061
  2. loupineto

    loupineto Ensign

    Joined:
    Dec 4, 2025
    Messages:
    7
    Likes Received:
    0
    I'm playing on an RE2 server. However, the `{{resourcesforid ...}}` function—which is aptly named—only returns raw resources (ores) and not components. Unfortunately, it doesn't return the quantity of resources required for the components or devices. It's possible the ECF files aren't up to date.
    In the following example, {{#resourcesforid '1639'}} is retrieved:

    Item : 1639 - Light Laser Turrets (CV)
    - 8456 : Titanium Ingot: 68
    - 8269 : Iron Ingot: 42,2
    - 8418 : Silicon Ingot: 156,1
    - 8420 : Copper Ingot: 245
    - 8427 : Carbon Substrate: 144
    - 8417 : Cobalt Ingot: 124,8
    - 8419 : Neodymium Ingot: 176
    - 8422 : Erestrum Ingot: 96
    - 8423 : Zascosium Ingot: 96
    - 8459 : Aluminium Powder: 48

    Can you tell me what the number after the decimal point "Cobalt Ingot: 124.8" corresponds to?
     
    #1062
  3. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,154
    Likes Received:
    751
    • These are all the resources required for the turret and its components.
    • For example, if the turret requires 8 parts of X, but 10 parts of X are produced per ingot, then the turret requires 0.8 ingots.
     
    #1063
  4. loupineto

    loupineto Ensign

    Joined:
    Dec 4, 2025
    Messages:
    7
    Likes Received:
    0
    (sorry trad google)
    However, without wanting to be a pain, I created a script that transfers resources for a CV laser turret, but when I want to build it, it lacks resources for 8 power coils and 12 advanced capacitors. It's the same script as before, with the added feature of the transfer working correctly.
    This works correctly for simpler devices like 'prometium hydro cell'.

    {{~set 'I' '1639'}}<size=50%>Item : {{@root.Data.I}} - {{i18n @root.Data.I}}
    {{#resourcesforid @root.Data.I}}
    {{#each .}}- {{@key}} : {{i18n @key}} : {{.}}{{~set 'Qte' (calc . '+' 1)}}
    {{#itemlist @root.E.S.Items @key}}{{#move . @root.E.S 'Prepa' (int @root.Data.Qte)}}{{/move}}{{/itemlist}}
    {{/each}}{{/resourcesforid}}</size>

    <size=50%>Item : 1639 - Light Laser Turrets (CV)
    - 8456 : Titanium Ingot: 68
    Transfert : 68 / 69 Transfert : 1 / 69
    - 8269 : Iron Ingot: 42,2
    Transfert : 43 / 43,2
    - 8418 : Silicon Ingot: 156,1
    Transfert : 156 / 157,1 Transfert : 1 / 157,1
    - 8420 : Copper Ingot: 245
    Transfert : 245 / 246 Transfert : 1 / 246
    - 8427 : Carbon Substrate: 144
    Transfert : 145 / 145
    - 8417 : Cobalt Ingot: 124,8
    Transfert : 124 / 125,8 Transfert : 1 / 125,8
    - 8419 : Neodymium Ingot: 176
    Transfert : 176 / 177 Transfert : 1 / 177
    - 8422 : Erestrum Ingot: 96
    Transfert : 96 / 97 Transfert : 1 / 97
    - 8423 : Zascosium Ingot: 96
    Transfert : 97 / 97
    - 8459 : Aluminium Powder: 48
    Transfert : 48 / 49 Transfert : 1 / 49
    </size>


    <size=50%>Item : 8517 - Promethium Hydrocell
    - 8398 : Promethium Ore: 2,5
    Transfert : 3 / 3,5
    - 8540 : Water Container: 5
    Transfert : 6 / 6
    - 8269 : Iron Ingot: 1
    Transfert : 2 / 2
    </size>
     
    #1064
    Last edited: Jun 30, 2026
  5. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,154
    Likes Received:
    751
    Presumably, the other effect comes into play here—for example, 2 ingots of X produce 6 items of Y, but the turret only needs 3 of type Y, so just 1 ingot. However, if you build Y, you need 2 units of X, and if X is already being used for other things, that won't be enough anymore.
     
    #1065
  6. loupineto

    loupineto Ensign

    Joined:
    Dec 4, 2025
    Messages:
    7
    Likes Received:
    0
    - Is it possible to recover the signal from a radar? (without C# routine) In idea, I would like to save energy on my ship and therefore deactivate the weapons and activate them automatically when the radar detects an enemy.
    - Is it possible to change the state of a Control Panel/Signals?
     
    #1066
  7. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,154
    Likes Received:
    751
    It is possible, but the server operator would have to change it in the save game script themselves. Since this would generally be considered a cheat, I can't make that change in the script across the board.
     
    #1067
  8. loupineto

    loupineto Ensign

    Joined:
    Dec 4, 2025
    Messages:
    7
    Likes Received:
    0
    Thank you very much for your answers, have a nice Sunday.
     
    #1068
  9. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,154
    Likes Received:
    751
    First Steps for an EmpyrionMCP Access ....

    Frage: Was kann ich aus Iron Ore bauen
    1. [​IMG] IronOre – Komplette Produktionskette
      IronOre ist einer der wichtigsten Basisrohstoffe im Spiel – aus ihm lassen sich 198+ Items herstellen! Hier die Übersicht:
      [​IMG] Stufe 1 – Direktes Smelten
      | Item | Station | Zeit | Output | |---|---|---|---| | IronIngot | Furnace | 1s | 2x pro Ore |
      [​IMG] Stufe 2 – Aus IronIngot
      | Item | Station | Zeit | Output | |---|---|---|---| | SteelPlate | Adv. Constructor | 2s | 10x (2 IronIngot) | | MetalPieces | – | – | 10x (1 IronIngot) | | CobaltAlloy | Adv. Constructor | 3s | 5x (CobaltIngot + IronIngot) |
      [​IMG] Stufe 3 – Kategorien (Auswahl)
      Baumaterialien (Hull/Truss/Window/Door): Hull Small/Large/Armored/Combat, Truss, Stairs, Ladder, Walkway, Wing, Container, Door, Shutter Door, Hangar Door, Boarding Ramp, alle Window-Varianten, Concrete Blocks
    Raumschiff-Systeme:
    • Antrieb: alle Thruster (SV/GV/MS), Hover Engine/Booster, RCS Blocks, Warp Drive, Pentaxid Tank
    • Kraftstoff: Fuel Tanks (SV/MS)
    • Cockpit: Cockpit SV T2, Passenger Seats
    • Energie: Solar Panel, Generator MS/T2
    • CPU Erweiterungen: HVT/SVT/CVT/BAT (T2–T4)
    Waffen & Munition: Shotgun, Sniper, Pistol T2, Minigun, Rocket Launcher, Explosives, Drill Attachment, EVA Boost → Alle Munitionen: 5.8mm, 12.7mm, 8.3mm, 15mm, 30mm Bullets, alle Rockets (Fast/Slow/Large/Artillery/Flak/Homing) Stationen & Geräte: Constructor (T0/T1V2/T2/SV/HV), Deconstructor, Repair Bay (alle Typen), Field Repair Station, Clone Chamber, Water Generator, Food Processor, Fridge, Ventilator, Oxygen Tank Elektronik & Komponenten: Computer, Motor, Mechanical Components, Energy Cell, Capacitor Component, Turret Radar, Antenna, Console, ATM, Armor Locker Hochwertige Items: Railgun Bullet, Detector CV, Generator MST2, CPU Extender T4 (800s Crafting-Zeit!) TL;DR: IronOre → IronIngot → SteelPlate ist das Rückgrat fast aller Crafting-Ketten im Spiel. Fast jedes größere Item braucht irgendwann SteelPlate – es ist quasi das wichtigste Intermediate Material. [​IMG]

    Frage: welche händler sind auf akua

    [​IMG] Händler auf Akua (Talon-Fraktion)
    Es gibt 2 Händler auf Akua — beide gehören zur Talon-Fraktion: ---
    [​IMG] TalonPlantationAkua (Plantage)
    Spezialisiert auf Pflanzen, Samen & medizinisches Grundmaterial | [​IMG] NUR Kauft (von dir) | [​IMG] NUR Verkauft (an dich) | |---|---| | AlienPalmTree, AlienPlantTube2 | AlienplantWorm, BigFlower | | AntiToxicPills (mf=1.2-1.4€) | CobraLeaves, CoffeePlant | | AntibioticOintment | Corn, DesertPlant20 | | AntibioticPills (mf=1.2-1.4€) | DurianRoot, Elderberry | | Bandages | Fertilizer, Pearthing | | CrossbowBoltPlayer (mf=1.2-1.4€) | Pumpkin, Snakeweed, Tomato | | Medikit04 (mf=1.2-1.4€) | | | MushroomBellBrown01 | |

    Nutzen: Bringt deine geernteten Pflanzen & Heilpflanzen → kaufst seltene exotische Samen zurück ---
    [​IMG] TalonFarmAkua (Farm)
    Spezialisiert auf Essen, Trinken, Rohstoffe & Ausrüstung | [​IMG] NUR Kauft (von dir) | [​IMG] NUR Verkauft (an dich) | |---|---| | AntiToxic/Antibiotic Injection (mf=1.2-1.4€) | AkuaWine [​IMG] | | Bandages | Beer [​IMG], Bread, Cereals | | BioFuel | Cheese, Milk, Steak | | CobaltOre (mf=0.8-1.2€) | CrossbowBolts [​IMG] | | Fertilizer | TalonCrossbowTribalPlayer [​IMG] | | FishMeat, SpareParts | | | Medikit05 (mf=1.2-1.4€) | |

    Nutzen: Bringt Rohstoffe & Medizin → kaufst Fertiggerichte, AkuaWine, Armbogen & Bolzen ---
    [​IMG] Wichtige Info:
    • Kein Waffenhandel im klassischen Sinne — aber der TalonFarmAkua verkauft dir den TalonCrossbowTribalPlayer (Stadtbogen) + Bolzen
    • Beide Händler kaufen Medizin (Injektionen, Pillen, Kits) zu höheren Preisen (mf=1.2-1.4€)
    • Die Talon-Händler sind Landwirtschafts-Fokus — für echte Waffen musst du zum BasicWeaponTools oder AdvancedWeaponToolsKits Händler auf anderen Planeten
    Möchtest du wissen, wo du echte Waffen (Schrotflinte, Gewehr, Raketenwerfer) kaufen kannst? [​IMG]
     
    #1069
  10. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,154
    Likes Received:
    751
    Frage an die KI:

    >> was gibt es auf akua

    Auf dem Planeten Akua gibt es folgende Details: Allgemeine Informationen:
    • Typ: Terrestrischer Planet
    • Fraktionen: Human
    • Ressourcen: Carbon, Iron, Copper, Silicon
    • Atmosphäre: Atembar (24% Sauerstoff, 0.7 Luftdruck)
    • Strahlung: Keine
    • Temperatur: 0-45°C (Tag), 7°C (Nacht)
    • Gravitation: 9-11 m/s²
    • Feuchtigkeit: 10-80%
    • Land/Wasser-Verhältnis: 20-25%
    Punkte von Interesse (POIs): Auf Akua findest du 9 POIs, die hauptsächlich als Startgebiete oder verlassene Strukturen erscheinen:
    1. TemperateStarterFarmVH (Farm)
    2. TemperateStarterTribalTower (Turm)
    3. TemperateStarterRuinsTribal (Ruinen)
    4. TemperateStarterTribalField (Feld) - kommt zweimal vor (eins wichtig, eins nicht)
    5. TemperateStarterTribalFarm (Farm)
    6. JunkT1 (Ruin/Schrott)
    7. RuinsTemperateStarter (Ruinen)
    8. [Internal: Null POI] (Neutral)
    Die POIs sind fraktionslos ("None") und scheinen eher dekorativ oder als frühe Spielziele (Stamm-Ruinen/Farmen) gedacht zu sein. Es gibt keine großen Städte oder aktiven Handelsposten der Fraktionen auf diesem Planeten.
     
    #1070
  11. Bespike

    Bespike Ensign

    Joined:
    Yesterday
    Messages:
    1
    Likes Received:
    0
    Hello everyone. I try to modify this script to visualize only the Automated Industrial Mining Rig. Can someone help me please, I tryied many thing but impossible to do it.

    I also would like to add (if possible) a status of the industrials mining rig like green or red to know if they are working or not. And if possible I also would love to see the industrial water extractor. But they are not TerrainPlaceables. Someone help me please. I spend days and days trying but failing :'(

    First script :
    {{~set 'Sl' ~P.SolarSystemCoordinates}}{{~#split @root.Data.Sl ' '}}{{~set 'Sl' .1}}{{/split}}{{~#split @root.Data.Sl '/'}}{{~set 'Sx' .0}}{{~set 'Sy' .1}}{{~set 'Sz' .2}}{{/split}}{{#vector @root.Data.Sx @root.Data.Sy @root.Data.Sz}}{{~set 'D2' .}}{{/vector}}<align=center><size=70%>Dispositifs dans la galaxie</size></align><br><size=45%><indent=40%>(P) = Privé, (F) = Faction</indent></size><br>{{#createarray}}{{#db 'TerrainPlaceables' 1000}}{{#each .}}{{#if isremove}}{{else}}{{#vector SolarSystems.sectorx SolarSystems.sectory SolarSystems.sectorz}}{{~set 'D1' .}}{{/vector}}{{split (calc (distance @root.Data.D1 @root.Data.D2) '/' 100000) ","}}{{~set 'D' (concat .0 '.' (substring .1 0 1))}}{{/split}}{{#createdictionary}}{{set . "Sol" ../SolarSystems.name}}{{set . "Pf" ../Playfields.name}}{{set . "Disp" (i18n ../TerrainPlaceables.blockid 'Français')}}{{set . "Ent" ../Entities.name}}{{~#ok ../TerrainPlaceables.facaccess}}{{set . "Typ" '(F)'}}{{else}}{{set . "Typ" '(P)'}}{{~/ok}}{{set . "Dist" @root.data.D}}{{~set ../../../. .}}{{/createdictionary}}{{/if}}{{/each}}{{/db}}{{~set 'Tab' .}}{{/createarray}}<size=45%>{{#scroll 32 3 15}}{{#if @root.Data.Tab}}{{#sortedeach @root.Data.Tab 'Dist'}}{{substring Sol 0 12}}<indent=20%>{{substring Pf 0 21}}</indent><indent=40%>{{substring Disp 0 21}} {{Typ}}</indent><indent=72%>{{substring Ent 0 22}}</indent><indent=85%>{{replace (format Dist '{0,6}') ' ' '  '}} AL</indent> {{/sortedeach}}{{/if}}{{/scroll}}</size>
     
    #1071

Share This Page