[MOD EXT] Empyrion Scripting - Scripts

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

  1. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    Fix the bug with the negative start pos
    https://github.com/GitHub-TC/EmpyrionScripting/releases/tag/9.0.4
     
    #401
  2. Nathan Jurgens

    Nathan Jurgens Lieutenant

    Joined:
    May 18, 2016
    Messages:
    52
    Likes Received:
    5
    in the configuration.json for Reforged Eden, what did you guys add for the Railgun & MX-4 Torpedo?

    "WeaponCV": ",Eden_RailgunCVSpinal,Eden_CVToredoRapid,",
    "AmmoCV": ",7108,7272,",

    Is that correct (added into the current lines)

    Cause the scripts looking for Weapons ids is not finding them

    {{~set 'WeaponsIDs' ''}}
    {{~set 'AmmoIDs' ''}}
    {{#devices E.S 'W-*'}}
    {{#each .}}
    {{~set 'WI' (configattr Id 'WeaponItem')}}
    {{~set 'AT' (configattrbyname
     
    #402
  3. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    This script selects the weapons based on the custom name which must begin with "W-".
     
    #403
  4. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    #404
    Sephrajin and ...M-o-H... like this.
  5. me777

    me777 Commander

    Joined:
    Aug 18, 2020
    Messages:
    384
    Likes Received:
    131
    Right now I have the problem that the output from my harvest script gets cleared at each run of the #blocks even when nothing is harvested.
    So I tryed saving it (setcache) - that became a runaway thing really fast making all sccripts do strange things...

    Is there a easy way to get the last x lines of a variable or a lcd text?
    I tryed to do it with what I know and found in the readme, but it is a mess with 2 #each loops...
     
    #405
  6. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    If you names your LCD
    Code:
    Script:[+40]xyz
    is means that the new lines will be added on top of the output LCD and the whole LCD output text contains the last 40 lines.
    This setting is useful for process log LCDs and when more than one Script uses the "activity log" LCD
     
    #406
  7. me777

    me777 Commander

    Joined:
    Aug 18, 2020
    Messages:
    384
    Likes Received:
    131
    Great!
    This is an elegant solution, but I did not find it annywhere, so I had to ask ;)

    Another Problem (with a different script):
    I don't get all Ingots with {{~#itemlist E.S.Items Ids.Ingot}}
    There are almost all Ingot IDs in E.S.Items and Ids.Ingot has the correct IDs too;
    but I only get a few in output (I have Iron, 4320 for sure):
    Code:
    {{~#itemlist E.S.Items Ids.Ingot}}
    {{Id}}
    {{/itemlist}}
    -----------------
    {{Ids.Ingot}}
    
    =>
    4333
    4342
    4346
    4366
    -----------------
    ,4319-4329,4333,4342,4346,4366,
    
     
    #407
  8. Homunk

    Homunk Lieutenant

    Joined:
    Mar 22, 2020
    Messages:
    74
    Likes Received:
    26
    Hi Astic,
    it's me again. The problem not beeing harvested for the Reforged Eden hydroponic bays unfortunately is not solved.
    This morning I placed one bay on your vessel AI Vega and there it was not harvested either.

    Before that I downloaded and installed the last version of your mod 9.1.0

    Any more ideas?
     
    #408
  9. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    True, ItemList could not yet handle ranges. It is fixed with this.
    https://github.com/GitHub-TC/EmpyrionScripting/releases/tag/9.1.2
     
    #409
  10. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    Please put your ship in the workshop and tell me where I can find it - then I'll have a look at it
     
    #410
  11. Homunk

    Homunk Lieutenant

    Joined:
    Mar 22, 2020
    Messages:
    74
    Likes Received:
    26
    How would I do this? Never put anything in the workshop.
    By the way, this is your ship. I only use it for the scripts. ;)
     
    #411
  12. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    I just tried this with the current Vega AI and it works as intended - harvesting both plants and hydroponic blocks.
    Maybe you still have the old version without harvest script or you have no "money" for the gardener in the refrigerator behind
     
    #412
  13. Homunk

    Homunk Lieutenant

    Joined:
    Mar 22, 2020
    Messages:
    74
    Likes Received:
    26
    First, thank you for your effort. Unfortunately here it doesn't work with the bays. If it works for you, then I must be doing something wrong. I just don't know what it is. As I wrote above, this morning I placed 1 bay on you ship, which I spawned in from the workshop and again the bay was not harvested. I didn't change anything else on the ship or the script. I also put sufficient money in the fridge. So I don't know.
     
    #413
  14. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    @Homunk Try it with the current ship - the older version have no harvest.
    Do you play on SP or MP on a server?
     
    #414
  15. Homunk

    Homunk Lieutenant

    Joined:
    Mar 22, 2020
    Messages:
    74
    Likes Received:
    26
    I think, i used the latest version of it, because it had the harvest script in place. I think it gets updated automatically, whenever you update it. I play SP.

    Just one remark: on my other base I run the older harvest script with coordinates and ids of the plants. There all the Eden Reforged Bays are shown on display with their name (translated to german) and their correct id.
     
    #415
  16. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    In SP, the game has the bug that the structure is often not made known to the API. As a result, of course, the scripts do not run there. Please check if the clocks run on the LCD of the structure or if "normal" plants are harvested.
     
    #416
  17. Homunk

    Homunk Lieutenant

    Joined:
    Mar 22, 2020
    Messages:
    74
    Likes Received:
    26
    The clock is running and all normal plants are harvested.
     
    #417
  18. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    Then I guess that the API in the SP cannot resolve the RE scenario correctly.
    The API unfortunately has MANY errors in the SP :-(
     
    #418
  19. Homunk

    Homunk Lieutenant

    Joined:
    Mar 22, 2020
    Messages:
    74
    Likes Received:
    26
    Ok, then I guess, I have to live with it.

    Thanks for all your help.
     
    #419
  20. Nathan Jurgens

    Nathan Jurgens Lieutenant

    Joined:
    May 18, 2016
    Messages:
    52
    Likes Received:
    5
    Yep all the weapons start with W- and it works on all the normal turrets etc just not the Reforged Eden ones, and those do not appear in the configuration file, so I thought it might of been the file. I will keep playing around with it.
     
    #420

Share This Page