BattleMaster Posted April 24 Report Share Posted April 24 Hello, I am completely new to using this library. I want to be able to find the download size of a game from my application. SteamDB does have this functionality (you can see the depots belonging to a game, and for each depot you can see the size), so there must be a way to do it; however, I wasn't able to achieve this with just the Steam Web API (do tell me if there is a way to do it with just the web api), and was thus wondering if I could do it using node-steam-user. I would greatly appreciate your help. Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 25 Report Share Posted April 25 getProductInfo() will give you most of the stuff SteamDB is showing, including depot info and sizes. Quote Link to comment Share on other sites More sharing options...
BattleMaster Posted April 25 Author Report Share Posted April 25 Thanks a lot! I tried to import steamuser with import * as steamuser from 'steam-user'; but now steamuser is just an empty object, what did I do wrong? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 25 Report Share Posted April 25 You probably just need to do import SteamUser from 'steam-user'; Quote Link to comment Share on other sites More sharing options...
BattleMaster Posted April 25 Author Report Share Posted April 25 (edited) That didnt really work, now it was looking like this: SteamUser seems to be a class, so I tried const steamuser = new SteamUser(); and then when trying to use steamuser.getProductInfo(...) I got this error: Sorry if I am bothering too much, I am pretty new to node and js in general. Edited April 25 by BattleMaster Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 25 Report Share Posted April 25 Did you log on? Show your full code please. Quote Link to comment Share on other sites More sharing options...
BattleMaster Posted April 26 Author Report Share Posted April 26 Not yet, I wanted to try if this part works first, and I assumed that I wouldn't get an error like this, but rather one telling me to log on. But I guess I can try doing that first. By the way, is there a tutorial or something for using this library? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 26 Report Share Posted April 26 You need to log on to do anything. You can just log on anonymously if all you want to do is call getProductInfo. I'll grant that it would be ideal to have a more descriptive error when you try to call a method before logging on, but I just haven't gotten around to updating all hundred+ functions to throw such an error. That said, the error you got isn't because you aren't logged on. It's because you didn't call getProductInfo with the expected arguments. There are a few example scripts on GitHub. Quote Link to comment Share on other sites More sharing options...
BattleMaster Posted April 27 Author Report Share Posted April 27 I still get a "not a function" error. minimal reproducible code: import SteamUser from 'steam-user'; await SteamUser.logOn({anonymous: true, machineName: 'Test', clientOS: 16}); nvm, i forgot this line var client = new SteamUser(); It works now, but getProductInfo seems to be stuck without doing anything console.log('logging on to Steam..'); await client.logOn({anonymous: true}); console.log('logged on'); console.log('getting product info..'); const product_info = await client.getProductInfo([10], []); console.log(`product_info: ${JSON.stringify(product_info)}`); Quote Link to comment Share on other sites More sharing options...
4049_1572836826 Posted April 27 Report Share Posted April 27 (edited) Try call getProduct after emmit loggedOn see my code Edited April 27 by 4049_1572836826 SENPAY98K 1 Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 27 Report Share Posted April 27 ^ this is correct. logOn does not return a promise; you need to wait for the loggedOn event. Quote Link to comment Share on other sites More sharing options...
BattleMaster Posted April 30 Author Report Share Posted April 30 ah I see, thank you Quote Link to comment Share on other sites More sharing options...
BattleMaster Posted May 1 Author Report Share Posted May 1 what exactly does "optional" on a depot mean? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted May 1 Report Share Posted May 1 I'm not sure, do you have an example? Quote Link to comment Share on other sites More sharing options...
BattleMaster Posted May 1 Author Report Share Posted May 1 I would have thought that maybe it's something that you can turn on or off like a DLC but it doesn't look like it. It is included in the download size that Steam shows. Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted May 1 Report Share Posted May 1 Dunno. Quote Link to comment Share on other sites More sharing options...
BattleMaster Posted May 1 Author Report Share Posted May 1 How do I find out if a depot belongs to a beta? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted May 1 Report Share Posted May 1 Depots don't belong to betas; they might have a beta option though. What the Steam client calls a "beta" is actually a branch. The default branch is called "public", and any other branch is available in the beta tab of Steam. Public branches have their manifests listed plainly in appinfo (see the public and beta manifests in your screenshot; they match so both branches contain the same content for that depot). For private branches, you have to request the manifest info from Steam using the password. Quote Link to comment Share on other sites More sharing options...
BattleMaster Posted May 1 Author Report Share Posted May 1 I'm asking because with a game like this for example, I would assume that the "DUSK SDK" depot only gets downloaded when you opt into the "dusk_sdk" branch, but it looks like it's also there with the public branch. Actually in this case it might actually be downloading the data even if you don't opt into the beta, because this seems to match the download size that Steam shows me (Dusk Content + Dusk SDK + Soundtrack): Quote Link to comment Share on other sites More sharing options...
BattleMaster Posted May 1 Author Report Share Posted May 1 What does this "maxsize" field mean? "max" of what? Is it the max out of any branch? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted May 1 Report Share Posted May 1 Yeah, it would be downloading all depots even if you aren't opted into a beta. maxsize is, as far as I'm aware, the size of the biggest build of that depot. Steam just assumes the worst and shows you the size of the largest build in a depot when you're downloading. Quote Link to comment Share on other sites More sharing options...
BattleMaster Posted May 1 Author Report Share Posted May 1 So is the download size that the steam desktop client shows also based on that "maxsize"? Dr. McKay 1 Quote Link to comment Share on other sites More sharing options...
BattleMaster Posted May 2 Author Report Share Posted May 2 I found something strange: For the game Fallout: New Vegas, "depots" isn't located at appinfo.depots, but instead at appinfo.install.registry.hkey_local_machine\\\\software\\\\bethesda softworks\\\\falloutnv.depots Why are the depots part of this object relating to the registry? Quote Link to comment Share on other sites More sharing options...
BattleMaster Posted May 2 Author Report Share Posted May 2 Similar situation with "Tomb Raider (VI) The Angel of Darkness" and for "Don't Starve Together" there arent any depots in the json I got Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted May 2 Report Share Posted May 2 This is a bug; update to 4.28.3 and it should be fixed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.