These are chat archives for arenanet/api-cdi

10th
Jun 2016
smiley
@codemasher
Jun 10 2016 16:28
ahrg, @lye see what missing IDs for skill challenges create D: http://wiki.guildwars2.com/wiki/User:Chieftain_Alex/sandbox2
;_;
smiley
@codemasher
Jun 10 2016 16:29
i also need some relation between these and the coordinates
i thought about hashes of the coords
these are at least unique per map
I'd just convert the coords to a string and have a dictionary
hashes are hard to debug
smiley
@codemasher
Jun 10 2016 16:31
hmm, anyway, nowhere near practical
why is it even that these skill challenges don't have anything to relate? how do the engine coders this ingame?
i mean, ther must be at least somewhere a relation between event and coords or something
I actually don't recall; let me double-check
smiley
@codemasher
Jun 10 2016 16:33
thanks!
the map has an array of them
technically they have ids -- but the ids are guids
smiley
@codemasher
Jun 10 2016 16:34
event-guids by chance? :D
they're actually not events, but basically
smiley
@codemasher
Jun 10 2016 16:35
but even if you just have GUIDs, i'd prefer to have them
:(
I hate dumping guids
smiley
@codemasher
Jun 10 2016 16:35
ikr
but we need a relation somehow D:
open an issue for it and I'll make the change
smiley
@codemasher
Jun 10 2016 16:36
feel free to come up with something cooler :D
it's like ... a one-line change but I don't want to think hard about it
smiley
@codemasher
Jun 10 2016 16:36
ok
hehe
thx <3
Edgar Doiron
@Coffee4cr
Jun 10 2016 16:42
it's going live today at 5pm, right?
:fire:
i wonder why they don't faciliate SMW for this purpose
like, add one more field with the coords to the skill challenge page
(and another one for the ID... hue)
ChieftainAlex
@ChieftainAlex
Jun 10 2016 16:49
Yeah I know it's horrible but it works..
smiley
@codemasher
Jun 10 2016 16:50
i mentioned some ideas on the project page in the german wiki how i'd use SWM data
in fact, you could pull most of the data from the wiki anyway
ChieftainAlex
@ChieftainAlex
Jun 10 2016 16:50
It was surprising how awkward it was to relate all the hero challenges to locations
smiley
@codemasher
Jun 10 2016 16:51
indeed, these and the vistas
Eearslya Sleiarion
@Eearslya
Jun 10 2016 16:51
Gasp, there's activity here?
smiley
@codemasher
Jun 10 2016 16:51
the vistas however aren't much of a problem
hmm, wait. if #61 is going to be real, would it be somehow possible to relate these, then?
ChieftainAlex
@ChieftainAlex
Jun 10 2016 16:55
Next up on the widget: more static locations for diving goggles!
smiley
@codemasher
Jun 10 2016 16:55
hmm, Alex, how much of effort would it be to bot edit all the POI articles to add the API data to SMW objects?
minutes/hours/days?
ChieftainAlex
@ChieftainAlex
Jun 10 2016 16:56
they all have ids so not long
you mean coordinates?
smiley
@codemasher
Jun 10 2016 16:56
yea, like coords and stuff
anything that's necessary to draw a map
ChieftainAlex
@ChieftainAlex
Jun 10 2016 16:57
I don't like the idea of having clutter in an infobox.. this would only be necessary for the "map in an infobox" sandbox proposal right
smiley
@codemasher
Jun 10 2016 16:58
hmm, and what about a "storage" like the 0x-codes pages?
ChieftainAlex
@ChieftainAlex
Jun 10 2016 16:58
I think everyone hates those
smiley
@codemasher
Jun 10 2016 16:58
hehe (me too)
but having some data on the articles would solve problems like the skillpoint one
ChieftainAlex
@ChieftainAlex
Jun 10 2016 17:00
true, so basically your proposal would be to use the map tile service from the gw2API, and everything else from SMW wiki api?
smiley
@codemasher
Jun 10 2016 17:01
well, my initial idea i had was basically like this :D
i usually prefer to load only a minimum of external data
pro: API outages can't break much stuff
con: bloat
ChieftainAlex
@ChieftainAlex
Jun 10 2016 17:03
it would still cause a failure of tiles
so still useless if API falls over
sticking maps on every POI page would be a large burden increase on the api though
smiley
@codemasher
Jun 10 2016 17:03
i'm pretty sure, the data and map endpoints are served from different machines. @lye ?
@Coffee4cr nah, a month. Needs a change to one of the backend servers.
@codemasher the tiles aren't generated dynamically -- there's a tool I run offline to regenerate and upload them to S3. The coordinates and stuff are served from the .dat-reading backend server (since those are all in content)
ChieftainAlex
@ChieftainAlex
Jun 10 2016 17:09
right, so the same server for serving tiles and json data
smiley
@codemasher
Jun 10 2016 17:09
err, that was not exactly the question - i meant externally
It will theoretically be possible to generate the tiles dynamically once I integrate a software renderer into the backend server for render.guildwars2.com -- though that's a while out
smiley
@codemasher
Jun 10 2016 17:10
so if you're going to restart the API servers, would it affect the map server too?
Nah, tiles go through cloudfront -> s3, json data is IIS -> js frontend -> .dat reading backend
smiley
@codemasher
Jun 10 2016 17:10
that's what i meant
and cloudfront has some cache (as we all know...)
AFAIK the cloudfront cache expires when new tiles are uploaded
since I toss 'em in a fresh bucket and update the cloudfront configs to point at the new bucket
smiley
@codemasher
Jun 10 2016 17:11
yea, and this is what takes some time
pretty sure that evicts everything from the cache
smiley
@codemasher
Jun 10 2016 17:11
sometimes a couple hours
hmm, maybe I have to manually evict the cache or something
smiley
@codemasher
Jun 10 2016 17:11
so you could say, even if the API goes down, the tiles are still available for a while
tiles should never be unavailable; worst case is they're stale for a bit after regeneration
well unless S3/CF go down, which has happened before
but the tiles service doesn't touch anything in our datacenter
smiley
@codemasher
Jun 10 2016 17:12
yea, so thats why i think we can rely on that at least :D
theoretically our DC could burn to the ground and the tiles would still work
smiley
@codemasher
Jun 10 2016 17:13
the wikis would go down before
ah that's true
smiley
@codemasher
Jun 10 2016 17:14
yep
I'll draw a diagram of how the API services work from a high level at some point
Since it's a commonly-asked question
darthmaim
@darthmaim
Jun 10 2016 17:15
:+1:
smiley
@codemasher
Jun 10 2016 17:15
i think cliff posted something similar ages ago
nothing much's changed since then, but it would be helpful to have it in a more visible place (e.g., the github repo)
<-- elephant brain
hmm
okay so I lied
it's changed significantly since then
smiley
@codemasher
Jun 10 2016 17:18
heh
I forgot that the original implementation didn't have a javascript frontend in front of the API servers
the v1 used to talk directly to the C++ backend servers
also there never was a "guild API server"
smiley
@codemasher
Jun 10 2016 17:19
planned perhaps
nah, the /v1/guild* (and /v1/events and such) were handled by what is now the whitelist server
smiley
@codemasher
Jun 10 2016 17:20
ah
ChieftainAlex
@ChieftainAlex
Jun 10 2016 17:20
other than dungeons, what are the "unknown" type markers in the maps api?
which made sense since you needed the whitelists for doing most of the content-related endpoints
@ChieftainAlex for the most part, they're "map cinematic" locations (e.g., have something you can click -- like in the achievements panel -- to open the world map and have it centered somewhere).
I have a changelist in that does ... something with them? I need more coffee.
smiley
@codemasher
Jun 10 2016 17:21
ahh, now they totally make sense
ChieftainAlex
@ChieftainAlex
Jun 10 2016 17:21
oh right, thanks I always wondered what those were
"always" as in since last week
smiley
@codemasher
Jun 10 2016 17:22
so the "dungeon entrances" aren't entrances but perhaps the video sequence which leads to discovery?
(i remember someone saying these arent the actual entrance)
so... yes and no
some of the "unknown"s have attached markers for display on the world map
the change I made exposes those markers (so you can render them with icons) -- the ones without markers will soon be removed from the API
(the ones without markers are almost exclusively for map cinematics)
smiley
@codemasher
Jun 10 2016 17:24
ah, ok
so the dungeon/raid/etc icons should start showing up once my change is out and your map rendering code is updated to check for ".icon" on the POIs
smiley
@codemasher
Jun 10 2016 17:25
:+1:
ChieftainAlex
@ChieftainAlex
Jun 10 2016 17:25
does etc include mastery points?
iirc no
ChieftainAlex
@ChieftainAlex
Jun 10 2016 17:25
then i'll continue cleaning up my hardcoded variables..
I'm actually not sure where mastery points are stored, hmm
those should be in the map data iirc but I'm not sure why they're not exposed
smiley
@codemasher
Jun 10 2016 17:28
so i'm going to open an issue for GUIDs on skill challenges then, ok?
yeah def
ChieftainAlex
@ChieftainAlex
Jun 10 2016 17:30
I realise that non-api stuff is effectively unrelated, but if clicking on hero points ingame generated a chatlink we'd avoid much of the annoyances
yeah :s
smiley
@codemasher
Jun 10 2016 17:31
#329
smiley
@codemasher
Jun 10 2016 18:48
@ChieftainAlex any suggestions/recommendations for a poc-widget name? or should i just name it somehow and you move it later in case it gets implemented?
smiley
@codemasher
Jun 10 2016 20:10
we've been fooled all those years, it's green!
ChieftainAlex
@ChieftainAlex
Jun 10 2016 20:34
@codemasher pick any title you like, we can always move it if we want to.
I've moved my abomination work in progress to Widget:World map so Widget:Test is free too.
I would love to figure out a way of making leaflet stick each "layergroup" in a separate ID'd div within div.leaflet-marker-pane ... deleting and reinserting the elements instead of just applying a blanket class change (e.g. + "hide") would be way more efficient on zoom.
ChieftainAlex
@ChieftainAlex
Jun 10 2016 20:40
someone else thought of the same issue/solution in 2013 (Leaflet/Leaflet#1734), and actually it looks like the beta 1.0 version addresses this problem. Guess I'll see if the beta version kills anything on the wiki
smiley
@codemasher
Jun 10 2016 20:42
be careful when you migrate from such a low version as .5x whic is running currently on the wiki
there were changes that broke stuff in .6 already
esp. zoom/view related
ChieftainAlex
@ChieftainAlex
Jun 10 2016 20:44
afaik I didn't break anything (more than usual at least) when I switched v0.5 to v0.7.7, so I'm hopeful it won't be too difficult.
smiley
@codemasher
Jun 10 2016 20:45
however, better double check ;)
oh, also re the huge vars you just added - we used to put scripts under the widget's page and included directly from there to keep the main code clean and make updates easier ;)
ChieftainAlex
@ChieftainAlex
Jun 10 2016 20:46
documentation looks terrible for 1.0 :D
smiley
@codemasher
Jun 10 2016 20:47
well, the leaflet docs are... underwhelming.
^^
or better: make an official guild wars wiki repo and include from there via rawgit
ChieftainAlex
@ChieftainAlex
Jun 10 2016 21:01
I can see based on this other game site using leaflet that the markers have been wrapped with an additional div with a class but looking at the source I can't find the line that makes it
ChieftainAlex
@ChieftainAlex
Jun 10 2016 21:09
 L.pane = function (map, name, container) {
     return new L.Pane(map, name, container);
 };
smiley
@codemasher
Jun 10 2016 21:10
    ps2maps.map.getPane('latticePane').getRenderer().options.padding = 0.75;
hmm?
L.divLayer = function (map, name, container) {
    return new L.DivLayer(map, name, container);
};
this is where they create the layers it seems
might wrap my head around that on the weekend
ChieftainAlex
@ChieftainAlex
Jun 10 2016 21:14
marker = L.marker( <xy coordinates>, {icon: hpIcon, title: namegoeshere, pane: 'challenges' })
this is the syntax apparently.
provided you extend it first)
ChieftainAlex
@ChieftainAlex
Jun 10 2016 23:12
found this walkthrough and partially implemented, just need to figure out which layers I want to show at each zoom level now.