Page 1 of 1

EP Lobbies JSON documentation

Posted: 21 Oct 2017, 06:01
by EAGLEMUT
This documentation is intended for developers who wish to consume EP Lobbies data, now available from http://eso-community.net/assets/patch/api/lobbies.json
Here is an example JSON output:

[
{
"allow_cheats": false,
"deleted": false,
"game_mode": 0,
"game_speed": 1,
"id": "a568cdbffb854a2fa496e51111044437",
"koth": false,
"last_pong": 1508558282.831,
"last_change": 1508558201.722,
"map": "Deccan",
"max_hc": -1,
"max_players": 7,
"min_hc": -1,
"monopoly": true,
"name": "Eaglemut_OP's Game",
"no_blockade": false,
"password": null,
"patch": null,
"players": [
"Eaglemut_OP",
"Queen Elizabeth",
"Napoleon",
"Queen Isabella",
"Henry the Navigator",
null,
null,
null
],
"quicksearch": false,
"restorable": false,
"scenario": false,
"starting_age": 0,
"treaty_time": 0
}
]


What you get is an array of objects, each of those objects representing one lobby/game room.

Properties of this object are:
bool allow_cheats - Indicates that the Allow Cheats option has been selected.
bool deleted - Internal. Indicates that our server marked this room as to likely be no longer available. These rooms should not be displayed as active rooms on a UI.
int game_mode - Indicates selected game mode. 0 = Supremacy, 1 = Deathmatch.
int game_speed - Indicates selected game speed. 0 = Slow, 1 = Medium, 2 = Fast.
string id - ESO room ID.
bool koth - Indicates King of the Hill game mode.
timestamp last_pong - Internal. Time of the last received keepalive request from host.
timestamp last_change - Internal. Time of the last received room update request from host.
string map - DisplayName of the currently selected map. This name is mostly readable to the end-user, but is not the actual translated name as seen on ESO.
int max_hc - Maximum allowed HC level for this room.
int max_players - Maximum allowed number of players for this room.
int min_hc - Minimum allowed HC level for this room.
bool monopoly - Indicates whether the room has Trade Monopoly victory condition enabled.
string name - Custom player-defined name of this game room. Always returns "QuickSearch Match" if quicksearch is true.
bool no_blockade - Indicates whether the room has activated No Blockade rule.
bool password - Indicates whether the room is password-protected.
int patch - Internal. Indicates currently active game patch. 1 = ESOC Supremacy Standard Patch, 2 = ESOC Treaty Patch, 3 = EP XPMOD, 4 = EP Smackdown.
string[8] players - Array of player names participating in this game room. The array is sorted according to the actual order of players in this game room, remaining empty/closed spots are filled with null values. If quicksearch is true, the array will only contain "Power Rating X" as the host player name, where X is that player's PR, rounded up to an integer.
bool quicksearch - Indicates that this room is a Quick Match room and wasn't hosted through the game browser. If true, the room name and host player name will be returned anonymized.
bool restorable - Internal. Indicates that this room was marked as deleted due to an abrupt stop in communication, and may still be restored.
bool scenario - Indicates the room is a Scenario type room.
int starting_age - Indicates the selected starting age for this room. 0 = Discovery, 1 = Colonial, 2 = Fortress, 3 = Industrial, 4 = Post-Industrial, 5 = Imperial, 6 = Post-Imperial.
int treaty_time - Treaty time, in minutes.

Re: EP Lobbies JSON documentation

Posted: 21 Oct 2017, 19:33
by musketeer925
It would probably be better to change password to a bool, and let GUIs represent as they please (e.g., "Yes").

Re: EP Lobbies JSON documentation

Posted: 21 Oct 2017, 20:50
by EAGLEMUT
musketeer925 wrote:It would probably be better to change password to a bool, and let GUIs represent as they please (e.g., "Yes").

Yes, done. :flowers:

The password attribute is now a bool and the patch attribute is functional. Doc updated.

Re: EP Lobbies JSON documentation

Posted: 27 Oct 2017, 18:07
by momuuu
This is cool and it seems to be working right now

Re: EP Lobbies JSON documentation

Posted: 27 Oct 2017, 18:20
by deleted_user
I can't wait to fix my computer

Re: EP Lobbies JSON documentation

Posted: 27 Oct 2017, 18:23
by aligator92
So thats why you kept hosting your afk lobby these last couple of days :D

Re: EP Lobbies JSON documentation

Posted: 27 Oct 2017, 19:04
by EAGLEMUT
aligator92 wrote:So thats why you kept hosting your afk lobby these last couple of days :D

Exactly, haha. Sorry to everyone for being unresponsive.

Re: EP Lobbies JSON documentation

Posted: 26 Jun 2018, 08:14
by Ashvin
timestamp last_change - Internal. Time of the last received room update request from host.

This is in seconds, not ms.

Re: EP Lobbies JSON documentation

Posted: 26 Jun 2018, 08:38
by EAGLEMUT
Ashvin wrote:
timestamp last_change - Internal. Time of the last received room update request from host.

This is in seconds, not ms.

It's in timestamp, like last_pong :hmm:

Re: EP Lobbies JSON documentation

Posted: 19 Aug 2018, 16:08
by EAGLEMUT
Updated for new quicksearch attribute and related changes to name/players.

Re: EP Lobbies JSON documentation

Posted: 01 Dec 2019, 17:45
by UrvyZnapy
Sometimes I get null map

Code: Select all


{
"allow_cheats": false,
"deleted": false,
"game_mode": 0,
"game_speed": 1,
"id": "d9a0e3495d4d46ef8965610f4f1e2b94",
"koth": false,
"last_change": 1575219071.7764876,
"last_pong": 1575219071.7764876,
"map": null,
"max_hc": -1,
"max_players": 2,
"min_hc": -1,
"monopoly": true,
"name": "EAGLEMUT's Game",
"no_blockade": false,
"password": false,
"patch": 1,
"players": [
"EAGLEMUT",
"Henry the Navigator",
null,
null,
null,
null,
null,
null
],
"quicksearch": false,
"restorable": false,
"scenario": false,
"starting_age": 0,
"treaty_time": 0
}
and sometimes empty room

Code: Select all


{
"allow_cheats": false,
"deleted": false,
"game_mode": 0,
"game_speed": 1,
"id": null,
"koth": false,
"last_change": 1575211510.4361851,
"last_pong": 1575211510.4361851,
"map": "randommaps",
"max_hc": -1,
"max_players": 4,
"min_hc": -1,
"monopoly": true,
"name": "ep 1v1 unr",
"no_blockade": false,
"password": false,
"patch": 1,
"players": [
null,
null,
null,
null,
null,
null,
null,
null
],
"quicksearch": false,
"restorable": true,
"scenario": false,
"starting_age": 0,
"treaty_time": 0
}
Empty room is maybe because of "restorable": true and "id": null (but why does it say "deleted": false?), but why is map null sometimes?

Re: EP Lobbies JSON documentation

Posted: 02 Dec 2019, 01:58
by EAGLEMUT
UrvyZnapy wrote:why is map null sometimes?
Simply means there is currently no map selected.
UrvyZnapy wrote:Empty room is maybe because of "restorable": true and "id": null (but why does it say "deleted": false?)
That's a weird room state, looks like a bug I'd say.

Since I'm here, I might as well make a note about some peculiarities of "restored" game rooms, in the sense of rooms hosted from a savegame file. Note that those rooms will return the savegame file name as "map" value, and they always act as if they are filled with the original players, even when those players are not actually in the room yet.

Re: EP Lobbies JSON documentation

Posted: 02 Dec 2019, 15:00
by Mr_Bramboy
Perhaps this has to do with people switching from WoL to EP. If you switch from EP to RE while having a EP map selected the RE map becomes bugged until you change it. The same could possibly happen if you switch from WoL to EP while having a WoL map selected.

Re: EP Lobbies JSON documentation

Posted: 02 Dec 2019, 15:29
by EAGLEMUT
Mr_Bramboy wrote:Perhaps this has to do with people switching from WoL to EP. If you switch from EP to RE while having a EP map selected the RE map becomes bugged until you change it. The same could possibly happen if you switch from WoL to EP while having a WoL map selected.
It's a valid state to have no map selected, it's not any kind of bug. When you check the custom maps checkbox you initially have no map ("Unselected") and have to choose something.