Difference between revisions of "Talk:WebAPI/Feedback"
(→Improperly formed JSON float_values for decal attributes?: new section) |
(→Improperly formed JSON float_values for decal attributes?) |
||
Line 37: | Line 37: | ||
[[User:VMDX|VMDX]] 18:42, 8 November 2011 (PST) | [[User:VMDX|VMDX]] 18:42, 8 November 2011 (PST) | ||
+ | |||
+ | : Unfortunately something like this has happened in the past with float values (Valve seems to be pretty allergic to these for some reason). The big issue here is that isn't valid JSON and so will be spit out by all but the most lenient parsers. So in order to do anything with it you'll need to search the string in an ad-hoc manner and replace every occurrence of the invalid syntax or remove float_value lines entirely, the former is probably fairly easy to do with a regexp replace and also how I'll work around it myself. Problem is that backpacks tend | ||
+ | to be pretty large and so you're going to be eating up precious cycles trying to search for it. I'll pass this along to someone at Valve. It's time to do a mass mail I think. -- [[User:Lagg|Lagg]] [[File:Backpack_Stickybomb_Launcher.png|24px|link=User_talk:Lagg]] 04:47, 9 November 2011 (PST) |
Revision as of 12:47, 9 November 2011
Contents
Sample / test profile
It would be nice to have a dummy profile that we can use to test against. The profile would hopefully include items of all quality types, positions, placed and unplaced items, etc. Jasonla 15:21, 2 July 2011 (PDT)
- as well as description/name tags, all possible attributes, kill-kounter ranks, paint colours, etc. I like the idea! Cerbrus 23:32, 2 November 2011 (PDT)
- I wouldn't count on this happening anytime soon. You're better off testing against Robin Walker's profiles and a couple of high-level traders. ~ Ath (talk) 09:49, 3 November 2011 (PDT)
- Yeah, I figured it wouldn't happen. But that's my feedback, and I thought, "Why not throw it out there and hope something comes of it." jasonla 10:53, 3 November 2011 (PDT)
- Robin's my prime test subject, right now... I'm just kinda confused where I should find custom descriptions / item names (name/description tagged items)! In the attributes, what defindex should I be looking for? Cerbrus 12:48, 3 November 2011 (PDT)
- Yeah, I figured it wouldn't happen. But that's my feedback, and I thought, "Why not throw it out there and hope something comes of it." jasonla 10:53, 3 November 2011 (PDT)
- I wouldn't count on this happening anytime soon. You're better off testing against Robin Walker's profiles and a couple of high-level traders. ~ Ath (talk) 09:49, 3 November 2011 (PDT)
Hidden attributes
Why is it that the "makers mark id" (defindex 228) is a hidden attribute? It is being showed inside the game so I don't understand why it's not the same here. Durza007 09:43, 29 July 2011 (PDT)
Paint(ed) item images.
Would it be possible to have the api return image url's for painted items, and correctly coloured images for paintcans? Or maybe, since the colour addition happens in-game with some kind of overlay, last I read, would it be posible to get a url to that overlay, per item?
I'm currently getting my paintbucket images from this wiki, but they'll have to be added into my code, manually, because of the seemingly random part of the url ( /6/69/ <-- those numbers) Cerbrus 23:30, 2 November 2011 (PDT)
- Regarding the seemingly random part of the images, those are the first and first/second characters of an MD5 hash of the image name. So, if the hash for an image was
01e071d9f50663dc2fb391a0a43babf3
, then the 'random' part of the url would be/0/01
. i-ghost 11:25, 3 November 2011 (PDT)- Right, meaning that there's no consistent short way to go from a known item to its corresponding image. Some information unfortunately needs to be mapped by you (like you have done) and could be subject to change. — The preceding unsigned comment was added by Fashnek (talk) • (contribs)
- The hash shouldn't really change, after the file's submitted, but without the image's url, there's no way to get it's hash, right? So one depends on the other, and vice versa, eventually relying on you, addin either the images to your project, or some sort of table containing parts of the url's... Hence my request for painted image urls / paint template overlays (+instructions on what blend modes to use, etc?) Cerbrus 12:40, 3 November 2011 (PDT)
- This topic was already brought up once in the archives, and a Valve employee commented on the matter. Use the Wiki's images until such time as the feature can be implemented. Additionally, the hashes are a result of the automated icon-upload script that's used; you can safely disregard the hashes and just use image_inventory + an extension if you're storing files locally. ~ Ath (talk) 12:50, 3 November 2011 (PDT)
- The hash shouldn't really change, after the file's submitted, but without the image's url, there's no way to get it's hash, right? So one depends on the other, and vice versa, eventually relying on you, addin either the images to your project, or some sort of table containing parts of the url's... Hence my request for painted image urls / paint template overlays (+instructions on what blend modes to use, etc?) Cerbrus 12:40, 3 November 2011 (PDT)
- Right, meaning that there's no consistent short way to go from a known item to its corresponding image. Some information unfortunately needs to be mapped by you (like you have done) and could be subject to change. — The preceding unsigned comment was added by Fashnek (talk) • (contribs)
Improperly formed JSON float_values for decal attributes?
I've been receiving improperly formed JSON where float_values are missing digits after the decimal point (i.e. "float_value": -1752173725722172700000000000.). They seem to be happening on the "custom_texture_lo" attribute (defindex 152).
Example backpack IDs are 76561197996909228 and 76561198018924290 as of now.
How are others dealing with this problem?
VMDX 18:42, 8 November 2011 (PST)
- Unfortunately something like this has happened in the past with float values (Valve seems to be pretty allergic to these for some reason). The big issue here is that isn't valid JSON and so will be spit out by all but the most lenient parsers. So in order to do anything with it you'll need to search the string in an ad-hoc manner and replace every occurrence of the invalid syntax or remove float_value lines entirely, the former is probably fairly easy to do with a regexp replace and also how I'll work around it myself. Problem is that backpacks tend
to be pretty large and so you're going to be eating up precious cycles trying to search for it. I'll pass this along to someone at Valve. It's time to do a mass mail I think. -- Lagg 04:47, 9 November 2011 (PST)