Mittens 2018 will be in Boston this September. There are three spaces left, so check out the thread for details!

Author Topic: ENGINE PLUGIN: AGSteam v3.3 - Steam overlay and keyboard input fix 15 Oct 2017  (Read 34833 times)

Calin Leafshade

  • AGS Project Tracker Admins
  • Long live King Cat!
    • I can help with making music
    •  
    • I can help with voice acting
    •  
    • Calin Leafshade worked on a game that was nominated for an AGS Award!
      Calin Leafshade worked on a game that won an AGS Award!
Re: ENGINE PLUGIN: AGSteam - Steam integration, simplified!
« Reply #20 on: 09 May 2013, 22:04 »
This is what is commonly known as "putting the cart before the horse"

Re: ENGINE PLUGIN: AGSteam - Steam integration, simplified!
« Reply #21 on: 09 May 2013, 22:10 »
This is what is commonly known as "putting the cart before the horse"
Yes, so then I can add all the needed Steam Features (achievements, leaderboard things, etc.) before Greenlight. Meaning that if it is greenlighted, it can be on steam instantaneously.

monkey0506

  • AGS Project Tracker Admins
  • Tasting the banhammer. Strangely, tastes like ham.
MORE THAN 120 DAYS LATER, I finally updated the link. By popular demand, in fact. It seems quite a few people are getting their games accepted now through the Greenlight process.

Functions of the current version of the plugin:
Code: Adventure Game Studio
  1.   ///AGSteam: Returns the requested Steam stat, or 0.0 on failure.
  2.   float AGSteam.GetAverageRateStat(const string steamStatName);
  3.   ///AGSteam: Returns the requested Steam stat, or 0.0 on failure.
  4.   float AGSteam.GetFloatStat(const string steamStatName);
  5.   ///AGSteam: Returns the requested Steam stat, or 0 on failure.
  6.   int AGSteam.GetIntStat(const string steamStatName);
  7.   ///AGSteam: Returns whether or not the Steam client is running and initialized.
  8.   bool AGSteam.Initialized;
  9.   ///AGSteam: Returns whether the specified Steam achievement has been achieved yet.
  10.   bool AGSteam.IsAchievementAchieved(const string steamAchievementID);
  11.   ///AGSteam: Resets a specific Steam achievement. Returns false upon error.
  12.   bool AGSteam.ResetAchievement(const string steamAchievementID);
  13.   ///AGSteam: Resets all Steam stats.
  14.   void AGSteam.ResetStats();
  15.   ///AGSteam: Resets all Steam stats and achievements.
  16.   void AGSteam.ResetStatsAndAchievements();
  17.   ///AGSteam: Marks the specified Steam achievement as achieved.
  18.   bool AGSteam.SetAchievementAchieved(const string steamAchievementID);
  19.   ///AGSteam: Sets the specified Steam stat to the given value.
  20.   bool AGSteam.SetFloatStat(const string steamStatName, float value);
  21.   ///AGSteam: Sets the specified Steam stat to the given value.
  22.   bool AGSteam.SetIntStat(const string steamStatName, int value);
  23.   ///AGSteam: Sets the specified Steam stat using the given values.
  24.   bool AGSteam.UpdateAverageRateStat(const string steamStatName, float numerator, float denominator);
User was banned for this post.

monkey0506

  • AGS Project Tracker Admins
  • Tasting the banhammer. Strangely, tastes like ham.
This is what is commonly known as "putting the cart before the horse"
Yes, so then I can add all the needed Steam Features (achievements, leaderboard things, etc.) before Greenlight. Meaning that if it is greenlighted, it can be on steam instantaneously.

Sorry I never replied to this before, but Calin was actually quite right on this one. You could come up with the ID names you want to use for your achievements, but every single function call you make through the plugin would fail until you have an entry in the Steam store (which, obviously, occurs prior to release on Steam). Granted, you've probably figured this much out by now, but I'm writing mostly to anyone coming along with the same ideas. Until your game has already been Greenlit, this plugin will do nothing for you. Literally all it does is place a few calls to Steam's servers, so if your game isn't there, if your achievements aren't there, then the request will fail.
User was banned for this post.

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Is there a #macro defined in the plugin so that it's possible to simply enable or disable it in AGS' script?
 

monkey0506

  • AGS Project Tracker Admins
  • Tasting the banhammer. Strangely, tastes like ham.
Yeah, forgot to mention it, but it's AGSteam_VERSION. Defined if the game is compiled with the plugin, otherwise it's not.
User was banned for this post.

monkey0506

  • AGS Project Tracker Admins
  • Tasting the banhammer. Strangely, tastes like ham.
I'm bumping this for the latest version. In addition to the methods I mentioned previously, this version includes the following:

Code: Adventure Game Studio
  1. enum AGSteamScoresRequestType
  2. {
  3.   eAGSteamScoresRequestGlobal, // used to request global leaderboard scores
  4.   eAGSteamScoresRequestAroundUser, // used to request leaderboard scores around the player's best score
  5.   eAGSteamScoresRequestFriends // used to request leaderboard scores for the player's Steam friends
  6. };
  7.  
  8. ///AGSteam: Returns the value of a global Steam INT stat
  9. static int AGSteam.GetGlobalIntStat(const string steamStatName);
  10. ///AGSteam: Returns the value of a global Steam FLOAT stat
  11. static float AGSteam.GetGlobalFloatStat(const string steamStatName);
  12. ///AGSteam: Returns the name of the current leaderboard (call FindLeadboard first)
  13. readonly static String AGSteam.CurrentLeaderboardName;
  14. ///AGSteam: Requests to load the specified Steam leaderboard. This call is asynchronous and does not return the data immediately, check for results in repeatedly_execute.
  15. static void AGSteam.FindLeaderboard(const string leaderboardName);
  16. ///AGSteam: Uploads the score to the current Steam leaderboard. Returns false if an error occurred.
  17. static int AGSteam.UploadScore(int score);
  18. ///AGSteam: Downloads a list of ten scores from the current Steam leaderboard.
  19. static int AGSteam.DownloadScores(AGSteamScoresRequestType);
  20. ///AGSteam: Returns the name associated with a downloaded score. Call DownloadScores first.
  21. readonly static String AGSteam.LeaderboardNames[];
  22. ///AGSteam: Returns a downloaded score. Call DownloadScores first.
  23. readonly static int AGSteam.LeaderboardScores[];
  24. ///AGSteam: Returns the number of downloaded scores (if any). Call DownloadScores first. Max is 10 scores.
  25. readonly static int AGSteam.LeaderboardCount;
  26. ///AGSteam: Returns the current game language as registered by the Steam client.
  27. static String AGSteam.GetCurrentGameLanguage();
  28. ///AGSteam: Returns the Steam user's username.
  29. static String AGSteam.GetUserName();

The biggest difference here is support for Steam leaderboards. Again, feel free to ask if further explanation is required for usage.
« Last Edit: 25 Mar 2014, 03:26 by monkey_05_06 »
User was banned for this post.

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
There seem to be a custom made version for linux.
https://github.com/onitake/agsteamstub
Don't know which functionality it replicates, but apparently it makes it possible to run steam version of Heroine Quest.
In theory this will also make possible to run any other game that requires AGSteam plugin.

monkey0506

  • AGS Project Tracker Admins
  • Tasting the banhammer. Strangely, tastes like ham.
Re: ENGINE PLUGIN: AGSteam - Now for Linux! - 2 April 2014
« Reply #28 on: 03 Apr 2014, 04:05 »
Seeing as any games distributed via Steam for Linux will likely have achievements and so forth, it's better to use the official shared libraries for Linux, now that I've made them available. I was working on it back in December but lost track of the files, and in the meantime forgot how rpath works. Now that I got that all sorted out, everything appears to be working (tested on Linux Mint 15). You can thank Mark Lovegrove for breathing down my neck on that one. (nod)



5 April 2014 - Recent changes to the plugin made it possible to crash the game if the Steam client wasn't loaded, which was a major regression from previous versions. That is fixed in both the Windows and Linux versions.
« Last Edit: 05 Apr 2014, 09:00 by monkey_05_06 »
User was banned for this post.

There seem to be a custom made version for linux.
https://github.com/onitake/agsteamstub
Don't know which functionality it replicates, but apparently it makes it possible to run steam version of Heroine Quest.
In theory this will also make possible to run any other game that requires AGSteam plugin.
Hi, I'm the author of that plugin.

I apologize for not discussing my intention to write a replacement to the "real" AGSteam beforehand, I wasn't sure how far I would get and if it would actually work out.
It probably would have been better to ask the developers of Heroine's Quest for a Steam-free version instead, but well, I also wanted to learn a bit about programming for AGS myself, so I just went ahead and started replicating the functionality of your plugin.

Since I got everything working quite quickly, I decided to just stuff the code on my github and post a note on the Steam forums. There doesn't seem to be much interest so far, I guess I'm filling a bit of a niche here.
I also posted an update today that stores the statistics and achievements to disk and loads them on startup.

I'm a bit unsure of how to proceed now. Do you think I should rather take the repository down? Or maybe release a binary-only plugin that will only work with Heroine's Quest? Maybe I should ask the developers to make a Linux version lacking Steam integration available on their website... Or is it ok for you if I keep the code publicly available?

monkey0506

  • AGS Project Tracker Admins
  • Tasting the banhammer. Strangely, tastes like ham.
Re: ENGINE PLUGIN: AGSteam - Now for Linux! - 5 April 2014
« Reply #30 on: 07 Jun 2014, 05:01 »
You authored that code yourself, and it doesn't reference the Steamworks API, so I have no issues with you leaving the code public. Bear in mind that the Steam for Linux version of AGS games uses the original Windows EXE (meaning, no DRM) and there are official versions of the AGSteam plugin available for Linux. If you want to include other features in your stub then feel free -- I can't tell you what to do with your own code. By comparison, if the Steam client isn't running then the official AGSteam plugin functions should all be no-ops.
User was banned for this post.

Re: ENGINE PLUGIN: AGSteam - Now for Linux! - 5 April 2014
« Reply #31 on: 29 Dec 2014, 12:19 »
hi monkey,

the Link in the fist post of the thread is down, and I would really like to play "The Cat Lady" with achivements. Can you upload the libagsteam (I specifically need the Linux version) plugin with SteamWorks integration again please?
Thanks for your help and support!

Edit: Ok. I took the library from The Samaritan Paradox for now. This one works!
« Last Edit: 29 Dec 2014, 16:39 by huhn_m »

monkey0506

  • AGS Project Tracker Admins
  • Tasting the banhammer. Strangely, tastes like ham.
Re: ENGINE PLUGIN: AGSteam - Now for Linux! - 5 April 2014
« Reply #32 on: 31 Dec 2014, 16:57 »
Yes, unfortunately I think I lost my hosting I was using. Haven't really decided what I'm going to do about it yet. May be time to start using my agser.me account...

In any case, I can put up a temporary link if anyone needs it.
User was banned for this post.

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Dualnames worked on a game that was nominated for an AGS Award!
      Dualnames worked on a game that won an AGS Award!
Re: ENGINE PLUGIN: AGSteam - Now for Linux! - 5 April 2014
« Reply #33 on: 01 Jan 2015, 02:01 »
Not to be the dick, but please do so, otherwise, I'm going to lock this, same thing happened to the lua topic. If you have the files and send them over to me, I can host them both on my agser.me account and my personal hosting at primordia-game.com which i've paid for a couple of time.
No more military army stuff. I'm alive and back.

monkey0506

  • AGS Project Tracker Admins
  • Tasting the banhammer. Strangely, tastes like ham.
Re: ENGINE PLUGIN: AGSteam - Now for Linux! - 5 April 2014
« Reply #34 on: 17 Jan 2015, 00:43 »
Dunno why it didn't occur to me before, but since this has an official (non-functioning) open-source stub, I have now uploaded the binaries for the FULL (functional) AGSteam via the stub's downloads page. The DLL is for Windows, of course, and the two SO files are for Linux (the ".32" version being the 32-bit variant, the other being the 64-bit variant).
User was banned for this post.

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
    • Dave Gilbert worked on a game that was nominated for an AGS Award!
      Dave Gilbert worked on a game that won an AGS Award!
Re: ENGINE PLUGIN: AGSteam - Now for Linux! - 5 April 2014
« Reply #35 on: 05 May 2015, 21:33 »
Hi all. Does this plugin work in 3.3? I've imported it into Technobabylon but when I try to run the game it gives me an illegal exception error.

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: ENGINE PLUGIN: AGSteam - Now for Linux! - 5 April 2014
« Reply #36 on: 06 May 2015, 09:45 »
Hi all. Does this plugin work in 3.3? I've imported it into Technobabylon but when I try to run the game it gives me an illegal exception error.
It should, "Heroine Quest" was made using 3.3, and it uses this plugin.
What OS do you have this error at? What version of AGS precisely?

monkey0506

  • AGS Project Tracker Admins
  • Tasting the banhammer. Strangely, tastes like ham.
Re: ENGINE PLUGIN: AGSteam - Now for Linux! - 5 April 2014
« Reply #37 on: 06 May 2015, 21:26 »
Not sure when Dave posted this, but I was chatting with him yesterday and the error seemed to be that he had the wrong version of the Steam API DLL (steam_api.dll) from what the plugin was built against. When I have time I will be sure to download the latest Steamworks and do fresh builds.

He also mentioned that once he sorted that out there were some achievement issues, but as CW said, other games have been released on AGS 3.3 with this plugin, so that could also be related to out-of-date builds. Will update ASAP.
User was banned for this post.

Re: ENGINE PLUGIN: AGSteam - Now for Linux! - 5 April 2014
« Reply #38 on: 09 May 2015, 21:00 »
Has this been tested to work with ags 3.2.1?
« Last Edit: 09 May 2015, 21:18 by WillG »

Re: ENGINE PLUGIN: AGSteam - Now for Linux! - 5 April 2014
« Reply #39 on: 25 May 2015, 03:24 »
Not sure when Dave posted this, but I was chatting with him yesterday and the error seemed to be that he had the wrong version of the Steam API DLL (steam_api.dll) from what the plugin was built against. When I have time I will be sure to download the latest Steamworks and do fresh builds.

He also mentioned that once he sorted that out there were some achievement issues, but as CW said, other games have been released on AGS 3.3 with this plugin, so that could also be related to out-of-date builds. Will update ASAP.

Is it going to be suitable for AGS 3.4.0.x ? I mean after you update your Steam builds.
Proximity Entertainment