Thuron.5648:

I am currently working on a WvW application for which I need to get all objectives and their ids, but to me it seems that the objectives are in some random order which differs per borderlands. Is there any logic behind the order and the ids that belong to the objectives?

smiley.1438:

The order of those IDs isn’t as random as it appears – the ID in match_details.json and the object identifier in objectives.json is the (game internal?) ID of that objective – you just need to assign them to the corresponding ID in objectives.json. There are a lot of examples around so that you can get an idea of how it works. You might also want to use the objectives.json which i’ve created instead of the one from the API – it contains some additional info like the objectives coordinates and their correct names in all 4 languages: https://gist.github.com/codemasher/bac2b4f87e7af128087e

I have some PHP examples as well as a working WvW map application, where you can get some ideas (not yet updated to cover the new ruin objectives):

https://github.com/codemasher/gw2api-tools/blob/master/examples/gw2wvw.php
https://github.com/codemasher/gw2api-tools/blob/master/inc/wvw_stats.inc.php
http://gw2.chillerlan.net/examples/gw2wvw.php
https://chillerlan.net/gw2/wvw.html (it doesn’t use the GW2 maps API yet because i created this app long before it was released)

Thuron.5648:

That objectives.json will definitely come in handy for looking up the id of a certain objective. What I’m still wondering though: the order in objectives.json is by id.
The order in match_details.json is apparently the same as objective_names.json, but it’s still not clear to me if there’s any logic in this order. The order in match_details.json seems to be the same for all the different matches, but is this always the case? Does the order ever change when say a new matchup starts at the end of the week?

The program I’m creating doesn’t allow me to link the objectives with the match_details.json so I have to hardcode it. I managed to do this for 1 borderlands but I just want to be sure this doesn’t change.

smiley.1438:

It’s just the way the JSON is built – as you can see, the IDs are quite ordered – EB starts at 1, followed by blue, red, green border (in that order) – the ruins objectives were added later and start with the id after the “normal” objectives which is 57/Cragtop. They were just added randomly as it appears.

Thuron.5648:

Hmm yea that sounds about right. As long as they don’t change I should be ok I guess. I’ll give this a try. Thanks for the objectives.json! It definitely comes in handy.