Showing Posts For zeeZ.5713:

Are we going to be able to POST/PUT?

in API Development

Posted by: zeeZ.5713

zeeZ.5713

See https://forum-en.gw2archive.eu/forum/community/api/API-Development-Plans/first#post2081787

We’re working on implementing OAuth2, a safe authentication system that will allow websites and applications to talk to our API on behalf of players without giving those apps your game password. For developers, this will involve signing up for an API key, getting a quota of API calls, etc. For users, there will be a new login flow where they authorize apps to take certain actions on their behalf.

OAuth2 support will enable many more personalized APIs to be created. Guild, Chat, Character, and other APIs are all possible. We don’t currently have a planned release date for OAuth2, but we’re actively working on implementing it.

Will we eventually be able to push data?

in API Development

Posted by: zeeZ.5713

zeeZ.5713

See https://forum-en.gw2archive.eu/forum/community/api/API-Development-Plans/first#post2081787

We’re working on implementing OAuth2, a safe authentication system that will allow websites and applications to talk to our API on behalf of players without giving those apps your game password. For developers, this will involve signing up for an API key, getting a quota of API calls, etc. For users, there will be a new login flow where they authorize apps to take certain actions on their behalf.

OAuth2 support will enable many more personalized APIs to be created. Guild, Chat, Character, and other APIs are all possible. We don’t currently have a planned release date for OAuth2, but we’re actively working on implementing it.

map/leaflet question

in API Development

Posted by: zeeZ.5713

zeeZ.5713

I found it … maxZoom needed to be changed from 7 to 6.

Hint: https://api.guildwars2.com/v1/continents.json lists max_zoom as 6, for anyone pondering why.

[API Suggestion] Maps API

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Not directly maps API, but related: “Geotagging” of screenshots for fancy Google Maps style image layers!

API errors & bugs

in API Development

Posted by: zeeZ.5713

zeeZ.5713

World Map Tile Service: Server sends Content-Type: image/png header, but serves JPEG images (not that it matters)

Access to API with http instead of https?

in API Development

Posted by: zeeZ.5713

zeeZ.5713

match_id: How do you get it?

in API Development

Posted by: zeeZ.5713

zeeZ.5713

use eval

You don’t use eval. Ever.

Python’s JSON module works just fine, and there are others like it

[API Suggestion] Guilds

in API Development

Posted by: zeeZ.5713

zeeZ.5713

That seems to be a little bit too bright

Is that sane?

insane :P

I added (mem)caches all over the place, it’s a lot saner now, I think :P

Time when nothing is cached: 1000ms to 1500ms
Time when all three color matrices are cached: 600ms to 800ms
Time when image is in cache: 50ms

Time when app engine starts a new instance: 3 to 20 seconds

I could probably shove off a bit of time by pre-calculating the matrices and putting them into the datastore, but I suspect lookup times are a big part of it.

And then there’s the whole color channels being backwards thing.

List of apps/websites using the API

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Thought I’d add my guild emblem image generator experiment thing to this list:
http://gw2-emblemer.appspot.com/emblem.get?guild_name=ArenaNet
http://gw2-emblemer.appspot.com/emblem.get?guild_id=4BBB52AA-D768-4FC6-8EDE-C299F2822F0F
… and that’s about all it does.

[API Suggestion] Guilds

in API Development

Posted by: zeeZ.5713

zeeZ.5713

… and here are the relevant bits, I think:

https://gist.github.com/zeeZ/5714857

Is that sane?

[API Suggestion] Guilds

in API Development

Posted by: zeeZ.5713

zeeZ.5713

I spent the night messing with that stuff, and, because I always wanted to learn how to use Google’s App Engine:

http://gw2-emblemer.appspot.com/emblem.get?guild_id=75FD83CF-0C45-4834-BC4C-097F93A487AF

It uses numpy and PIL to mess with the emblem data

The source is horrible, I’m not catching some of the errors, and there’s no caching, let’s see how long it takes to break and exceed all limits

I’m basically creating a matrix following Cliff’s JS example, then… turn the image from RGB into BGR, apply the mask, turn it back into RGB and add the a or b file as an alpha I blame Cliff, his matrix is totally backwards :P

E(E): Fixed issue with guilds with blank background, I think, thanks to whoever tried that and put it in my error log :P

(edited by zeeZ.5713)

[How To] Colors API

in API Development

Posted by: zeeZ.5713

zeeZ.5713

I stumbled across those CSS3 filters:

	-webkit-filter: brightness(1.5) contrast(1.5) hue-rotate(180deg) saturate(2);

Now if only there was a lightness filter :P

[How To] Colors API

in API Development

Posted by: zeeZ.5713

zeeZ.5713

I had it wrong when I said S & L are between 0 – 1 (saturation is; lightness is not).

Actually, they seem both to be between 0 and 2 (or at least >1) :

7: {
	name: "Ocean",
	cloth: {
		brightness: -21,
		contrast: 1,
		hue: 188,
		saturation: 1.32813, <--
		lightness: 0.976563
	},
	leather: {
		brightness: -18,
		contrast: 1,
		hue: 188,
		saturation: 1.13281, <--
		lightness: 1.05469
	},
	metal: {
		brightness: -18,
		contrast: 1,
		hue: 188,
		saturation: 0.78125,
		lightness: 1.01563
	}
}

Just to make that clear, they’re not raw values you take but factors you multiply the current values with.

How much bigger than 1 is the product? If it’s not much I’d just cut it off.

[API Suggestion] Colors

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Never mind that…

http://codepad.org/tvfy3vnz

Turns out they represent hue as something between 0.0 and 1.0 for some reason…

High resolution WvW map?

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Those maps are old, and the overlays are mostly there to indicate where stuff is.

AFAIR the walls are just overlays too, hidden somewhere among the billion other textures.

[API Suggestion] Colors

in API Development

Posted by: zeeZ.5713

zeeZ.5713

The conversion might be worth doing a second post on the other thread with some examples in different languages. Python for example seems to have a standard lib for converting, while many other languages need to implement the algorithm themselves.

If you’re talking about colorsys then.. meh. Maybe I’m doing something wrong here, but the result’s off.

http://codepad.org/9jftbuvW

[API Suggestion] Colors

in API Development

Posted by: zeeZ.5713

zeeZ.5713

I have something crazy like this

Brightness/contrast for each red, green and blue:

	(base_rgb.r + cloth.brightness - default.brightness) * ((cloth.contrast - default.contrast) / 128)

H/S/L:

	h: (cloth.hue - color.h) % 360
	s: (cloth.saturation - color.s) / 255
	l: (cloth.lightness - color.l) / 255

With base_rgb being 128,26,26 and color being the result of the first transformation

Of course I could be way off

[API Suggestion] Colors

in API Development

Posted by: zeeZ.5713

zeeZ.5713

so it should be possible to add something like this before the other process?

Pixastic.process(bg, “brightness”, {brightness:50,contrast:0.5});

Lets test some things ^^

Yes. Though I have found that I have to do this in order to chain them:

	Pixastic.process(Pixastic.process(img, "brightness", bright_opts), "hsl", hsl_opts);

Not sure if you need to use legacy for brightness.

Difference in data count events/event_names?

in API Development

Posted by: zeeZ.5713

zeeZ.5713

First of all, event_names.json doesn’t have a world_id parameter, it’s always a list of all events that have been discovered globally.

As for events missing in events.json:

After a new patch, the events list has to re-populate. At the moment there’s a bug where the initial state of an event is not correctly recorded until the event has been initiated on that world at least once. For now, treat missing events as ‘inactive’.

[API Suggestion] Colors

in API Development

Posted by: zeeZ.5713

zeeZ.5713

http://dragonwatch.net/fancyemblemexperiment/ does most of this math already, using pixastic. The only thing it’s missing is brightness/contrast, which seem to be something that pixastic also supports.

It does, yeah. I dug up the non-compiled sources for my little experiment that I did almost a year ago, and it seems I only bothered with hue and value, using 160,32,32 as a base

The way I did it on that site is pick the most common color on those masks and the individual colors from a screenshot of the in game guild emblem designer, then force that through a Python script to convert RGB to HSV, get the saturation and value difference between the two and dump it all into a HSV array.

The JS does something like this:

	var bg = new Image();
	bg.onload = function() {Pixastic.process(bg, "hsl", {hue:hsv[bgi].h,saturation:hsv[bgi].s,lightness:hsv[bgi].v});}
	$('#emblem #backg *:first-child').replaceWith(bg);
	bg.src='images/backgrounds/'+background+'.png';

Where hsv is an array that contains hue, staturation and value.. values, bgi is whatever index I gave that color in the array, and background in this case the file name for the emblem background.

I honestly don’t remember how or why I did some things the way I did, and the whole thing was just a random experiment quickly thrown together to help decide on an emblem for the upcoming launch, but I’m sure people will figure it out, even if it has to be via trial and error like I did it :P

You can find Pixastic here, btw.

(edited by zeeZ.5713)

[Data dump] All recipes and created items

in API Development

Posted by: zeeZ.5713

zeeZ.5713

I went ahead and updated the dumps today.

[API Suggestion] Guilds

in API Development

Posted by: zeeZ.5713

zeeZ.5713

At some point we’d like to be able to render images on our servers so that you don’t have to, but that’s not available yet. I know there are some emblem creator websites and apps already — is this enough information to feed into those so that you can generate emblems?

I dabbled with that around release: http://dragonwatch.net/fancyemblemexperiment/#21;23;1;1;6;0;0;0;0;16

We can get to the emblem parts and figure out their ID, and from what I remember applying a color is just a hue shift (or that least that’s how I did it). Of course pre-rendered images would save us some computations on our side :P

Mapping the API

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Here is an obvious question: Shouldn’t this documentation be provided by ArenaNet for the usage of their api?

I’d be inclined to agree with you. Seems a little odd to just toss it out there without providing some

Doesn’t seem odd to me. They’re just testing the waters, and this is what they got. They just throw it out there and see what we do with it, spending the time on readying new shinies for us.

Documenting would be something to do once the stuff is out there proper and more or less stable. We’ve got smart guys here, we can figure it out :P Maybe that’s what they’re counting on, hoping it’s well documented on the wikis by the community before they have to even lift a finger

[Data dump] All recipes and created items

in API Development

Posted by: zeeZ.5713

zeeZ.5713

I needed (wanted) all items that are created from a recipe and the matching recipes to do the things I want to do, so I pulled it from the API, one item/recipe a second (I felt generous and didn’t want to just bulk spam them all :P).

Maybe some of you need that data too, so to pull a little weight off the API servers’ shoulders, my data dumps as of June 8, 2013:

 
recipe_details for every recipe in recipes. Key is recipe ID, data is recipe_details output
https://dl.dropboxusercontent.com/u/6664141/gw2/recipe_details.json.gz

item_details for every recipe’s output_item_id in the above list. Key is item ID, data is item_details output.
https://dl.dropboxusercontent.com/u/6664141/gw2/recipe_created_items.json.gz

 
I didn’t pull details for the recipe’s ingredients because the way my idea unfolds currently I can pull them on the fly as needed. I hope those dumps provide to be useful to some of you (and that they don’t get outdated too fast)

(edited by zeeZ.5713)

Are we allowed to use it?

in API Development

Posted by: zeeZ.5713

zeeZ.5713

As long as it’s purely an overlay and doesn’t interact with the game in any other way I’d hazard a guess that you probably won’t get banned for it.

And then add a generic response about own risk, malicious software, not supported, etc.

[How to] Get chat code with item ID

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Python?

from base64 import b64encode
def genItemChatCode(item_id):
    return '[&' + b64encode('\x02\x01' + chr(item_id%256) + chr(item_id/256) + '\x00\x00') + ']'

There might be a better approach to this, though :P Also what happens once IDs exceed 65535?

[API Suggestion] Map Coordinate System

in API Development

Posted by: zeeZ.5713

zeeZ.5713

And as a bonus, geotag screenshots

Java access to the api

in API Development

Posted by: zeeZ.5713

zeeZ.5713

@zwei Please do not use com.guildwars2.api as a package name. Java naming conventions suggest you should use a domain you own, making this one imply it’s an official thing (plus there’s a (tiny) chance an official package will conflict with yours should they ever release one). Personally I see this as a no-go, though I do tend to be a little strict on random things from time to time

[API Suggestion] Guilds

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Ah yes, showing individual members’ influence gain. I’m looking forward to some kicking related drama this will eventually generate in those elite guilds

API Development Plans

in API Development

Posted by: zeeZ.5713

zeeZ.5713

I only dream of a streaming API that just trickles down event or WvW updates to us instead of having to poll it every other nanosecond :P

[API Suggestion] Guilds

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Once the actual event has kicked off it’s in the API already. Rushes are “Complete the guild rush course.” while bounties begin with “Subdue and capture” (except for Brekkabek, his event is swapped as “Capture and subdue Brekkabek.”).

I assume what you’re looking for is whether or not a specific guild has one of those missions active, and if so with which targets and their completion status.

(edited by zeeZ.5713)

List of apps/websites using the API

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Technically the English wiki is one of those sites too :P
http://wiki.guildwars2.com/wiki/Catch_rabbits_and_return_them_to_Arlo (Fetch worlds currently active on in the event infobox)

High resolution WvW map?

in API Development

Posted by: zeeZ.5713

zeeZ.5713

[Code] Tags please

in Suggestions

Posted by: zeeZ.5713

zeeZ.5713

The code tags listed on Wikipedia seem to be supported, don’t do any fancy language specific coloring though.

# """ THE SPINNY THING """
from time import sleep
thingy = [ '|', '/', '-', '\\' ]
i = 0
while True:
    i = ( i + 1 ) % 4
    print thingy[ i ], '\r',
    sleep(0.25)

Or you could use regular html <code> tags I guess

(edited by zeeZ.5713)

Authenticator Questions/Concerns [merged]

in Account & Technical Support

Posted by: zeeZ.5713

zeeZ.5713

I think the text next to the input boxes forthe process of unlinking an authenticator could be reworded a bit to clear up confusion.

Currently, it asks for a current code and a different code. Clever as I thought I was I went to the second input (different code) and entered whatever code it gave me, then went to the first input (current code) and the code my authenticator showed next. That didn’t work, so I tried again, and again.

I was already looking into possible recovery options when I switched it around, just for the heck of it. Into the first input (current code) I entered the code that was current/valid as of page load, and in the second input (different code) I entered whatever came next. Naturally, that worked.

Maybe it’s my own stupid fault for not reading the whole page properly as I only managed to skim it as far as “Please confirm that you enter two different codes yada yada yada ok got it” in the second paragraph and totally overlooked “and that the second is newer than the first.” in the second half of the sentence, but who has the time to read two full paragraphs these days when they obviously know what they’re doing? :P

Songs on the Bell Choir mini game

in Wintersday

Posted by: zeeZ.5713

zeeZ.5713

6, 1, 3, 4, 6, 1, 3, 4, 6, 1, 3, 4, 2?

(edited by zeeZ.5713)

No time to participate/different time zone [merged]

in The Lost Shores

Posted by: zeeZ.5713

zeeZ.5713

They’ve scheduled the events based on concurrency peaks, and running those events for different time zones doesn’t seem to be possible either:

We know that this is a topic that’s going to be heavily discussed, and we definitely want as much of your feedback as possible, both positive and negative (so long as it remains constructive and within the guidelines of the rules of conduct). However I would just like to point out that this:

“…fact that it’s the highest concurrence time…”

is contradictory to this:

“why not choose a time where there’s a higher chance for people to choose to attend?”

The reason we chose the times that we did, when concurrency is at its peak, is precisely because it offers us the highest chance for the largest number of people to attend. By definition though, because concurrency rises and falls, that means it’s impossible for us to choose a time that offers us a chance for everyone to attend.

Offering events like this at multiple times for different time zones is certainly worth considering, but given our team’s goals and the timeline we had to operate in (we fielded our team immediately after shipping the Live game), it just wasn’t feasible for us to consider such an option for this particular event.

Having said that, this decision is something that we realized would not make everyone happy. Keep in mind that there is a tremendous lineup of content to choose from during the weekend and after, with both the island and the Fractals dungeon remaining active, and we will continue to listen to both criticisms and compliments about these special events in order to continually improve your playing experience.

Effectively reporting bugs in game?

in Bugs: Game, Forum, Website

Posted by: zeeZ.5713

zeeZ.5713

Always provide names and other relevant stuff in text, makes it easier to copy & search ^^

Rejoice! Mobile Authentication News!

in Account & Technical Support

Posted by: zeeZ.5713

zeeZ.5713

I’m using Google Authenticator on an Android for GMail, two Google Apps accounts and now GW2. Setup went without a hitch (all four addresses are unique), and login to all accounts using the authenticator works properly.

At least on Android, you can touch and hold a GA entry for about two seconds to bring up the menu that contains options to rename or remove it. That’s pretty much an Android standard thing.

I found ceiling cat in Guild Wars 2!

in Guild Wars 2 Discussion

Posted by: zeeZ.5713

zeeZ.5713

Stop looking up Queen Jenna’s dress now… ceiling cat is watching you.

But she’s asking for it!

Attachments:

Queue size data from 9-14 to 9-18 (EU)

in WvW

Posted by: zeeZ.5713

zeeZ.5713

Queue sizes and their histories are totally something that should make it into the Extended Experience