[MOD EXT] Empyrion Scripting - Scripts

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

  1. Homunk

    Homunk Lieutenant

    Joined:
    Mar 22, 2020
    Messages:
    72
    Likes Received:
    24
    Replace the Ids in this line with the Ids of the items you want to have listed.
    {{~set 'IDs' '2265,2295,2255-2264,2267,2282,2283,2286,2290-2292,2326,2327,2309,2329-2333'}

    More information you can get from the Empyrion Scripting ReadMe.txt file.
     
    #521
  2. GATTO

    GATTO Ensign

    Joined:
    Feb 25, 2022
    Messages:
    15
    Likes Received:
    2
    Thank you, i managed to get the id in a different way (for the extra resouces not vanilla) but now i'm seeing a weird thing
    The script breaks randomly when i change playfield, works smoothly on bases but on CVs works when i place it then i warp or i leave the planet and stops working... i'm playing on a friend server, did we screwed up something?
     
    #522
  3. Homunk

    Homunk Lieutenant

    Joined:
    Mar 22, 2020
    Messages:
    72
    Likes Received:
    24
    If you play SP or coop, that's what happens, but it should not happen on a dedicated server play.
     
    #523
  4. GATTO

    GATTO Ensign

    Joined:
    Feb 25, 2022
    Messages:
    15
    Likes Received:
    2
    we're on dedicated.
    I eve tried the priority thing (1Script:*** 2Script:** and so on) but it still stops when switching playfield

    --------------------

    SCRATCH that. the script was working and not working because it was running LOCALLY lol, my friend failed to upload the mod (the file host is paranoid about dll) so it was kinda running only when i was around.
    We've put a ticket in to upload the damn thing on the server xD
     
    #524
    Last edited: Jul 29, 2022
  5. GATTO

    GATTO Ensign

    Joined:
    Feb 25, 2022
    Messages:
    15
    Likes Received:
    2
    ok, no, script is on the server, still having the same issue, as soon as i change playfield, everything stops working
     
    #525
  6. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    820
    Likes Received:
    671
    When the Script is run on the server - turn the EAC on - so your local mod is blocked, running both doesn't work.
     
    #526
  7. GATTO

    GATTO Ensign

    Joined:
    Feb 25, 2022
    Messages:
    15
    Likes Received:
    2
    trying now, i did removed the mod from the client thinking it was overlapping or something but i had the same issue. on the planet when i'm running other scripts (if i turn off and on my lcd) the cv scripts start running again, as soon as i hit space. ded.

    tested without the mod on my client and with EAC on. same issue.

    they start working only when i'm back on Haven (where i have some other scripts running on base) after i access the script lcd and close it.

    if i go in space everything stops and the previous workaround does nothing Q_Q
    Also deleted the cache
     
    #527
  8. GATTO

    GATTO Ensign

    Joined:
    Feb 25, 2022
    Messages:
    15
    Likes Received:
    2
    #528
  9. GATTO

    GATTO Ensign

    Joined:
    Feb 25, 2022
    Messages:
    15
    Likes Received:
    2
    I may have found out what's going on, i attached a ship info script (fuel, oxy, position, docked ships etc) and NOW everything seems to work when switching playfields

    i need to know what's enabling that script to work anywhere and why the others dont lol
     
    #529
  10. Sephrajin

    Sephrajin Rear Admiral

    Joined:
    Dec 22, 2017
    Messages:
    1,236
    Likes Received:
    3,184
    Something like this?
    Best used with CultureInfo as described in the ReadMe by Astic.
    [​IMG]

    Save to a lua file and edit with notepad++ for syntax highlighting.
    HTML:
    -- -------------------------------------
    -- Status information and item counts
    -- Written by Sephrajin 2019-2022
    -- ------------------------------------
    -- List Ingots & Ores, red on low or missing -- the 'plain ids' are Eden related and sadly do not work for the 0 check...
    -- Requires:
    -- LCD: Script:StatusIO
    -- Output:
    -- Projector: StatusIO
    -- Fontsize: 12
    -- Projector w:2.75 x h:3
    -- ------------------------------------
    {{~set 'limitLow' 1000}}
    {{~set 'limitMedium' 1000}}
    {{~set 'limitGood' 100000}}
    <align=center><size=+7>Ingots & Ores</size>
    {{bar 1 0 1 30 '═'}}</align>
    {{scroll 32 1}}
    {{#sortedeach E.S.Items 'Count' true}}
    {{~#test Id 'in' (concat @Ids.Ingot @Ids.Ore '7300,7301,7342-7344,4365')}}
    <color={{~#test Count geq @root.Data.limitGood}}green>{{~else}}{{~#test Count le @root.Data.limitMedium}}{{~#test Count le @root.Data.limitLow}}red>{{else}}orange>{{/test}}{{~else}}yellow>{{/test}}{{/test}}◉ {{i18n Key}} <pos=420>{{format Count '{0,6:N0}'}}</pos></color>
    {{/test}}
    {{/sortedeach}}
    {{#itemlist E.S.Items (concat @Ids.Ingot @Ids.Ore '7300,7301,7342-7344,4365')}}{{~#test Count geq 1}}{{~else}}<color=red>○ {{i18n Key}} <pos=420><size=+1> ⚠</size></pos></color>
    {{/test}}
    {{/itemlist}}
    {{/scroll}}
    -- ------------------------------------
    -- List Components, red on low or missing
    -- Requires:
    -- LCD: Script:StatusComponents
    -- Output:
    -- Projector: StatusComponents
    -- Font Size: 12
    -- Projector w:2.75 x h:3
    -- ------------------------------------
    {{~set 'limitLow' 500}}
    {{~set 'limitMedium' 1000}}
    {{~set 'limitGood' 5000}}
    <align=center><size=+7>Components</size>
    {{bar 1 0 1 30 '═'}}</align>
    {{scroll 32 1}}
    {{#sortedeach E.S.Items 'Count' true}}
    {{~#test Id 'in' '4375,4374,4357,4401,4340,4338,4339,4331,4314,4307,4308,4315,4303,4304,4311,4360,4361,4363,4364,4306,4310,4312,4343,4313,4305,4330,4309,4334,4337,4366,4367,4350-4356,4378-4381,5097,5108,5706-5708,7298,7299,7302,7303,7310,7312,7313,7320,7330,7341,4444,4358,4377'}}
    <color={{~#test Count geq @root.Data.limitGood}}green>{{~else}}{{~#test Count le @root.Data.limitMedium}}{{~#test Count le @root.Data.limitLow}}red>{{else}}orange>{{/test}}{{~else}}yellow>{{/test}}{{/test}}◉ {{i18n Key}} <pos=420>{{format Count '{0,6:N0}'}}</pos></color>
    {{/test}}
    {{/sortedeach}}
    {{#itemlist E.S.Items '4375,4374,4357,4401,4340,4338,4339,4331,4314,4307,4308,4315,4303,4304,4311,4360,4361,4363,4364,4306,4310,4312,4343,4313,4305,4330,4309,4334,4337,4366,4367,4350-4356,4378-4381,5097,5108,5706-5708,7298,7299,7302,7303,7310,7312,7313,7320,7330,7341,4444,4358,4377'}}{{~#test Count geq 1}}{{~else}}<color=red>○ {{i18n Key}} <pos=420><size=+1> ⚠</size></pos></color>
    {{/test}}
    {{/itemlist}}
    {{/scroll}}
    
     
    #530
  11. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    820
    Likes Received:
    671
    #531
  12. Daimonicon

    Daimonicon Lieutenant

    Joined:
    Nov 4, 2019
    Messages:
    71
    Likes Received:
    19
    Hallo,

    ich hänge irgenwie mit der Formatierung. Dieser Schnipsel ist aus dem ShipInfo Script ich glaube von ASTIC.
    Diesen Teil wollte ich gerne auf einem zweiten Display darstellen aber ich kriege keinen Zeilenumbruch hin :-(
    Das Script an sich funktioniert soweit ich das sehen kann aber ich hätte die Ausgabe gern wie folgt:

    Docked:
    -HV Small Tank 79,30% Fuel 0,00% O2
    -SV Loot Lifter 400 98,02% Fuel 93,75% O2
    -HS3 - Salvager 44,83% Fuel 0,00% O2

    Mir angezeigt wird aber (komplett fortlaufender Text):

    [​IMG]

    Kann mir einer helfen gibt es vieleicht sogar beispiele weil meine "." für Leerzeilen sicher auch nicht korrekt sind ?

    Code:
    .
    Docked:
    .
    {{#each E.S.DockedE}}
    - {{~Name}}
    {{~use S.FuelTank}}
    {{~math Content '/' Capacity}}
    {{~format . '{0,8:P2} Fuel'}}
    {{~/math}}
    {{/use}}
    {{~use S.OxygenTank}}
    {{~math Content '/' Capacity}}
    {{~format . '{0,8:P2} O2'}}
    {{~/math}}
    {{/use}}
    {{/each}}
    
     
    #532
  13. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    820
    Likes Received:
    671
    @Daimonicon Try to remove the '~' from the {{~Name}} because ~ means that the line is concat with the previous line
     
    #533
  14. Daimonicon

    Daimonicon Lieutenant

    Joined:
    Nov 4, 2019
    Messages:
    71
    Likes Received:
    19
    I couldn't test it right away because my savegame was broken but taking away this "~" unfortunately doesn't help.
     
    #534

Share This Page