These are chat archives for arenanet/api-cdi

6th
Mar 2017
Hagai Cohen
@DxCx
Mar 06 2017 12:48
Hey, i'm trying to apply item stat on an item, for example, combining this item https://api.guildwars2.com/v2/items/79712 with this stat: https://api.guildwars2.com/v2/itemstats/1134
but it looks like im missing some lookup table or something
as the stats are relative
how should it work?
Darqam
@Darqam
Mar 06 2017 13:42
Take a peak at the bottom comment on the page: https://github.com/arenanet/api-cdi/blob/master/v2/itemstats.js
But with a bit of looking around, you'll find that all ascended trinkets with 4 stats have the same main and secondary "amount" of stats, so you can manually create an object to determine the amount of stats to give based on info from the item. That's how the wiki does it at least.
Hagai Cohen
@DxCx
Mar 06 2017 14:12
alright, thanks, can i get a link to this table?
or object
i mean i can reverse it, but im sure someone already done it before
Darqam
@Darqam
Mar 06 2017 14:16
And take a look at all the sub-templates. That's where all the numbers are thrown in
Hagai Cohen
@DxCx
Mar 06 2017 14:17
subtemplaes seems empty :O
darthmaim
@darthmaim
Mar 06 2017 14:17
you can expand the table
Darqam
@Darqam
Mar 06 2017 14:17
use "edit" to see what's there
there is nothing to show on the page itself
Hagai Cohen
@DxCx
Mar 06 2017 14:18
oh, edit.. ok
Darqam
@Darqam
Mar 06 2017 14:18
but don't actually edit anything ;)
Gruntzy
@gruntzy
Mar 06 2017 14:22
Hey, https://api.guildwars2.com/v2/account/raids still outputs me the boss I've killed last week. I haven't killed any raid boss today, so I guess it should output an empty array. Is anyone here experiencing the same issue ?
Darqam
@Darqam
Mar 06 2017 14:23
yeah same problem on my end
@lye :fire: :fire: :fire:
if that's the case for raids, might be worth checking dungeons reset properly too
Gruntzy
@gruntzy
Mar 06 2017 14:28
It seems the array is reset once you have done at least kill. One guildmate just did escort today and the output is correct for him
Darqam
@Darqam
Mar 06 2017 14:29
hm, good to know, but ideally it shouldn't be like that...
Dominic
@DomGrieco
Mar 06 2017 15:51
How do I go about finding an ID of a trait? Wiki has the wrong ID for Clarion Bond.
darthmaim
@darthmaim
Mar 06 2017 15:52
986
Dominic
@DomGrieco
Mar 06 2017 15:52
ty
Darqam
@Darqam
Mar 06 2017 15:55
not sure why the skill/trait IDs change so often
darthmaim
@darthmaim
Mar 06 2017 15:55
they never change :O
Darqam
@Darqam
Mar 06 2017 15:56
they definitely do on occasion. I've had quite a few times (notably after skill rewords) where IDs change to something and then back
darthmaim
@darthmaim
Mar 06 2017 15:56
thats weird
Darqam
@Darqam
Mar 06 2017 15:56
either that or I am doing something very very very wrong with my code
darthmaim
@darthmaim
Mar 06 2017 15:56
sometimes skills/... get replaced by new skills
but thats very rare and they shouldn't change back
Dominic
@DomGrieco
Mar 06 2017 15:57
darth is there an api explorer to look up id's by name?
darthmaim
@darthmaim
Mar 06 2017 15:57
Dominic
@DomGrieco
Mar 06 2017 15:58
thanks just what I was looking for

Is there any simple way to deal with characters changing names using the API?

@vennekilde no, there isn't. I think the common thing is to use the {account id, character created} tuple as a unique identifier.

Hey, https://api.guildwars2.com/v2/account/raids still outputs me the boss I've killed last week.

@gruntzy uhh, hmm. The progress counters only update when you're logged in, and there's two 5-minute caches between the map instance server altering your account data and it showing up on the API. If that doesn't explain the discrepancy, I can dig around some more.

not sure why the skill/trait IDs change so often

@Darqam when skills change significantly it's usually done by copy-pasting the original skill, then modifying the copy. The pve/pvp splits count as "significant" change; don't ask me why designers do it this way I haven't the faintest clue.

I have no idea how the game client handles it correctly.
Darqam
@Darqam
Mar 06 2017 17:51
I'll login and afk on my account. In ~10 mins i'll see if my raid kills reset
Darqam
@Darqam
Mar 06 2017 17:56
oh cool, kills reset
didn't even have to wait 10 mins
caches are hard; you might have to wait up to 10 minutes
it depends on (1) when the map instance server flushes your data to the DB (which additionally happens every time you switch maps or sell something on the TP, for example), and (2) whether the API backend server has a cached copy from the DB already.
ChieftainAlex
@ChieftainAlex
Mar 06 2017 18:37
I feel like I've asked this before (sorry), is there an open request for the /characters/ endpoint to display which map landmarks you have reached? (i.e. an endpoint which could be used to locate the final map completion landmarks, such as a missing vista)
Yeah, arenanet/api-cdi#39
I should get around to doing that at some point
Archomeda
@Archomeda
Mar 06 2017 19:10
hmm... seems that if someone buys a mast pole for the guild hall, it doesn't have a completed listing in both ingame nor api :(
only the queued listing
lol
Archomeda
@Archomeda
Mar 06 2017 19:11
so my discord bot just skips it since i programmed it to not look for "queued" entries and just "completed"
interestingly enough, the ids do skip a number
[
  {
    "id": 631694,
    "time": "2017-03-06T17:13:26.000Z",
    "type": "upgrade",
    "upgrade_id": 459,
    "action": "queued"
  },
  {
    "id": 631692,
    "time": "2017-03-06T17:13:26.000Z",
    "type": "upgrade",
    "upgrade_id": 459,
    "action": "queued"
  },
  {
    "id": 631690,
    "time": "2017-03-06T17:13:25.000Z",
    "type": "upgrade",
    "upgrade_id": 459,
    "action": "queued"
  },
  // ...
]
i removed the user
yeah don't rely on the ids being monotonics -- just that higher ids mean "newer"
Archomeda
@Archomeda
Mar 06 2017 19:13
hmm :(
so the ids in between do not exist? :(
what's the guild id?
uhh, they might, I have no idea
Archomeda
@Archomeda
Mar 06 2017 19:13
FF509111-AF73-4D0C-9193-AAEE7DCEFA41
same guild :P
yeah I don't see an event for 631693
nor do I see complete events in the log for that upgrade_id
actually let me try something else
Archomeda
@Archomeda
Mar 06 2017 19:16
weird :/
maybe the game doesn't output it anymore since the build_time is 0? https://api.guildwars2.com/v2/guild/upgrades/459
yeah, looking at all of the guild's data; there's no such event
definitely possible
seems like a bug imo
Archomeda
@Archomeda
Mar 06 2017 19:19
pretty sure stuff used to have a build_time before the HoT rework
oh well
thanks anyway :D
go ahead and open an issue for it if there isn't one already
because like
that should probably be fixed?
Archomeda
@Archomeda
Mar 06 2017 19:30
suppose this is more a game engine issue than an api issue
Archomeda
@Archomeda
Mar 06 2017 20:39
@lye i made #459 for it, for whenever someone gets around it fixing the events :P
I'll see if I can find the time to fix that
should be a really straightforward change
Darqam
@Darqam
Mar 06 2017 21:04
queue 10 hours of work
Gruntzy
@gruntzy
Mar 06 2017 21:06

Hey, https://api.guildwars2.com/v2/account/raids still outputs me the boss I've killed last week.

@gruntzy uhh, hmm. The progress counters only update when you're logged in, and there's two 5-minute caches between the map instance server altering your account data and it showing up on the API. If that doesn't explain the discrepancy, I can dig around some more.

@lye This is effectively fine after logging in and waiting a few minutes ! :p My mistake, I made some wrong assumptions and posted a bit quickly :/

no worries, it's good that you posted about it
glad it wasn't something crazy; I'll go ahead and close out the issue
Added #460 as a note for fixing it in the future
because honestly it's annoying that you can't tell your current account state without logging in; it's just a bit of legwork to work around on my side
windwarrior
@windwarrior
Mar 06 2017 21:27
/gg
lol wrong focus
tried to gg ingame
Archomeda
@Archomeda
Mar 06 2017 21:30
hahaha
windwarrior
@windwarrior
Mar 06 2017 21:37
w4b4 being stupid