Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.
Original Source
- Original title: Advanced users tutorial: Unlockable Steam achievements
- Original author: Tuomo L
- Original date: September 21, 2018
- Source thread: https://forums.rpgmakerweb.com/threads/advanced-users-tutorial-unlockable-steam-achievements.100313/
- Source forum path: Game Development Engines > Visual Novel Maker Directory > Visual Novel Maker Tutorials
Summary
Warning, this is for advanced users only. This is NOT a plug and play, you do need to know what you're doing or else your achievements won't work. If you still need help setting this stuff up and cannot make this on your own, I can offer assistance with my publisher services Prequisities Steam Appid for your VN which you can pay for at Steamworks (Costs about 80€).
Archived First Post
Warning, this is for advanced users only. This is NOT a plug and play, you do need to know what you're doing or else your achievements won't work.
If you still need help setting this stuff up and cannot make this on your own, I can offer assistance with my publisher services
If you still need help setting this stuff up and cannot make this on your own, I can offer assistance with my publisher services
Prequisities
- Steam Appid for your VN which you can pay for at Steamworks (Costs about 80€).
- Active Steam account with which to test your achievements on
- Understanding of Steamworks, depots and branches, this is not a tutorial how to setup your game on Steam
- Understanding of at least basic levels of Javascript for debug purposes
- Understanding of basic computer terminology such as root folder
Preparations
Download the following zips
- https://dl.nwjs.io/v0.26.6/ <- Pick SDK version for the OS that you use. The SDK will be used to test your achievements and functionality, when actually releasing your games you want to use the regular version instead.
- https://github.com/greenheartgames/greenworks/releases <- Pick the 0.266.6 version for the OS that you use
- Steamworks SDK version 1.41 <- You can find this when you become steam partner under "View SDK change notes"
Error Check: Make sure you don't have brackets in your api name.
Scripting
Make a new Coffee Script in your VN, call it "Achievements" or something as equally easy to identify. Copy and paste this code exactly as is.
Code:
greenworks = (require||requireNode)("./greenworks")
greenworks.init()
Next, go to the scene where you want to insert your achievement. For purposes of the test, we'll go to the very first scene, at the top of the load order. Now, use script call and use
Code:
greenworks.activateAchievement("Test", function() { console.log("Success!")}, function(err) { console.log(err) })
You replace "Test" with the name of Api name you have setup in the previous step.
Error check: Make sure you have quotation marks in the script call around your achievement's Api name.
Export project
Now export your project as you normally would. Then go to the exported folder and do the following
- Replace all files with the ones from your downloaded Nw Js version. Delete Game.exe
- Export the contents of greenworks into the root of the exported folder
- Open your Steamworks SDK and go to redistributable bin. Go into the folder of the OS you run and copy the contents in the lib folder of your exported project's root folder that contains greenworks node file.
- From the SDK, go to public->Steam->lib->your OS-> and copy all the files inside to the place with greenworks node.
Error check: Make sure you have extensions visible and that your full text file name with extensions should be "steam_appid.txt"
Testing the project
Run nw.exe and press F12.
Run the following console command
Code:
console.log(greenworks.getAppId())
Make sure the AppId is correct, if it is not you need to go back and check your steps, you've done a goof somewhere.
Next, start a new game while still having the console window open. It should tell you "Success!" but if it says anything but that, you need to address the issue.
If you now go to your Steam library and check the game out, it should tell you that you've gotten the achievement. Congratulations, you've done it! Now, all you need is copy the rest of the achievements and set each of them the same way.
Downloads / Referenced Files
Log in to download
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadCreator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
0
replies
1
view
Topic Summary
Loading summary...