These are chat archives for arenanet/api-cdi

16th
Jan 2018
czokalapik
@czokalapik
Jan 16 2018 07:44
Hi all, can anyone help me with figuring out coords? I have mumble xyz (afaik in meters) and I have waypoints on map in xy fetched from API, I want to find closest waypoint to my character, but I don't know how to get Z axis from api, can it be calculated by floors, they have fixed height?
smiley
@codemasher
Jan 16 2018 08:26
the API does not support the Z-axis. there are z values in /v1/event_details.json though.
czokalapik
@czokalapik
Jan 16 2018 09:08
how about floor height? is it fixed? maybe I can narrow distance to waypoint based on floor differences ?
smiley
@codemasher
Jan 16 2018 09:10
what are you trying? display a map in a browser or draw ingame? the first wouldn't require a z-axis and for the latter, maybe @BoyC (i think) can help.
czokalapik
@czokalapik
Jan 16 2018 09:40
I'm trying to get closest waypoint to current player position, in HoT maps not considering Z-axis at all won't give good results, so I was thinking if floors have fixed heights in game
smiley
@codemasher
Jan 16 2018 09:42
inside or outside the game? that's what i'm asking
czokalapik
@czokalapik
Jan 16 2018 09:42
outside ;]
smiley
@codemasher
Jan 16 2018 09:43
that's what i mean. because you could probably get the coordinates from within the game like taco or so
derRAV3N
@derRAV3N
Jan 16 2018 11:06

outside ;]

If you have mumble data, you still have xyz. I don't know for sure about floor heights, but I think they don't always have the same difference. But you could kinda check it with gw2taco and visit some maps

smiley
@codemasher
Jan 16 2018 11:08
umm, they wanted z coordinates for map pois from what i understand. - position data is available everywhere ;)
derRAV3N
@derRAV3N
Jan 16 2018 11:09
Also I'm quite sure for the HoT maps it's more like the walkpath that's killing that calculation, not the missing z. calculating only with xy will probably make not a real error difference :)
smiley
@codemasher
Jan 16 2018 11:10
it would if you wanted to calculate the 3d distance
wtb typing skills
some waypoints are on top of each other but on different altitudes
the simplest workaround would be to grab a mumble implementation and calculate them
derRAV3N
@derRAV3N
Jan 16 2018 11:12
hmm yea depends on whats the goal
doesn't the mumble api also return which floor you're on?
smiley
@codemasher
Jan 16 2018 11:14
that too, but the floor doesn't give any altitude information
the floors are more the representation of the different instances rather than heightmaps
czokalapik
@czokalapik
Jan 16 2018 12:19
well, for now I made an assumption that floor height is ~250 (in coord units presented by api), and after testing bloodstone fen (one WP basically on top of another) I had "acceptable results" comparable to distance shown in game.
It doesn't have to be super accurate, but I will keep digging
Archomeda
@Archomeda
Jan 16 2018 13:22
Oh great, got called twice by two different foreign numbers. I didn't answer. One from France and one from Hungary. According to various people on the internet it's those people again that pretend to be Microsoft to scam you. Not that anyone should answer foreign numbers because why should you (or be so easily scammed), but watch out still.
derRAV3N
@derRAV3N
Jan 16 2018 15:47

well, for now I made an assumption that floor height is ~250 (in coord units presented by api), and after testing bloodstone fen (one WP basically on top of another) I had "acceptable results" comparable to distance shown in game.

you should probably doublecheck with rata sum. it has 4 layers i think and they are quite tight together.

ChieftainAlex
@ChieftainAlex
Jan 16 2018 18:31
I've always wanted a way to convert between z-height and floor
events api returns z data doesn't it
ChieftainAlex
@ChieftainAlex
Jan 16 2018 19:24
I'm being dumb, I can't see from https://wiki.guildwars2.com/wiki/API:MumbleLink whether it tells you the character height or not
I'm expecting vertical axis = 0 to be the tipping point between land and aquatic skillsets
but it seems to be -41.6 inches
ChieftainAlex
@ChieftainAlex
Jan 16 2018 20:47
Just went for a blunder around the various Cities - each of them has a different limit for the floor buttons on the world map. Examples:
City World map levels Y-axis
Rata Sum 3 15461
Rata Sum 2 14683
Rata Sum 1 13835
Hoelbrak 3 12740
Divinity's Reach 3 3959
The Grove 4 3623
The Grove 3 2345
The Grove 1 870
Eearslya Sleiarion
@Eearslya
Jan 16 2018 20:48
Yeah, I'm guessing it's just another value that would be determined per-map which makes sense
ChieftainAlex
@ChieftainAlex
Jan 16 2018 20:48
I guess world map level is different to map_floor ..
Eearslya Sleiarion
@Eearslya
Jan 16 2018 20:48
I think "floors" are only relevant to the 2D map rendering really
ChieftainAlex
@ChieftainAlex
Jan 16 2018 20:49
Think there is no relationship between Y* and floor then?
even if the upper/lower bounds of Y* are determined per map
Eearslya Sleiarion
@Eearslya
Jan 16 2018 20:50
I think so, yeah
ChieftainAlex
@ChieftainAlex
Jan 16 2018 20:50
made for some hilarious tiny gifs though
The Grove 3 to 1.gif
Medyro
@Medyro
Jan 16 2018 20:52
Can i ask wy Z tough? Souldnt Y be Up/Down? (at least going by the first Cite Note of the Wiki Page?)
ChieftainAlex
@ChieftainAlex
Jan 16 2018 20:52
sorry meant Y
labelled the damn table wrong
Medyro
@Medyro
Jan 16 2018 20:54
And as for Character height; that could be fAvatarTop[1]-fAvatarPosition[1] (or like AvatarTop.Y-AvatarPosition.Y (as from the Comments on the same Page)) maybe, no?
BoyC
@BoyC
Jan 16 2018 21:08
umm sorry tldr but to my knowledge the waypoint data in the api only contains 2d coordinates so you either have to measure them manually or go by some other heuristic (maybe measuring 2d distance is fine too?)
the only point data i found in the api that has 3d coordinates was the wvw tactical positions
but admittedly it's been a while since i last looked
Archomeda
@Archomeda
Jan 16 2018 21:20
map floors are definitely different from the map layers, layers are the things you're talking about, a floor can be a whole new map layered on top or under another floor
e.g. look at mistlock sanctuary
but somehow they can be visualized as the same thing though
in game
@ChieftainAlex i'm also not sure if the mumble avatar y-axis is feet, eyes or something else
    // Unit vector pointing out of the avatar's eyes aka "At"-vector.
    lm->fAvatarFront[0] = 0.0f;
    lm->fAvatarFront[1] = 0.0f;
    lm->fAvatarFront[2] = 1.0f;

    // Unit vector pointing out of the top of the avatar's head aka "Up"-vector (here Top points straight up).
    lm->fAvatarTop[0] = 0.0f;
    lm->fAvatarTop[1] = 1.0f;
    lm->fAvatarTop[2] = 0.0f;

    // Position of the avatar (here standing slightly off the origin)
    lm->fAvatarPosition[0] = 0.001f;
    lm->fAvatarPosition[1] = 0.0f;
    lm->fAvatarPosition[2] = 0.5f;
that's all that's said as far as i can see here: https://wiki.mumble.info/wiki/Link
ChieftainAlex
@ChieftainAlex
Jan 16 2018 21:27
dunno, y-axis on the map coordinates was clearly inches though
lined up with ingame when standing 5000 ft below a wp = 5000"
Archomeda
@Archomeda
Jan 16 2018 21:27
oh, not the feet in measurement, but rather the body :P
ChieftainAlex
@ChieftainAlex
Jan 16 2018 21:27
yeah yeah i got that
Archomeda
@Archomeda
Jan 16 2018 21:28
afaik the point where it swaps from land to aquatic weapons should be 0
ChieftainAlex
@ChieftainAlex
Jan 16 2018 21:29
i was lazy and just hardcoded a 41.6" offset
Archomeda
@Archomeda
Jan 16 2018 21:29
can't you check with the camera position?
ChieftainAlex
@ChieftainAlex
Jan 16 2018 21:29
thing is when i swim beneath the water surface and swim back to the surface, there was +-1"
Archomeda
@Archomeda
Jan 16 2018 21:30
hm
ChieftainAlex
@ChieftainAlex
Jan 16 2018 21:30
more accurate than jumping out of the water and back in at least
Archomeda
@Archomeda
Jan 16 2018 21:31
well, i have no clue
it's been a while since i've worked with the coordinate system
ChieftainAlex
@ChieftainAlex
Jan 16 2018 21:32
@BoyC as I said above, https://api.guildwars2.com/v1/event_details also has some z-axis stuff
Archomeda
@Archomeda
Jan 16 2018 21:32
and even when i worked with it, it was a mess
ChieftainAlex
@ChieftainAlex
Jan 16 2018 21:32
^
Doesn't matter, I just wondered if I could split the z into layers, but its not possible and i'm fine with that
an evening's amusements
Medyro
@Medyro
Jan 16 2018 21:37
Looking at them i don't htink there correct.
The first event would be under water then, if 0 (or well 41.6) would indicate see level, wouldn't it?
"EED8A79F-B374-4AE6-BA6F-B7B98D9D7142": {
      "name": "Defeat the renegade charr.",
      "level": 42,
      "map_id": 20,
      "flags": [],
      "location": {
        "type": "sphere",
        "center": [
          -9463.6,
          -40310.2,
          -785.799
        ],
        "radius": 2500,
        "rotation": 0
      }
    }
Archomeda
@Archomeda
Jan 16 2018 21:37
ehm
Medyro
@Medyro
Jan 16 2018 21:38
Did i link the wrong Event?
Archomeda
@Archomeda
Jan 16 2018 21:38
i guess?
no, it's the same
tbh this event is conditional though based on your personal story, maybe that has something to do with it?
Medyro
@Medyro
Jan 16 2018 21:39
Except there is a different one, with the same name, and underwater at least i guess.. xD
Archomeda
@Archomeda
Jan 16 2018 21:39
and the position gets moved by a script?
i dunno
Medyro
@Medyro
Jan 16 2018 21:40
Guess were two then cause neither do i
Archomeda
@Archomeda
Jan 16 2018 21:40
(as a side note, i still love these conditional events)
(and i loved to trigger this one whenever we were waiting to start that guild challenge nearby, before the change into guild instances)
ChieftainAlex
@ChieftainAlex
Jan 16 2018 21:42
Well the y-level tied in with the events i sampled in Draconis mons at least
roughly.
Archomeda
@Archomeda
Jan 16 2018 21:43
does anyone know one of the other personal story conditional events by any chance?
i'm curious if that y position is weird too
ChieftainAlex
@ChieftainAlex
Jan 16 2018 21:45
-25045.1 on sieran too
Archomeda
@Archomeda
Jan 16 2018 21:46
"69F33290-1F9F-4005-9F30-FC9FB6176F24":{
   "name":"Kill the Risen commander to avenge Tybalt.",
   "level":55,
   "map_id":73,
   "flags":[],
   "location":{
      "type":"sphere",
      "center":[
         17395.5,
         -31739.3,
         3.76123
      ],
      "radius":2500,
      "rotation":0
   }
}
seems it has the same y-axis weirdness
so my best guess is that it's indeed affected by some backend scripting that changes the location when it's triggered
ChieftainAlex
@ChieftainAlex
Jan 16 2018 21:46
as in its super high up
nice find
hrm
I wonder if you can trigger it with a griffon high up
probably a lower skybox than Draconis Mons
Archomeda
@Archomeda
Jan 16 2018 21:50
"893057AB-695C-4553-9D8C-A4CC04557C84":{
   "name":"Kill the Risen commander to avenge Forgal.",
   "level":54,
   "map_id":73,
   "flags":[],
   "location":{
      "type":"sphere",
      "center":[
         1852.43,
         -29331.8,
         2304.68
      ],
      "radius":2500,
      "rotation":0
   }
}
this one is supposed to be underwater, looking at https://wiki.guildwars2.com/wiki/Kill_the_Risen_commander_to_avenge_Forgal, but i think this is still way too far underwater :P
wait, the location is [x,y,z] where y is vertical right?
or is it z in this case?
Medyro
@Medyro
Jan 16 2018 21:53
Was thinking about that too. Couldn't find anything saying clarifing that tough. So.. I#M afraid but i don't know this time.
Would maybe assume tough that it's the same as Mumble.. maybe.. possibly..
Archomeda
@Archomeda
Jan 16 2018 21:54
@ChieftainAlex how is the wiki event location widget set up?
In-game, coordinates are calculated from the center of the map, where a negative on the Z axis is above sea level (Z is jumping). Moving West from the center of the map is negative on the X axis and moving South from the center of the map is negative on the Y axis. This is why there are negative coordinates.
well, i guess it's -z for the vertical axis
Medyro
@Medyro
Jan 16 2018 21:58
I tought that link ment the Picture (as the post is pointing on it it seems)
https://forum-en.gw2archive.eu/forum/community/api/Event-Details-API-location-coordinates/first#post2262330
Oh, hold on. Didn't read. Nevermind
Archomeda
@Archomeda
Jan 16 2018 22:01
i dunno where it pointed since that link wasn't valid anymore
i just skimmed through the whole thread :P
seems to answer our question though
anyway, i think the coords are right then
take the z-coord, invert it, and you have the height coord for the event
seriously if we ever get a /v2/event-details we seriously need to discuss how we can improve that structure
Medyro
@Medyro
Jan 16 2018 22:03
Yep, seems like it. Except that it wasn't really my question as more of a "that looks unnormal" but ok.
Archomeda
@Archomeda
Jan 16 2018 22:03
hehe :P
i'm used to having the y-coord as height coord
so it confused me too
also not inverted.. heh
Medyro
@Medyro
Jan 16 2018 22:04
That API seems to already be parially strucktured like GeoJson already, so i guess that they would take that or i guess improve that. (If that is what they use anyways)
BoyC
@BoyC
Jan 16 2018 22:06
meh again tldr, sorry guys i'm not keeping up, but i have an exact conversion for api-ingame coordinates that i wrote for the wvw stuff if you need it
Medyro
@Medyro
Jan 16 2018 22:07
API in Game Coordinates converted to Map or Screen, or both or something else?
BoyC
@BoyC
Jan 16 2018 22:08
api supplied coordinates converted to 3d world coordinates
for the wvw api coord variables
although that has some map offset hacks in it as well
here are two important functions

float WorldToGameCoords( float world )
{
return world / 0.0254f;
}

float GameToWorldCoords( float game )
{
return game * 0.0254f;
}

Archomeda
@Archomeda
Jan 16 2018 22:10
heh alright, haven't worked with geojson at all, but it seems the coords there are formatted as [longitude, latitude, elevation], don't know where the inversion comes from though
BoyC
@BoyC
Jan 16 2018 22:10
meh gotta work on that markdown stuff :D
Archomeda
@Archomeda
Jan 16 2018 22:11
yeah, that's inch -> meters and vice versa :)
BoyC
@BoyC
Jan 16 2018 22:11
yep
that's the first part
darthmaim
@darthmaim
Jan 16 2018 22:11
```<linebreak>
content<linebreak>
```
BoyC
@BoyC
Jan 16 2018 22:11
then you have the actual conversion
wvwObjectiveCoords[ objident ] = CVector3( GameToWorldCoords( ( v.x - offset.x ) * 24 ), GameToWorldCoords( -v.z ), GameToWorldCoords( ( -( v.y - offset.z ) ) * 24 ) );
Archomeda
@Archomeda
Jan 16 2018 22:12
i did it at one point, but it really is a long time ago
BoyC
@BoyC
Jan 16 2018 22:12
the 24 multiplier comes from the map coordinates being in feet or something i think
Archomeda
@Archomeda
Jan 16 2018 22:12
i'll stop talking about what i don't know anymore before i get all of us even more confused haha
darthmaim
@darthmaim
Jan 16 2018 22:13
:D
the map stuff is really confusing
BoyC
@BoyC
Jan 16 2018 22:13
the offsets are map world offsets if i recall correctly
darthmaim
@darthmaim
Jan 16 2018 22:13
ideally it would be all one coordinate system
BoyC
@BoyC
Jan 16 2018 22:13
yeah when the 3d engine and the map engine are developed separately this is what you get :D
anyway that code is straight out of the taco wvw code that should be perfectly accurate based on what i've seen
...back to writing my ui engine. if you need any clarification just ping me in private and i'll reply when i see it :)
Archomeda
@Archomeda
Jan 16 2018 22:20
:O what are you working on?
BoyC
@BoyC
Jan 16 2018 22:20
my demotool. non gw2 related :)
Archomeda
@Archomeda
Jan 16 2018 22:20
aw :(
how far did you get with improving the integration with taco into gw2?
BoyC
@BoyC
Jan 16 2018 22:21
sorry, real life is still in a bit of a ruin, trying to keep my mind off of it and this has been nagging at me for a bit
didn't really touch taco since august when my boss was fired and everything went to shit
Archomeda
@Archomeda
Jan 16 2018 22:21
that sucks
no worries though, i was just wondering; i hope you get yourself back on track
BoyC
@BoyC
Jan 16 2018 22:22
then i got involved with a girl who went back to her ex when he realized that she's leaving, he quickly got a divorce and talked her mind full of crap and left me hanging
so yeah, not a good couple months
Archomeda
@Archomeda
Jan 16 2018 22:23
:(
BoyC
@BoyC
Jan 16 2018 22:23
i really want to sit down with chris and set up a roadmap for taco before i go any further with it, but it's just not been a priority with everything for now
my raid group disbanding didn't help either :D
Archomeda
@Archomeda
Jan 16 2018 22:24
understandable
darthmaim
@darthmaim
Jan 16 2018 22:24
:(
Archomeda
@Archomeda
Jan 16 2018 22:24
a lot of things crashing down at the same time... yeah, just take your time
darthmaim
@darthmaim
Jan 16 2018 22:24
lets hope everything will get better for you <3
BoyC
@BoyC
Jan 16 2018 22:25
aww <3 :)
Archomeda
@Archomeda
Jan 16 2018 22:25
i agree :)
BoyC
@BoyC
Jan 16 2018 22:26
i did do a fix for the dpi scaling stuff but didn't deploy it yet
basically i needed to undo the previous dpi fix when the gw2 client became dpi aware :D
Archomeda
@Archomeda
Jan 16 2018 22:28
(the dpi awareness is annoying if it doesn't scale in multiples of 2 imo)
BoyC
@BoyC
Jan 16 2018 22:28
don't get me started
i mean i get that high dpi screens need some sort of compensation
but everything's blurry as hell
Archomeda
@Archomeda
Jan 16 2018 22:29
exactly
BoyC
@BoyC
Jan 16 2018 22:29
i have a 4k screen and i need to browse the web at 200% zoom because it's all tailored to full hd
Archomeda
@Archomeda
Jan 16 2018 22:29
windows was never made with dpi scaling in mind, and it still isn't
BoyC
@BoyC
Jan 16 2018 22:29
and images are blurry as hell
text is nice because it's rendered for the proper resolution
it's not that... if you want crisp images with scaling you need to have vector graphics and that's very limiting either in performance or visual fidelity
Archomeda
@Archomeda
Jan 16 2018 22:31
:/
btw, speaking of high resolution, taco's icon is 16x16 :P
BoyC
@BoyC
Jan 16 2018 22:32
meh :D
Archomeda
@Archomeda
Jan 16 2018 22:32
i noticed that when i placed a shortcut on my desktop for using it every day for the wintersday karma route :P
BoyC
@BoyC
Jan 16 2018 22:33
it's because i use small icons on my taskbar :D
oh
tekkit
man
that guy does excellent work :D
Archomeda
@Archomeda
Jan 16 2018 22:33
hehe yeah
i still can't use taco non-stop because of the dead keys bug
sadly enough
BoyC
@BoyC
Jan 16 2018 22:34
you have no idea of the work i put into fixing that to no avail :\
Archomeda
@Archomeda
Jan 16 2018 22:34
yeah... you've mentioned it some time ago when i was talking about the very same issue :')
whenever you get back into it and you get clearance from chris, i hope it might solve this issue as well
BoyC
@BoyC
Jan 16 2018 22:36
:)
Archomeda
@Archomeda
Jan 16 2018 22:37
i wish i didn't rely on dead keys that much... but ever since it was introduced in winxp by default and i still used win98 on my pc in my own room back then, i changed it on that win98 pc too to have dead keys
it makes it easier to type letters that require it, because otherwise i have to press keybinds like ctrl+'+e or something
i don't even know what the keybind is
oh well :)
Quaggan BooOOoot
@QuagganBooOOoot
Jan 16 2018 23:34
New discussion in API Development:

Revenant lacking in PVP
by RobMonty.3719 in API Development

The amazing comparison of revennant to other classes, most all others have a ton of spells to choose from, rev has none..
Necro using ground as weapon, so over powered its stupid amazing anet even programmed such a thing.
Most classes cant do nothing about it.
Rev has no under water spells at all? None....
How many years has the rev had no under water spells at all?
When will anet balance or do something for rev except make it a target for others to feed on?
Best bet is 3 stances, kinda like ele gets 4 and a ton of spells, rev has such a limited amount of everything. Even thiefs get more spells...
The only class i know that gets less spells is a warrior which is balanced well..

Gawd,,,, really, are you ever going to do something for the rev since taking it all away?

Eearslya Sleiarion
@Eearslya
Jan 16 2018 23:37
sigh
I should just make one of y'all a mod on the forums
Eearslya Sleiarion
@Eearslya
Jan 16 2018 23:39
Are there players out there who are mods? I thought it was just Gaile and a few other ANets..
literally no idea
Eearslya Sleiarion
@Eearslya
Jan 16 2018 23:40
Even if that guy had posted in the right forum, that is still just...eugh.
"necros use the ground as a weapon so they must be op" I assume he means AoEs...
Really though, how does someone see all the other topics in the forum related to programming and think "oh, yes, this is where I post about how the game should change"
API Development
if you don't know what an API is, good chance you'll just see the Development bit
so it's the subforum for game development
BoyC
@BoyC
Jan 16 2018 23:45
maybe rename it to Addon API Development :)
maybe
BoyC
@BoyC
Jan 16 2018 23:45
or something
Eearslya Sleiarion
@Eearslya
Jan 16 2018 23:47
I mean, I guess I get that, but even a glance at all the other topics would prove it's not game development..
(I normally redirect people a little nicer than that but hoo boy his post just annoyed me)