cooltrain7 / Planetside-2-API-Tracker

An unofficial repository for Planetside 2 (PS2) Census API Examples, Issues, and Wiki. Collected and Maintained by members of the PS2 API Community.
http://census.daybreakgames.com/
33 stars 8 forks source link

`"worlds": [ "all" ]` appears to be broken on world-level event subscriptions #131

Open fredkilbourn opened 2 years ago

fredkilbourn commented 2 years ago

It appears that world-level events are not working reliably if you subscribe with "worlds": [ "all" ], instead you must subscribe with "worlds":["1","9","10","11","13","17","18","19","25","1000","1001"].

I tested several variations and further testing is needed, but here are results from testing on http://census.daybreakgames.com/ps2-websocket.html:


/*** RECEIVES FacilityControl AND PlayerFacilityCapture ***/

{
    "service": "event",
    "action": "subscribe",
    "characters": [
        "all"
    ],
    "eventNames": [
        "PlayerFacilityCapture",
        "FacilityControl"
    ],
    "logicalAndCharactersWithWorlds": false,
    "worlds": [
        "1",
        "9",
        "10",
        "11",
        "13",
        "17",
        "18",
        "19",
        "25",
        "1000",
        "1001"
    ]
}

{
    "service": "event",
    "action": "subscribe",
    "characters": [
        "all"
    ],
    "eventNames": [
        "PlayerFacilityCapture",
        "FacilityControl"
    ],
    "logicalAndCharactersWithWorlds": true,
    "worlds": [
        "1",
        "9",
        "10",
        "11",
        "13",
        "17",
        "18",
        "19",
        "25",
        "1000",
        "1001"
    ]
}

/*** ONLY RECEIVES FacilityControl ***/

{
    "service": "event",
    "action": "subscribe",
    "eventNames": [
        "FacilityControl",
        "PlayerFacilityCapture"
    ],
    "worlds": [
        "1",
        "9",
        "10",
        "11",
        "13",
        "17",
        "18",
        "19",
        "25",
        "1000",
        "1001"
    ]
}

{
    "service": "event",
    "action": "subscribe",
    "eventNames": [
        "PlayerFacilityCapture",
        "FacilityControl"
    ],
    "logicalAndCharactersWithWorlds": false,
    "worlds": [
        "1",
        "9",
        "10",
        "11",
        "13",
        "17",
        "18",
        "19",
        "25",
        "1000",
        "1001"
    ]
}

{
    "service": "event",
    "action": "subscribe",
    "eventNames": [
        "PlayerFacilityCapture",
        "FacilityControl"
    ],
    "logicalAndCharactersWithWorlds": true,
    "worlds": [
        "1",
        "9",
        "10",
        "11",
        "13",
        "17",
        "18",
        "19",
        "25",
        "1000",
        "1001"
    ]
}

/*** ONLY RECEIVES PlayerFacilityCapture ***/
{
    "service": "event",
    "action": "subscribe",
    "characters": [
        "all"
    ],
    "eventNames": [
        "PlayerFacilityCapture",
        "FacilityControl"
    ],
    "logicalAndCharactersWithWorlds": false,
    "worlds": [
        "all"
    ]
}

/*** RECEIVES NO EVENTS ***/

{
    "service": "event",
    "action": "subscribe",
    "eventNames": [
        "FacilityControl",
        "PlayerFacilityCapture"
    ],
    "worlds": [
        "all"
    ]
}

{
    "service": "event",
    "action": "subscribe",
    "eventNames": [
        "PlayerFacilityCapture",
        "FacilityControl"
    ],
    "logicalAndCharactersWithWorlds": false,
    "worlds": [
        "all"
    ]
}

{
    "service": "event",
    "action": "subscribe",
    "eventNames": [
        "PlayerFacilityCapture",
        "FacilityControl"
    ],
    "logicalAndCharactersWithWorlds": true,
    "worlds": [
        "all"
    ]
}
fredkilbourn commented 2 years ago

Per [DIG] Maelstrome26 the valid worlds should be:

export const worldArray = [
    1,
    10,
    13,
    17,
    19,
    40,
    1000,
    2000,
];

https://discord.com/channels/251073753759481856/451032574538547201/976479124086464522

microwavekonijn commented 1 year ago

I just wanted to leave the comment that the case /*** ONLY RECEIVES FacilityControl ***/ is not broken. PlayerFacilityCapture is a character centric event that is filtered by whitelisting character id first and foremost, world ids can be used to further filter the messages in combination with logicalAndCharactersWithWorlds set to true.

I suspect it is a bug with the wildcard for worlds which is also related to the subscriptions being altered. I am currently tracking this in more detail with NSS.