Showing Posts For zeeZ.5713:

Daily achievement for 03-05 invalid

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Looks like the new daily jumping puzzle and adventure achievements in general need a whitelisting. Today’s 1914, tomorrow’s 1887, 1926 and 1898 and 2988 from a couple days ago all show up as “no such ID”.

Let's talk about permissions

in API Development

Posted by: zeeZ.5713

zeeZ.5713

We need a way to specify required permissions to allow as many end users to complete the process as possible.

That’s gonna be one hell of a dropdown menu :P Alternatively you could provide a way to generate some kind of string (like an encoded bitmask or json) that contains the permissions you’re asking for that the user can copy and paste to the key generation page to auto-select them.

[Emblem Contest] Problem with the form

in Bugs: Game, Forum, Website

Posted by: zeeZ.5713

zeeZ.5713

Same.

Chrome got to a whooping 4% on a 300KB zip file, then stopped. Worked in Opera (or just by random chance?)

The huge PSD won’t upload, though. “Failed to load resource: the server responded with a status of 413 (OK)”

Mumble Link: Add player health?

in API Development

Posted by: zeeZ.5713

zeeZ.5713

{"name": "00000000-0000-0000-0000-000000000000","profession": 1,"race": 1,"map_id": 1029,"world_id": 268435516,"team_color_id": 0,"commander": false,"fov": 1.222,"supply": 100,"health": 300000}

Is 193 characters already, the mumble wiki defines the field as wchar_t identity[256], so I may get be getting a bit angsty about how big those numbers can get and what other nonsense we want added there :P

Mumble Link: Add player health?

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Pull request time?

TOTP login not redirecting

in Bugs: Game, Forum, Website

Posted by: zeeZ.5713

zeeZ.5713

I have had an authenticator connected since… forever.

  • Click login on the forums
  • Get redirected to https://account.arena.net/login/wait/totp with all the OAuth2 parameters
  • Enter E-Mail (shake head at “Did you mean ….net?”) and password
  • Submit
  • Enter authenticator code (ignoring remember network)
  • Submit

at this point nothing happens (visually). In the background stuff is submitted and a json response received. At this point further submits yield a “Some fields are invalid; please fix them.” at the top and another background request resulting in a HTTP 400 error.

Going back to the forums will still show you logged out, but clicking Login again passes you back and forth and results with you logged in.

New Account Log-in Screen

in Account & Technical Support

Posted by: zeeZ.5713

zeeZ.5713

It seems a bit silly, yeah. Why is it suggesting .net for my .de address? Why not .com? Why suggest anything at all? Go home, login box, you’re drunk :P

API error with Python 2.7.10; Please help! :D

in API Development

Posted by: zeeZ.5713

zeeZ.5713

You look at the data to see why it doesn’t contain the key it should contain, figure out if you a) did something wrong and fix it, or b) data without that key can be a valid result and determine how you want to handle those cases.

If you don’t know what’s going on, add more logging. And then some more. Up to the point where you might as well just step through the debugger. And then do that.

API error with Python 2.7.10; Please help! :D

in API Development

Posted by: zeeZ.5713

zeeZ.5713

You’re doing


        accountjson = requests.get('https://api.guildwars2.com/v2/account?access_token=', headers = head) 
        accountdata = accountjson.json()
        accountname = accountdata['name']

but for guilds you’re doing


        guilddata = requests.get('https://api.guildwars2.com/v1/guild_details.json?guild_id='+ str(guildid)) 
        guildname = guilddata['guild_name']

which is why you’re getting


Traceback (most recent call last):
File “D:\guild.py”, line 11, in <module>
guildname = guilddata[‘guild_name’] #account guild information
TypeError: ‘Response’ object has no attribute ‘getitem’

Error with tokeninfo endpoint

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Don’t you love bugs that popup out of nowhere... (or seem to, only to be some very silly mistake that triggers that bug once every blue moon...)

When I was in Middle school, a friend of mine wrote a script that would backup a DB for a service once every month, on the 30th.... and then came February... took him a moment.

I’ve been using some tool to convert files of timestamped GPS coordinates from one format to another. Worked ok until I traveled from UTC+1 to UTC+7. Suddenly timestamps jumped backwards in time at the end of the day. What happened? That tool quietly converted ISO 8601 from +HH:MM to Z by doing hours = hours-offset modulo 24. Does that count?

Anyway, can confirm confirmation of confirmed issues.

(edited by zeeZ.5713)

API Keys "ErrBadData" since patch

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Any ETA for things to go back to normal API wise?

Not before regular business hours would be a good bet

Mail and Gold

in API Development

Posted by: zeeZ.5713

zeeZ.5713

1. Not yet? (https://github.com/arenanet/api-cdi/pull/25)
2. and 3. would be no currently. I believe guild stuff is on hold until after the release of HoT with all its guild related changes, and I expect account wallets to be on a radar somewhere too.

Stats increase on all items

in API Development

Posted by: zeeZ.5713

zeeZ.5713

That’s a great opportunity to figure it out and convert it all to a format that makes more sense. Future you might even thank you one day :P

Launching inventory endpoints

in API Development

Posted by: zeeZ.5713

zeeZ.5713

But they can… by giving their guild their API keys

Launching /v2/tokeninfo

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Just dumping this here because I’m not a fan of new topics and it’s semi related to this one :P

The “New Key” page currently reads

Set a name, description, and set of permissions for this key. The name and description fields are for your use.

First: There is no “description” field

Second: That those fields “are for your use” kind of implies to me that only I will be able to see the name of this key. It may just be a minor privacy thing, but I think people should be made aware that this information is available through the API.

Third, while we’re here: Maybe make it clear that all (current) scopes are read only.

API key and Request library, how to? (Python)

in API Development

Posted by: zeeZ.5713

zeeZ.5713

From Requests documentation:

def get_jsonparsed_data(url):
   # Receive contect as url returned as object"
   response=requests.get(url, headers={'Authorization': 'Bearer D34D8E3F-...'})
   return response.json()

Open Link in New Tab (Default)

in Forum and Website Bugs

Posted by: zeeZ.5713

zeeZ.5713

You can also ctrl+click, shift+click or click them with the middle mouse button/scroll wheel to open them in new windows or tabs :P

What is this?

in Forum and Website Bugs

Posted by: zeeZ.5713

zeeZ.5713

The hell thinks “The hell?” is a good tile for a topic?

Support SSL certificate expired

in Forum and Website Bugs

Posted by: zeeZ.5713

zeeZ.5713

So without a valid certificate, we can’t be sure if it’s actually the ANet team we’re communicating with?

That’s how it’s supposed to be, yes. In practice it really depends on how you scale your confidence.

An expired certificate means the private key’s… privacy is no longer guaranteed. You’re to assume anyone digging through their trash could have found it.

Since I doubt they’d do something like that (this is where the trust and confidence comes in) chances that someone 1) got hold of their private key and 2) is able to pose to you as one of the domains listed in the certificate (e.g. support.guildwars2.com) are about as slim as they were yesterday.

So, in theory, going by protocol, the certificate must not be used any longer, and you should not trust it.

In practice it’s up to you to trust them. How confident are you that the key has not been compromised, keeping stuff like this in mind (this list is by no means complete):

  • The certificate expired “just” yesterday.
  • Would a company like that let their certificates expire and still use them?
  • What are the chances they simply managed to forget to renew them?
  • How big are the odds that someone could have.. “acquired” their private key and is posing as one of the sites by now?

As long as you don’t just go around and start trusting any site with an invalid certificate now I don’t see much of a scam coming out of this.

E: Actually, you’d assume that no competent web team would let the certificates for the support platform of a game this size expire and not renew them well before they’re due. Saying “it only expired a day ago!” was kind of incompetent on my end too, really.

(edited by zeeZ.5713)

Support SSL certificate expired

in Forum and Website Bugs

Posted by: zeeZ.5713

zeeZ.5713

Strictly speaking, no.

Being less strict, yes. The communication is still encrypted, but it’s showing you an expired ID and it’s up to you to trust it.

Support SSL certificate expired

in Forum and Website Bugs

Posted by: zeeZ.5713

zeeZ.5713

https://en.support.guildwars2.com/ (and a ton of other support pages, most of which are dead, except for help.ncsoft.com) expired 31.08.2013 23:59:59 GMT

You may want to renew certificates before the deadline hits, especially when it’s on a weekend

Should I be concerned?

in Account & Technical Support

Posted by: zeeZ.5713

zeeZ.5713

Thank Gaile for your response. Please let someone know to get a physical authenticatior in the works that I could buy. I like alot of others dont have a smartphone so I’m not able to use the app as an added protection.

The support page states that any app which supports the TOTP/OATH standard (IETF RFC 6238) can be used with the Guild Wars 2 two-factor authentication. That should apply to hardware tokens too. (No support, your own risk, etc, etc)

API errors & bugs

in API Development

Posted by: zeeZ.5713

zeeZ.5713

There’s no vista icon in files.json. Maybe that one rogue map_waypoint_hover assassinated it and took its place.

E: Also no skill challenges.

Weapon set daily achievements

in Suggestions

Posted by: zeeZ.5713

zeeZ.5713

I mostly only ever play my ranger, always with a longbow and greatsword. Every time I get a cool new weapon skin I either think “aw man that’s a cool greatsword/longbow skin, I might use this one instead” or “that’s a really cool axe, sword, torch, dagger…. skin, too bad I don’t use those”, so I thought maybe I’ll keep one of each and just roll some dice to see which to use for the day to mix things up. And so should everyone else.

Why not encourage everyone else to switch things up? It would be a daily slayer kind of achievement: Defeat enemies while wielding a <x> [and a <y>]. requiring about 40 kills with that weapon set.

It would have introduce a new class of profession specific achievements though if you’d always want all players to be able to achieve it. Every day a random weapon set for all 8 professions would be drawn, and maybe only the one applying to your current profession would be shown. Or something like that, dunno, I’m not a game designer :P

Map for Labyrinthine Cliffs

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Having up to date map tiles as the update hits would be rad, otherwise we’d have to abandon the tile service and build our own with tiles mined from the game client.

This is the map of Labyrinthine Cliffs the tile service gives us as of right now

Attachments:

Search feature not working

in Forum and Website Bugs

Posted by: zeeZ.5713

zeeZ.5713

Issues where the search engine would randomly return 0 results instead of real results have been fixed.

  • Fix: Search engine now always returns 0 results instead of real results.

Attachments:

I need the propaganda

in Cutthroat Politics

Posted by: zeeZ.5713

zeeZ.5713

Here are the digital versions of the campaign posters, so you can print them out or play with them to show your support for the candidate of your choice:

Kiel: http://www.flickr.com/photos/arenanet/9304482086/sizes/l/

Gnashblade: http://www.flickr.com/photos/arenanet/9301701493/sizes/l/

Those are not New Krytan! My immersion!

Boxes o' fun

in Black Lion Trading Co

Posted by: zeeZ.5713

zeeZ.5713

I would totally buy a Font of Petrification :P

Also, thanks Curtis for pointing out such a thing existed, the wiki did not know!

(edited by zeeZ.5713)

GW2's Mumble Link "context" data format

in API Development

Posted by: zeeZ.5713

zeeZ.5713

byte4.byte5.byte6.byte7 == ip address of the map/server i think.
/ip in the chat window has the same number.

edit:
byte44-byte47 == uint32 and seems to be the build version of the game (cf https://api.guildwars2.com/v1/build.json)

That seems to add up, so I added that above.

Please note that I’m using square brackets to give array sizes, not position :P float[ 3 ] is an array of three floats, not a float at position 3! Thus Nithanim is confusing the heck out of me, even if I assume he means ints and not single bytes.


E: I’ve attached random dumps from Plains of Ashford, Black Citadel, Lion’s Arch, Heart of the Mists, Red, Blue, and Green Borderlands. Didn’t get any overflows.

map_id seems off the charts for WvW.

There seems to be something in byte 32, maybe another int? Everything else is 0 across the board.

(edited by zeeZ.5713)

GW2's Mumble Link "context" data format

in API Development

Posted by: zeeZ.5713

zeeZ.5713

We know Mumble Link uses this data format:

Data format Description
uint32_t uiVersion
uint32_t uiTick
float[ 3 ] fAvatarPosition
float[ 3 ] fAvatarFront
float[ 3 ] fAvatarTop
wchar_t[ 256 ] name
float[ 3 ] fCameraPosition
float[ 3 ] fCameraFront
float[ 3 ] fCameraTop
wchar_t[ 256 ] identity / character name
uint32_t context_len
byte[ 256 ] context
wchar_t[ 2048 ] description

But what about the stuff inside context? GW2 writes context_len as 48 bytes, but what’s inside?

Edit: See https://github.com/arenanet/api-cdi/blob/master/mumble.md

Attachments:

(edited by zeeZ.5713)

6.7.2013 api server down ?

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Event Details API location coordinates

in API Development

Posted by: zeeZ.5713

zeeZ.5713

I made a silly picture

All events are within map_rect of their respective map.
All maps are within continent_rect of their continent.

To figure out where something is on the continent you need to know their place within map_rect on the map, then fit map_rect inside continent_rect on the continent.

Attachments:

EventDetails.Location: how does it work?

in API Development

Posted by: zeeZ.5713

zeeZ.5713

You need to convert those coordinates from map coordinates to continent coordinates using the information from maps.json first. See this thread on how to calculate that.

[API Suggestion] Trading Post API

in API Development

Posted by: zeeZ.5713

zeeZ.5713

I’m curious what ArenaNet’s economy stuff guy, John Smith I believe was his name, has to say about this back and forth here about grand scale automation of trading post buys and sales.

WebSocket location server/client map thing

in API Development

Posted by: zeeZ.5713

zeeZ.5713

As of right now, what’s being sent is basically this:

Client output:

{
“map”: int map_id,
“continent”: int continent_id,
“name”: string character name,
“face”: float face direction in degrees,
“elevation”: float adjusted elevation,
“position”: [float adjusted x, float adjusted y]
}
encoded in Base64.

map_id is bytes 27 and 28 from context as uint32 (counting from 0), I believe
continent_id is from https://api.guildwars2.com/v1/maps.json?map_id=… (cache that thing on every map change)
name is identity
face is -(atan2(fAvatarFront[ 2 ], fAvatarFront[ 0 ])*180/pi)%360
elevation is fAvatarPosition[ 1 ]*39.3701
position is fAvatarPosition[ 0 , 2 ]*39.3701, then transformed from map coordinates to continent coordinates

Server output:

[{client 1}, {client 2}, …]
unencoded…

Client connets to: ws://host/publish/key
Map connects to: ws://host/players.json/key

There is no other fancy stuff being done on connect other than what simple WebSockets do.

The server will accept more data than the above minimum, but will simply discard it.

(edited by zeeZ.5713)

WebSocket location server/client map thing

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Do I run location distributor on my server forward the ports add a key to it and then host the webpage with the distributor address and key for it to work like this?

The distributor doesn’t care about the keys really, all you set it up with is a port and update frequency (no binding to a specific interface yet, sorry).

You’d set it and a map modified for your needs up somewhere, give your people the sender and point them to it.

Ideally you’d have a prompt for the key on both sender and map, so if a third party knew where your map was they’d not get your locations.

For ease of use give them the sender as an exe and a preconfigured bat along with it to run that thing, like:


@echo off
set /P key="Enter key: " %=%
location_sender.exe local.ctrl-alt-chainsaw.net -l info -p 8888 -f 0.5 -k %key%
pause

They’d enter it as they run the bat and open the map, and off they go. Or you hard code it on the map and/or client and hope nobody from the other side figures out where your map is

As for the icon, line 144 sets the icon style for a new player, which is defined in 105-110.
You could define a new icon, like “leaderIcon” along with a list of your leaders, like “var leaders = [‘Gir Doomsong’,‘Inventor Zim’];” somewhere, and modify line 144 to read something like “icon: leaders.indexOf(player.name)>=0? leaderIcon : posIcon,” or something :P

I should definitely update the map a little if I get around to….

WebSocket location server/client map thing

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Code: https://github.com/zeeZ/gw2-location
Map: http://dl.dropboxusercontent.com/u/6664141/gw2/map.html
“Binaries”: https://dl.dropboxusercontent.com/u/6664141/gw2/location_dist.zip

Right now it’s a very basic implementation and due to lack of free time won’t move at much speed, but I welcome any pull requests.

It consists of three things:
location_sender uses the MumbleLink data GW2 provides and based on an API call translates your map coordinates to world coordinates, then opens a WebSocket to location_distributor and continually sends it your position

location_distributor takes that data, does a minimal amount of sanity checking, puts it into a big list and provides a second WebSocket which the map can connect to, to perpetually receive a list of players and their location

map… well, is a basic map to show that data. Right now it doesn’t allow to change address and key on the fly, so you’d have to download and change it if you want to mess with different servers and keys.

Both location_sender and map provide a key on connect to allow for grouping. The map will only receive location data for players that have provided the same key.

You can sort of demo it by running location_sender.{exe/py} local.ctrl-alt-chainsaw.net
With both sender and map not providing a key I sort of consider that a public group :P

Who is excited about the API going public?

in API Development

Posted by: zeeZ.5713

zeeZ.5713

I think the OP is reacting to an article on PCGamerN.

Talk about a misleading title

Map API / Mumble Mashup

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Within a zone, the offset seems to be consistent, so I can easily write a translation map for each zone, but I’m curious if other people have noticed the same?

I think most location translation is going on here

I notice Dredghaunt Cliffs and Caledon Forest are way off using that formula, but all other maps I visited were spot on. Either way I think we should split discussions out of this a bit

Map API / Mumble Mashup

in API Development

Posted by: zeeZ.5713

zeeZ.5713

I’m updating my implementation:
location_sender sends its updates to websocket /publish/key
map connects to websocket /players.json/key and will receive location updates for anyone using key

I’m using that inconsistency so I don’t get confused between the two :P

Here’s my very crude implementation of the whole thing, in Python:
https://github.com/zeeZ/gw2-location

Stuff “compiled” into executables:
https://dl.dropboxusercontent.com/u/6664141/gw2/location_dist.zip

My current version of the map:
http://dl.dropboxusercontent.com/u/6664141/gw2/map.html

If you point the sender at local.ctrl-alt-chainsaw.net port 8888 it should show up, unless I shut it down or it crashed :P

(edited by zeeZ.5713)

Map API / Mumble Mashup

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Here’s my very crude implementation of the whole thing, in Python:
https://github.com/zeeZ/gw2-location

Stuff “compiled” into executables:
https://dl.dropboxusercontent.com/u/6664141/gw2/location_dist.zip

My current version of the map:
http://dl.dropboxusercontent.com/u/6664141/gw2/map.html

If you point the sender at local.ctrl-alt-chainsaw.net port 8888 it should show up, unless I shut it down or it crashed :P


Should probably explain this a little more:

location_sender prepares and attempts to read link data from memory. Once it finds something, it takes position, face direction, map and character name, converts position to world map coordinates based on a json call and face direction to degrees, and tries to send that data as a base64 ecnoded JSON string to a WebSocket server.

location_distributor provides the WebSocket for that information, makes sure it’s a little bit sane, and provides another WebSocket that keeps pushing a json list of everyone’s location data

The map as linked above subscribes to that and, hopefully, shows where everyone is.

Problems right now:

  • sender doesn’t reconnect on its own, does no check if the game is still updating data (uiTick) and will just keep sending forever.
  • distributor doesn’t do a lot of sanity checking besides stripping anything but the information we want from the json it receives. Players are only removed once the sender disconnects, even if it stops sending updates
  • map is very basic and hackish.

I welcome anything you can tell me about my code

(edited by zeeZ.5713)

Map API / Mumble Mashup

in API Development

Posted by: zeeZ.5713

zeeZ.5713

One thing this thread made me think about:

There’s also some data being exported to the Logitech G13 (and other Logi Devices), such as char name, map name, and map completion. Not 100% certain on what all is there, since I don’t own one, and am judging based on poorly filmed youtube videos.

However, if there’s useful info in there, one would think it could be extracted in a similar fashion. (Note: I’ve not looked at the G13’s API).

Just tossing the idea out there.

As far as I remember it just provides images with the information on it, no machine readable data.

API errors & bugs

in API Development

Posted by: zeeZ.5713

zeeZ.5713

I did some running: http://i.imgur.com/Opb0pTQ.jpg

The y coordinates for Caledon Forest don’t line up for some reason.

[API Suggestion] Event Details

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Is there some difference we should be aware of in the format of the coordinates in event_details.json as opposed to map_floor.json? Apologies if this has already been covered, but I can’t find it anywhere.

See https://forum-en.gw2archive.eu/forum/community/api/Event-Details-API-location-coordinates/first

Map API / Mumble Mashup

in API Development

Posted by: zeeZ.5713

zeeZ.5713

https://gist.github.com/zeeZ/1fbad280c600d56f41be

And here are the icons, because kitten gist. https://dl.dropboxusercontent.com/u/6664141/icons.tar.gz

That’s as far as it’ll go, I guess.

Event Details API location coordinates

in API Development

Posted by: zeeZ.5713

zeeZ.5713

I was using a numpy matrix, but even if I only built it once per map your pile of random characters is a lot faster.

All condensed in one ugly block of code so I don’t have to look at it so much:


def continent_coords(continent_rect, map_rect, point, game=False):
    return (
        (point[0]-map_rect[0][0])/(map_rect[1][0]-map_rect[0][0])*(continent_rect[1][0]-continent_rect[0][0])+continent_rect[0][0],
        ((-point[1] if game else point[1])-map_rect[0][1])/(map_rect[1][1]-map_rect[0][1])*(continent_rect[1][1]-continent_rect[0][1])+continent_rect[0][1]
    )

Event Details API location coordinates

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Yes, math hard. Cliff?

Event Details API location coordinates

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Currently I’m under the impression that those coordinates are supposed to be inside map_rect, which sits inside continent_rect on the map, but I didn’t put a lot of effort into trying to verify that (None)

Map API / Mumble Mashup

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Knowing the format of the context blob would be great.

I just brute force it into uint32 and get map ID at the 7th and world ID at the 9th position (counting from 0, of course :P), though I’m sure some of that is utterly wrong.

Edit:
How to turn fAvatarPosition[3] into map coordinates (or the rough idea thereof):

fAvatarPosition[3] contains x, a, y position, a being altitude, because kitten.
context[256] contains the map ID, somewhere, see above.

For some reason you have to negate y.

Multiply x, y by 39.3701 to convert from meters to inches. You now have your chatacter’s position within map_rect for the given map.

Resize and translate this point to fit into continent_rect (that’s the easy part) and boom, you can slap it onto the map.

http://i.imgur.com/ULRQjyd.jpg

Sort of. Dunno, I’m no asura. I just slap them pieces together until they break or through some miracle actually work.

(edited by zeeZ.5713)

API Development Plans

in API Development

Posted by: zeeZ.5713

zeeZ.5713

This, or at least the general idea of where the API is going, should be a sticky.