New API

Discussion in 'Empyrion API' started by oshadow, May 23, 2019.

Tags:
  1. oshadow

    oshadow Commander

    Joined:
    Dec 10, 2015
    Messages:
    55
    Likes Received:
    21
    Has anyone figured out how to build interaction with mods on the playfields side?
    ))))

    it turns out that each playfield will launch its own copy of the mod, and in order to manage their data, you need to implement the registration system of each mod starter in order to transfer commands and receive data to it, do I understand correctly? )
     
    #1
  2. Keith Hovey

    Keith Hovey Captain

    Joined:
    May 11, 2016
    Messages:
    221
    Likes Received:
    74
    We have a LOT of questions about the new API ourselves... So far i have not been seeing anything solid answers wise on this stuff as of yet. Im assuming more changes will be made before 10.0 launches. Best to just sit tight for now. Eventually documentation will get filled out by third parties same as last time, or eleon will generate proper documentation. As of right now the API isnt complete as far as i know.
     
    #2
    Last edited: Jun 1, 2019
  3. Kenny_66

    Kenny_66 Lieutenant

    Joined:
    May 3, 2018
    Messages:
    19
    Likes Received:
    0
    I am also very curious about the thinking behind implementing mods that load with each PfServer. It seems like an odd step since we have mods at the main server level already.

    The only thing I can think of is they may have separated out the playfield specific mod functions and made them communicate with the PfServer directly instead of pulling data from the PfServer through the Main server and into the API. (cut out the middleman)
     
    #3
  4. Xango2000

    Xango2000 Captain

    Joined:
    Jun 15, 2016
    Messages:
    385
    Likes Received:
    202
    Well, if you were to make a racing mod that uses
    modApi.Application.Update += OnUpdate;
    and the server runs that playfield process on it's own core.
    Then the loop to check the positions of the racers would only slow down that one core rather than the main process.

    but to answer the OP, I haven't played around with the new API yet but I have spent some time looking over the features and demos.
     
    #4
  5. Kharzette

    Kharzette Ensign

    Joined:
    Sep 20, 2018
    Messages:
    9
    Likes Received:
    0
    I am using a playfield mod for base related stuff. Seemed the appropriate place for it. Update doesn't get called on playfield mods, but you can just set up a timer for periodic stuff. I check base battery stuff every 15 seconds.

    I've found the ildasm tool really useful for playing around in the new stuff. Aim it at ModApi.dll and you can see what is implemented so far.
     
    #5
  6. Kharzette

    Kharzette Ensign

    Joined:
    Sep 20, 2018
    Messages:
    9
    Likes Received:
    0
    #6

Share This Page