Jump to content
McKay Development

Dr. McKay

Administrator
  • Posts

    3392
  • Joined

  • Last visited

Everything posted by Dr. McKay

  1. No, images for two items with identical classid/instanceid pairs (which is not uncommon) will be identical. Plus I believe it can change from time to time unpredictably.
  2. Unfortunately there isn't. You'll need to just avoid moving two items which might get mixed up inside of one trade.
  3. You're trying to invite people to TeamSpeak through Steam?
  4. The problem with this is that I'm about 99% sure that you need to actually be "in" a server in order to invite someone to a game, unless it's a Steam lobby. And "joining" a server is a non-trivial task.
  5. Don't worry about poll failures unless you aren't getting any successful polls at all. Failures will happen.
  6. I'm not very familiar with Dota, but as far as I know TF2 and possibly Dota are the only Valve games where IEconService gives enough useful information to build an item's display information. For everything else, you need to use inventory JSON. Attributes are only a concept in Valve-land; the Steam econ server has no concept of "attributes". Consequently, attribute data doesn't translate to the inventory JSON. Attributes are just that: attributes attached to an item. For example in TF2 an attribute might change how much damage the weapon does. In CS:GO, wear is an attribute. IEconService has no classids because again, it has no concept of classids. They're entirely assigned by and used by the Steam econ server, and consequently they're only available in the econ endpoints (like inventory JSON and GetAssetClassInfo).
  7. I purposefully didn't mention the WebAPIs because they aren't really "Steam items". They're "Valve items", and third-party games don't need to follow any of the same standards. However, for Valve games, the "id" in the WebAPI is the item's asset ID, and "original_id" is the item's asset ID when it was originally created. If it's identical to the item's "id", that means that the item was never traded or modified. Quality (generally) determines the color of the item's name, and (sometimes) a prefix to the item's name (for example, StatTrak, ★, etc). Quality has nothing to do with wear. For CS:GO, you can't really get much useful information out of the WebAPI except an item's raw wear value (frequently, incorrectly, and ignorantly referred to as its "float value") and perhaps original ID.
  8. I can't help in any way with C#.
  9. The trade receipt page contains the new item data. If you're using node-steam-tradeoffer-manager, you only need to use offer.getReceivedItems.
  10. Use offer.getReceivedItems, which will contain the new asset IDs of those items.
  11. Check if itemsToGive.length is 0, and itemsToReceive.length is greater than 0. If both tests pass, then accept the offer. Make sure you check both, as both itemsToGive and itemsToReceive could be empty when the Steam econ server is acting up, even though you might be giving items in that offer.
  12. That error means that either your secret is wrong or your clock is wrong. If you're using the same code and the same secret on both machines, then the time must be wrong on the VPS.
  13. If you're being redirected to login, then you pretty clearly aren't logged in.
  14. Make sure your "output log" is capturing stdout.
  15. Is this module the entry point for your application? What output are you getting?
  16. Well, you wrapped everything in a "login" function. Call that.
  17. You have to actually call logOn to connect to Steam and log on.
  18. If you're using node-steam-user, you can do this pretty easily.
  19. Sometimes (I've only seen it happen to CS:GO), Steam will "lose" an inventory like you describe. I suspect there's some error when the econ server requests it from the GC, so it defaults to "empty, can't trade", then that gets cached. There are three (public) ways to break an inventory cache. 1. Launch/close that game (of course, you need to own it first) 2. Complete a trade containing items from that game (obviously this doesn't work if Steam won't let you trade items for that game) 3. Accept a real-time trade request. Obviously, only #3 is an option here. You don't need to actually complete the trade (or even begin the session). All you need to do is send and accept a real-time trade request. This will flush all inventory caches for both parties. If you're using a bot, you can send and accept trade requests programmatically. Don't worry about actually handling the trade session, as it will expire on its own.
  20. You can use getPersonas to get persona data. Off the top of my head (this might not work), getting an avatar URL would go something like this: user.getPersonas(["76561198006409530"], (personas) => { var hash = personas["76561198006409530"].avatar_hash.toString('hex'); var url = "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/" + hash.substring(0, 2) + "/" + hash + "_full.jpg"; });
  21. Sometimes it can be a little confusing to identify a specific item in the Steam economy. There are several different types of IDs present in one particular item, and a lot of vague terminology. This guide aims to clear all that up for you. For starters, the "official" term for a Steam item is an asset. When I say a "Steam item", I mean a particular copy of an item. I'm not referring to the item's definition, name, image, or anything. I'm referring to a specific, unique copy of the item. In a general sense, every item on Steam must be owned by an app. An "app" is a game, software, or whatever on Steam. Every app has its own unique AppID. You can find a particular game's AppID by going to its store page or community hub and looking at the URL. For example, TF2's AppID is 440 so TF2's store page can be found at http://store.steampowered.com/app/440. CS:GO's is 730, Dota 2's is 570, and so on. Note that Steam Community items, Steam gifts, and other "Steam" items are owned by the "Steam" app, which has AppID 753. To identify an item, you'll need the AppID of the game which owns it. Of course, the AppID alone isn't enough. You also need two other IDs. Have you ever noticed how some games have multiple inventories, which appear in a drop-down list? An example is the Steam inventory, which has sub-inventories for "Community", "Gifts", "Coupons", etc. These "sub-inventories" are called contexts, and each context has its own context ID. If a game doesn't have a drop-down menu to select a context, that doesn't mean that it's without contexts. That only means that it has one single visible context. That single context still has an ID. For all current Valve games, the context ID for the publicly-visible context is 2. Context IDs can be a bit tricky. It's entirely up to the game's developer to determine how they work. For example, Valve games take the "single shared inventory" model in which there's one context ID which is shared by everyone. Under this model, an item belongs to one particular context and never leaves that context. Consequently, the item's context ID never changes. It is, however, possible for game developers to create contexts in any way they choose. For example, Spiral Knights uses the "per-character inventory" model in which everyone who plays the game has their own context IDs for their characters. Creating a new character creates a new context ID. This means that when an item is traded between users, its context ID will change as it moved out of a particular character's inventory. Those are the two different types of "containers" in the Steam economy. Apps own contexts, and contexts own assets. Every asset on Steam has, in addition to its AppID and context ID, an asset ID which is guaranteed to be unique inside of a given AppID+ContextID combination. Notice that this means that asset IDs are not unique across all of Steam. They aren't even unique across a particular app. They are only unique inside of a given context. For example, there could be two items with asset ID 1 in the same game, as long as they have different context IDs. An item's asset ID may be referred to as "assetid" or just plain "id". Context IDs and asset IDs are assigned by the game developer and can follow any pattern. They can change when traded or not. They may both be up to 64 bits in size. Consequently, Steam returns them (like all other 64-bit values) in JSON as strings. Still following? All of what we've learned so far leads us to this conclusion: in order to uniquely identify an item, you need its AppID, its context ID, and its asset ID. Once you have these three things, only then can you uniquely identify it. In fact, this is how you link to a particular item in a user's inventory: steamcommunity.com/profiles/steamid/inventory#appid_contextid_assetid. Here's an example: https://steamcommunity.com/id/DoctorMcKay/inventory#440_2_134161610 What are these "classid" and "instanceid" values though? The observant reader may have noticed that there are two more IDs attached to a particular item which I haven't mentioned. These are the "classid" and "instanceid". These IDs are used to map an asset to its description. What's a description? A description is what you need in order to actually display an item. An item's description contains its name, image, color, market_name, whether it's tradable or not, whether it's marketable or not, and more. There are many endpoints on Steam which return JSON objects representing assets that only contain the asset's AppID, context ID, asset ID, classid, instanceid, and amount. An item's amount is how big of a stack it is. Unstackable items always have an amount of 1. Stackable items (such as Steam gems) may have a larger amount. Stacked items always have the same asset ID. What's the difference between a classid and an instanceid? In a nutshell, a classid "owns" an instanceid. The classid is all you need to get a general overview of an item. For example, items with the same classid will pretty much always have the same name and image. The instanceid allows you to get finer details such as how many kills are on a strange/StatTrak weapon, or custom names/descriptions. You can turn a classid/instanceid pair into a description using the GetAssetClassInfo WebAPI method. Notice that the instanceid is actually optional: if you only have a classid that's fine, you just won't get finer details for the item. Name? Market Name? Market Hash Name? Every asset on Steam has a name. Without a name, there's nothing to show in your inventory. The item's name is the name property of its description. The item's name may be localized if the game's developer has set it up to be. Every marketable item also has a "market name". This name may be the same as—or different from—the item's regular name. The item's market name is the market_name property of its description. This is the name that's displayed in the Steam Community Market when the item is up for sale. Why the distinction? There are some items which have value-affecting data that isn't in their name; for example, CS:GO skins have 5 different tiers of "wear", which isn't in their names. The wear tier is appended to each skin's market name however, so that the different tiers of wear are separated in the market. The market name may be localized or not, and may not exist at all if the item isn't marketable. It's up to the game's developer. Finally, every marketable item also has a "market hash name", available under the market_hash_name property. This name is supposed to be the English version of the item's market name, but in practice it may vary. For example, Steam Community items prepend the AppID of the originating app to each item's market hash name, but not to the market name. The market hash name is never localized, and may not exist if the item isn't marketable. Again, it's up to the game's developer. You can view the Community Market listings for any marketable item using this URL formula: steamcommunity.com/market/listings/appid/market_hash_name. Here's an example: https://steamcommunity.com/market/listings/440/Mann%20Co.%20Supply%20Crate%20Key Note that the Community Market has no concept of contexts. Consequently, market [hash] names are unique for a particular "class" of items per-app (and by extension per-context). This means that for marketable items, two items with identical market hash names will be worth roughly the same (with some exceptions, like unusual TF2 items). Questions? Ask below. I'm happy to help!
  22. Lower your poll interval if it takes too long. Please understand that this is Steam. Slow responses will happen from time to time.
×
×
  • Create New...