One of the challenges of using a game creation engine –even one as scriptable as RPG Maker– is interacting with various external social gaming software. In our case, getting Achievements to work in Steam was very difficult. The Steam API is written in C++, while RPG Maker games (VX, VX-A) run in Ruby.
Download and License
The source code for Alistel is located here:
…and the latest compiled DLL is here:
Alistel is provided under the open-source BSD license:
…with the additional request from White Giant RPG Studios, LLC:
“Please only use Alistel to manage achievements for games that you have developed. Please don’t use it to meddle with achievements in other Steam games.”
Keep in mind that, as a Steam developer, you will also be bound by whatever agreement you signed with Steam (which is a lot stricter than the BSD license).
How To Use It
Download Alistel.dll and put it in your game’s main folder. You will also need a plain text file called “steam_appid.txt” that contains your game’s APPID. Finally, you’ll need “steam_api.dll” from the Steam Workshop page:
(from the .zip, it’s in sdk\redistributable_bin\).
Now, open up your game in RPG Maker. Open the Script Editor (F11), and go down to the final script, called “Main”. At the very top (before the “begin” main loop), add the following:
FnSteamInit = Win32API.new("Alistel.dll", "steam_init", "v", "i")
FnSteamAchievement = Win32API.new("Alistel.dll", "steam_sync_achievement", "p", "i")
FnSteamNumEarnedAchieves = Win32API.new("Alistel.dll", "steam_get_num_earned_achieves", "v", "i")
Next, add an event with the following event code:
amt = FnSteamNumEarnedAchieves.call()
$game_variables = amt
Your game has \v achievements.
Run the game, and you should see the immediate results:
If you see “0”, then:
1. Make sure Steam is running.
2. Close and re-open the game.
a. The very first time you load the game, Steam might take some time to cache the achievement data. Just close and re-open the game.
Next, add another event, with the following event commands, but replace “MyAchievement1” with the name of an actual achievement in your game:
Wait: 1 frame
You got an achievement!
Run your game, and you should see:
Pretty simple, right?
If things just aren’t working, try looking at the file “steam_log.txt” in your game’s project directory. Alistel will (try to) write helpful debug messages here.
Building from Source
If you want to add more functionality to Alistel, you’ll need to build it from source. To do that, you’ll need to clone the repository:
git clone firstname.lastname@example.org:sethhetu/alistel.git
…or, if you don’t want to install git, you can just click “Download Repository” from the project page, and unzip it:
You’ll also need Visual Studio Community Edition, 2015 or later:
Finally, you’ll need the latest Steam API, from:
Extract the “sdk” folder from the .zip file into “Alistel/steamworks”.
Now, double-click “Alistel.sln” to open the project. At the top of the screen, you’ll see “Debug” or “Release”, and “x86” or “x64”. Make sure it says “Release” and “x86”, like so:
You can click on “Build -> Rebuild Solution” to get a new DLL in “Alistel/Release”.
Moving On From Here
Hopefully, this is enough to get you started adding a simple set of achievements to your game. For RPG Maker games, there’s lots of scripts that can make Achievements look even nicer in-game. And the Steam API has a lot of additional functionality that you could add to Alistel.
We at White Giant RPG Studios, LLC would encourage you to donate your tools and libraries to the community, in the same way that we’ve donated Alistel. Developing games is less frustrating if we work together!Share