1. I have corrected the e-mail settings so that outgoing e-mails from these forums should be sent now. If you tried to Register or Reset your Password, please try again!
    Dismiss Notice

More Details on MetagameEvent?

Discussion in 'Census: Planetside 2' started by ParhelionChaser, Aug 2, 2014.

  1. I'm trying to write a client that will poll for events every couple of minutes to check for alerts, and to see which faction won the most recent few alerts. The API I'm finding on http://census.daybreakgames.com/ is a little light on details; is there a document with more details on how to get the most out of this data? Or is there someone who can give me the lowdown on this? Thanks!
     
  2. Jhett12321

    Jhett12321 Guest

    http://census.daybreakgames.com/get/ps2:v2/world_event?type=METAGAME
    Will return the 10 most recent metagame events, in a format similar to this:

    Code:
       "event_type": "MetagameEvent",    "experience_bonus": "20",    "faction_nc": "1",    "faction_tr": "1",    "faction_vs": "1",    "instance_id": "628",    "metagame_event_id": "10",    "metagame_event_state": "138",    "metagame_event_state_name": "ended",    "table_type": "metagame_event",    "timestamp": "1407138938",    "world_id": "25",    "zone_id": "0"
    faction_xx is the territory control at that point. It returns a 0-100 float if it's a territory control alert, or an int between 0-3 if it's a facility alert.

    instance_id is a SERVER unique number that is given to each alert. Can be used to track start, and end events.

    metagame_event_id is a magic value representing the continent and facility type of the alert. They map to the metagame_event collection: http://census.daybreakgames.com/get/ps2:v2/metagame_event?c:limit=100&c:lang=en

    metagame_event_state represents if this is a start, or end of an event.

    timestamp: Time (in seconds) since Unix epoch.

    world_id represents the server. See http://census.daybreakgames.com/get/ps2:v2/world?c:lang=en&c:limit=100

    zone_id is a deprecated value! Use metagame_event_id instead.
     
  3. Fantastic! Thanks for the reply- that's hugely helpful. I noticed that metagame_event_state also had a value of "canceled" in one case. Do you know what that might indicate?

    So the ten most recent alerts are available; there's no timespan bounding them as well, then. Okay, that makes sense.

    Ooh- with the new changes to alerts, do you have any idea whether there will be changes to the event data?

    Thanks again! It's cool to see that there's some community around here in this side of the game. :)
     
  4. Jhett12321

    Jhett12321 Guest

    I haven't seen a canceled state so far, but I just treat them the same as 'end' states.

    You can get more than the 10 most recent using the c:limit query command:
    Code:
    http://census.daybreakgames.com/get/ps2:v2/world_event?type=METAGAME&c:limit=100
    Yes, they have made changes. metagame_event_id now maps to the following:
    Code:
    var alertTypes = {    "31":{zone:"2", facility:"0"}, //Indar Lock    "32":{zone:"8", facility:"0"}, //Esamir Lock    "33":{zone:"6", facility:"0"}, //Amerish Lock    "34":{zone:"4", facility:"0"}, //Hossin Lock};
    You can also get events between 2 timestamps using the after, and before query commands available in world_events. A list of world_id's can also be given to get events for specific servers:

    Code:
    http://census.daybreakgames.com/get/ps2:v2/world_event?type=METAGAME&c:limit=100&after=1407300000&before=1407308942&world_id=10,11,13
     
    Last edited by a moderator: Dec 13, 2016

Share This Page