API Wiki/Documentation support

Discussion in 'Empyrion API' started by joemorin73, Mar 17, 2017.

  1. joemorin73

    joemorin73 Captain

    Joined:
    Aug 24, 2016
    Messages:
    635
    Likes Received:
    484
    This thread is for the support of the API's documentation in the Wiki.

    https://empyrion.gamepedia.com/Game_API

    Please restrict discussion in the thread to issues in regards to the documentation of the API.
     
    #1
  2. Xango2000

    Xango2000 Commander

    Joined:
    Jun 15, 2016
    Messages:
    421
    Likes Received:
    235
    How do I connect to it?
    What port does it use?
    Is there a new setting in the dedicated.yaml for setting the port?

    I don't know any of the Cs, can I use Python to interface with it?
     
    #2
  3. joemorin73

    joemorin73 Captain

    Joined:
    Aug 24, 2016
    Messages:
    635
    Likes Received:
    484
    This is the API, not the Telnet.
     
    #3
    Narfle likes this.
  4. Xango2000

    Xango2000 Commander

    Joined:
    Jun 15, 2016
    Messages:
    421
    Likes Received:
    235
    yes. you did see the part where it says it uses a tcp port, right?
     
    #4
  5. joemorin73

    joemorin73 Captain

    Joined:
    Aug 24, 2016
    Messages:
    635
    Likes Received:
    484
  6. Xango2000

    Xango2000 Commander

    Joined:
    Jun 15, 2016
    Messages:
    421
    Likes Received:
    235
    How does the API work?
    As mentioned above it is made of two parts that communicate over a tcp-connection.
    The Game directly uses the EPM and will send events to the listening side (tool).
    The tool can then work with those events.
    You can also send requests to the EPM (and therefore to the Game). The Game will then execute them and (depending on the request) send you the things you asked for or an error.
     
    #6
  7. joemorin73

    joemorin73 Captain

    Joined:
    Aug 24, 2016
    Messages:
    635
    Likes Received:
    484
    EPM is the mod, not the mod API.
     
    #7
    Daede likes this.
  8. huhlig

    huhlig Captain

    Joined:
    Nov 5, 2015
    Messages:
    160
    Likes Received:
    328
    #8
    Daede likes this.
  9. joemorin73

    joemorin73 Captain

    Joined:
    Aug 24, 2016
    Messages:
    635
    Likes Received:
    484
    That is my fault. I haven't had a chance to update the Wiki in a while as I've been busy preparing things for my server for the 6.0 release. I will try to return to this ASAP.
     
    #9
    Daede likes this.
  10. huhlig

    huhlig Captain

    Joined:
    Nov 5, 2015
    Messages:
    160
    Likes Received:
    328
    Is there an NDA one can sign to get internal documentation on that API in the meantime?
     
    #10
    Xango2000 and Daede like this.
  11. joemorin73

    joemorin73 Captain

    Joined:
    Aug 24, 2016
    Messages:
    635
    Likes Received:
    484
    I'm not using any internal document to make the documentation. I'm using the samples in the source to reverse engineer.
     
    #11
    Daede likes this.
  12. huhlig

    huhlig Captain

    Joined:
    Nov 5, 2015
    Messages:
    160
    Likes Received:
    328
    #12
  13. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    519
    Likes Received:
    217
    Hey,

    @joemorin73 did a great Job with the documentation so far. I promised to help him but sadly did not find the time yet. :(
    The Example project and also the Interface.cs in that project were ment to explain most of those functions. But I see that not everything is clear.
    I will try to extend that online documentation in the next weeks. Alpha 6.0 still keeps us quite busy. As soon as its out I can spent more time on the API and documentation again. Sorry for the long wait.
     
    #13
  14. huhlig

    huhlig Captain

    Joined:
    Nov 5, 2015
    Messages:
    160
    Likes Received:
    328
    Ahh ok, I was kind of curious given that only 5/60 of the CmdId's were documented and there are places that list the functionality as "dunno...".
     
    #14
  15. Alexandra

    Alexandra Ensign

    Joined:
    Apr 9, 2017
    Messages:
    27
    Likes Received:
    6
    How to send "Hello" in chat message box? Not Alert. With telnet command?
     
    #15
    Last edited: Jun 5, 2017
  16. joemorin73

    joemorin73 Captain

    Joined:
    Aug 24, 2016
    Messages:
    635
    Likes Received:
    484
    As follows, without Telnet:

    Code:
                GameAPI.Game_Request(CmdId.Request_ConsoleCommand, (ushort)CmdId.Request_ConsoleCommand, new Eleon.Modding.PString("SAY 'Hello!'"));
    
     
    #16
    Alexandra likes this.
  17. Alexandra

    Alexandra Ensign

    Joined:
    Apr 9, 2017
    Messages:
    27
    Likes Received:
    6
    P.s. Thanks joemorin73 ! Working!

    How to change name "Server" in chat box? It's possible in EAH tools, but i don't know how do it with API.
     
    #17
  18. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    519
    Likes Received:
    217
    Ingame it will always show as "Server". No way to change that yet, sorry :(
    EAH tool does it only in tool. The Players still will see "Server"
     
    #18
  19. Jackall

    Jackall Commander

    Joined:
    May 12, 2017
    Messages:
    305
    Likes Received:
    91
    Ah man!! That means my "Server God" is only seen by me?!!? That takes all the fun out of it.
     
    #19
  20. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    519
    Likes Received:
    217
    #20

Share This Page