Useful?
This is a really great script and I think it will be really useful for my purposes!!
Just one question and correct me if I'm wrong about this, this tool currently displays achievements stats only right? I think it would be even better if we can also see playtimes stats, in specific, average playtime and games with any playtime / with more than x hours, I was checking your code and I believe you already have some works around playtime in computeUserStats so I don't think it would be too hard to add?
Unless the plan with your script is only achievements? Let us know
Thank you!!
Comment has been collapsed.
the all winner summary doesn't show individual play hours but if you click their name it will give the breakdown of all their wins and each individual games stats(win date, achievement counts (X/total)(its also a link to their achievement page for the game for more manual checking), completion %(I assume this is just based off achievement counts), and hours for the game.
just finished a scan myself.
took a while... near an hour but it had to check 806 winners.
Comment has been collapsed.
Yes, completion % is based entire off achievement counts. Games without achievements are excluded from the calculation.
It took you an hour to run? Something is wrong... Mine took only a few minutes with 843 winners.
Comment has been collapsed.
You're welcome :)
The tool displays playtime too, in the rightmost "Hours" column. The multi-user summary shows the commutative time played by each user. The detailed user view shows playtime per game. But it doesn't do any analysis on the playtime. It just displays the raw numbers. If there are any metrics that make sense, I might consider adding them. I don't have access to HLTB data unfortunately.
Another thing I just thought of is to have a flat view of all the games without separation by user. I'll look into it if there's demand.
Comment has been collapsed.
I see where my misunderstanding goes, I am interested in Single User checks currently, so that user specific average playtime and games with any playtime, Multi user checks I don't have an use right now but I can see it's value.
I took the freedom to quickly compute and update your script with what I mean, as you suggested, like in this screenshot. I don't know if this was already a feature? Let me know
Comment has been collapsed.
No it's definitely not a feature and would be a great addition!
Would you like write access to the repo to push your changes? Or you can share them directly with me and I'll update the script.
Comment has been collapsed.
Here are the changes, it's pretty simple, you already did most of the work I only added the calculations, I checked them against Excel formulas and the numbers match so I think they are correct
Inside computeUserStats
// Add these definitions
let anyHours = 0;
let avgHours = 0;
// update the for with this line
for (const w of wins) {
if (w.hours) anyHours++;
}
// add these values within the return
return {
anyHours: anyHours,
avgHours: Math.trunc((totalHours / 60) / anyHours * 100) / 100
}
And in the innerHTML of sgStatus change this at the end
⭐ Avg. Game Completion Rate: <b>${stats.compPct}%</b><br>
⏱️ Games with any Playtime: <b>${stats.anyHours}</b><br>
⏰ Avg. Game Playtime: <b>${stats.avgHours}</b>
Comment has been collapsed.
Can you make the column labels clearer? Not only did I have trouble figuring out which were for wins-with-playtime and which were for wins-with-achievements-earned, but it took me a while to figure out that "Comp %" breaks tradition by not being the total number of wins that have 100% completion, but instead the percentage of achievements earned out of all wins' achievements combined.
Comment has been collapsed.
Good points. It IS confusing. One thing I'll definitely do is rename "Comp %" to "Avg. Achievement %" to match DYEPB nomenclature.
As for the other columns, I'll make it clear that they're based on achievements. One thing I'm considering is combining the Number and % columns. There's no good reason to have both.
So
| Games Won | Games ≥0 | % ≥0 | Games ≥25% | % ≥25 |
|---|---|---|---|---|
| 3 | 2 | 66% | 1 | 33% |
Would become
| Games Won | % /w 1 achievement | % ≥25 complete |
|---|---|---|
| 3 | 66% (2/3) | 33% (1/3) |
Since this makes the table more compact, I can add another column for the actual "completed %"
Adding columns for hours played (>1 hour, >5 hours) is possible, although I never found that level of granularity very useful.
Comment has been collapsed.
Comment has been collapsed.
Bump! and an "ACTION REQUIRED" message to anyone who ran the script before.
⚠️ Attention
Due to a recent bug fix, users who ran scans with versions older than 1.4.1 need to clear all giveaway caches in order for Full CV filtering to work correctly.
To clear the cache, go into settings and click on the button shown here https://ibb.co/HTDqCWBr
Also, be sure to update your script to the latest version (v 1.5.0)
Comment has been collapsed.
Are you seeing this bug for a multi-copy giveaway? The script should already work for single copy giveaways marked as Not Received.
Can you point me to an example of the bug?
Comment has been collapsed.
The script should already work for single copy giveaways marked as Not Received.
I just tested it on me since I have a not received for Saints Row 2(got it myself sometime later in a collection)... its showing in the list of wins when you run the script on me.
something else I noticed is profile features limited games showing 0hrs played, don't know if there is a workaround for that.
Comment has been collapsed.
Ah right, that's a real mistake. I made it count everything on a user's won page as a win to get around the problem of winners being chopped off in giveaways that have more than 3 winners. I should be able to fix that easily.
I'm still curious what the HTML looks like for multi-copy giveaways with mixed feedback because my script is probably not detecting that correctly.
Comment has been collapsed.
The bug is fixed in the latest release. You'll have to update the script then clear the cache for any pages you're having issues with. (Giveaway Cache [Current Page] under advanced settings).
The new release also saves results and lets you annotate them on a user's won page (like DYEPB?). Only works if you run a full scan on a user (no filtering). Annotation is off by default. You'll have to enable it in settings.
Comment has been collapsed.
Nice! Seems to be working as intended! :)
A minor thing I just noticed, is that if you go to page 2 or any other page of a user's wins, the username isn't filled out automatically unlike on the first page. Recalling the last scan results for that user still works fine though.
Comment has been collapsed.
great job especially since you are not a coder yourself :)
it would be great if there is an option for the gifts sent as well though :)
edit: it seems that the script is a bit bugged. i tried to scan my profile and found some of them has N/A playtime even though i have them.
also, what does the light blue background means?
Comment has been collapsed.
What exactly do you mean by "an option for the gifts sent"? You can run the script on gifts sent or won pages.
Could you tell me which games have playtime incorrectly marked as N/A? I just ran it on your "won" games and I don't see any N/A playtime.
The blue background means that it's a whitelist-only giveaway :)
Edit: See screenshot. Several games have N/A for achievements but playtime looks fine to me.
Comment has been collapsed.
Hmm strange. I ran it at first on gift sent and it didnt do anything. Maybe ill try it again tomorrow.
I cant remember all of them, but i remember quadrata having 0.0 playtime (sorry it wasnt N/A, i mistype) . Iirc lego star wars was also 0.0 ... did it happen intermittently? Strange
Comment has been collapsed.
On the gifts sent page, you have to specify which user you want to check - Either select 'Single user' mode and enter a username or select 'All winners' mode.
You're right. It is reporting 0 hours for a bunch of games that you have hours in. Not sure what's causing that. I suspect it's an issue with the Steam API. Do You Even Play, Bro? reports the same number of games with any playtime (122), but looks like it's excluding some games for the % calculation; it only shows 124 as the total in the denominator vs 133 in my case.
Comment has been collapsed.
Figured it out.
Steam wasn't returning data for Profile Features Limited games. I made the necessary changes. Now it only shows 2 games with 0 playtime and 131 out of 133 as played.
You'll need to update the script and run a new scan using the Scan(fresh) button to grab fresh data.
Comment has been collapsed.
I checked. I can determine if an app is a dlc through the Steam store API, but that endpoint is apparently rate-limited to 200 requests per 5 minutes so won't work for bulk requests. The ESGST API also provides the data, but I don't want users to start flooding Rafael's server with 100s of requests and drive up his costs.
So, not sure. Maybe someone else with more knowledge can answer.
Comment has been collapsed.
Actually, thinking about it, using ESGST to check if an app is a DLC isn't much different than using ESGST to check if a game is Full CV which I'm already doing. With caching, the burden on ESGST should be minimal. So yeah, I think it's doable. I'll work on it.
Too tired right now. Might get around to it later in the week.
Comment has been collapsed.
Interesting script! The stats I found for the games I've given away are not what I expected at all. But there's something heartwarming about the cheap or "mediocre games" getting more love than the "good games" (based on the combo of playtime + achievements hit).
(there is significantly LESS card farming than I expected lmao - c'mon folks, the booster pack economy needs support!!!)
Comment has been collapsed.
Hey PK,
I've been using your script for a few days now and I don't have much to complain about.
However, I did find a bug that I solved by clearing the cache.
It wouldn't let me scan a user, giving me a “No matching found” error, or it would only return a DLC depending on whether the option was checked or not.
The other users still worked, and this one worked after clearing the various caches.
Anyway, It's great, well done, congratulations ;)
Comment has been collapsed.
Thanks for using and appreciating the script!
I suspect the bug you ran into was because the cache for that user had an older format than the current one. I updated the cache structure a couple of times during development to support new features. If you run into the same problem again, then it's definitely a bug which I'll need to look into, so please ping me if it happens again.
Comment has been collapsed.
Woah, this looks interesting. I'll take the time to try it out for sure. Thank you for your efforts!!
Comment has been collapsed.
61 Comments - Last post 28 minutes ago by FallenDream
216 Comments - Last post 1 hour ago by foe
11 Comments - Last post 3 hours ago by makki
10 Comments - Last post 3 hours ago by Khatulistiwa
306 Comments - Last post 8 hours ago by Chris76de
10 Comments - Last post 8 hours ago by DeliberateTaco
4 Comments - Last post 9 hours ago by Fluffster
11 Comments - Last post 10 minutes ago by speks
10 Comments - Last post 18 minutes ago by Fluffster
32 Comments - Last post 23 minutes ago by yannbz
378 Comments - Last post 35 minutes ago by marianoag
188 Comments - Last post 39 minutes ago by molderko
1,100 Comments - Last post 43 minutes ago by Fitz10024
29 Comments - Last post 46 minutes ago by Oppenh4imer
Hi everyone!
I’ve put together a userscript that reports play stats (hours and achievements) for SteamGifts winners.
You might be thinking, "Wait, doesn't Do You Even Play, Bro? already do this?" Not quite! While DYEPB focuses on a user's overall win play percentages, SG Playstats also works on 'gifts sent' and group pages which helps you answer questions like: "Are the people I gave games to actually playing them?" or "Which members of this group are playing their wins?"
You might also be wondering, "Does this script replace or supersede DYEPB?" My answer is: No. DYEPB is simple, time-tested and does what it does really well.
More importantly, it annotates its results on a user's page which my script doesn't do.How to Install
How to Run
The script grabs giveaway info from the page and pulls play data from Steam to create a sortable results table:
⚠️ Chrome users are reporting slow run times compared to Firefox. If the Steam stage of a 300 giveaway scan is taking closer to 30s than 10s, I recommend changing the Steam Scan Speed setting from 6 to 10. Firefox users should stick to the default value.
Scanning Options
Caching
The script stores data locally (cache) to be nice to SG and Steam by reducing the number of data requests.
When you run a scan, you have a choice:
Note 1: The SG giveaway cache holds 50,000 items, and Steam cached data expires after 5 days. Both can be adjusted in settings.
Note 2: There are advanced debug options in settings that let you view / delete cache contents if you're so inclined. 99% of you should have no reason to.
Limitations
Disclaimers
Steam limits Steam has a daily API quota. If you run massive scans constantly, they may temporarily block your API key.
I’m NOT a dev! My knowledge of programming is very basic. I built this with a ton of help from AI. If you’re an actual coder and want to improve the script, please feel free!
Changelog
Comment has been collapsed.