API Wiki/Documentation support

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

Thread Status:
Not open for further replies.
  1. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Alright. In that case, I'd highly like one for entities in general (mostly focused around 'drops on the ground', and NPCs)
    It would be usefull knowing 'what this is' in detail for an entity.

    Also, I'd like the entity list command to ideally include a name, aswell as actually using the types listed ;)

    I've already been doing some. I'll go crazy then. ;)
     
    #41
  2. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Alright, I've added a template to the top of each of the pages I could find, with an Index, back to the gameAPI.. should make navigating the wiki a little bit nicer :)

    I looked at adding a link to the GameAPI page, onto the front page of the wiki, but it doesn't seem like I can. Maybe you can?
    (I was thinking of putting it under the 'Development', And just refer to the main Game_API side)
     
    #42
    Jascha likes this.
  3. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
  4. Xango2000

    Xango2000 Captain

    Joined:
    Jun 15, 2016
    Messages:
    385
    Likes Received:
    202
    Remind me to update the wiki page about the dialog window. The new version doesn't use IdMsgPrio like the old one did.
     
    #44
  5. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    If you notice that it changed, then please just updated it instead of spamming all possible communication channels. Thanks.
     
    #45
  6. Xango2000

    Xango2000 Captain

    Joined:
    Jun 15, 2016
    Messages:
    385
    Likes Received:
    202
    I've mentioned the dialog box change twice; once here asking for a reminder and once on discord asking if anyone has figured it out yet. That is not spamming.

    I asked for the reminder because I just remembered that I figured that out and forgot to document it, I'm at work right now so I can't edit the wiki.
     
    #46
  7. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    This is a public forum, not your personal calendar. I guess that says all... So please.
     
    #47
  8. Xango2000

    Xango2000 Captain

    Joined:
    Jun 15, 2016
    Messages:
    385
    Likes Received:
    202
    oh, my bad. I should have said
    "Somone needs to to update the wiki page about the dialog window the new version doesn't use IdMsgPrio like the old one did. I'll get to it when I get home if nobody gets to it first."
     
    #48
  9. Xango2000

    Xango2000 Captain

    Joined:
    Jun 15, 2016
    Messages:
    385
    Likes Received:
    202
    Updated:
    Request_ShowDialog_SinglePlayer entry

    Added:
    DialogBoxData page
    Event_DialogButtonIndex entry, though I left most of it blank because I haven't tested it myself.

    Does anyone know about Event_DialogButtonIndex? Is anyone working on it?

     
    #49
  10. oshadow

    oshadow Commander

    Joined:
    Dec 10, 2015
    Messages:
    55
    Likes Received:
    21
    is request:
    private void Player_ShowDialog_SinglePlayer(int entityId, string message, string pos = "OK", string neg= "")
    {
    Eleon.Modding.DialogBoxData DLG = new Eleon.Modding.DialogBoxData();
    DLG.Id = entityId;
    DLG.MsgText = message;
    DLG.PosButtonText = pos;
    DLG.NegButtonText = neg;

    SendRequest(Eleon.Modding.CmdId.Request_ShowDialog_SinglePlayer, (ushort)Eleon.Modding.CmdId.Request_ShowDialog_SinglePlayer, DLG);
    }


    fired event:
    case Eleon.Modding.CmdId.Event_DialogButtonIndex:
    {
    Eleon.Modding.IdAndIntValue obj = (Eleon.Modding.IdAndIntValue)p.data;
    if (obj == null) { break; }
    addEvent(string.Format("Result DialogBOX ID: {0} Value: {1}", obj.Id, obj.Value));
    }
    break;
     
    #50
  11. oshadow

    oshadow Commander

    Joined:
    Dec 10, 2015
    Messages:
    55
    Likes Received:
    21
    is there any documentation on the changes of the API? Something I do not see, that besides messages something appeared ... (
     
    #51
  12. imlarry425

    imlarry425 Captain

    Joined:
    Jan 10, 2019
    Messages:
    464
    Likes Received:
    339
    I was interested in writing a mod that used a placed NPC as the interface (similar to the trader gambler npc that plays 21) ... I went through the wiki and github code but didn't find/recognize anything like that, is there any public documentation or example code anyone is aware of that shows events/requests related to those? Thanks muchly.
     
    #52
  13. Taelyn

    Taelyn Guest

    You dont do this with the API but with the Dialogue System

    Examples are inside Dialogues.ecf file and Dialogues-config-and-examples.txt
     
    #53
    imlarry425 likes this.
  14. imlarry425

    imlarry425 Captain

    Joined:
    Jan 10, 2019
    Messages:
    464
    Likes Received:
    339
    Thanks Taelyn .. I'm looking at the function interfaces that are implemented in the dialog config examples and had a quick question if you don't mind. If I wanted to use the conversation mechanism to interact with a helper app/mod is that supported?

    use case: in a conversation with a dialog enabled npc selecting "Ensign Floyd, help me plot the shortest route to <target> from our current location" would bring forward a helper app (client mod?) that uses read-only access to global.db to populate weighted adjacency matrix and then does best path search and presents it and potentially locks target on the first jump in the sequence with some sort of loadNextJump between the hops.

    Guessing this would start something like...

    Execute_1: "SetSignal('AstrometricsBestPathDialog', true)"

    ...but don't see any events or requests that interact with signal logic or create call backs. Not sure if the integration model would support this sort of thing or if dialog properties like currentTarget are exposed in the API.

    At the high level what pieces would you use to write that sort of thing? Appreciate the help, if I should take this to the discord or elsewhere no grief.
     
    #54
  15. Taelyn

    Taelyn Guest

    No this isnt possible

    Neither the dialog has any API interaction
     
    #55
    imlarry425 likes this.
  16. zaphodikus

    zaphodikus Captain

    Joined:
    Oct 1, 2016
    Messages:
    471
    Likes Received:
    229
    Has anyone written alternate versions of the "getting started" steps anywhere. I tried to follow them but found I was unable to import the lib successfully. A high level description of the workings may have helped my switch in toolchains more easily troubleshoot if the problem I faced was really that this only works under certain environment setups. Alternate guides?
     
    #56
  17. Xango2000

    Xango2000 Captain

    Joined:
    Jun 15, 2016
    Messages:
    385
    Likes Received:
    202
    Here is an example of both the API1 and API2 versions of a simple ServerSay mod plus a video showing the mod in action.

    Code and Mod can be downloaded here for free.
    https://www.patreon.com/posts/43804726

    Video showing the mod in action and some of how to set up Visual Studio to edit the code.
     
    #57
    zaphodikus likes this.
  18. Xango2000

    Xango2000 Captain

    Joined:
    Jun 15, 2016
    Messages:
    385
    Likes Received:
    202
    #58
Thread Status:
Not open for further replies.

Share This Page