API Bugs

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

  1. Xango2000

    Xango2000 Captain

    Joined:
    Jun 15, 2016
    Messages:
    715
    Likes Received:
    419
    Small Bug:
    Autominer T3 shows up in Event_Playfield_Entity_List as a Type 0 but the T1 and T2 don't show up at all, neither does the Water Generator.
     
    #81
  2. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,019
    Likes Received:
    725
    Small-ish bug:
    The text on the button for ItemExchange doesn't change, unless client does a reload of game. (It appears to be fixed to whatever the client first saw, when they started the game)
     
    #82
    Jascha likes this.
  3. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,019
    Likes Received:
    725
    Request_Playfield_Stats:
    With the change of 'ents', it has now become very clear that this is broken (The returning event).
    The list does not contain
    -Players
    -Dronebases
    -Drones (sometimes? - It will appear that they are displayed, if a player is loading them, otherwise omitted.. But the drones don't just 'go away', just because a player is away from them, so this seems wrong..)
    -Some alien installations, such as spawned 'patrol carrier HQ', 'carrier mk1'
    -Itemcrates (wether it be from death, or by dropping) are not displayed, if not loaded by a player. (Basically same case as the drones: They aren't going away, just because they are unloaded)
    At the very least. I did some shallow testing, so there's likely even more wrong with the returns..

    And I (still) very much would like it to ATLEAST include the name of the entity on this list aswell (If someone is going to bugfix it, it should be a quick addition.. Pretty please? )
     
    #83
  4. Mortlath

    Mortlath Commander

    Joined:
    Jul 26, 2017
    Messages:
    142
    Likes Received:
    112
    Any update on this? I was hoping that this would be fixed in Alpha 8.
     
    #84
  5. Mortlath

    Mortlath Commander

    Joined:
    Jul 26, 2017
    Messages:
    142
    Likes Received:
    112

    Any update on this? I was hoping that this would be fixed in Alpha 8.
     
    #85
  6. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    845
    Likes Received:
    363
    Hey,

    you will get back
    - Event_DialogButtonIndex, in case it worked
    - or for example PlayerId not found in case he got offline.


    I just checked it and it works.
    You have to set the factionGroup to
    Faction = 0
    Privat = 1
    And the factionId to the players internal ID (not Steam Id)
     
    #86
  7. Mortlath

    Mortlath Commander

    Joined:
    Jul 26, 2017
    Messages:
    142
    Likes Received:
    112
    Ah, I was setting the factionGroup to Eleon.Modding.PlayerInfo.factionGroup of the player who was to own it.
     
    #87
  8. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,019
    Likes Received:
    725
    When doing game_exit, and trying to trigger Request_Entity_Destroy, will result in an 'out-of-sync' error.
    It seems to still have executed the request however, as the structure will be gone when logging on again.. Possibly just a minor thing? (Aka, remember to wrap any request in game_exit, ina try/catch?)
     
    #88
  9. Mortlath

    Mortlath Commander

    Joined:
    Jul 26, 2017
    Messages:
    142
    Likes Received:
    112
    Are you talking about Eleon.Modding.CmdId.Request_ShowDialog_SinglePlayer? I get responses back from that request.

    I double checked, and I don't get any kind of event back when I send Eleon.Modding.CmdId.Request_InGameMessage_SinglePlayer.

    I used to get Eleon.Modding.CmdId.Event_Ok back with the same sequence number, but now I don't get anything back. If I send a different request later, I get back a response for that, so nothing appears to be hung.
     
    #89
  10. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    845
    Likes Received:
    363
    Oh I'm sorry. You are right I looked at the wrong request. Will check it later today
     
    #90
  11. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    845
    Likes Received:
    363
    Ok I see what you mean. I put it also on the list. But as also for all the rest... We have to wait when they will continue :(
     
    #91
  12. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,019
    Likes Received:
    725
    (I suppose technically not a bug, but evenstill: It would appear, that the Mods run in the same thread as the servers other functions.. If you for instance do a while(true) (Infinite loop), the server will drop all players.. A less extreme example is, for more expensive functions, AI will clearly freeze up.. This is without anything in the game_update() section)
     
    #92
  13. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,019
    Likes Received:
    725
    Request_Entity_SetName
    Does not support entities (such as drones) - Neither on the closeup (Which displays their 'non-resolved name still, such as SpaceDroneLaser..), nor on the marker above their heads.
     
    #93
  14. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,019
    Likes Received:
    725
    Request_Entity_Destroy2
    For param 'playfield' does not support 'null'. You have to specify on which playfield the entityid exist on.
    Technically not a bug, but def. an inconvenience
     
    #94
  15. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,019
    Likes Received:
    725
    When doing Game_Exit() , requests sent will result in 'out-of-sync' issue.

    An usecase I atleast have, is deleting some structures on quit, as:
    GameAPI.Game_Request(CmdId.Request_Entity_Destroy, 9988, new Eleon.Modding.Id(f.Key));
    This will more often than not, after DSL, result in this error. Beforehand it was functional.

    Possibly provide a Game_OnBeforeExit, that will stall the game untill the mod gives the 'goahead, shutdown', if used, or optionally, find a way to resolve the issue, so that 'last-minute' requests will still be executable.
     
    #95
  16. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,019
    Likes Received:
    725
    Request_Entity_Spawn

    -entityTypeName does not work (ie. unable to use it to spawn NPCs) -- That, or I'm doing it wrong ;)
    --Tested extensively with type 0 (unset), and up to 20
    --Tested with all flags set, except bpdir and bpname
    --Tested with 'friendly names' aswell as 'unfriendly names' for multiple zirax mobs

    -Does no longer mess with the terrain (this is both good and bad.. I would like to have an option, where it will 'build up to it', or 'dig down as needed', as it used to be.
    --Sometimes it partially does it, but acts quite unpredictable (if set to 'flatten' as bp option)..
    ---Usually nothing happens
    ---Sometimes something happens when restarting server
    ---If something have happened, result will variate by just moving around
     
    #96
    Last edited: Oct 10, 2018
  17. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,019
    Likes Received:
    725
    Blueprints spawned from Request_Entity_Spawn is hostile to whatever they are spawning.
    (If they have a spawner, and it spawns things, the structure (turrets etc) will attack what is spawned)
     
    #97
  18. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,019
    Likes Received:
    725
    Telnet's remoteex doesn't seem to want to coexist with 'aim':
    remoteex cl=1 'aim av' (With the clientid '1' being a valid player), sent through
    Request_ConsoleCommand

    does nothing. The game seemingly receives it but does nothing.

    (With the same approach, other commands such as 'give credit 10' works)
     
    #98
  19. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,019
    Likes Received:
    725
    When using Event_GlobalStructure_List ,
    Structures that have been moved (by the API), will have their pos & rot set to '0,0,0', rather than their actual position...

    (Structure moved by Request_Entity_ChangePlayfield)
     
    #99
  20. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,019
    Likes Received:
    725
    Telnet's remoteex doesn't seem to want to coexist with 'wipe':
    remoteex cl=1 'wipe<playfield> deposit' (With the clientid '1' being a valid player), sent through, and <playfield> being a valid one.
    Request_ConsoleCommand

    Returns CoQ error, and logs to dedi server:
    10-21:14:00.701 22_14 -WRN- ClientExc from CId=1, EId=1042, steamid/=/'Exacute': System.IO.DirectoryNotFoundException: Could not find a part of the path "D:\APPS\steamapps\common\Empyrion - Galactic Survival\Saves\Games\DediGame\Playfields\Akua\wipeinfo.txt".
    c2137_at at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
    c2137_at at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
    c2137_at at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
    c2137_at at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) [0x00000] in <filename unknown>:0
    c2137_at at System.IO.StreamWriter..ctor (System.String path) [0x00000] in <filename unknown>:0
    c2137_at at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string)
    c2137_at at System.IO.File.WriteAllLines (System.String path, System.String[] contents) [0x00000] in <filename unknown>:0
    c2137_at at Assembly-CSharp.PageProvider.DisableView (Boolean , Boolean , Boolean , Boolean , Boolean ) [0x00000] in <filename unknown>:0


    (With the same approach, other commands such as 'give credit 10' works)
     

    Attached Files:

    #100

Share This Page