API Bugs

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

  1. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    You meant when you send a chat? (the box and sound on top right?)
    Just tested it agian. It works fine (Sound and Box). Or do you mean something else?
     
    #21
  2. cmwhee

    cmwhee Commander

    Joined:
    Oct 31, 2016
    Messages:
    118
    Likes Received:
    72
    I'm also seeing issues with Game_Event not being called in single player mode.

    if you run a mod on a dedicated server, everything appears to work fine, but SP never fires Game_Event

    The other methods are still working as expected
     
    #22
  3. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    The mod is not for single player at the moment. Only a few functions were implemented to make the EPD tool possible.
     
    #23
  4. cmwhee

    cmwhee Commander

    Joined:
    Oct 31, 2016
    Messages:
    118
    Likes Received:
    72
    that makes a lot of things make sense
     
    #24
  5. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    Should be fixed with A 7.2
     
    #25
  6. Xango2000

    Xango2000 Captain

    Joined:
    Jun 15, 2016
    Messages:
    385
    Likes Received:
    202
    Once an ItemExchange window's button text is set it cannot be changed

    Example:
    I set the button to say "Close" when a user uses the ItemExchange as a backpack
    then try to change the text to "Send" when a user uses ItemExchange to Send a Mail message
    then I try to change it to "Delete" when a user closes an ItemExchange being used for an inbox mail message
     
    #26
    Mortlath likes this.
  7. Mortlath

    Mortlath Commander

    Joined:
    Jul 26, 2017
    Messages:
    49
    Likes Received:
    26
    I ran into this as well. The button text only changes when the client is restarted. I don't have to restart the server.
     
    #27
  8. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    Thanks. I'll added it to our list already.
     
    #28
  9. cmwhee

    cmwhee Commander

    Joined:
    Oct 31, 2016
    Messages:
    118
    Likes Received:
    72
    CmdId.Request_Entity_Spawn seems to be not working, or at the very least failing silently. I've got a workflow that runs through the steps necessary to create an entity, and receieves Event_OK but no entity is created.

    I can provide Example code if needed, but it's alittle too involved to paste in.

    for reference, the exact values I'm using are:

    {
    "forceEntityId": 0,
    "playfield": "Akua",
    "pos": {
    "x": 11.5354891,
    "y": 58.5829468,
    "z": -11.8831434
    },
    "rot": {
    "x": 0,
    "y": 139.371,
    "z": 0
    },
    "name": "Settled-Test",
    "type": 2,
    "prefabName": "Settled-Test",
    "factionGroup": 0,
    "factionId": 0
    }
     
    #29
    Last edited: Nov 25, 2017
    Jascha likes this.
  10. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    Thanks for the example.
    The prefabname looks wrong.
    It hast ot look like this:
    CV_Player
    HV_Player
    BA_Player
    ....
    I know its stupid, but thats what we got for now. But it should not be that difficult, cause you might now what you want to spawn.

    If thats not the problem, some other points in general (that came to my mind before your example):
    If you stand next to it when creating, does it show and then disappear?
    Is the Playfield loaded?
    Do you get any errors back?
    If it disappears after a few sec, please let me know and see if a touch fixes the issue (we had that problem some time ago, but was supposed to be fixed)
     
    #30
  11. cmwhee

    cmwhee Commander

    Joined:
    Oct 31, 2016
    Messages:
    118
    Likes Received:
    72

    prefabname os BA_Player (in this case BA_Alien) and name is the spawn name of the prefab blueprint?

    * it does not show then disappear, it just doesn't show at all
    * the playfield is loaded
    * no errors, I get Event_OK
     
    #31
  12. cmwhee

    cmwhee Commander

    Joined:
    Oct 31, 2016
    Messages:
    118
    Likes Received:
    72
    Update: I swapped to BA_Alien, and the structure momentarily appeared before disappearing

    by momentarily I mean <100ms

    attempting to spawn it again in the same location yields nothing
     
    #32
  13. cmwhee

    cmwhee Commander

    Joined:
    Oct 31, 2016
    Messages:
    118
    Likes Received:
    72
    also, there doesn't seem to be a structure id available to touch
     
    #33
  14. Jascha

    Jascha Administrator

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

    did you create a ID first? with Request_NewEntityId?
    that is needed to spawn the base.
    Then you also have the ID to touch it, in case it does not work. Its not beautiful, I know, but its the only thing we got for now, and it should work.
     
    #34
  15. cmwhee

    cmwhee Commander

    Joined:
    Oct 31, 2016
    Messages:
    118
    Likes Received:
    72
    "prefabName" needs to be the name of the blueprint file, without the.epb extension. Using an entitySpawnInfo with a requested entityId and the filename worked

    I've updated the wiki for this call
     
    #35
    Jascha likes this.
  16. Dost

    Dost Ensign

    Joined:
    Dec 25, 2017
    Messages:
    11
    Likes Received:
    3
    Hello there,

    I spawned BA through API call Request_Entity_Spawn. All went quite well except for structure integrity (it is all red).

    When I looked at the structure in the game, it is slightly buried in the ground. When I came closer, game unburied it but still with poor integrity.
    If at that point I call on console regenerate on that structure, it change nicely to green integrity and works great from that point on.

    But if I call regenerate on unvisited/still buried structure from a far or through API as Request_ConsoleCommand, it regenerates (it blinks on screen) but still remain as red structure integrity.

    Is there a way how to force recalculating terrain around structure or any other mean to spawn fully functioning BA structure from API call?

    Thanks a lot :)
    Dost
     
    #36
  17. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    Thanks for the Info. I'll give this further to the devs, thank you
    Not sure there is another way so far.
     
    #37
    Last edited: Dec 27, 2017
    Dost likes this.
  18. Dost

    Dost Ensign

    Joined:
    Dec 25, 2017
    Messages:
    11
    Likes Received:
    3
    Thanks a lot Jascha.

    That alone would allow for mod with Zirax expansion on planet. Building around ore deposits, and pushing on player's location. Making it slightly harder to conquer and hold planet.

    It already works for me but unfortunately without integrity you oneshot those structures and they fall to pieces - not that much harder if you ask me. Plus while I managed to convert them to Aln faction they don't seam to attack me anymore (even spawned Zirax soilders inside are peaceful). Just its ion turrets demolish predators in vicinity. It seems to me that at some point in time they attacked me...

    I can send the code of mod for testing if needed. It is just 500 lines of code and doesn't need anything else than one dll in Content/Mods/xxx and starting new game on Akua.

    Tom
     
    #38
    ZheBerg likes this.
  19. Jascha

    Jascha Administrator

    • Moderator
    Joined:
    Jan 22, 2016
    Messages:
    1,141
    Likes Received:
    713
    Just an idea. Did you use the export request before you spawned the structure. Because the export contains all the infos of the structure.
     
    #39
    Dost likes this.
  20. Dost

    Dost Ensign

    Joined:
    Dec 25, 2017
    Messages:
    11
    Likes Received:
    3
    Do you mean Request_Entity_Export? I did now on created structure but format is unreadable to me...
     

    Attached Files:

    #40

Share This Page