API: how to find the remaining "charges" of gathering tools? — Guild Wars 2 Forums
Home API Development

API: how to find the remaining "charges" of gathering tools?

Hello all,

I am experimenting a bit with the API. I am a player with many characters and i always forget where i have put certain items, so i am trying to build a tool that helps me find such items (from bank, material storage, shared inventory, player bags and equipement).

Now there are items which have limited uses, like normal salvage kits and gathering tools (not the unlimited ones). I am trying to show the number os remaining uses as well, but thing go not well for gathering tools :angry:

I tried to search for an answer in these forums, but i did not find anything. Hopefully someone here knows how to solve this.

I have an example with a characters who has a few "Frostbitten Orichalcum Mining Picks" equiped/in his bags (item id = 68376).
He also has a "Black Lion Salvage Kit" in his bags (item is = 19986).

When i do an api request via characters?ids=charname then i get info about that character, including his inventory (bags) and equiped items (armor, weapons, gathering tools, etc).

When it comes to the mentioned items i find info like this:

    "equipment": [
            "id": 68376,
            "slot": "Pick",
            "binding": "Account"

      "inventory": [
             "id": 68376,
              "count": 1,
               "binding": "Account"

       "inventory": [
              "id": 19986,
               "count": 1,
               "charges": 25,
                "binding": "Account"

The first 2 items are the mining picks (first one is equiped, the 2nd one is in one of the bags)
The last item is the salvage kit. It has an extra line with "charges". This reflects the remaining number of uses left.

But the mining picks dont come with this "charges" line :anguished:

Does anyone know how to obtain this info? Thanks in advance :+1:


  • GODh.3892GODh.3892 Member ✭✭
    edited September 16, 2020

    One extra thing... unbreakable salvagekits like "Copper-Fed Salvage-o-Matic" have always a "charges" of 1.

    How can i tell that its a unbreakable salvagekit and not a normal (breakable) salvagekit with just 1 use left? :anguished:

  • andrewfam.5980andrewfam.5980 Member
    edited September 18, 2020

    I'm trying to do the same thing. Unfortunately, that's all we got. Either the devs didn't see that's important or they might overlook it. About the unlimited salvage kit and the normal one, I guess you have to use their names to make a distinction.

  • @andrewfam.5980 said:
    I guess you have to use their names to make a distinction.

    That's a bit tricky as each item have multiple names (one for each supported language, like english, french, chinese, etc) and its always possible that Anet starts changing a name for whatever reason (i hope not ofc) :'(

    I was hoping for a nicer solution like a flag or something :3

  • Leo.3428Leo.3428 Member ✭✭✭

    Use the ID, not the name - but of course you need to first make your system know what ID is what.

  • Using the ID instead of the name is better, but only works for the unbreakable tools (both salvage and gathering). Downside is that it would not be good for the application if Anet keeps adding new unbreakable tools (new effects, etc).

    And it does not solve the issue with not receiving the remaining charges of breakable gathering tools :'(

  • Leo.3428Leo.3428 Member ✭✭✭

    I hadn't realized you want your app to be future-proof; I agree there is not enough information in the API - gathering tool age included.
    Let's hope ANet sees your request.

  • I think i have solved the problem with the unbreakable salvagekits. They all seem to be level 0, details.type is "salvage" and details.charges is 1.. All other kits have differences here. Tested it on 239 salvage kits (over 4 accounts) and i got a 100% correct result (even a normal kit with 1 charge left).

    But gathering tools is still a different story :/

    And yes, the API is far from complete. I have some items in bags or even equiped which are not in the API. I am able to locate these items (like bagname + slot) and noticed that these items are not on wiki either. So far i could see that these items were all armor which i bought from a karma or wvw merchant. One item i got from doing guild mission (an item that spawns crafting stations). So, these items still exist, but there is no info availabe via the API or even wiki, other than tracking down the items in you bags and staring at them :#

  • Knowing how i "fixed" the problem with the unbreakable salvagekits, i did the same thing with unbreakable gathering tools. I had to add a check on rarity as an item like "copper mining tool" is level 0 too. But for now it seems to work 100% (without the need of using names or id's) B)

    So 1 problem left: breakable gathering tools... but i dont think there is a fix for that (due lack of info), unless Anet decides to give their API a bit more love