GodotSteam: Content Querying omits returning FileID, needed for getting the file

I want to make use of User Generated Content, but can’t because the function

https://github.com/Gramps/GodotSteam/blob/e3acb6b783644102f61609a6d658ae9716eca211/godotsteam/godotsteam.cpp#L4768

skips returning the most important piece of information from the Steam structure: m_nPublishedFileId


In other words, this line:

ugcResult["fileID"] = (uint64_t)pDetails.m_nPublishedFileId;

is missing from the linked code and makes UGC querying useless.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 29 (17 by maintainers)

Most upvoted comments

Hmm, that’s weird it crashes in your version. Not sure what the difference would be or why MinGW would cause that (if it does).

Indeed, I’ll try a fresh install of VS2015 and pure Godot 3.2.1 sources once more to investigate.

Is that array is stores usable? Is it meant to be PoolIntArray in your uploadLeaderboardScore call?

Steam describes the array as Optional: Array containing the details surrounding the unlocking of this score. (from here). It looks like the mistake is in getting its size in your implementation.

Or is this being all done in test on Steamworks before pushing publicly?

Yes! You can set this up easily, no public workshop required, see the “Enabling ISteamUGC for a Game or Application” section here.


EDIT: compiling from x64 Native Tools Command Prompt for VS2019 the build was a success and no longer crashes, not sure if it’s the x64, the command prompt, the VS version or any of them together that did it. Regardless, this should let me bother you less and perhaps push some pull requests.

Some good news, more bad news.

Good: the editor you uploaded works and returns the entries with fileID Bad 1: My compiled version crashes at the same point. Bad 2: I was hoping to get around the inability to link the items by storing the ID of the item in the byte array that steam lets you associate with a leaderboard entry, however when calling Steam.uploadLeaderboardScore(value, false, PoolIntArray([1, 2, 3])) then ```

Steam.getDownloadedLeaderboardEntry(handle, 1)
var entries = Steam.getLeaderboardEntries()
print(entries)```

Entries is printed as [{global_rank:1, score:3, steamID:0}] which excludes the byte array! Checking the leaderboard entry through the web, Steam does show that the array was populated: Capture

If you upload the linux export template, I think this fix is good enough for now, regardless of the issues above.