Author Topic: Adding Achievements Using agsteam.dll  (Read 1288 times)

Adding Achievements Using agsteam.dll
« on: 05 Aug 2017, 06:58 »
I've had my game (Neofeud) greenlit and I'm currently trying to add achievements using the agsteam.dll tool, but I'm having some trouble figuring out exactly what I need to do to implement the achievement in AGS.  I have added a test achievement to the game on Steamworks, but I'm having trouble figuring out what code I need to add into the AGS game files to make the achievements work.  Is there some documentation for agsteam.dll that I missed, perhaps?

Thanks

Re: Adding Achievements Using agsteam.dll
« Reply #1 on: 05 Aug 2017, 08:29 »
Also, I'm getting an error saying that I'm missing "libagsteam.so" and so I can't compile to Linux.  I added the libagsteam.so file to my game/Linux/ folder but I'm still getting this error. 

m0ds

  • Guest
Re: Adding Achievements Using agsteam.dll
« Reply #2 on: 05 Aug 2017, 11:58 »
Quote
///AGSteam: Returns the requested Steam stat, or 0.0 on failure.
  float AGSteam.GetAverageRateStat(const string steamStatName);
  ///AGSteam: Returns the requested Steam stat, or 0.0 on failure.
  float AGSteam.GetFloatStat(const string steamStatName);
  ///AGSteam: Returns the requested Steam stat, or 0 on failure.
  int AGSteam.GetIntStat(const string steamStatName);
  ///AGSteam: Returns whether or not the Steam client is running and initialized.
  bool AGSteam.Initialized;
  ///AGSteam: Returns whether the specified Steam achievement has been achieved yet.
  bool AGSteam.IsAchievementAchieved(const string steamAchievementID);
  ///AGSteam: Resets a specific Steam achievement. Returns false upon error.
  bool AGSteam.ResetAchievement(const string steamAchievementID);
  ///AGSteam: Resets all Steam stats.
  void AGSteam.ResetStats();
  ///AGSteam: Resets all Steam stats and achievements.
  void AGSteam.ResetStatsAndAchievements();
  ///AGSteam: Marks the specified Steam achievement as achieved.
  bool AGSteam.SetAchievementAchieved(const string steamAchievementID);
  ///AGSteam: Sets the specified Steam stat to the given value.
  bool AGSteam.SetFloatStat(const string steamStatName, float value);
  ///AGSteam: Sets the specified Steam stat to the given value.
  bool AGSteam.SetIntStat(const string steamStatName, int value);
  ///AGSteam: Sets the specified Steam stat using the given values.
  bool AGSteam.UpdateAverageRateStat(const string steamStatName, float numerator, float denominator);

ie. AGSteam.SetAchievementAchieved("GEN_WIZ");

f*** knows about linux tho sorry. It might be file/folder structure? If you have any of our games, TCL, Downfall, Samaritan, Apotheosis... you can check the file structure for the Linux builds. I always thought the folder structure was linux/libs/32 or sth...more than just "linux". I don't know about it though myself. But, I'd advise sorting your base Win version out first, and then move onto Linux. Radiant, monkey_05_06 and possibly Dave G have a better understanding of Linux setup.

ps.
Spoiler: ShowHide
Grab a copy of "SAM Picker" (Google it). It'll help you turn achievements on and off once you've tested them. DON'T use it on games other than your own, Valve will ban you!! ;) Alternatively, you could create manual code that switches them off for testing purposes, but SAM Picker is quick and simple.
« Last Edit: 05 Aug 2017, 14:07 by MJL »

Re: Adding Achievements Using agsteam.dll
« Reply #3 on: 05 Aug 2017, 14:09 »
Also, I'm getting an error saying that I'm missing "libagsteam.so" and so I can't compile to Linux.  I added the libagsteam.so file to my game/Linux/ folder but I'm still getting this error. 
I think you might need to add it to Editor's Linux folder, or Editor's root folder, where you have windows plugins, not game's folder. It will be copied into game automatically.

Re: Adding Achievements Using agsteam.dll
« Reply #4 on: 14 Aug 2017, 07:15 »
So I've tried adding "libagsteam.so" and "libagsteam-32.so" to:
 
-the game's "Linux/lib32" folder and the "Linux/lib64" folder,
-to the AGS Editor's "Linux/lib32" folder and the "Linux/lib64" folder,
-to the AGS Editor's root folder,
-to the game's root folder,

and I'm still getting this error:

Quote
WARNING! The plugin 'agsteam.dll' does not have a Linux equivalent ('libagsteam.so' (32-bit)) available. Your game may not run or function properly without it. Do you wish to continue building for Linux anyway?

Does anyone know where these Linux files are supposed to go exactly?

Re: Adding Achievements Using agsteam.dll
« Reply #5 on: 14 Aug 2017, 11:03 »
I am still waking up, but for me Linux build wasn't working and I had to manually copy the Linux engine and the .so files in the game folder. Can you test the Linux version and verify that your game executable isn't indeed executing under Linux?

Re: Adding Achievements Using agsteam.dll
« Reply #6 on: 14 Aug 2017, 15:30 »
So I've tried adding "libagsteam.so" and "libagsteam-32.so" to:
 
-the game's "Linux/lib32" folder and the "Linux/lib64" folder,
-to the AGS Editor's "Linux/lib32" folder and the "Linux/lib64" folder,
-to the AGS Editor's root folder,
-to the game's root folder,

and I'm still getting this error:

Quote
WARNING! The plugin 'agsteam.dll' does not have a Linux equivalent ('libagsteam.so' (32-bit)) available. Your game may not run or function properly without it. Do you wish to continue building for Linux anyway?

According to the latest code, libraries should go in Editor/Linux/lib32 and lib64 correspondingly.

This suddenly struck me, you said  "libagsteam-32.so" but Editor expects just "libagsteam.so" in both versions.
« Last Edit: 14 Aug 2017, 16:08 by Crimson Wizard »

Re: Adding Achievements Using agsteam.dll
« Reply #7 on: 06 Oct 2019, 07:49 »
Hi, now I have the same problem. Couldnt build for Linux due to missing plugins.
I'm using agsteam-disjoint, not the AGSteam2Client. Im getting the error: The plugin agsteam-disjoint.dll dos not have a Linux equivalent (libagsteam-disjoint.so(32-bit, 64-bit)) available. I have 2 folders linux64 and linux32, and inside libagsteam.so libagsteam_api.so and libagsteam-32.so. I added them everywhere but without success  :(

It has to work somehow but how?  :-\
Truly, truly, i say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Re: Adding Achievements Using agsteam.dll
« Reply #8 on: 06 Oct 2019, 08:00 »
I'm using agsteam-disjoint, not the AGSteam2Client. Im getting the error: The plugin agsteam-disjoint.dll dos not have a Linux equivalent (libagsteam-disjoint.so(32-bit, 64-bit)) available. I have 2 folders linux64 and linux32, and inside libagsteam.so libagsteam_api.so and libagsteam-32.so. I added them everywhere but without success  :(

But you do not have the one that was mentioned in the error message ("libagsteam-disjoint.so") ?

Re: Adding Achievements Using agsteam.dll
« Reply #9 on: 06 Oct 2019, 08:27 »
No I dont have this one libagsteam-disjoint.so  :-\ Can I find it somewhere?  (roll)
Truly, truly, i say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Re: Adding Achievements Using agsteam.dll
« Reply #10 on: 06 Oct 2019, 09:28 »
I checked all AGS Games on Steam. All have no Linux version on Steam, except for Guard Duty, there is a Linux version on Steam. Does anyone know them and can ask them how they did it? The Linux version on Steam with achievements is important to me  :(
Truly, truly, i say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Re: Adding Achievements Using agsteam.dll
« Reply #11 on: 06 Oct 2019, 09:36 »
Unfortunately I do not know myself. But the creators of other games should be around, just wait for few days for them to notice and answer.

Or join Discord channel and try there: https://discordapp.com/channels/221047797292597249/221047797292597249

"Guard Duty" was made by Chicky, also may mention Wadjet Eye company's person Dave Gilbert, and Grundislav who also released multiple commercial games before.
« Last Edit: 06 Oct 2019, 09:38 by Crimson Wizard »

Re: Adding Achievements Using agsteam.dll
« Reply #12 on: 06 Oct 2019, 10:03 »
Ok, thank u  :) I will wait.
Truly, truly, i say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.