Jump to content
McKay Development

How to find download size of a game / find depots belonging to a game


BattleMaster

Recommended Posts

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.

Link to comment
Share on other sites

That didnt really work, now it was looking like this:

image.png.7e11b36bc26eafc6850069604de2ff28.png

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:

image.thumb.png.f46401025db81f9f43f5211b38468444.png

Sorry if I am bothering too much, I am pretty new to node and js in general.

Edited by BattleMaster
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

I still get a "not a function" error.
image.png.00f970973d6971fefa76b24479a1ec74.png
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)}`);

image.png.8d3791b152162908d96c1db1abcc75e1.png

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.
image.png.b747a7dee1e3f948e8dbc3a9e19b6a0b.png

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):
image.png.8627f40c7a6cb8174488297e4034e1fb.png

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
image.png.60d4f66288e67d2ce3029fc32de9416e.png
Why are the depots part of this object relating to the registry?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...