[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,063
    Likes Received:
    727
    Found another divide by Amount :-(
    https://github.com/GitHub-TC/EmpyrionScripting/releases/tag/13.0.6
    should work now.
    Sorry for the inconvenience
     
    #841
  2. ctthespian

    ctthespian Ensign

    Joined:
    Jul 13, 2022
    Messages:
    7
    Likes Received:
    0
    Any answer to why the configuration.json is being created in the save folders with the default amounts instead of the values set in the config file in the mods\empyrionscripting folder? Should the value be "ItemId": 4344 or "ItemName": "MoneyCard" for the salary lines in the \Mod\EmpyrionScripting\configuration.json? Seems regardless there is a configuration.json that is created with the Salary lines with the default cost values in the saves folder ie Empyrion - Galactic Survival\Saves\Games\NewGame_4\Mod
     
    #842
  3. Mycroft_Groks

    Mycroft_Groks Lieutenant

    Joined:
    Aug 17, 2018
    Messages:
    51
    Likes Received:
    8
    Astic,
    Is there anything in the API to allow scripts to post messages in the ingame chat? Maybe elevated so it has to be from an admin core structure?
     
    #843
  4. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,063
    Likes Received:
    727
    The configuration.json in the content/mod directory is overwritten with every mod update and is also not in the (normal) backup of many servers.
    Hence the mod configuration in the savegame. This does not usually change that often on a server.
    But I'll see if I can find a directory for "templates"
     
    #844
  5. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,063
    Likes Received:
    727
    You can currently open dialogs, but I'll see if I can also include a chat/info output.
    In any case, this would be limited to the global (admin) channels and only the faction channel would be accessible for players
     
    #845
  6. Mycroft_Groks

    Mycroft_Groks Lieutenant

    Joined:
    Aug 17, 2018
    Messages:
    51
    Likes Received:
    8
    Ok. that's what I'm looking for. Admin posting in global is exactly what I'm looking to do
     
    #846
  7. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,063
    Likes Received:
    727
    First steps...

    [​IMG]

    [​IMG]
    [​IMG]
     
    #847
  8. Mycroft_Groks

    Mycroft_Groks Lieutenant

    Joined:
    Aug 17, 2018
    Messages:
    51
    Likes Received:
    8
    Very appreciative!! This is great!
     
    #848
  9. m1ckeyten

    m1ckeyten Ensign

    Joined:
    Jul 9, 2019
    Messages:
    19
    Likes Received:
    5
    Hey, any way to disable the mod while the server is on
     
    #849
  10. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,063
    Likes Received:
    727
    No
    What is the "use case" for this? Why would you want to deactivate the mod, the DLL is loaded into the process and blocked by it.
    Replacing the mod via ModLoader, as with my other mods, is unfortunately not possible with the new ModAPI
     
    #850
  11. m1ckeyten

    m1ckeyten Ensign

    Joined:
    Jul 9, 2019
    Messages:
    19
    Likes Received:
    5
    I just wanted the idname and iconid json files created by the mod for the EWA, but i dont want the mod to be active

    edit :
    NameIdMapping.json
    IdIconMapping.json
     
    #851
  12. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,063
    Likes Received:
    727
    Switching off the mod while the server is running is not implemented or planned
     
    #852
    m1ckeyten likes this.
  13. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,063
    Likes Received:
    727
    Hint: ...\Saves\Games\[Savegamename]\Mods\EmpyrionScripting\Configuration.json
    Code:
    "SaveGameScriptsIntervallMS": 10000,
    "ScriptsSyncExecution": 2,
    "ScriptsParallelExecution": 4,
    ...
    "ProcessMaxBlocksPerCycle": 200,
    
    Are set VERY conservatively by default so as not to put the server (and the game) under load.
    Double the values (SaveGameScriptsIntervallMS must lower) and the scripts will run more "smoothly", but there may be micro-jerks in the game.
     
    #853
  14. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,063
    Likes Received:
    727
    EmyprionScripting 13.1.0: https://github.com/GitHub-TC/EmpyrionScripting/releases/tag/13.1.0
    Add chat commands (EmpyrionScripting-Demo-CV is up to date and show the usage)

    Chat
    • {{chatbysignal SignalName sender}}message{{/chatbysignal}}
      • Sends the chat message to the player who triggers the signal. In the block, the player is available with Id and name
    • {{char sender text}}
      • Sends a chat message to the owner of the structure (faction or player) with the text 'text' and the sender 'sender'
    Chat (Admin only)
    • {{chatglobal sender text}}
      • Sends a global chat message with the text 'text' and the sender 'sender'
    • {{chatserver sender text}}
      • Sends a server chat message with the text 'text' and the sender 'sender'
    • {chatplayer playerId sender text}}
      • Sends a private chat message to the player 'playerId' with the text 'text' and the sender 'sender'
    • {{chatfaction factionId sender text}}
      • Sends a faction chat message to the faction 'facrionId' with the text 'text' and the sender 'sender'

     
    #854
    Last edited: Jun 30, 2024
  15. ctthespian

    ctthespian Ensign

    Joined:
    Jul 13, 2022
    Messages:
    7
    Likes Received:
    0
    I'm not sure if I'm getting the problem across. I'm assuming if you change the configuration.json in the games mod folder, when a savegame is created, and I've tested a brand new local game, the configuration.json file in the save game folder has the values for the cost of the salaries from the mod folder if edited. If it's not expected that you can change the costs in the content/mod folder and instead have to change it afterwards under the saves folder that's fine. Though I would think the logic would be the mod configuration.json sets what gets created in the savegame folder for a new game.

    Basically (Edit mod/configuration.json salary 0) > (Start new local game) > (Salaries are in place) > (configuration.json created in saves folder has default salaries) > (need to edit configuration.json under the saves folder to drop salaries to 0 or modify from default)
     
    #855
  16. ASTIC

    ASTIC Rear Admiral

    Joined:
    Dec 11, 2016
    Messages:
    1,063
    Likes Received:
    727
    The reason for not taking this from the content/mods directory is that many settings are scenario-specific.
    This does not change frequently on a server, but it does in the SP.
    One possibility would be to store the configuration.json in the scenario directory or with the name of the scenario directory in a completely different location, e.g. Save\Games
    I'll think about it. Unfortunately, the API in the SP doesn't work really well, so the MP with a dedicated server is preferable anyway,
     
    #856
  17. Zapata

    Zapata Ensign

    Joined:
    Oct 14, 2023
    Messages:
    2
    Likes Received:
    1
    Hello, I've been trying to get Reforged Eden 2 ammo types to show in a base container list script in SP. Instead of the name the script shows the Id number a second time. I tried adding the descriptions to the Configuration.json file in my save game folder per the readme but have been unable to change the script results. Any help pointing out my error would be much appreciated.

    Script
    {{!Comment Line}}
    {{scroll 15 1}}
    {{#items E.S 'Ammo_Box'}}
    ◎ {{Id}} {{Count}} {{Name}}
    {{/items}}
    {{/scroll}}

    My changed section: (also made similar changes to "AmmoPlayer" and "AmmoBA" Ids section)
    "AmmoAllProjectile": ",12.7x99mmBullet,20mmBullet,30mmBullet,5.56mmBullet,7.62mmBullet,8.3mmBullet,9mmBullet,CrossbowBoltPlayer,Eden_TurretBolterBA_Ammo,Eden_TurretBolterCV_Ammo,Eden_TurretRailgun_Ammo,Eden_TurretVulcanCV_Ammo,FlameThrowerCanister,FlamethrowerTank,RailgunBullet,ShotgunShells,12.7mmBullet,15mmBullet,5.8mmBullet,50Caliber,40mmBullet,Eden_TurretRailgunHeavy_Ammo,Eden_VulcanAmmo,",
     
    #857
  18. Zapata

    Zapata Ensign

    Joined:
    Oct 14, 2023
    Messages:
    2
    Likes Received:
    1
    Never mind. I was able to get the info needed from the Vega AI demo ship in the workshop. I used the script:Boxinfos LCD in this ship incase anyone else is trying the find the same thing.

    Thanks ASTIC for this mod. It's a huge improvement in immersion.
     
    #858
    ASTIC likes this.
  19. FelixRuss

    FelixRuss Ensign

    Joined:
    Jul 23, 2024
    Messages:
    4
    Likes Received:
    0
  20. FelixRuss

    FelixRuss Ensign

    Joined:
    Jul 23, 2024
    Messages:
    4
    Likes Received:
    0
    Hello, I can’t download your file, can you leave a link to Google Drive?
     
    #860

Share This Page