playMaker

Author Topic: Steamworks.NET  (Read 17436 times)

terri

  • Sr. Member
  • ****
  • Posts: 348
    • View Profile
    • terrivellmann.tumblr.com
Re: Steamworks.NET
« Reply #75 on: May 04, 2017, 02:22:38 PM »
i got the achievements to work and I have it where it is saving scores to the leaderboard.

Does anyone know how to retrieve the leaderboard scores and display them?

I would pay good money for this.

I originally hired the creator of Steamworks.NET for the first actions made for this, so you could probably pay him to create any actions you need.

BDFgames

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: Steamworks.NET
« Reply #76 on: May 04, 2017, 02:47:49 PM »
"i got the achievements to work and I have it where it is saving scores to the leaderboard."

Nice one. Mind sharing a screenshot of your leaderboard saving state? Mine works, but only intermittently, so I'm guessing I've done something wrong.  :(

"Does anyone know how to retrieve the leaderboard scores and display them?"

It seems to be currently not possible to display the leaderboard in-game using the Playmaker Steamworks actions. The action scripts need to be revisited to enable this.

iEpic

  • Playmaker Newbie
  • *
  • Posts: 48
    • View Profile
    • IndieGamerWorld
Re: Steamworks.NET
« Reply #77 on: May 04, 2017, 02:58:41 PM »
It's working for INTs but I'm not sure how to upload it as a float or in a minute:seconds format.

BDFgames

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: Steamworks.NET
« Reply #78 on: May 04, 2017, 03:03:40 PM »
Thanks for sharing. Very simple -- I must be trying too hard with mine or something, as mine only works now and then.  :)

I'm pretty sure the Upload Score action only takes Integers right now. Someone would need to create a version for other formats the Steam Leaderboards will accept.

If there are any expert Action script coders interested in taking this on, I'd be interested in putting some cash into such an engagement too.  :)

ermak

  • Junior Playmaker
  • **
  • Posts: 60
    • View Profile
    • AL Games
Re: Steamworks.NET
« Reply #79 on: August 02, 2017, 05:02:09 AM »
Here have one C# script for "Get scores from leaderboard" but the creator missing something and he don't know where exactly is downloaded score data. If anyone can help with this...
http://answers.unity3d.com/questions/1352472/steamworksnet-unity-c-leaderboards.html

========================================

Also is very important to add this line, if you want Achivments to unlock in-game and not only if you quit the game. Thanks to ManicMinerUK for that hint!

Line:
SteamUserStats.StoreStats()

So, my SteamAchievementUnlock.cs script currently is this and Achievements are unlocking in-game:

Quote
// Created by Riley Labrecque for Digital Devolver and Terri Vellmann
// (c) 2014
using UnityEngine;
using Steamworks;

namespace HutongGames.PlayMaker.Actions
{
   [ActionCategory("steamworks.NET")]
   [Tooltip("Unlocks an Achievement by name.")]
   public class SteamAchievementUnlock : FsmStateAction
   {
      [RequiredField]
      [Tooltip("Achievement name.")]
      public FsmString achievementId;

      [UIHint(UIHint.Variable)]
      [Tooltip("Returns true on success, false on failure.")]
      public FsmBool success;

      public override void Reset()
      {
         achievementId = null;
         success = null;
      }

      public override void OnEnter()
      {
         success.Value = SteamManager.StatsAndAchievements.UnlockAchievement(achievementId.Value);   
         SteamUserStats.StoreStats ();  // ADD THIS LINE
      }
   }
}


With this line Achievements showing in Unity Editor too, but you must be loged in your Steam app (username account with access to Steamworks page).
Also don't forget after creating Achievements on Steamworks page, to publish your changes and reload your Steam app and Unity program.

========================================

Can anyone give me example picture of FSM how to setup and work with these actions: Steam Stats Setup, Steam Stat Set, Steam Stat Get. I can't figure out how to work with this. Unity showing error "can't find stat with that name", but "Steam Stats Setup" action must be only INT or FLOAT and my stat API Name is STRING (on steamworks developer page https://partner.steamgames.com) ?

Thanks!
« Last Edit: August 02, 2017, 05:49:46 AM by ermak »

evmo

  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
Re: Steamworks.NET
« Reply #80 on: November 13, 2017, 10:53:15 PM »
Hey All,

I've got steamworks.NET all setup with the actions installed.

I've followed everyone's examples and got the app ID entered. Everything seems to be working, no errors and the console is putting out the following messages:

New Score of 420 uploaded to leaderboard: High Scores
UnityEngine.Debug:Log(Object)

OnScoreUploaded 1 - 0
UnityEngine.Debug:Log(Object)

Nothing is appearing in the leaderboard though.

Am I missing something?

ermak

  • Junior Playmaker
  • **
  • Posts: 60
    • View Profile
    • AL Games
Re: Steamworks.NET
« Reply #81 on: November 15, 2017, 01:08:38 AM »
Hey All,

I've got steamworks.NET all setup with the actions installed.

I've followed everyone's examples and got the app ID entered. Everything seems to be working, no errors and the console is putting out the following messages:

New Score of 420 uploaded to leaderboard: High Scores
UnityEngine.Debug:Log(Object)

OnScoreUploaded 1 - 0
UnityEngine.Debug:Log(Object)

Nothing is appearing in the leaderboard though.

Am I missing something?

If I remember right (because I dont work with Unity from a while)

1. You must see in the log:
OnScoreUploaded 1 - 1 (Score is uploaded)
If you see:
OnScoreUploaded 1 - 0 (Score is not uploaded)

2. You must send only bigger score not equal or smaller of the current recorded score on steam. Example: upload: 2, 5, 10 , 12 ... this is fine.
If you upload 10, 15 and after this again 15 or 14 , 12 ... this is not fine.

3. Make your Leaderboard in your Steamworks account like this:

Name: What you want
Community Name: What you want
Sort Method: Descending (this is very important)
Display Type: Numeric

4. If I remember right (from Steam docs)... You can upload/send only 10 scores for 10 minutes interval. TIhis is steam limitation for optimisation purpose. So, if you upload the right numbers, but very often... again you will see:
OnScoreUploaded 1 - 0

Good Luck!

evmo

  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
Re: Steamworks.NET
« Reply #82 on: November 15, 2017, 11:59:30 AM »
Hey All,

I've got steamworks.NET all setup with the actions installed.

I've followed everyone's examples and got the app ID entered. Everything seems to be working, no errors and the console is putting out the following messages:

New Score of 420 uploaded to leaderboard: High Scores
UnityEngine.Debug:Log(Object)

OnScoreUploaded 1 - 0
UnityEngine.Debug:Log(Object)

Nothing is appearing in the leaderboard though.

Am I missing something?

If I remember right (because I dont work with Unity from a while)

1. You must see in the log:
OnScoreUploaded 1 - 1 (Score is uploaded)
If you see:
OnScoreUploaded 1 - 0 (Score is not uploaded)

2. You must send only bigger score not equal or smaller of the current recorded score on steam. Example: upload: 2, 5, 10 , 12 ... this is fine.
If you upload 10, 15 and after this again 15 or 14 , 12 ... this is not fine.

3. Make your Leaderboard in your Steamworks account like this:

Name: What you want
Community Name: What you want
Sort Method: Descending (this is very important)
Display Type: Numeric

4. If I remember right (from Steam docs)... You can upload/send only 10 scores for 10 minutes interval. TIhis is steam limitation for optimisation purpose. So, if you upload the right numbers, but very often... again you will see:
OnScoreUploaded 1 - 0

Good Luck!

I've been told that the build must be uploaded to Steam for this to work? I've only been trying it locally so far...I'm shown as being in the game when I test so it is talking to Steam.

I set my leaderboard up just as you show it in your example so that should be correct.

Will upload a build tonight and see it works.

Never tried to use any Steam services before so this is all new to me, I appreciate the help!
« Last Edit: November 15, 2017, 12:02:05 PM by evmo »

evmo

  • Playmaker Newbie
  • *
  • Posts: 6
    • View Profile
Re: Steamworks.NET
« Reply #83 on: November 15, 2017, 09:07:40 PM »
Success!  I have scores in my leaderboard!

I just missed the part about it needing to be played through Steam which in hindsight is totally obvious.... ::)

Thanks for the help everyone.