These are chat archives for arenanet/api-cdi

6th
Mar 2016
David Reeß
@queicherius
Mar 06 2016 00:32
I dont know if it helps anyone, but if anyone doesn't want to go through the hassle of parsing attributes of items and characters: https://github.com/gw2efficiency/gw2e-item-attributes :)
windwarrior
@windwarrior
Mar 06 2016 00:33
does it also give the name of the statcombo?
thats something that was bugging me when creating windwarrior.github.io/DungeonMoney
David Reeß
@queicherius
Mar 06 2016 00:43
Not yet, but i'll add that as an issue. Could be a little helper function.
Right now it's basically what lives inside gw2e, just a little more generalised and cleaned up. Trying to clean up the messy parts first. :D
smiley
@codemasher
Mar 06 2016 00:47
i bitmasked the attributes and put them to db to easily search by attribute combination ;)
Eearslya Sleiarion
@Eearslya
Mar 06 2016 04:48
@lye @tivac Are you in either of these pictures, I wonder? https://twitter.com/ArenaNet/status/705880076412391424
Pat Cavit
@tivac
Mar 06 2016 06:06
No, I posted from my desk
windwarrior
@windwarrior
Mar 06 2016 12:39
@queicherius I was thinking about how you would model statnames, but well I cannot think of anything else than huge switch/case statements that filter on primary/secondary/../ stats
maybe like split on 1-4 stats first, then narrow it down on primary stat, and then switch/if over secondary/ternary stats
I assume it is not something easily exposed by the API right? mapping from statcombinations to statnames
David Reeß
@queicherius
Mar 06 2016 12:45
I have a big list laying around here somewhere. Could just iterate through that until something matches. Maybe i'll do that later today... if I can find the list. :D
windwarrior
@windwarrior
Mar 06 2016 12:47
I have a deadline today, thats usually when I start thinkering and have to force myself not to fix this problem :')
David Reeß
@queicherius
Mar 06 2016 12:49
I know that feeling. Suddenly everything else seems so much more interesting.
smiley
@codemasher
Mar 06 2016 13:11
isn't that what deadlines are made for? :D
David Reeß
@queicherius
Mar 06 2016 13:25
Hm. Maybe i'll do some copy pasting from the sql file, but I was thinking of doing it slightly differently.
That said, looks like you could update that to support Concentration and Expertise! :D
smiley
@codemasher
Mar 06 2016 13:26
it was the easiest thing i could come up with ;)
yea, haven't updated that in ages
David Reeß
@queicherius
Mar 06 2016 13:27
HARDCODE ALL THE THINGS! my favorite comment in that code by far. :D
smiley
@codemasher
Mar 06 2016 13:27
the whole thing emerged from the bitmasks i used earlier (and which i still use for the recipes)
David Reeß
@queicherius
Mar 06 2016 13:27
I know that feeling
smiley
@codemasher
Mar 06 2016 13:27
heh
@Eearslya I'm not in them either. I'm immune to photography.
windwarrior
@windwarrior
Mar 06 2016 13:29
do you even evade
33333333
@windwarrior so items don't have stats, persay, they reference stat objects which have values multiplied against item level (which is adjusted by rarity) to get the final stats. IIRC the stats objects have localized names (or, some of them do) -- need to look into exposing that since they're used for pvp amulets too.
windwarrior
@windwarrior
Mar 06 2016 13:32
right, makes sense
Also need to reference those from choosy-stat items somehow I think.
windwarrior
@windwarrior
Mar 06 2016 13:33
"selectable_stats": [1,2,7,10,14] and then something like /v2/stats?ids=
maybe?
I don't remember if the level/stat multiplier is just linear of if there's a table; if it's linear it might make sense to have an /v2/itemstats endpoint or somesuch that just dumps the multipliers.
yeah
and then "selected_stat": 7 when it's in an inventory itemstack or something
I have a small feeling that the multipliers are not actual multipliers and that there's a table somewhere though.
windwarrior
@windwarrior
Mar 06 2016 13:34
btw, ingame itesm that are stat selected (lengedaries, gorseval/sabetha armor) dont link their stats either
always funny when someone tries to gearcheck you and you cannot prove that you really have viper's armor :')
smiley
@codemasher
Mar 06 2016 13:35
ohai @lye! the attribute combination thing makes me wonder if it was possible if you could hand us something more reliable than letting us guess... :D
to be honest, I'm still not sure where the actual stat selections are stored :|
@codemasher yeah, I'm going to need to expose something for choosy stats and pvp amulets, I just haven't figured out the best way to do it.
smiley
@codemasher
Mar 06 2016 13:36
heh, yea, thats really tricky
i mean, if we had an id for each combination (see my sql) it would be super helpful
windwarrior
@windwarrior
Mar 06 2016 13:41
also, is there an explicit relation between inscription/insignia and stats on a weapon
The good news is that there definitely is an id for each combination
IIRC, no, the inscription/insignia are boring crafting items
The stats on the weapon are determined from the weapon's item object, which is correlated to the insignia only through the crafting recipe.
windwarrior
@windwarrior
Mar 06 2016 13:42
for example, could you expose that "Rabid's Emb(cantspellthis) Pants" are created with a "Rabid's something insignia"
ah right, reverse relation
do these still exist?
probably
smiley
@codemasher
Mar 06 2016 13:48
(and more interestingly: why?)
Usually double spaces are an indication that there's a parameter in the item name that had no matching string when the name was resolved
e.g. the raw name might be "{infixString} Emblazoned Pants {suffixString}"
and there's a parameter in the middle which isn't passed in when the name resolved
smiley
@codemasher
Mar 06 2016 13:50
the funny thing was, it was mostly in french and spanish item names
but not in english and german
windwarrior
@windwarrior
Mar 06 2016 13:50
maybe a difference in word ordering?
smiley
@codemasher
Mar 06 2016 13:51
the pre-and sufffixes are included in the item names
if you can find an item id, I can VPN in and show you the raw string
smiley
@codemasher
Mar 06 2016 13:52
uhh, there's a thread on the forums back from when Cliff was doing that thing... might dig that up :D
David Reeß
@queicherius
Mar 06 2016 13:56
@codemasher btw, you are looking for buff ids here (https://github.com/codemasher/gw2-database/blob/master/src/Updaters/Items/CreateDB.php#L161) but some items have other ids (e.g. https://api.guildwars2.com/v2/items/38422 ). That's why I went with string parsing, even tho it's a bit ugly.
oh, we expose the buff ids? orz
David Reeß
@queicherius
Mar 06 2016 13:58
Exaclty, you are looking at the buff skill id, but only have 16631 and 16517. The item I linked has 25542
smiley
@codemasher
Mar 06 2016 13:58
PR welcome :P
David Reeß
@queicherius
Mar 06 2016 13:58
._.
windwarrior
@windwarrior
Mar 06 2016 13:59
Giver's weapons feel weird tho
smiley
@codemasher
Mar 06 2016 13:59
i herd tahts what githubs made for :D
David Reeß
@queicherius
Mar 06 2016 14:00
On a unrelated note: anyone else playing Black Desert? AFK autofishing while programming ftw.
I saw lye posting about a witch, if that was BDO, good class choice. :D
yeah it's farm central
at some point I should finish the last few levels for 50 instead of just doing contribution points and brewing beer
David Reeß
@queicherius
Mar 06 2016 14:03
I'm still lvl 22 because I was fishing for about 75% of my playtime so far.
unless you want to pvp, you're not missing too much
combat-wise it's mostly more of the same once you've got the core skills unlocked
Shii Kayano
@BryghtShadow
Mar 06 2016 14:07
@lye Speaking of exposing buff ids... any chance you could expose buff ids for nourishments? Or at least the name of the buff? We already have the description and the duration exposed in the item's details subobject. e.g. https://api.guildwars2.com/v2/items/67371 Buff id should be 25632 and name should be Pumpkin's Blessing.
windwarrior
@windwarrior
Mar 06 2016 14:09
(also, that duration is certainly not 0ms)
orz, can you open an issue for that? That should probably be fixed
I don't really want to expose /v2/buffs because that's a large can of worms
but I can definitely fix that details object not having a name or the correct duration
Shii Kayano
@BryghtShadow
Mar 06 2016 14:10
Will do. :)
thanks <3
windwarrior
@windwarrior
Mar 06 2016 14:11
arenanet/api-cdi#245
smiley
@codemasher
Mar 06 2016 14:26
seems like the only german item with a double space (back then) has been fixed https://api.guildwars2.com/v2/items/20286?lang=de
darthmaim
@darthmaim
Mar 06 2016 14:27
want me to find a list of all items with double spaces?
smiley
@codemasher
Mar 06 2016 14:27
i could add a flag in case a replacement takes place and list all ids&lang
or that way XD
feel free @darthmaim :D
@darthmaim a subset of 5-6 would be helpful for debugging on my end
darthmaim
@darthmaim
Mar 06 2016 14:27
on it
though I disconnected the VPN to play BDO, so I probably won't be able to look it up until tomorrow :P
darthmaim
@darthmaim
Mar 06 2016 14:29
:O
smiley
@codemasher
Mar 06 2016 14:29
öö
also look for the multibyte ones
chr 194.160
darthmaim
@darthmaim
Mar 06 2016 14:31
well, seems like that is the only item that still has multiple spaces
smiley
@codemasher
Mar 06 2016 14:32
(i'll add a flag to the updater anyway for future purposes ;) )
darthmaim
@darthmaim
Mar 06 2016 14:38
either mysql can't query for those weird multibyte characters or they don't exist anymore
when I got some time later i might just write a small script iterating over all items and checking
smiley
@codemasher
Mar 06 2016 14:41
thats what i can do right now :P (it just takes my updater half an hour again... :D)
darthmaim
@darthmaim
Mar 06 2016 14:41
just iterate over an existing db?
you have access to the gw2treasures db
smiley
@codemasher
Mar 06 2016 14:41
that would take more effort :D
it's just, i've truncated my temp-db once more :D
(also: i want to test it as it may stay as a permanent change in the updater ;) )
David Reeß
@queicherius
Mar 06 2016 14:52
@lye is there any chance we can get the current gemstore offers exposed?
smiley
@codemasher
Mar 06 2016 15:00
@queicherius I actually have an endpoint for that, but it doesn't show packages
not sure if I ever made the PR
smiley
@codemasher
Mar 06 2016 15:07
nice
btw, i'm currently so hammering the API...
[2016-03-06T15:07:06+00:00][    6.9167s] [fr] 2d45bf23e6129dff790878d207c46896 updated
[2016-03-06T15:07:07+00:00][    7.9086s] [es] 7d9d3735af40d8a7442f67f5a7a33406 updated
[2016-03-06T15:07:08+00:00][    8.7657s] [de] 2538a3a690d266447ae56f5ef7daf94a updated
[2016-03-06T15:07:08+00:00][    9.0497s] [zh] 455f8176a5563dca709715ca5eb1bdba updated
[2016-03-06T15:07:09+00:00][   10.1488s] [en] 8559668137dfc1ec1c2305c64bb89cab updated
[
1 response per second - my internet is the best DDoS protection :D
Eearslya Sleiarion
@Eearslya
Mar 06 2016 15:40
@lye We'll see how immune you are
Anet is just 49 minutes from my housr
I actually wonder what would happen if I just..showed up
Probably not much.
smiley
@codemasher
Mar 06 2016 16:13
@lye @darthmaim replacements occured on 504 items
smiley
@codemasher
Mar 06 2016 16:19
            // strip out weird double spaces from item names
            // https://gitter.im/arenanet/api-cdi?at=56dc3e56126367383571545d
            $old_name = $item['data_'.$lang]['name'];
            $new_name = str_replace([chr(194).chr(160), '  '], ' ', $old_name);
            $item['@metadata']['name_replacement'][$lang] = $old_name !== $new_name;
@codemasher huh. I have a feeling the localized text in those cases just has an extra space, but I'll double-check that assumption tomorrow.
smiley
@codemasher
Mar 06 2016 16:34
although i can see a purpose in some of these strings (like a line break), it seems that these have been removed from (most) earlier items
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted
hmm, seems like i need to store the temp JSON on disk in future... :D
smiley
@codemasher
Mar 06 2016 17:18
pff, if it doesn't work, throw more memory at it...
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 4G
so mysql is sitting on one core, php on the other >.<
smiley
@codemasher
Mar 06 2016 17:29
:point_up: March 6, 2016 3:41 PM @darthmaim umm, seems like don't have ftp/ssh access anymore anyway :D