Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setReturnOnlyIDs and setReturnMetadata don't work yet return true #301

Open
Lyaaaaaaaaaaaaaaa opened this issue Dec 12, 2022 · 9 comments
Open
Assignees
Labels
bug Related to any general issue with GodotSteam ugc / workshop Related to Steam Workshop / UGC

Comments

@Lyaaaaaaaaaaaaaaa
Copy link

Describe the bug
the UGC setReturnOnlyIDs and setReturnMetadata have no effect on the ugc request. I suspect it is the same for the similar functions described in https://partner.steamgames.com/doc/api/ISteamUGC#SendQueryUGCRequest

To Reproduce
Steps to reproduce the behavior:

  1. Have an app with a workshop to test
  2. Call createQueryUserUGCRequest with the following parameters: USER_UGC_LIST_PUBLISHED WORKSHOP_FILE_TYPE_COMMUNITY and USERUGCLISTSORTORDER_CREATIONORDERDESC
  3. Call setReturnOnlyIDs(handler, true) or setReturnMetadata(handler, true)
  4. Call sendQueryUGCRequest(handler)
  5. Call getQueryUGCResult(handler)
  6. Print the content and compare the result after changing the parameters on step 6

Expected behavior
By calling setReturnOnlyIDs(true) it should return IDs instead of all the details on the pending UGC Query.
By calling setReturnMetadata(true) it should return the metadata with the rest of the query.

Desktop (please complete the following information):
Linux pop-os 6.0.6-76060006-generic #202210290932~1667401208~22.04~d2df702 SMP PREEMPT_DYNAMIC Wed N x86_64 x86_64 x86_64 GNU/Linux

Version of Godot:
3.5.1

Version of GodotSteam:
Steamworks 1.55 - GodotSteam 3.18.3 (Pre-compiled version)

Additional context
The bool returned by setReturnOnlyIDs and setReturnMetadata is true though.

@Gramps Gramps self-assigned this Dec 12, 2022
@Gramps Gramps added ugc / workshop Related to Steam Workshop / UGC bug Related to any general issue with GodotSteam labels Dec 12, 2022
@Gramps
Copy link
Member

Gramps commented Dec 12, 2022

Hmm, at least someone is finally testing all these Workshop functions! Thanks for reporting these. I will look into them!

@Gramps
Copy link
Member

Gramps commented Dec 24, 2022

Well, the functions are pretty basic; they only pass the handle and a bool. I'm not sure what could be wrong with them. Interestingly enough, Valve's notes for SetReturnOnlyIDs say: "the false if the UGC query handle is invalid or if the UGC query handle is from CreateQueryUGCDetailsRequest." You use that at the beginning of the example yet also say it returns true. Not quite sure how to fix this one currently.

@Gramps
Copy link
Member

Gramps commented Mar 7, 2023

And, in a related noted, coming back to this since my time is actually clearing up finally. I believe this is also discussed in the Discord. Has anything changed?

@Lyaaaaaaaaaaaaaaa
Copy link
Author

Can't say. I didn't come back to this matter yet!

@Gramps
Copy link
Member

Gramps commented Jun 25, 2023

There is a big v3.20 patch coming with some changes to the Inventory class. Might have an effect!

@Gramps
Copy link
Member

Gramps commented Jul 30, 2023

The oldest issue that is still open! Just an update that the patch should be coming this week or next. Sorry for the delay!

@Gramps
Copy link
Member

Gramps commented Jan 31, 2024

Headed into the new year and digging through everything again! One question I failed to ask originally as I am now going back through this: is the data returned by this fully populated or are the other fields in the dictionary empty except the ones requested (IDs and/or metadata)?

If you are getting the full dictionary back with keys but the data is blank except the ones you request, that is normal and expected. The dictionary itself with all keys will always come back since we have no way of telling ahead of time if there were only supposed to be ID's and/or metadata returned. I guess we could introduce an intricate if this is empty, omit the key but that might be excessive.

If all the details are coming back, fully populated dictionary, despite setting these; it may be a Steam issue as I mentioned before, most of these functions just pass along what Steam gives us.

Let me know when you get a chance!

@Lyaaaaaaaaaaaaaaa
Copy link
Author

hi, I did some run to check and all the results are always the same with all the info. The source code used can be found here: https://godotsteam.com/tutorials/workshop/ (for the case with setReturnMetadata I just replaced setReturnOnlyIDs by it.)

Here is the dictionary when not asking the id only.

{ "result": 1,
 "file_id": 3155913867,
 "file_type": 0,
 "creator_app_id": 2114790,
 "consumer_app_id": 2114790,
 "title": "New Lorebook from workshop",
 "description": "3 entries",
 "steam_id_owner": 76561198024787848,
 "time_created": 1707318240,
 "time_updated": 1707318240,
 "time_added_to_user_list": 0,
 "visibility": 0,
 "banned": false,
 "accepted_for_use": false,
 "tags_truncated": false,
 "tags": "English",
 "handle_file": -1,
 "handle_preview_file": 2377406675051228029,
 "file_name": "",
 "file_size": 230,
 "preview_file_size": 85443,
 "url": "",
 "votes_up": 0,
 "votes_down": 0,
 "score": 0,
 "num_children": 0 }

Here is the result when calling steam.setReturnOnlyIDs(_query_handler, true)

{ "result": 1,
 "file_id": 3155913867,
 "file_type": 0,
 "creator_app_id": 2114790,
 "consumer_app_id": 2114790,
 "title": "New Lorebook from workshop",
 "description": "3 entries",
 "steam_id_owner": 76561198024787848,
 "time_created": 1707318240,
 "time_updated": 1707318240,
 "time_added_to_user_list": 0,
 "visibility": 0,
 "banned": false,
 "accepted_for_use": false,
 "tags_truncated": false,
 "tags": "English",
 "handle_file": -1,
 "handle_preview_file": 2377406675051228029,
 "file_name": "",
 "file_size": 230,
 "preview_file_size": 85443,
 "url": "",
 "votes_up": 0,
 "votes_down": 0,
 "score": 0,
 "num_children": 0 }

Here is the result when calling steam.setReturnMetadata(_query_handler, true)

{ "result": 1,
 "file_id": 3155913867,
 "file_type": 0,
 "creator_app_id": 2114790,
 "consumer_app_id": 2114790,
 "title": "New Lorebook from workshop",
 "description": "3 entries",
 "steam_id_owner": 76561198024787848,
 "time_created": 1707318240,
 "time_updated": 1707318240,
 "time_added_to_user_list": 0,
 "visibility": 0,
 "banned": false,
 "accepted_for_use": false,
 "tags_truncated": false,
 "tags": "English",
 "handle_file": -1,
 "handle_preview_file": 2377406675051228029,
 "file_name": "",
 "file_size": 230,
 "preview_file_size": 85443,
 "url": "",
 "votes_up": 0,
 "votes_down": 0,
 "score": 0,
 "num_children": 0 }

@Gramps
Copy link
Member

Gramps commented Feb 8, 2024

That is really strange but also really helpful! I'll dig into this a bit more this evening and see what I see!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Related to any general issue with GodotSteam ugc / workshop Related to Steam Workshop / UGC
Projects
None yet
Development

No branches or pull requests

2 participants