Jump to content


Photo
* * * * * 1 votes

Identifying Steam Items


  • Please log in to reply
39 replies to this topic

#21 yellowish

yellowish

    Newbie

  • Member
  • Pip
  • 4 posts

Posted 10 August 2016 - 11:20 PM

Dear Dr. McKay,

 

as this is my first post in here, I'd like to thank you for your work. It saves us all a lot of time.  :ph34r:

 

However Im consused on checkin the stickers wear's value. Stickers on a weapon. How do I know which defindex is which?  



#22 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,652 posts

Posted 11 August 2016 - 12:54 AM

You have to check the item schema for that.



#23 yellowish

yellowish

    Newbie

  • Member
  • Pip
  • 4 posts

Posted 11 August 2016 - 10:54 AM

Yes, I'm on that part. But what's the proper way to identify that exact sticker on GetSchema API? Names definitely aren't exact, it seems like nothing matches together

 

#edit:

forgive me my ignorance. I just released the structure is completely different to what I thought it is. 


Edited by yellowish, 11 August 2016 - 02:25 PM.


#24 yellowish

yellowish

    Newbie

  • Member
  • Pip
  • 4 posts

Posted 12 August 2016 - 11:19 AM

Excuse me please, for posting post under another, but I'd like thread to be bumped.

 

What does it mean when sticker is not listed on any of the sticker slots on IEconItems, but is placed as HTML tag in item's descriptions on user's inventory? Like here:

"367883549_480087296":{  
   "appid":"730",
   "classid":"367883549",
   "instanceid":"480087296",
   "icon_url":"-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpopbmkOVUw7PvRTipH7s-JkIGZnPLmDLfYkWNFpp102r_ErdutiwbmqUtuMG-hdoeVdgNoY16F-wPsku_mh5Dq7cian3B9-n51JZMMtxo",
   "icon_url_large":"-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpopbmkOVUw7PvRTipH7s-JkIGZnPLmDLfYkWNF18lwmO7Eu9Tw2AKx80RkMGvxdo6XIQBsM1nQ_lTow-i6hMTu75zAy3Q163Vxs33D30vgugbUquA",
   "icon_drag_url":"",
   "name":"StatTrakâ„¢ SCAR-20 | Crimson Web",
   "market_hash_name":"StatTrakâ„¢ SCAR-20 | Crimson Web (Minimal Wear)",
   "market_name":"StatTrakâ„¢ SCAR-20 | Crimson Web (Minimal Wear)",
   "name_color":"CF6A32",
   "background_color":"",
   "type":"StatTrakâ„¢ Mil-Spec Grade Sniper Rifle",
   "tradable":1,
   "marketable":1,
   "commodity":0,
   "market_tradable_restriction":"7",
   "descriptions":[  
      {  
         "type":"html",
         "value":"Exterior: Minimal Wear"
      },
      {  
         "type":"html",
         "value":" "
      },
      {  
         "type":"html",
         "value":"This item features StatTrakâ„¢ technology, which tracks certain statistics when equipped by its owner.",
         "color":"99ccff"
      },
      {  
         "type":"html",
         "value":" "
      },
      {  
         "type":"html",
         "value":"StatTrakâ„¢ Confirmed Kills: 715",
         "color":"CF6A32"
      },
      {  
         "type":"html",
         "value":"*Stats for this item will reset when used in Steam Trading or Community Market",
         "color":"ff4040"
      },
      {  
         "type":"html",
         "value":" "
      },
      {  
         "type":"html",
         "value":"The SCAR-20 is a semi-automatic sniper rifle that trades a high rate of fire and powerful long-distance damage for sluggish movement speed and big price tag. It has been painted using a spider web-patterned hydrographic over a red base coat and finished with a semi-gloss topcoat.\n\n<i>Be careful where you walk, you never know where the web is spread</i>"
      },
      {  
         "type":"html",
         "value":" "
      },
      {  
         "type":"html",
         "value":"The Arms Deal 2 Collection",
         "color":"9da1a9",
         "app_data":{  
            "def_index":"65535",
            "is_itemset_name":1
         }
      },
      {  
         "type":"html",
         "value":" "
      },
      {  
         "type":"html",
         "value":"<br><div id=\"sticker_info\" name=\"sticker_info\" title=\"Sticker Details\" style=\"border: 2px solid rgb(102, 102, 102); border-radius: 6px; width=100; margin:4px; padding:8px;\"><center><img width=64 height=48 src=\"https://steamcdn-a.akamaihd.net/apps/730/icons/econ/stickers/standard/thirteen.bcec4689b3d28dd0c9fd5d3f119842639d286dc5.png\"><br>Sticker: Lucky 13</center></div>",
         "app_data":{  
            "def_index":"65535"
         }
      }
   ],
{  
   "id":561293657,
   "original_id":265616091,
   "defindex":38,
   "level":1,
   "quality":9,
   "inventory":23,
   "quantity":1,
   "rarity":3,
   "attributes":[  
      {  
         "defindex":6,
         "value":1130889216,
         "float_value":232
      },
      {  
         "defindex":7,
         "value":1144062999,
         "float_value":708.0639038085938
      },
      {  
         "defindex":8,
         "value":1040999533,
         "float_value":0.13710184395313263
      },
      {  
         "defindex":80,
         "value":715,
         "float_value":1.0019284019922442e-42
      },
      {  
         "defindex":81,
         "value":0,
         "float_value":0
      },
      {  
         "defindex":113,
         "value":13,
         "float_value":1.8216880036222622e-44
      },
      {  
         "defindex":228,
         "value":4294967295,
         "float_value":-1
      },
      {  
         "defindex":229,
         "value":4294967295,
         "float_value":-1
      },
      {  
         "defindex":147,
         "value":"models/weapons/stattrack.mdl"
      },
      {  
         "defindex":230,
         "value":2,
         "float_value":2.802596928649634e-45
      },
      {  
         "defindex":231,
         "value":5,
         "float_value":7.006492321624085e-45
      },
      {  
         "defindex":39,
         "value":0,
         "float_value":0.38999998569488525
      },
      {  
         "defindex":40,
         "value":0,
         "float_value":0.5
      },
      {  
         "defindex":145,
         "value":"models/weapons/w_snip_scar20_mag.mdl"
      },
      {  
         "defindex":199,
         "value":90,
         "float_value":1.2611686178923354e-43
      }
   ]
},

I, personally can think of one reason why it might be showing like that, but that's jus suspicion; the sticker might be completely scratched. But does it make any sense?


Edited by yellowish, 12 August 2016 - 12:14 PM.


#25 tchosniper

tchosniper

    Member

  • Member
  • PipPip
  • 11 posts

Posted 06 December 2016 - 01:35 PM

So can I use offer.addMyItem({"appid": 730, "contextid": 2, "classid": "xxxx"}); or offer.addMyItem({"appid": 730, "contextid": 2, "instanceid": "xxxx"}); or I need use only with assetid?



#26 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,652 posts

Posted 06 December 2016 - 04:56 PM

You must use assetid. You can't use classid or instanceid when sending a trade offer.



#27 tchosniper

tchosniper

    Member

  • Member
  • PipPip
  • 11 posts

Posted 07 December 2016 - 10:50 AM

Okay thanks, and can I ask you why currencies[i] say undefined?



#28 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,652 posts

Posted 07 December 2016 - 02:00 PM

"Currencies" are a weird thing that I don't think anyone except Spiral Knights uses.



#29 Selectah

Selectah

    Newbie

  • Member
  • Pip
  • 1 posts

Posted 09 March 2017 - 03:16 PM

So there isn't any easy way to link an item the bot received to the original owner?

 

In my project we may need to give items back to the user. If the items can change their names and their 5 IDs after a trade or something, we'll have to figure out a guaranteed way to make sure that we will always know who were the owners of the items, and this sounds too much difficult...

 

Can anyone here help me with this?

 

 

The trade receipt page contains the new item data. If you're using node-steam-tradeoffer-manager, you only need to use offer.getReceivedItems.

 

 

Hello, i have the same question.

 

The use case is:

 

1. Webuser set prices for items and requests API to deposit them;

 

i.assetid          i.market_name  i.classid       i.instanceid

9400869287   Falchion Case   991959905  0

9400869231   Falchion Case   991959905  0

9400869172   Falchion Case   991959905  0

9400869102   Falchion Case   991959905  0

 

2. API saves items and sends trade offer beetween webuser and trade bot;

3. Trade bot accepts the offer;

4. At this point i have to set correct prices for received items, but i can't match saved and received items because they are totally identical except the assetid property.

 

i.assetid          i.market_name   i.classid        i.instanceid

9401413793   Falchion Case    991959905   0

9401413749   Falchion Case    991959905   0

9401413842   Falchion Case    991959905   0

9401413881   Falchion Case    991959905   0

 

Please let me know If you are have any approaches to solve this.

 

Thank you.


Edited by Selectah, 10 March 2017 - 05:27 PM.


#30 Markcreator

Markcreator

    Newbie

  • Member
  • Pip
  • 2 posts

Posted 09 August 2017 - 11:50 AM

Thank you for this helpful thread.

I do have a question though; you mentioned that an asset id will be unique in an app in a specific context, but will (new) asset id's caused by new or traded items -always- be different from any asset id that has ever existed within the app and context, regardless of which user's inventory it's in? This worries me because I'm not sure whether I should account for duplicate asset id's over time or across different inventories when old asset id's might get reused, or will that never happen and will they always be unique no matter how many transactions happen within the app across the whole of Steam?

 

Thank you in advance.



#31 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,652 posts

Posted 09 August 2017 - 02:47 PM

There is no guarantee that if an assetid changes, it won't change to an assetid that has been previously assigned to an item. They are only guaranteed unique at one point in time. That said, for Valve games, when an assetid changes it will only increase and will never be an ID previously assigned.


  • Markcreator likes this

#32 Markcreator

Markcreator

    Newbie

  • Member
  • Pip
  • 2 posts

Posted 09 August 2017 - 03:00 PM

So, just to be sure, Steam only guarantees an assetid to be unique at any specific given point in time rather than over the entire existence of the app's global inventory, but the implementation of the system that Valve used for their own games guarantees that assetid's are assigned through incrementing and thus it is reasonable to assume that those specifically will always be unique?



#33 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,652 posts

Posted 09 August 2017 - 03:03 PM

Yep!


  • Markcreator likes this

#34 Redpanda

Redpanda

    Newbie

  • Member
  • Pip
  • 1 posts

Posted 08 October 2017 - 09:23 PM

I need some help, I am trying to find a special knife pattern in CSGO called sapphires, ruby and black pearl. These special patterns are all in the Doppler series but, there is also Phase 1-4  pattern which isn't what I want. Is there a chance I could directly search up the special patterns on the steam market?



#35 Einar_100

Einar_100

    Newbie

  • Member
  • Pip
  • 3 posts

Posted 21 March 2018 - 05:13 AM

Hi, 

First many thanks for the explanation of the different entitities in the Steam Asset API. It was very confusing to me before reading your post. Now, at least, I'm able to ask a question :-). 

 

This one is about the Asset Classes. Do have any thoughts about how an Inventory provider should handle these classes when mapping a number of them to a single description returned in the GetAssetClassInfo response? To me it feels like constructing an apple from a pear. How can one interpret an AssetClass? Is an Asset aggregated by a number of AssetClasses? 

It also seems strange that these classes are cached in Steam. What information is cached then? Only their ids? Because the Steam Asset API don't let Steam know anything about an individual Asset Class information despite the GetAssetClassInfo request (since it only returns the overall Asset information). 

Maybe I completely missunderstood this?!

Best regards, 

Einar



#36 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,652 posts

Posted 21 March 2018 - 12:55 PM

Hi, 

First many thanks for the explanation of the different entitities in the Steam Asset API. It was very confusing to me before reading your post. Now, at least, I'm able to ask a question :-). 

 

This one is about the Asset Classes. Do have any thoughts about how an Inventory provider should handle these classes when mapping a number of them to a single description returned in the GetAssetClassInfo response? To me it feels like constructing an apple from a pear. How can one interpret an AssetClass? Is an Asset aggregated by a number of AssetClasses? 

It also seems strange that these classes are cached in Steam. What information is cached then? Only their ids? Because the Steam Asset API don't let Steam know anything about an individual Asset Class information despite the GetAssetClassInfo request (since it only returns the overall Asset information). 

Maybe I completely missunderstood this?!

Best regards, 

Einar

 

Assuming you're talking about what the Steamworks documentation refers to as an "asset class" and that by "inventory provider" you mean an item server backend, which is kind of outside the scope of this thread but I'll answer anyway.

 

Asset classes basically describe the "nature" of an item, and you define them yourself. For example, in Valve games each item has a definition index (defindex), which is a class. def_index: 1234

But each item can also have special attributes, for example a StatTrak CS:GO item. So you might have stattrak: true

This means that each item/asset has multiple asset classes.

 

You expose a class to Steam for every kind of attribute that changes how the item is rendered, so you end up with basically a list of display-affecting attributes. You could read the above as "this item has def_index 1234 and it is a stattrak item". Then Steam calls GetAssetClassInfo with that listing of classes and expects you to return a proper description, which gets cached indefinitely for that set of classes. So that means that your set of classes for a specific item needs to include all the data necessary to build a comprehensive description.

 

The purpose of asset classes and descriptions is to decouple the display information from the actual asset. For example, every CS:GO Case Key is completely identical so there's no reason to store all the display information with each individual item. So instead the economy server requests the list of classes for the assetid from the item server, which replies with a list of classes that the economy server has already seen. Thus the econ server knows that it's seen this kind of item before and doesn't need to request display information.



#37 Einar_100

Einar_100

    Newbie

  • Member
  • Pip
  • 3 posts

Posted 22 March 2018 - 04:19 AM

Assuming you're talking about what the Steamworks documentation refers to as an "asset class" and that by "inventory provider" you mean an item server backend, which is kind of outside the scope of this thread but I'll answer anyway.

 

Asset classes basically describe the "nature" of an item, and you define them yourself. For example, in Valve games each item has a definition index (defindex), which is a class. def_index: 1234

But each item can also have special attributes, for example a StatTrak CS:GO item. So you might have stattrak: true

This means that each item/asset has multiple asset classes.

 

You expose a class to Steam for every kind of attribute that changes how the item is rendered, so you end up with basically a list of display-affecting attributes. You could read the above as "this item has def_index 1234 and it is a stattrak item". Then Steam calls GetAssetClassInfo with that listing of classes and expects you to return a proper description, which gets cached indefinitely for that set of classes. So that means that your set of classes for a specific item needs to include all the data necessary to build a comprehensive description.

 

The purpose of asset classes and descriptions is to decouple the display information from the actual asset. For example, every CS:GO Case Key is completely identical so there's no reason to store all the display information with each individual item. So instead the economy server requests the list of classes for the assetid from the item server, which replies with a list of classes that the economy server has already seen. Thus the econ server knows that it's seen this kind of item before and doesn't need to request display information.

Thanks for your comprehensive answer and yes your assumptions were right about what i was refering to with Asset Class and Inventory provider.

So an Asset Class represents a specific piece of display information of an Asset and could have been called AssetDisplayParameter instead?
What confuses me most is the "conversion" of the list of classes to an asset description in the GetAssetClassInfo request. Steam can't know wich part in the response to this method belongs to which classes. So I guess Steam caches the complete signature of classes in the GetAssetClassInfo request in order to be able to re-use display information?

 



#38 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,652 posts

Posted 22 March 2018 - 11:44 AM

So an Asset Class represents a specific piece of display information of an Asset and could have been called AssetDisplayParameter instead?

 

I suppose you could say that.

 

What confuses me most is the "conversion" of the list of classes to an asset description in the GetAssetClassInfo request. Steam can't know wich part in the response to this method belongs to which classes. So I guess Steam caches the complete signature of classes in the GetAssetClassInfo request in order to be able to re-use display information?

 

GetAssetClassInfo takes as input a list of classes and responds as output with a single description. That description corresponds to the entire list of input classes. So the response should correspond to all classes. Which means that I think you understand it correctly, Steam does cache the complete signature of classes.


  • Einar_100 likes this

#39 Einar_100

Einar_100

    Newbie

  • Member
  • Pip
  • 3 posts

Posted 23 March 2018 - 03:52 AM

I suppose you could say that.

 

 

GetAssetClassInfo takes as input a list of classes and responds as output with a single description. That description corresponds to the entire list of input classes. So the response should correspond to all classes. Which means that I think you understand it correctly, Steam does cache the complete signature of classes.

So from Steams point of view instead of a list of classes-values it could use some kind of identifier to the description.

Anyway thanks a lot for you took the time to answer me despite it was a bit off-topic. I think I have the picture now :).


Edited by Einar_100, 23 March 2018 - 03:57 AM.


#40 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,652 posts

Posted 23 March 2018 - 11:23 AM

Yeah, class-values are a complete black box to Steam.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users