[mod] Empyrion Scripting Mod

Discussion in 'Empyrion API' started by ASTIC, May 25, 2019.

Tags:
  1. kkin形影

    kkin形影 Ensign

    Joined:
    Oct 17, 2022
    Messages:
    21
    Likes Received:
    0
    #381
  2. kkin形影

    kkin形影 Ensign

    Joined:
    Oct 17, 2022
    Messages:
    21
    Likes Received:
    0
    How to implement automatic classification of items through scripts? For example, I store all items in the 'A' box and automatically classify them into the BCD box.
     
    #382
  3. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,019
    Likes Received:
    715
    There are many ships and bases in the workshop that use sorting via scripting. Just search for "script
     
    #383
  4. Mycroft_Groks

    Mycroft_Groks Lieutenant

    Joined:
    Aug 17, 2018
    Messages:
    47
    Likes Received:
    7
    Is it possible to use item Keys instead of IDs for the config? Adding and changing the IDs I want to use for the decon script is a pain after each wipe. Using Keys would negate this issue.
     
    #384
  5. Sephrajin

    Sephrajin Rear Admiral

    Joined:
    Dec 22, 2017
    Messages:
    916
    Likes Received:
    2,917
    Yes, is is shorter thus more often used, but shpuld work just the same with keys.
    You can work with id lists (@ids.xy) as well!
     
    #385
  6. Mycroft_Groks

    Mycroft_Groks Lieutenant

    Joined:
    Aug 17, 2018
    Messages:
    47
    Likes Received:
    7
    Ok! So I just need to put the keys I want to use just like I would the IDs? Fabulous!!
     
    #386
  7. me777

    me777 Commander

    Joined:
    Aug 18, 2020
    Messages:
    384
    Likes Received:
    132
    ASTIC, Ich hab 2 Fragen:

    Laufen C# LCD Scripte seltener als Handlebars? (Ich habe experimentiert und das Ergebnis einer Änderung hat recht lange gebraucht)
    Ist der Schild Status auch in Handlebars? (in der Doku hab ich 's nicht gefunden) über C# komme ich dran, aber habe da oben genantes Problem.

    War warscheinlch langsam weil ein altes Mod noch auf dem Testserver gelaufen ist....

    nochmal n edit:

    wie kann ich mit (ingame LCD) C# n Lever / Signal setzen?


    Danke!
     
    #387
    Last edited: Jan 17, 2024
  8. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,019
    Likes Received:
    715
    Code:
    {{E.S.IsShieldActive}}
    {{E.S.ShieldLevel}}
     
    #388
  9. JMFB6125

    JMFB6125 Ensign

    Joined:
    Jan 21, 2024
    Messages:
    1
    Likes Received:
    0
    I am not sure what I am doing wrong here. I'm trying to use a shop script for my player shop. The script I have requires someone to put in the exact amount of currency for each transaction. I want to make it so that you can place a stack of currency into the sale box and then it gives you as many items as you can with that amount of currency and then gives you the items and any change at the end. I can attach the script I have below.


    <align=center><size=+1><color=purple>Item Name Here</color></size></align>
    {{set 'cost' 5000}}
    {{set 'volume' 1}}
    {{#items E.S 'box33-item'}}
    {{set 'itemID' Id}}
    {{/items}}
    {{#items E.S 'box33'}}
    {{#test Id 'eq' 4347}}
    {{#test Count 'eq' @root.Data.cost}}
    {{set 'Payed' true}}
    <color=green>Thank you for the correct deposit.</color>
    {{/test}}
    {{/test}}
    {{/items}}
    {{#items E.S 'box33-item'}}
    {{#test Id 'eq' @root.Data.itemID}}
    {{#test Count 'lt' @root.Data.volume}}
    <color=red>Not enough item.
    {{set 'emptybox' true}}
    {{/test}}
    {{/test}}
    {{else}}
    {{set 'emptybox' true}}
    <color=red>The shop is empty.
    {{/items}}
    {{#items E.S 'box33'}}
    {{#test Id 'eq' @root.Data.itemID}}
    <color=red>Please remove your item.
    No new transactions until previous item has been removed.
    {{set 'emptybox' true}}
    {{/test}}
    {{/items}}
    {{#if @root.Data.emptybox}}
    Transactions halted
    {{else}}
    {{#if @root.Data.Payed}}
    {{#items E.S 'box33-item,box33'}}
    {{~set 'ShopBox1NB' ''}}
    {{~set 'Amount' ''}}
    <color=orange>Transfer In Progress</color>
    {{#test Id in '4347'}}
    {{~set 'ShopBox1NB' 'moneybox'}}
    {{/test}}
    {{#test Id in @root.Data.itemID}}
    {{~set 'ShopBox1NB' 'box33'}}
    {{~set 'Amount' @root.Data.volume}}
    {{/test}}
    {{#ok @root.Data.ShopBox1NB}}
    {{#move ../. @root.E.S @root.Data.ShopBox1NB @root.Data.Amount}}
    {{Source}} -> {{Destination}}
    {{/move}}
    {{/ok}}
    {{/items}}
    {{else}}
    {{#items E.S 'box33-item'}}
    <align=center><color=green>This box is selling
    {{@root.Data.volume}} {{Name}}
    for {{@root.Data.cost}} Gold Coins.
    There is {{Count}}
    available to purchase.
    Deposit exactly {{@root.Data.cost}} Gold Coins into the box and wait for this screen to inform you that your item is ready to retrieve.
    <smallcaps><color=red>No refunds
    Do no open the box until instructed to or you may lose your money</color>
    Item ID {{Id}}
    </color>
    {{/items}}
    {{/if}}
    {{/if}}
     
    #389
  10. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,019
    Likes Received:
    715
    #390
  11. lateniter

    lateniter Ensign

    Joined:
    Jan 31, 2024
    Messages:
    1
    Likes Received:
    0
    Love the Mod, even though we are still running on 11.4.6...
    Is there a variable for showing the maximum Shield like... E.S.Shieldlevel ?

    I'd like to have a bar display and not have to recode the 15550 if I update the ship in a manner that affects the shield

    <color=#ffd700>
    {{#use E.S.ShieldLevel}}
    {{bar . 0 15550 16 }}
    {{~format . '{0,8:}'}}
    {{/use}}</color>

    Thanks, and any help appeciated
     
    #391

Share This Page