Search for new games to share.
Syntax for writing comments.
Frequently asked questions.
Community rules and guidelines.
If you want another option, ESGST has nearly the same functionality and is much better supported (and has a plethora of other features baked in as well).
I was looking to give away some games to my whitelist and, to make it as worthwhile a giveaway as I could, I wanted to see how many people already had the game. If everyone on my list had it, it wouldn't be worth giving. Likewise if only 10 out of the list really wanted it (wishlisted), that's still not doing the greatest service to those on my list. There was no way I was going to manually look up every user to find out if the GA was going to be worth it.
I looked to see if there were any scripts out there to do this for me, but alas, there were none, so I set out to fix that. A few days into the process, someone else on the forums asked for the same thing. Well, that kicked me into higher gear to make something useful for anybody else who wanted this functionality, and at this point, I think it's ready to show. It may not be 100% yet, but good enough probably for most.
As the script has gotten use, there have been a few different additional suggestions for improvement and I've been trying to add them all in. I will continue to add features based on your feedback!
The script will scan through your whitelist or a group for an appID (only one game at a time, and no subs at this point), and report a count of how many in that list have it or want it, and what the ratio to the overall list size is. It will work from any active page of your WL or group page on SteamGifts, or from the Steam store for that particular app.
It will also work with m0l0's Whitelist Wishlist and Tools with no (obvious) conflicts, though your header may get a little crowded if you use both.
The script uses the Steam API key (you can get yours here). From the Steam site, you can enter any value you like into the domain field (even invalid domain names), so long as nobody has already used it. Once done, you'll receive your API key. Plug this value into the appropriate field on the script's form and the rest should work without needing to re-enter it in the future. If there are errors, the script may prompt you to enter the API key again. If you've lost it, the API key should still be accessible to you via the link above.
You can get to the script HERE, and it should auto-update when I post changes, based on your userscript tool's update scheme.
I have only personally tested on Chrome with Tampermonkey, but should also work with anything else.
If you use the script under other configurations, please let me know (whether there are issues or not!) so I can make a note of it. Also, if you find any bug, problems, or miscellaneous weirdness, please report them on the GitHub issue log.
If you have any other comments, suggestions, or other feedback, please share! I want to make this as useful and user-friendly as possible for all of you.
I need to give a shout out to a few users in particular here:
Thanks also to everyone else who has offered suggestions for improving and whatever other feedback you have provided! I'm am slowly but surely adding in what I can and I appreciate the support from the community. <3
Comment has been collapsed.
Will you find this script useful?
Interesting idea. You should mention though, that you placed that button on https://www.steamgifts.com/account/manage/whitelist. I expected it on https://www.steamgifts.com/giveaways/new. ;)
Could you implement that functionality directly in the Steam store? You could directly fetch the appID from the open site and the benefits for the users should be obvious too.
Not a bad idea at all! I can certainly include it in both, too. Thanks for the thought!
Linking from the Steam store now works as of 0.05. I'll post changes to the main thread here in a moment. Thanks again for the suggestion!
Thank you for making something out of my suggestion!
Some games Such as Death Road to Canada, show up as "null". But otherwise works well!
Hm. I'm not sure what the deal is here. It worked for me (252610), with only one user owning. Perhaps nobody on your list has it, therefore, it's bugging out?
That is a possibility. I'll try to find another game no one owns to test it out.
Ah, I think that is it. I've never heard of that game, and you're the only one on my WL that has it. I removed you, and it came up null as well. I'll take a look at that for the next update.
Edit: I added you back to the list. ;)
It's new-ish. Glad its not too major of a bug!
Added to the SG Add-Ons Registry, keep up the good work ^^
Work well here i use it With Opera and violentmonkey.
Thank you for your usefull script Gaffi !
i'll see one possible improvment
When i do a Blue heart GA i'd like to send some kind of "personal" invitation. Now, quite sure you see where it leads (◕‿-)✌
It would be amazing if there is a possibility to display the name of WL's members which owned the game.
Thanks for the feedback! As far as who has what, an earlier version (pre-release) painted a flag next to the user's name showing whether they owned it or not. This was only on one page at a time, however. I'll see if I can add to the output a report of the users who don't have the game yet.
It doesn't work for me. When I insert the app ID it doesn't show me anything. If you can post an image of how it should appears will be great
Sure, I'll add some screenshots. In the meantime, what app are you trying to check?
the witcher 3, 292030
Hm. That works fine for me. Let me ask a few more questions:
Thanks, and I hope I can help get this working for you.
Hm. I bet that has something to do with having only one page of users. I'll check that out. Thanks!
I think I actually got it down to some network/slowness I let mine sit for a few minutes and it actually came up, but it took way too long. I'm not sure if that's my problem or not, but I've added a progress meter (on the button) so you should be able to see if it is actively moving or not. This doesn't actually fix anything; it just lets you know what's going on. To that end, I also added some extra verbosity to the console, which may help in identifying the root problem.
took me 20 minutes to realize what "domain name" required -.-
Not bad, but without actual caching this concept is very slow and ineffective. You absolutely must keep wishlist of given user in a short-lived local cache, probably 24 hours would do (that's what I have in ArchiBoT). In addition to that it would make sense to also cache your wishlist to avoid cluttering SG servers. With those two enhancements, you can easily check multiple appIDs while only initial request will take time, everything else will be pulled from cache, and refresh if needed.
If you need some examples, check out my 2hu userscript (code, features won't work for you). I cache my API responses in short-lived cache for 15 minutes. This way my 2hu group members can easily view giveaway values without asking my API for data on each page being refreshed, otherwise it'd be killing my server. And I'm doing that for response as fast as this - caching wishlists is a must.
Sorry, I don't mean to sound dense, but how is caching wishlist data going to help that much? If caching full user inventories, like SG does, might make some sense and I will certainly look into that for my code, but I'm failing to see why you point to wishlists explicitly?
As always I was already going too far and I thought I suggested that already ;_;. In addition to showing how many users miss given game you could also implement indicator how many users wishlisted given title. And in this case you should cache games as well as wishlists. Pretty much what ArchiBoT is doing, just for your WL and not given group.
:D Alright. Thank makes me feel better.
I had considered adding in wishlist checking, and I do think it would be useful to tie together for this purpose, but there are already some scripts out there to to that, so I didn't jump on it. Since I've made (I think, anyway) good progress on my own piece for now, I may just put wishlist checking on my to-do list.
Thanks for the feedback!
Hi there, Archi! Thanks for the feedback, but I'm having some difficulty implementing a caching solution.
Right now, I'm stringifying JSON data to write to storage, but there is a relatively large amount of data to be stored (storing whole libraries/collections for ~100 users). I'm taking the raw Steam API data and compiling it together, and I imagine I could write my own JSON from scratch, keeping only the most basic, relevant bits (rather than extra things like play time), but I'm not sure if that will be enough to reduce below that maximum. Is there some other way to do or optimize this? Is there something else you would recommend?
I'm running this only on the user's machine; I do not have a hosted resource (like your justarchi.net) to store another DB or anything like that.
Thanks for your help.
I don't know what limit is, but appIDs are stored as 32-bit unsigned integers (even lower if you apply actual steam masks and XOR, but hell please don't do that for your own sake).
5200000 characters were stored successfully, but 5300000 weren't.
5200000 characters were stored successfully, but 5300000 weren't.
Assuming appIDs are 6-characters (mostly), that gives you ability to store approx. 866.6 thousands of games, so over 8k per user if you have ~100. That should be enough. Actual limit will be a bit lower due to json structure, but you can do smart tricks such as storing json in base64 or any other format that takes less characters and decompress it, it's really easy and js already offers methods out of the box.
Apart from that, there is no way to do that with JS only. You can either use smart tricks and compress the data, or write your own API for managing cache. Assuming you don't want to do the second (nobody wants), you should stick with first option.
I'm not JS expert, I hate that language - I'm mostly coding backends in C# these days. But I'm sure there are ways to minify that json further, not only restructurizing it to contain only relevant info, but also compressing it using one method or another - cache is big enough, it's just a matter of proper logic.
Compression actually sounds like a very good idea. I'm sure some zip-like algorithms would be really effective too, since there are so many repeated segments (i.e. appIDs owned by more than one user). Even then, base64 may be good enough to start with. I'll research that a bit more. Thanks for the guidance.
Turns out, the unoptimized JSON string is actually just under 7 mil characters, so per your check, this won't fit.
I've got ways to optimize, but I thought it was interesting enough to share. :D
Those API requests are also pretty printed, so you could probably save up a bunch of space just by getting rid of all the \t and \n characters.
Still, be careful about using localStorage to store a lot of data, especially because it's saved by domain, and not by script, which means that every script that uses localStorage to store its settings (like mine, and a lot of others from what I saw) could stop working with that same error you noticed when trying to store too much. There are tools out there that tell you the exact (or almost exact) amount of local storage your browser supports, but it's about 5MB for every browser, give or take a little.
Very good point about the total size allotment. I know you commented elsewhere about making a browser extension, but I don't love that option. :/
Yeah, I told you that through the Steam chat, but was more of an explanation of how the GM_setValue works without the same limitations as localStorage methods. I'm not sure if there are any space limits to it, but I couldn't find anything like it just by Googling, so you should be fine with using whatever amount of space you need.
I don't have the exact code to test it for you, but you could just make a new test script with the code needed just to import all the data from all the users, turn it into a string, and then use GM_listValues to see all stored keys on Monkey's storage and then GM_getValue to retrieve it and check if all stored correctly. Use console.logs and that stuff. If it works, that I think it should, then you don't really need to worry about storing too much data and messing up other scripts.
I once read about GM_setValue, it doesn't have a limitation of variable size and number of variable can be stored.
But if there are too many variable stored, it'll slow down the script.
I once used each appID as a variable name for my script, so the script have thousands of variables stored, and it became slower the more appID stored.
I then use an array to store appID, convert it to json, and save it to 1 variable, e.g GM_setValue("data", "your_json")
Well, it's kinda inefficient to register a million memory addresses for a million values when you should really just register one memory address for one array :P
As for converting it to JSON, you don't really need to turn an array into an object and then into a string to store it, you can directly turn the array into a string and store it that way, but I'm guessing you do that. Converting it into a string, and then adding it into an object and converting that as well into a string would be kinda pointless as well.
It is pretty simple to save data with GM_setValue("bundle-34900", true), GM_setValue("cards-34900", true), GM_setValue("achievements-34900", true)
But then again, 1 game has at least 5 variables, lol
I didn't knew it will slow down the script. :D
Every time the script runs, I pull the json and store it in an array
var GameData = GM_getValue("GameData", "");
GameData = JSON.parse(GameData);
And everytime GameData updated, I just need to update the GM value
Updated to 0.06!
Updated to 0.07.
Not working :/
Mind explaining how/what part is not working? ^^
When I put the game id, nothing happens. Both in the SG and Steam Store. That progress button doesn't appear.
What browser/scripting tool are you using?
Google Chrome and Tampermonkey
Can I ask how many people you have in your whitelist?
You have less than one full page of a list, but that should not matter.
To get to the console, you can press F12, then at the top of the panel that appears, select Console. It should be next to Elements, but may be hidden behind >>.
Open the console, reload the page (whether SG or Steam), try to run the function. The console should fill up with messages of all kinds (some may not be related to my code). Copy all of that and send to me (add me on Steam, or post on an old GA of mine if you like), or post an issue here: https://github.com/Gaffi/SG-WL-Inventory/issues
Once you're done, you can press F12 again to hide the panel.
Thanks for the debugging help!
Here's it: https://github.com/Gaffi/SG-WL-Inventory/issues/13
Thanks. I'll look into it as soon as I can.
I've updated the script (now 0.07) and this should be resolved. Thanks for your report!
Can this thing be somehow modified to check people in a Steam group? The site that did that seems to have stopped working.
That's probably doable. I'll add it to the list. :)
would be nice since
swl.mabako.net seems to be down ;)
Very nice scripts!
button even did not appearing, chrome+tampermonkey
create an issue on github, added to friends in steam
can someone help me?
Hey sorry. I just posted that update, but missed one thing. I've corrected to 0.08.
thanks, works great with ff+greasemonkey and chrome+tampermonkey
Nice script. Very simple and easy to use.
Displaying details about ownership, such as who has a game (rather than only summary statistics)
Displaying details about ownership, such as who has a game (rather than only summary statistics)
This will be great if you can make it :D
Scanning wishlists for most wanted games
Scanning wishlists for most wanted games
Isn't m0l0's Whitelist Wishlist and Tools already done this?
For your second point, yes, there is already a script out there that does something like this, but mine would be a little different. For example, the other script lists the top wishlisted games, whereas mine will identify a specific game. Overall, my addition would just be another option, up to you which one you use.
So your script will just show 1 game instead of a list, right?
Looking forward to your script then
Correct. In current form, you supply a game ID (or run from a specific game's store page) and it returns the results.
I think the other script is more useful for finding what game to buy for your whitelist (if that is your aim), but mine is better to find out if a game you already have a key/gift for (say from a bundle or something) is likely to be well received by your WL.
i come from here to +1 inclusion of groups instead of just whitelist; thank you
Works with Firefox and Greasemonkey.
Thanks for checking and confirming for me! :)
Very useful tool, thank you. :)
I hope you don't mind that I edited your script to better fit my needs. I moved the button to the left of the community button and changed the label to "SG♥" because I am using several scripts that add buttons and it's getting crammed.
In case anyone else is interested: Script
If you don't like that I will remove the link.
I do not mind at all. :)
In fact, I may just plug that snippet into the main code. I also do not love the size of the button as it is.
Sounds like a good idea but the name Inventory Checker is misleading since it would check the Inventory for unredeemed gifts of that game. If I understood this correctly Libary Checker would be more accurate.
With the way the concept has been expanding, I do feel a name change is appropriate. I'll come up with something (maybe your suggestion here) once more of the major changes are done.
Thanks for the feedback.
can you move that default input number to a placeholder or something? as it is alert box, i understand difficulty, but that's a minus for me. on Linux I use thing, let's call it quick paste, where you select text somewhere and with middle mouse paste it without it going in to clipboard. the problem here is that, if i select that number in steam store link, opening your alert that default number selects over my steam selection and i'm pasting your default number. and as i can't switch tabs with your modal dialog, this happens every time.
I'll see about plugging in a text input field on the page instead? Or maybe something else... We'll see. Thanks for the feedback.
Hey there, I've pushed out update 0.10, which, in addition to adding the group checking, removes all alert boxes from the script. :)
Came here to give my +1 for any inclusion of groups instead of only whitelists.
It would be extra-nice of you!!!!!!
It's coming. :) I still have some work to do, but an update will be out soon that will add some foundation pieces to the process.
Very good! It will be veru useful for the whole community!
Hey there, I've pushed out update 0.10, which adds the group checking! Just an FYI, there are some issues if there are private users in the group. I'm working on a fix, but overall, this should work fine.
+1 to newer name =)
(makes more sense to me with this title)
Good, because this site is not working anymore:
Do you have a direct link?
It's up in the description, but here's a shortcut for you. :D
Sorry sir, i didn't found the link on description, just a quick look =/
But thanks again!
No worries! I hope you find it useful.
Damn, tried several times, but seems like Chrome is not accepting it... and when i clicked, gives a library error =/
Hm... What script tool are you using? I use Tampermonkey, but haven't testing using any others.
I was using Grease Monkey, but i forgot that i've uninstalled! Hahaha, gonna try again, sorry!
thanks so much for your service to the community! this would be the tool that finally pushes me to try and figure out all of this userscript stuff when being able to check groups beyond whitelist is added. finally got bugged enough at the by-now obvious fact of swl's death... i bump from this thread
i stressed "when being able..." so much because i added it after the fact - did so to stress the edit... the comment didn't show as edited, but it will now... hangs head
oye dang, i commented the same a month ago... i promise i'm not hounding, i just saw this and yeah... well a bump is a bump? know that life gets in teh way and other things happen, i'm sorry
Lol. Nice bump. ;) Do not worry, I do not feel hounded.
Adding the group stuff so far is actually working ok, but there are some design decisions I made that I need to rollback/change, which is unfortunately a bit of a mess. After that, I can then work on bugs, etc.
I'm sorry to keep everyone in suspense, but I'm getting there.
Since there's a bump, I'll give a status update:
I added in some group functionality, but didn't love the implementation.
I changed the UI portion, and now having it working, except for some odd cases (usually has to do with group size).
I could probably release a buggy version now, but I'm trying to hold off until I have most/all of the big, obvious issues dealt with. Perhaps this week, given the time to do so. Real work calls this week, so I'm going to be less available to code, but I'm otherwise that close to release.
awesome, thanks for the status update. sounds great.
i'm not really in any rush, take all the time you need to fix it up however you like. i just saw the opportunity to joke and had to take it. ^^
excellent, thanks for letting me know. updating now & will try it out ^^
update: test #1 was beautiful, thanks a million! ^^
unsure if it's supposed to be working on the steam store pages as well, but the button there isn't doing anything for me at all (see photo). works great from the steamgifts group page, but not there. if that section is only for whitelists then that would explain why it's broken for me though, since i have no whitelist.
Yes, sorry. The Steam page launch is only for WL... Maybe look for that in V0.11?
oh that's fine, just wanted to make sure it's supposed to be like that..
group page is easier anyways really. from store page i'd have to insert groupid instead of appid which i don't even really know those id numbers.
Exactly. That was my original angle, and after a few tests, I already hated having to go look up the group info. :P
Nice, and thanks since now!!
Very useful feature and it works well :) Thank you!!
Great update !
Very nice update!
\o"/ \"o/ \o"/ \"o/ i dance
thanks so much, you da effin best - i shall undertake the endeavor of (trying to) reckon(ing) scripts and stuff here soon ^^
can't thank you enough... but thanks - thanks!!!
:D You are very welcome!