Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Steam Leaderboards - can't get it to write score value

Okay, I've been bashing my head against my desk over this for the past few hours now.

I've successfully gotten WriteLeaderboards() to work...ish

Using this code:

alt text

It creates a leaderboard under my steamworks account titled ClassicMode! Hooray! I can rest assured that my game is linked to my steam app id properly.

HOWEVER, I can't actually get it to add an entry. Using the SetIntStat (circled in red) I've tried "Score" "score" and a TON of other possibilities (so many attempts), but I can't get it to write a value to the leaderboard. I've also tried int and int32 data types.

For reference, here's the empty leaderboard created in my steamworks account: alt text

Any idea what I should write in SetIntStat to get it to actually write an entry to the leaderboard? OR if SetIntStat is incorrect, what should I be using?

Product Version: UE 4.13
01_statwrite.png (84.0 kB)
02_classicmode.png (37.0 kB)
more ▼

asked Oct 03 '16 at 04:59 AM in C++ Programming

avatar image

104 11 14 21

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

The answer was to make a steam stat in addition to the leaderboard named "StatName_Statname" where StatName is the name called by SetIntStat.

However, now it's incrementing the scores instead of replacing them which is frustrating...

more ▼

answered Oct 04 '16 at 01:41 AM

avatar image

104 11 14 21

avatar image borbs727 Jan 20 '17 at 10:30 PM

I'm having the same problem. I'm able to read my score, but I can't get the score to display. I got it working once, but after trying to change it around I broke it. So frustrating! alt text

capture.jpg (349.9 kB)
avatar image Oraclefish Jan 21 '17 at 06:53 PM

Unfortunately, you're not going to be able to do steam leaderboards in any decent capacity using blueprint OR UE4's OnlineSubsystem - you have to go around it using native steam methods in C++

The reason is - using UE4's OnlineSubsystem, there is no way to read an arbitrary range of scores (like the top 10) - you can only give it specific player IDs and see those scores. Also, UE4's OnlineSubsystem is just riddled with issues for Leaderboards...

I found this article helped a lot for accessing native steamworks functions: https://wiki.unrealengine.com/Steam_workshop

From here, I wrote some blueprint-callable methods using the "Leaderboards: How-To" article under the steam partner site. (It's pretty much copy-paste)

avatar image MeMe Feb 01 '17 at 03:37 PM

Hi Oraclefish, for days I am trying to replicate what you have posted. Could you be so kind and post the c++ class you have created in the editor with the "leaderboard how to" code added?

the "leaderboard-how to" code for the header gives me error messages at "ccall" and I have no clue what is happening.

thanks in advance

avatar image Genova Nov 20 '17 at 01:47 PM

Holy *** you just answered something I could NOT find after skimming every pages I could find. Not even Epic's docs are mentioning this anywhere (or if it does it's damn well hidden)... The StatName_StatName was what's missing... thanks a lot !

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

very nice answer,I find the StatName_StatName for many days

more ▼

answered Mar 01 '18 at 07:12 AM

avatar image


avatar image sanjithkanagavel Mar 21 '18 at 08:54 PM

I am in 4.18.3 and its not working for me. Any idea why? Did you change anything in cpp files ?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question