PA Client API Requests

Discussion in 'Mod Support' started by wondible, March 11, 2014.

  1. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    meta told me in the irc to ask him for requests and I figured making this thread more visible is a better idea
    cptconundrum and wondible like this.
  2. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    Make the xmpp chat easier accessibly for external programs
    Currently the chat uses the uberid as a login and the current session id as a password. That's pretty nasty when trying to connect via an external chatprogram or via a library. Being able to chat with people without having to open PA is quite cool however. I was able to send messages back and forth between PA and a little program I wrote. However it requires me to have a session id handy to login. I think session ids have a pretty long lifetime, but still it would be much easier to authenticate via ubernet login/pass.

    Also I think it should be possible to send messages to people who are not on your friendlist. xmpp seems to easily support this. I was able to send a message from a self written program to PA without having the user of the program on my friendlist by removing a few checks from PA's code. To get rid of people a block user feature should be implemented instead.
    cptconundrum, proeleert and LavaSnake like this.
  3. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,622
    Likes Received:
    691
    That's epic! It would be really neat to have a global PA chat feed that uses that and a website so you could connect from anywhere.
  4. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    An official way to pass data into pa.exe via a parameter
    Currently the replay links use the parameter --username. I have no idea what that parameter is for, it looks unused (and if somebody at Uber realizes that it can be cleaned away that would be pretty bad for us). The cool tthing for us about --username is that the value passed into it is given to the js layer. So a mod can receive it and do stuff like open a replay.

    EDIT:
    Fulfilled:
    [​IMG]
    Last edited: May 25, 2014
    cptconundrum and zihuatanejo like this.
  5. wondible

    wondible Post Master General

    Messages:
    3,279
    Likes Received:
    2,078
    Subscribe to unit
    Subscribe to a unit/group for health and activity information. Expected uses: team commanders health, tracking nukes/major projects without rendering an entire pip, monitoring overall size/health of multiple attacking groups. If not a subscription, ability to query unit properties by id.

    Edit: Sort of possible, but only provided the server is sending the data (e.g. visible on screen), unless you turn off all filtering.
    Last edited: November 14, 2015
    LavaSnake and Fr33Lancer like this.
  6. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    I want to reinforce this request. It would be super crazy helpful for me and would get rid of a ton of potential error sources if I could somehow request the server_state data that the lobby gets from inside of the live_game scene.

    So to make my request super precise, this is what the server_state handler gets on entering a lobby.
    First this is the config of the lobby:
    [​IMG]
    2vs2 with one team having shared resources and some random system. This is probably the most complex case config wise for me.
    So this is what server_state gets:
    [​IMG]
    Important here is that it lists the exact team composition with every single player as a separate entity. It also lists the exact planets. That's required after all to build up the lobby UI.

    Now currently this is were PA Stats has to get data from. That's rather annoying because the moment some new way to join a game is invented I have to figure it out all again, so far I've not really figured out if I can get this data for galactic war games at all.

    It would be MUCH simpler for me if I could get the data above from inside live_game. This however seems not to be possible, as the server_state handler for the game above gets this data:

    [​IMG]
    So this is the exact same game, I just clicked ready and start to launch it. Now note:
    - There are 3 armies for this 4 player 2v2. One of them has a name that is build up of 2 player names, they are listed as one army because of shared resources. There is no indication whatsoever for me to separate the players again. This is really bad for me and makes it impossible to even get the team composition from inside live_game in the case of shared armies games.
    - The used system is missing completely. I think there is some other handler that gives it a bit of data about the planets, but not the full system as the lobby has it. I need the full one.

    Suggestion: Just have the server keep the lobby data and add it to the server_state message. i.e. you can just store the full lobby server_state message data in the server and have it add a lobby: properties to the live_game server_state message that has the last lobby server_state. Should be pretty simple to implement server side and would require no changes in the client (at least not in the js layer, dunno about how the native code looks like after all). Implementing it that way should also take care that it stays up to date even if the lobby code is changed to have a different data format.
    Please :> Would get rid of so maaaany headaches and so many weird errors I had and still get especially after patches. Like I have no idea how to get this info in gw and even if I figure out how to it will be some super specific way only for gw. I dislike lots of specific ways, I'd rather just grab the data when it is final and in use by the running game.

    EDIT:
    As a bonus add the lobbyId of the game currently being played.
    Last edited: May 26, 2014
  7. swizzlewizzle

    swizzlewizzle Active Member

    Messages:
    216
    Likes Received:
    56
    I would like to have an API into basic AI. Nothing low level or anything but at least enough to set goals, change AI "attitudes", apply AI selectively across units.. that sort of thing.
  8. Raevn

    Raevn Moderator Alumni

    Messages:
    4,234
    Likes Received:
    4,338
    mgmetal13 likes this.
  9. wondible

    wondible Post Master General

    Messages:
    3,279
    Likes Received:
    2,078
  10. metabolical

    metabolical Uber Alumni

    Messages:
    312
    Likes Received:
    1,366
    Just saw this completed in our tracking list, so it should be in the next build, whenever that is.
  11. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    So whenever that is I'll clean up PA Stats :D
    cptconundrum and proeleert like this.
  12. Raevn

    Raevn Moderator Alumni

    Messages:
    4,234
    Likes Received:
    4,338
    Additional blueprint parameters:

    "wreckage_feature" - specify a feature blueprint to use for wreckage instead of the automatically created one. This parameter should be usable on both units and features (so you can chain them)
    Last edited: June 25, 2014
  13. wondible

    wondible Post Master General

    Messages:
    3,279
    Likes Received:
    2,078
    Last edited: September 18, 2014
  14. wondible

    wondible Post Master General

    Messages:
    3,279
    Likes Received:
    2,078
    Stop sending absolute urls to the client
    The client files are located and run locally, so it should control it's own fate. Not urgent since the workaround is to examine the URL and figure out what state change it implies.
  15. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    68331 seems not to be that next build?
    [​IMG]

    can't see any change
    cptconundrum likes this.
  16. wondible

    wondible Post Master General

    Messages:
    3,279
    Likes Received:
    2,078
    Field 'slots' was added. Might be nice if was objects with individual connected states etc., but names are a start.
    cola_colin likes this.
  17. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    ah, that's good enough for the players.
    And what about the full planet data part? :p
    cptconundrum likes this.
  18. zihuatanejo

    zihuatanejo Well-Known Member

    Messages:
    803
    Likes Received:
    581
    As detailed here, https://forums.uberent.com/threads/...access-to-a-unit-move-function-command.64280/, I would like access to a unit's gameworld coordinates (x,y,z) and access to a move command, so I can make that unit move around. Primary goal is a simple one-click or modifier input to make a unit move in a spiral around the whole planet, or around the perimeter of an area-patrol/command. If you could make this possible, it would be AWESOME (and that is what this game is about, right?!)

    EDIT: might need to know a bit more about you store and manipulate gameworld coordinates to make this work, some sort of orientation relative to pole data might be needed as well.
  19. wondible

    wondible Post Master General

    Messages:
    3,279
    Likes Received:
    2,078
    Planet Summary Information
    Along the lines of the spectator panel, per-planet. Would enable mods that gave a grand overview for multi-planet games. Should provide information on enemy units, up to the last intelligence, so it would be possible to report the relative amount of control by each player. (Inspired by the recent minimap discussions)
    Last edited: November 14, 2015
  20. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    I'd like to reinforce the request for a way to get world coordinates by a generic "give me the world coordinates of the mouse cursor right now" call. I especially need this call in the system editor, it is the missing key for a map editor where the user makes a click in the system editor and gets a new brush added/removed at the clicked location.
    Additionally it would be _very_ helpful if map features would accept a direction position: [x,y,z] property, just like brushes.

    @sorian pinging you, as you're in that team ;)
    Last edited: October 12, 2014
    zihuatanejo likes this.

Share This Page