Write Leaderboard Integer doesn't submit entry to Steamworks

I’ve been trying to get Steamworks to work all day today with no luck. Followed the following set up for my game first.

Then, I set up a couple of leaderboards for some songs in my game. I also edited the CPP file using this tutorial.
https://lordihean.net/2016/04/21/ue4-tutorial-resolving-steam-leaderboards/ Edit* Correct linked I used

Next, I use blueprints to fire out the write of leaderboards but it never updates out. I created the following blueprint, and when the write is true, I trigger a sound just for debugging purposes. I hear the sound, but no new data is being entered into the database of my game on Steamworks.

http://puu.sh/s4iCh/4cd907c48b.png

Heck, the game even creates a new database for songs I did not create one myseklf, for example, I played through Team Fortres 2 theme song, and after refreshing the Steamworks page for leaderboards, it appears! But the list is just empty, with no entries at all. This was a packaged game, that I uploaded a build to Steam and then played by launching the game from Steam.

http://puu.sh/s4jtR/812aaba7cd.png

I also added steam stat variables like the following, but still no luck at all.

http://puu.sh/s4jxW/da587985e5.png

Is there a bug somewhere in the code

After doing some testing, I found that the changes I made to the cpp file are not actually compiled out. I think I need a separate answer thread for that, because I click build on the engine solution of my game, and it says build successfully (Super quickly), the compile on the UE4 button also works and compiles.

http://puu.sh/s4kQ1/5e895ed6c6.png

But I need the statName_statName like that and it only increments, when I did those fixes to the cpp file.

So, how can I compile the engine with the changes I made out. Sorry, I am quite noob at cpp with ue4. I right click the engine, press build, and it finishes very quickly. But going by the behavior from the stat and leaderboard, it ain’t working.

http://puu.sh/s4lbL/4dceeef460.png

I looked at those before I posted this question. It’s the second link…

There sure are bugs :slight_smile:

Here’s the recap:

And to fix it:

https://lordihean.net/2016/04/21/ue4-tutorial-resolving-steam-leaderboards/

If you can’t do that then please UPVOTE this: Unreal Engine Issues and Bug Tracker (UE-24791)

I finally figured this out.

What happened is that I used the Marketplace engine, which doesn’t let you edit the code. So the modification from the other links didn’t actually happened.

I had to download the engine from github, compile that out. Then add the plugins to the code and compile those. Then make a copy of my project with the new self compiled engine. Then I packaged the game, and uploaded to Steam. Where it finally worked out!

http://puu.sh/s5y9y/0418e73110.png

For other links of places I struggled but managed to overcome, which may happen for other people:

just as an aside, I have the online subsystem pulled out into my project “Plugins” folder so that I can have custom code in there without compiling the whole engine. You can just copy the whole OnlineSubsystemSteam folder. Might have to modify the build.cs file though.

the lordihean link is broken but here’s an archived version: https://web.archive.org/web/20160422120905/https://lordihean.net/2016/04/21/ue4-tutorial-resolving-steam-leaderboards/

this is STILL an issue in 4.18

Heck, the game even creates a new database for songs I did not create one myseklf, for example, I played through Team Fortres 2 theme song, and after refreshing the Steamworks page for leaderboards, it appears! But the list is just empty

It seems “Write leaderboard integer” is implemented in UE4 as built in BP node right now. But I have the same problem as the Topic Owner says. I see in steam works ne lists generated, but without content. The integer i pass to “write Leaderboard interger” is not seen in the steam works leader board. Nor the steam player. Any idea how what’s going on and how to fix?

Thanks Motanum. Would be cool to share some codes. :slight_smile: Or more details how to do that for c++ and steam works beginner.

In the meantime I got my problem fixed and I described the solution here. Hope it helps somebody.
https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/1387886-steam-read-leaderboard-integer-failed?p=1813920#post1813920

EDIT: Not fixed completly. Now I can read (read leaderboard integer) a value, update the value (write leaderboard integer), then read the updated value again (read leaderboard integer) and the updated value seems to be correct updated.
But log in into steamworks, it shows me that the value is not updated. Interesting on that, by restart the game the values I catch (read leaderboard integer) still the updated values from the last game run. But still, when log into steam works and look at the leaderboard, the changes are not shown here. Seems to be the values are “somehwere” temporary(?) saved.

I found it much easier to make my own blueprint nodes to handle all steamworks functionalities with leaderboards etc, as you can attach much more data to leaderboards, rather than to use the ue4 default blueprints.