设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 63|回复: 0

[制作教程] Steam Integration and Achievements Tutorial (Tested on MV)

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    前天 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    4446

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    22899
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    28239

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    Setting up Steam Integration and Achievements


    Intro

    So... you’re planning on releasing your RPG Maker MV game on STEAM in this, the year of our lord 2025. Steam integration is turning out to be trickier than you expected, but you can’t say “no” to those sweet, sweet features. Being able to pull player data like their playtime or Steam username seem like neat lil’ tricks, but you’re after the holy grail. One of the most popular ways for gamers to track their progress through your game and for you to reward them for achieving the unlikely: STEAM ACHIEVEMENTS.

    Sadly, the guides you’re finding online are old, outdated or incomplete. The official page for OrangeGreenworks is down, there’s a ton of confusion about what versions of SDKs and NW.js you need and the instructions from various sources are conflicting and confusing.

    Does any of the above sound familiar? If you are struggling, as I did, with all of the above, then YOU, my friend, have come to the right place. After much, MUCH trial and error, I was able to get integration and Steam Achievements to work on my game and I will now pass my knowledge on to YOU!



    Questions you may have at this point:

    What is Steam Integration?


    It’s your game’s ability to “talk” with Steam. Once it’s working, you will be able to pull some data directly from Steam and have it function as a variable or text in your game. This will let you do neat little tricks like call the player by their Steam name. However, if you’re like me, the functionality you’re most interested in is having a Steam Achievement pop up for the player when they perform a specific action in your game. This will require you to set up “Steam Integration”.

    Does my game need to be published/uploaded on Steam to do this?

    The short answer is NO, since you can run a local test to confirm that your game is, in fact, trying to pull data from Steam (you can test this by creating a dummy data file, I will explain later), but ultimately, to actually confirm that integration is working and to test if your achievements pop up on Steam, YES, you will need to already have your game uploaded to Steam.

    How do I get my game on Steam?

    NOPE. This guide will not be covering that. The short version is you have to pay $100 (as of the time of writing) and go through Steam’s many requirements to get your page created, your game tested, approved by Valve and published. I will not be touching on practically any of that, as I feel like there is plenty of information online on this topic, far more than I could find on the actual setting up of Steam Integration. This also goes for “creating the achievements” themselves on Steam.



    Quick rundown:

    There are 5 major components that are required in order for this to work and they all need to be both the right “versions” and "set up correctly". Any error with versions or installation of ANY component is very likely to result in one of countless errors or failures. Thankfully, I have done a lot of the legwork so you don’t have to! The components you'll need are:


    • The correct version of each OS “Node” (various .node files).
    • The OrangeGreenworks plugin (JS file).
    • The correct version of Greenworks (JS file).
    • The correct version of Steam’s SDK files (many files in this folder would normally need to be moved to a “lib” folder in your game files to allow for integration).
    • The correct version of the NW.js (.exe file)


    Credit to all those who did work, without which I would not have been able to implement integration.


    • Thanks to KillerGin for creating a great guide in 2021: Setting up STEAM Integration in RPG Maker MV

      This is a great starting point as it covers how you would normally obtain and install all the files you need. I believe it is just somewhat outdated since I tried the versions he recommends and it did not work for me. Thanks to LandsharkRAWR, however, for commenting on this thread and advising that he was able to succeed by using these versions: NWjs 49.1, steam SDK 1.43 and greenworks v83. Those versions worked for me and they’re the ones we will be using in this guide.
    • Thanks to Hudell for creating the OrangeGreenworks plugin and its guide: OrangeGreenworks - Steam Integration with Achievements and Time Log

      Unfortunately, the link to the plugin is down as is the site where the instructions are hosted! Bummer! But thankfully, both have been saved locally and I will be providing them to you.


    **Pre-Guide Disclaimer**


    Before diving in, ***BACK UP EVERYTHING***

    I cannot stress this enough; I am not responsible for any damage you cause to your own game or computer by following these instructions. They worked for ME on a Windows operating system, but I recommend you back up the entirety of your project to a safe location, ideally, both on your local computer and a second location (a cloud service or maybe an external drive) before attempting.

    This includes both your project folder as well as your RPG Maker MV local files since this process will require adjustments to both.

    You are proceeding with these instructions at your own risk!




    ------- The Guide -------


    Alright, with the disclaimer and credits out of the way, let us begin.


    I. Downloads

    Normally, you would start by locating and downloading:

    • NW.js version 49.1
    • Steam’s SDK package version 1.43 (contains necessary .node and api files)
    • Greenworks version 83
    • The OrangeGreenworks plugin
    Lucky for you, I have placed everything here: Incredibly Convenient WinRar File

    1) So, the first step is to click the link just above this line and extract the file you receive. You should now have a folder called “PlayGG.Docs_STEAM_Integration_Bundle”.

    You’re welcome.


    II. Update your NW.js file

    ***SERIOUSLY, CREATE BACK UPS***
    Again, I strongly recommend you back up both your project folder and your RPG Maker local files before attempting these changes. That way, if anything goes wrong, you can just restore your backup folders and avoid any potential issues

    ***COMPATIBILITY WARNING***
    This process WILL REQUIRE you to update the local files in RPG Maker, specifically, the NW.js files. Some users have reported performance issues, particularly with some plugins when updating their NW.js files. I have not encountered any performance issues but I cannot speak to its universal compatibility with any plugins you may be using. If you start experiencing performance issues, restore the local folders to their original backups and again, proceed at your own risk.


    1) Right click your RPG Maker MV game in Steam and click PROPERTIES > INSTALLED FILES > BROWSE
    2) Navigate to the nwjs-win folder
    3) Move the “www” folder and the “package” file (place them on your desktop or another folder, you will need them again           shortly).
    4) Delete all other files in the nwjs-win. It should now be empty.
    5) From the file I provided and you extracted, locate the “nwjs-sdk-v0.49.1-win-x64” folder
    6) Copy all files and folders from the “nwjs-sdk-v0.49.1-win-x64” folder into the “nwjs-win” folder.
    7) Move the “www” folder and the “package” file you removed in step “3” back into the nwjs-win folder.
    8) Rename the “NW.js” file to “Game”. (NOTE - This should be an executable file, so if you are displaying extensions, make sure its “Game.exe”. - I believe this name IS case sensitive since Steam's search for the executable file is case sensiti)
    9) Delete the “chromedriver” file from this folder. (This is a file that is only needed for the editor playtest functionality, so it           does not need to be in this folder. However, there will be copy of it will be in the nwjs-win-test folder).
    10) Back out of the "nwjs-win" folder and locate the “nwjs-win-test” folder.
    11) Delete all its contents (nwjs-win-test folder contents).
    12) Copy and paste all the contents in the nwjs-sdk-v0.49.1-win-x64 folder into the “nwjs-win-test” folder.
    13) Rename the NW.js file to “Game”. (Again, make sure it is being recognized as an executable file).

    Having trouble so far?
    If you are struggling or more of a visual learner, please have a look at KillerGin’s instructional video here: Dramatically Improve RPG Maker MV (and MZ) Games
    This time-stamped link already starts at the 3:40 mark which is when he covers how to replace the files in the nwjs-win and nwjs-win-test folders. Everything after the 8:30 mark in his video is irrelevant to this guide. He will also show you how to confirm your update worked in the editor Playtest engine, but keep in mind that the version you will see is 49.1, not 50.2 like he does in the video.


    Congratulations. You have now updated your NW.js and related files in you RPG Maker MV local folders. This by itself should help improve performance in RPG Maker. Moving on…


    III. Setting up the "LIB" folder and Greenworks file

    1) Navigate to your project folder. This is the folder that contains your project’s “Game” file and is usually located here:                  C:\Users\YOUR_USER_NAME\Documents\Games\YOUR_GAMES_NAME
    2) From the file I provided and you extracted, locate the “lib” folder. Copy and paste it (the entire lib folder) into this folder. It should be on the same level/folder as your “Game” file.
    (Note – One of the more time-consuming parts of this process was wrangling everything that needs to be in the lib folder from its original location. This includes several node and api files which must be pulled from various locations housed in the 1.43 SDK folder. I have already set up the lib folder with all its needed files for your convenience.)
    3) From my provided files, also locate the “greenworks.js” file. Copy and paste it into the same folder (not IN the lib folder, but on its same level). Yes, it’s an odd spot for a .js file.

    Your game folder should now contain your Game file, the lib folder, the greenworks.js file as well as various other files and folders. Moving on…

    IV. Setting up the OrangeGreenworks plugin

    1) From my provided files, locate the orangegreenworks.js file
    2) From your game folder, navigate to the js > plugins folder. Copy and paste the orangegreenworks.js plugin here with your       other plugin files
    3) Launch RPG Maker MV, click on your plugins and add/enable your new plugin. It should ideally be placed at the bottom of       your plugin list. Make sure you set it to ON.

    I am assuming you are familiar with adding plugins at this point, so I didn’t go into too much detail here. Moving on…


    Quick break

    I would take a moment to playtest your game for a second just to make sure everything still seems normal. Maybe walk around, get into a battle… we probably don’t want to keep going if you’re experiencing any compatibility issues at this point. If you do encounter any weirdness, I would recommend replacing your game folder as well as your RPG Maker local files with the backups you created before starting this guide. (YOU BACKED THEM UP, RIGHT!?)

    On the other hand, if everything is working as expected then CONGRATULATIONS! You have no idea how hard it was for me to make it to this point. Or since you’re here, maybe you do? Let’s move on to the final steps!


    V. Deploy your game and modify your deployed game files

    1) Deploy your game. (I assume you’re familiar with this process but just in case, make sure you don’t use the “exclude unused files” option. I would recommend encrypting since you probably don’t want Steam users going through all your game files, right?)
    2) Then navigate to the deployed folder. Verify that there is a “lib” folder and that it contains the “greenworks.js” file.
    3) Outside the www folder, delete everything except for the package.json file (and the www folder itself).
    4) In files I provided, locate the “nwjs-sdk-v0.49.1-win-x64”. Copy and paste all of its contents into your deployed game folder. (Only its contents, not the folder itself).
    5) (For testing) Create a text file (using Notepad) called “steam_appid.tx”. The contents of this text file should be your game’s App ID. This can normally be viewed on your Steam Developer page. It typically ends with zero. This file is only needed for testing purposes, when you send your game to steam’s servers, you don’t need to include it.
    6) Rename the nw.js file to “Game”. (Again, assuming “Game” is the file you’ve programmed Steam to look for).

    You may now double-click the Game file to playtest your game. Note that it will not launch if you do not create the text file mentioned on step 5, but that file is not necessary for deployment onto Steam.


    Quick note on OrangeGreenworks plugin

    In the included files, you will find one called “Steamworks Manual”. These are the creator’s instructions on how to install and use the OrangeGreeworks plugin. We have already covered all the installation stuff but you may want to review it for instructions on using the plugin itself. Some important script commands include:

    OrangeGreenworks.getScreenName();

    This script call will return the Player’s Steam Screen Name. While playtesting, it will return “Play Test” instead.

    OrangeGreenworks.activateAchievement('ACHIEVEMENT_NAME');

    This script call will activate an achievement called ACHIEVEMENT_NAME. While playtesting, it will only display a message on the console indicating that the achievement was activated.


    VI. Deploy to Steam and test!

    Once you are satisfied with local testing, you may delete the “steam_appid.tx” file and upload your game to Steam. Hooray!

    Now as you may have surmised, Achievements need to be set up in Steam and assigned a specific name. Then, you can run scrip commands in your game that call that specific name and as long as you’ve followed these instructions, integration should be active and your game should be able to “talk” to Steam. For example, if you make an achievement on Steam called “ACH_Beat_Level_1”, then performing the script call

    OrangeGreenworks.activateAchievement('ACH_Beat_Level_1');


    will prompt the achievement to pop up on Steam and award it to the player’s profile.


    What do you mean just "Deploy to Steam and test!?"

    Sorry friends, this guide will not delve into how to upload your game onto Steam or how to set up achievements there because, as with creating a Steam page, I feel there is plenty of documentation out there that will guide you. Figuring those things out was nothing compared to getting integration set up, so if integration is now working for you, you’ve conquered one of the hardest parts. Well done!

    I believe that most people that end up here have already figured out Steam page publishing and game uploading, so I have decided to keep the scope of this guide focused on specifically Steam Integration.

    If you're struggling to set achievements up in Steam itself, I highly recommend this AuroDev video that covers it in great detail:
    How to Add Achievements to Your Game



    Outro / Shameless Plug

    Well friends, what an adventure we’ve had. I hope you found this guide helpful! Best of luck in your RPG Maker and GameDev journey and I look forward to seeing what great games you all come up with, hopefully now featuring Steam achievements!

    Speaking of cool Steam games with Achievements, please check out my upcoming release, PIXEL PIXIE which will be releasing in the next few weeks!



    Thank you and happy game-making to all!


    本贴来自国际rpgmaker官方论坛作者:PlayGG_Doctor处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/steam-integration-and-achievements-tutorial-tested-on-mv.175030/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-7-14 14:20 , Processed in 0.065831 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表