API Bugs

Discussion in 'Empyrion API' started by Jascha, Mar 14, 2017.

  1. cmwhee

    cmwhee Commander

    Joined:
    Oct 31, 2016
    Messages:
    118
    Likes Received:
    72
    I've actually never seem GameEvent fire ever. I didn't even know it was supposed to be associated with PDA events, I just assume it was a deprecated and undocumented API feature
     
    #61
  2. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    I might be mistaken, but the GameEvent is a 'recent addition' (73), added after Event_PdaStateChange (72). This suggests it is likely to do with the PDA, and not deprecated :)
    Also I heard it mentioned in a discord, and forum (I think), at some point, that it was relating to the PDA.
    Again, I might be mistaken. But if it is to do with the PDA: It's broken :)
    If not: We really need something that can read events off the PDA ;) (other than just chapter's active/deactive/completed state)
     
    #62
  3. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    Hey,

    you guys are right. We took it out in 7.0 or 7.5 or lets say we deactivated it out of performance fears. It really sends a LOT!
    But for 8.1 (maybe also for 8.0 with a flag to deactivate in the dedicated.yaml or so) it will be tested and implemented again. If so we have quite some new things to play with :)

    The next days we will start with a lot of cool new features on the API side. Hope all goes well. I let you know then.
     
    #63
    Exacute likes this.
  4. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Sounds cool.

    In reality, it is for the most part enough to know:
    -When a chapter, task, action is: activated, deactivated, completed, (failed)
    -When a criteria have been partially met would be nice knowing too (for instance, if you have a subjectkilled, with amount 2, it would be nice having it spit out, when amount:1/2)
    These should be fairly 'low impacting', and really all I can think off, that is neccessary to get notified off, event-related.

    The remaining functionality would make sense to be able to querry via. a request (such as name, rewards, structure, etc.. basically exposing the yaml-imported stuff)
     
    #64
  5. Xango2000

    Xango2000 Captain

    Joined:
    Jun 15, 2016
    Messages:
    385
    Likes Received:
    202
    CmdId.Request_Playfield_Entity_List
    returns data, but that data is Not valid
    I'm receiving Entity information but none of those entities match the playfield I'm requesting Entities for
     
    #65
    Exacute likes this.
  6. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Hmm. Weird. Do you have multiple playfields running? I only tested with one, but for the most part, I got the data I was expecting.

    However! The Ids seemed off. And not everything was listed for me either.
    There's likely atleast some buggyness going on with it, yes.
     
    #66
  7. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    Please provide a proper bug report with an example what is wrong.
    "Does not work", does not help.
     
    #67
  8. Xango2000

    Xango2000 Captain

    Joined:
    Jun 15, 2016
    Messages:
    385
    Likes Received:
    202
    No. I reported the bug, it's been confirmed by someone else. You have all the information you need to find the bug yourself.
     
    #68
  9. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    If you can, I'm sure it would be helpfull with some screengrabs / lists, with ingame expected, versus logged outputs^^ I've deleted the code I used to logging, so if you still have it, that would be the easiest :)
    The more detailed 'what is going wrong', the easier it usually is to fix.
     
    #69
  10. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Bug: When closing a server, mods DO NOT get the chance to execute 'Event_Player_Disconnected'.
    This *should* always be sent, and the server *should* wait for the mod to finish, before shutting down.

    (To reproduce, click 'save and exit' in server-window /shut it down, and notice no disconnect event is sent in log/other)
     
    #70
    Last edited: Apr 16, 2018
    Jascha likes this.
  11. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Bug: When connecting to a server, 'Event_Player_Connected' doesn't fire, if the user is tabbed out.
    (Ie. the user is ON a playfield, and active, according to the 'sneak preview'. Only when you OPEN the game, does the event get sent)


    (To reproduce, click 'connect' to a server, then tab out of the game, and refer to the logfile / like, if event is received)
     
    #71
    Last edited: Apr 16, 2018
    Jascha likes this.
  12. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    This can't be send when the server is closed that way. You need to kick them first.
     
    #72
  13. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Hm. I mean it's not the end of the world to hook it up to game_exit..

    In my usecase I'm fine. But in general, the difference between game_exit, and having it be an event, is that you have (each) users entityid to work with.
    You are a little more blind in the game_exit case.
    You can maintain your own list, of players online to work around this.. But for consistensies sake, I'd think having it work foreach DC would be more intuitive, no?
     
    #73
  14. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    It would be for sure better, but I'm not sure the devs would invest much in that.
     
    #74
    Exacute likes this.
  15. <Darth Sidious>

    <Darth Sidious> Lieutenant

    Joined:
    Jul 4, 2017
    Messages:
    57
    Likes Received:
    25
    in 8.0 after loading playfield, request strucrureslist and structureupdates some time return incorrect values.... devices = 65535, lights = 65535, blocks =-1, Triangles =-1, class =255
     
    #75
  16. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    This is actually kind of correct. With 8.0 invalid data (since some data can't be delivered when the playfield is still loading) will be set to -1. That way you can determin if a value is correct or not. Before he send you a 0 which lead to even more problems.

    65535 is -1 in this case, but this will be fixed soon.

    Thanks for reporting.
     
    #76
  17. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Player connected event doesn't always get sent.
    Quite frustrating, and breaking ;)

    I have no been able to reliably reproduce it, and it seems to happen randomly.
    But nonetheless, the event for a player having connected doesn't reliably trigger.
     
    #77
  18. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Minor bug:
    If launching several 'popups' (such as itemexchange), only one will appear.
    I'm not sure how much of a bug this really is, but it can possibly lead to unintended behaviour.
    If intended, noting it in the documentation would be fine, I think. (Please let me know, if intended, so that I can update the wiki accordingly)
     
    #78
  19. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    Should be fixed with Alpha 8.0
    See new Event though.
     
    #79
  20. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    For Request_ShowDialog_SinglePlayer;
    Text is bugged. (formatting) [Possibly related: The first line is encased in ; Perhabs that is being counted as indendation?]

    Both buttons, and text, is not always properly behaving: See https://imgur.com/a/WiWHUvp
    Note, that the same result comes from \n , \r, \n\r & Envoirenment.NewLine (Although \r does nothing)

    Bonus bug1: Too much content (than what can be handled by client-screen) doesn't get auto-wrapped, but rather overflows.

    Bonus bug2: Popup box persists, even after exiting game (servershutdown)

    Bonus bug3: Overflowing in y-axis (top-bottom), doesn't get handled properly either. In this case, a scrollbar would be expected. (see image)

    Bonus bit:
    I feel it would be greatly beneficial being able to specify
    [ RIGHT],[ /RIGHT]
    [ LEFT],[ /LEFT]
    [ CENTER], [ /CENTER]tags, to define how the text behaves, per-line.

    EDIT: After further testing, it appears to be mostly related to few lines. More lines seems to make the end-result more stable.
    (See imgur link for all documentation)

    Edit2: added overflow-y bug.
     
    #80
    Last edited: Jun 2, 2018
    Jascha likes this.

Share This Page