API Extension for player data

Discussion in 'Suggestions' started by Duling, Jul 11, 2022.

  1. Duling

    Duling Spearman

    Joined:
    Nov 25, 2017
    Messages:
    5
    Likes Received:
    5
    Trophy Points:
    3
    Hi all!

    Me and my brother we are always logging on and off the civs to check if we have receipts, quests done/missing, what we have on the vault, etc.

    Is it possible to have that content available through a REST API? That would require the user/password to acquire the user's data of course, so we can only query our own data.

    I'm thinking about:
    1. Currency data
    2. Vaulted items
    3. By civ:
      1. Accepted quests
        1. Status and info on the quest (e.g.: which quests are missing to complete this one, etc);
      2. Warehoused items
      3. Schools
        1. Known recipes
      4. Factories
        1. Production state(e.g: Pine plank, 35%)
      5. Units & Gear
    Any other kind of query would be done outside of the API's. I bet a lot of players dabble in programming like me and tools for user management and "clans" could easily be created with that.
     
  2. Loading...


  3. CrimsonCantab

    CrimsonCantab Berserker

    Joined:
    Sep 14, 2018
    Messages:
    115
    Likes Received:
    99
    Trophy Points:
    28
    I would be interested in helping out with this, if possible. I'm guessing the server code is largely C#?
     
    Ardeshir likes this.
  4. martinmine

    martinmine Server Engineer
    Staff Member Administrator

    Joined:
    Aug 6, 2019
    Messages:
    378
    Likes Received:
    265
    Trophy Points:
    63
    Hi,
    I think this is a great idea and it is something that I have been thinking about myself. It is technically possible to implement but there are architectural constraints that prevents this from being implemented. These are really expensive to address and it takes a lot of time to take care of it. The actual problem is that player information (that you want to query) is kept in-memory. This is not persisted before you log out of the game, or if the server shuts down. An API would have to be built as a separate application running next to the server and with this design it is not possible to know when the data is "up to date" or not.
    What is really cool is that this opens the gate to other applications where we could for example have dashboards for player stats, display player info on the forum, and so on.
    I hope to get there one day but right now this is not something that is highly prioritized.
     
    Ardeshir, ConradIII and Slyrevick like this.
  5. ConradIII

    ConradIII Champion

    Joined:
    May 8, 2022
    Messages:
    77
    Likes Received:
    24
    Trophy Points:
    8
    As I remember there once was a part of the website that showed all your Civs and what crafting, what level of gear - would be great if you brought it back .. but focus on India Civ - these tweaks are great but I understand the effort ..
     
  6. Ardeshir

    Ardeshir Immortal

    Joined:
    Apr 8, 2019
    Messages:
    983
    Likes Received:
    527
    Trophy Points:
    93
    Love the idea of having aoeo's equivalent to aoe4 World and AoEIV.net in a couple years time, and can see the equivalent to WoW's armory with quest cooldown timers for logged-in users being super useful for regular PvEers.

    Guess it just comes down to getting enough trusted players with programming skills onto it so it doesn't need to impact Kev and Martin if we wanna expedite things?

    I might be able to help (in a month or so) under the wing of someone who actually codes for a living, like @CrimsonCantab. I'm not an expert by any means but I've mucked around with game files for offline mode and now played with rms in more than 1 title. If it's C++, C#, html or xml I won't be completely lost, just mostly :D
     
  7. CrimsonCantab

    CrimsonCantab Berserker

    Joined:
    Sep 14, 2018
    Messages:
    115
    Likes Received:
    99
    Trophy Points:
    28
    Wait, so if the server shuts down, how is all that data preserved? Where does it go when you do maintenance?
     
  8. martinmine

    martinmine Server Engineer
    Staff Member Administrator

    Joined:
    Aug 6, 2019
    Messages:
    378
    Likes Received:
    265
    Trophy Points:
    63
    Everything is saved to disk. Your player data is also saved to disk when you sign out, so if the server suddenly crashes the largest impact is the players who are online.
     
    Comecudemod likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice