Setting up STEAM Integration in RPG Maker MV (using updated NW.js, super high performance)!

● ARCHIVED · READ-ONLY
Started by KillerGin 50 posts Page 1 of 3 View original ↗
  1. Hello everyone!

    It's not easy to set up STEAM integration into RPG Maker MV. Who doesn't want to setup STEAM achievements, call players by their STEAM name, OR check to see if they have DLC installed (these are the things I set up in my game, I'm sure there is more you can do)

    However, the original guide seems a bit complicated and... only updating to NW.js 33.3 is a bit low, let's update that bad boy to NW.js 49.2 so we can experience a massive performance upgrade to the game while STILL integrating STEAM functionality (We will support PC, Mac and Linux!)!

    The trick with this is that the..... NW.js, Greenworks.js, Greenwork Nodes, and your STEAM SDK must be all paired correctly.

    So this guide is created to work with
    1) NW.js 49.2
    2) Steam sdk 1.5
    3) OrangeGreenworks.js (Plugin for MV)
    4) Greenworks Nodes (For NW.js 49.2)
    5) Greenworks.js

    ////////////////////////////////////////////////////

    BEFORE YOU START BACK UP EVERYTHING! (BACK UP A COPY OF YOUR GAME BEFORE YOU START)

    ** You do NOT have to update the NW.js if you don't want to, though the exact versions of the files you grab have to be different. (Greenwork nodes and possibly STEAM SDK). I highly recommend updating NW.js due to the massive performance gain.


    1) Update your NW.js here (Get version 49.2, follow the guide):
    Link: https://forums.rpgmakerweb.com/inde...e-game-performance.131620/page-4#post-1156268

    2) Download STEAM SDK here (get version 1.50):
    Link: https://partner.steamgames.com/downloads/list

    3) Get OrangeGreenworks Plugin here:
    Link: https://forums.rpgmakerweb.com/inde...gration-with-achievements-and-time-log.59469/

    (If the link is gone for the MV plugin, you can look through the Comments, starting from the latest back to find a pasted copy, or bug the creator for a fixed link lol)

    4) Get the proper Greenworks Nodes here (Put Cursor above Version and make sure its version 0.49.2)!
    Link: https://greenworks-prebuilds.armaldio.xyz/

    You may have to play around with the "Search" properties on the left to find the proper versions. Get the following
    a) greenworks-linux32.node
    b) greenworks-linux64.node
    c) greenworks-osx64.node
    d) greenworks-win32.node
    e) greenworks-win64.node

    5) Get the proper Greenworks.js file here. (You can download one of these, why not the latest 33.3 and just take out the "greenworks.js" that comes with it. I believe they are all the same. "greenworks-v0.14.0-nw-v0.33.3-win-x64.zip", the rest, discard)
    Link: https://github.com/greenheartgames/greenworks/releases

    ////////////////////////////////////////////////////

    So now that you updated your NW.js to 49.2 (49.2 is the latest version that supports all 3 platforms PC, Mac, and Linux)
    and downloaded all the necessary files, all you need to do is place the files in the proper locations.

    1) Enable the OrangeGreenworks plugin in your RPG Maker MV game via the plugin manager (place in your js folder, etc).

    2) Drop the greenworks.js file in the top most folder of RPG Maker MV. (yes a weird place, the top most folder where your Game.rpgproject file is located.)

    3) In the same location of the greenworks.js create a brand new "lib" folder

    4) In the newly created lib folder, place the 5 downloaded greenworks nodes.

    5) Now you need to put the STEAM SDK files into the lib folder..... These are where you need to grab the files:

    a) Open the STEAM SDK:
    Public -> STEAM -> Lib

    You will see all the platform folders, take everything out these folders, and put the files into your new "lib" folder. (Not the folders, open folders and just drop files into "lib" folder, your lib folder will not have any folders inside it, just files.)
    (WARNING! For Linux 64 bit, you have to manually add "64" to the end of the file name or it will overwrite the 32 bit version)

    b) Open the STEAM SDK:
    Open redistributable_bin folder

    Grab both steam_api files (2 files hanging around), and again, dump the contents of all folders, the platform folders, into your new "lib" folder (Not the folders, open folders and just drop files into "lib" folder, your lib folder will not have any folders inside it, just files.)
    (WARNING! For Linux 64 bit, you have to manually add "64" to the end of the file name or it will overwrite the 32 bit version)

    ////////////////////////////////////////////////////

    Thats it! You are done! YAY!

    When you check the console f8 (when you launch the game in the editor) you should see that the plugin will show your STEAM Name in the console which means everything is working (it will do this automatically)! Now for STEAM achievements you have to set the achievements up through STEAM Works, give them a name, and just call them by name.

    So the following STEAM calls are possible (and more!):

    STEAM Achievement example: "OrangeGreenworks.activateAchievement('Name of achievement');"

    STEAM Screen Name example (save to variable): "$gameVariables.setValue(209, OrangeGreenworks.getScreenName());"

    STEAM DLC check (save to switch): "$gameSwitches.setValue(257, OrangeGreenworks.isDLCInstalled(APPIDNUM));"

    Etc!

    ////////////////////////////////////////////////////

    To get the most out of your game, be sure to check out my second guide, the GPU optimization guide:
    link: https://forums.rpgmakerweb.com/inde...d-mz-second-big-discovery-gpu-related.131957/
  2. Thanks, Freddie. I appreciate this. Wouldn’t mind a video tut as I’m one of those who learn better that way.

    Quick question: do I NEED to update nw.js? I tried it but didn’t notice a difference for me and ultimately changed it back to default.
  3. You dont have to update the NW.js....

    BUT the files, the versions of them, have to match.

    The NW.js has to match the greenwork nodes and.... I believe they have to match with the version of STEAM used.

    So if you dont update and use the default NW.js version 29.4, you have to use the correct versions of NW.js, Nodes, STEAM SDK, etc.
  4. Thanks Freddie. Much appreciated. Take care; stay safe.
  5. This is just what I was looking for. I was struggling to make Steam Achievements work. Thanks a lot!!!

    But while I was trying to make the plugin work after all the steps, I got an error message.


    I updated NW.js to 49.2 by following almost all the steps in this link:
    https://forums.rpgmakerweb.com/inde...e-game-performance.131620/page-4#post-1156268
    (except the osx-test part because as you mentioned in the reply I couldn't find that folder)


    Now my game folder looks like this:
    Game folder
    캡처2.JPG


    And my lib folder:
    lib folder
    캡처3.JPG


    And I activated the plugin(I put it on the top in case):
    Activate plugin
    캡처5.JPG


    Then I tested the project by trying a name input like this:
    Event
    캡처4.JPG

    The first line is a script call to return the Player’s Steam Screen Name,
    the second 5 frames wait,
    the third another script call to store name in variable #110,
    then another wait,
    and a script call to set the name of actor #1 as the variable #110,
    and then the name input.


    And this error shows up:
    Error
    캡처.JPG


    Since I was playtesting, I expected to get "Play Test" as the default name of actor #1 when inputting the name but it didn't work.
    What did I do wrong? Do you know what caused the matter?

    Edit) I tried to return the name of actor #1 instead of Input name event by putting \n[1] in text and got '0', which means the script call isn't working.
    I'm so confused...

    Edit2) OMG It works!!!!!!!!!!!!!!!!!!!!!!!!!! I got the wrong OrangeGreenworks.js before and now I think I've got the right file!!! You're my savior!! Thanks!!!
  6. Hey everyone!
    Glad to hear its working great for you!
  7. Hey Freddie! I'm preparing to release the Early Access version of my game on Steam.
    Thanks to you, I'm working on implementing Steam achievements for the full version.
    However, I find it difficult to open the project after upgrading the nw.js.
    It's slower and causing more errors. (only when starting not while playing)
    Do you happen to know why?
  8. chiithecat said:
    Hey Freddie! I'm preparing to release the Early Access version of my game on Steam.
    Thanks to you, I'm working on implementing Steam achievements for the full version.
    However, I find it difficult to open the project after upgrading the nw.js.
    It's slower and causing more errors. (only when starting not while playing)
    Do you happen to know why?

    Really? That is super rare, the point is updating NWJs to dramatically increase performance. It depends, if you read previous posts you can find lots of stories of people figuring it out. Using the correct files, etc are all part of the process.

    Like just above someone wrote this:

    "Edit2) OMG It works!!!!!!!!!!!!!!!!!!!!!!!!!! I got the wrong OrangeGreenworks.js before and now I think I've got the right file!!! You're my savior!! Thanks!!!"
  9. KillerGin said:
    Really? That is super rare, the point is updating NWJs to dramatically increase performance. It depends, if you read previous posts you can find lots of stories of people figuring it out. Using the correct files, etc are all part of the process.

    Like just above someone wrote this:

    "Edit2) OMG It works!!!!!!!!!!!!!!!!!!!!!!!!!! I got the wrong OrangeGreenworks.js before and now I think I've got the right file!!! You're my savior!! Thanks!!!"

    Haha yeah that was me all excited. English is not my first language and I can't tell you're being funny or offended. :( The Steam achievements were killing me and I really appreciated your step-by-step explanation. It helped me a lot.
    With the new version of nw.js, the project does start but takes more time to load when starting and sometimes does not start and shows only a white screen. The problem actually appeared from the moment I got it to work - even when I was writing that note you mentioned.
    I was just wondering if you know anything about this matter, or if you have seen anyone experiencing a similar matter so that I could figure something out. I've followed all the steps again and I read the previous posts here but couldn't find a solution.
    No offense to you! Just to report possible errors. :)
  10. I'm testing out a game I'm working on releasing and can get the Steam integration working correctly on Windows, with the Steam Overlay, but I can't seem to get the Steam Overlay to work on the Linux version. The plugins are set up correctly (they can grab info from Steam like the Screen Name and install directory). I sthere something I'm missing or does the Steam Overlay not work in nw.js on Linux? I've used a few different versions of nw.js (and the proper version of the other files). As far as I understand though, I shouldn't need any of these for the Steam Overlay itself to work (I simply added the --in-process-gpu launch option). Any thoughts?
  11. I'm here again... just to let people know about my issue.
    I've released a game following all the steps mentioned here, and players have been reporting the same issue - the game not starting, the saves getting corrupted, and not being able to load any of them.
    I'm using Hime's Sync Save Data (https://himeworks.com/2015/12/sync-save-data/) and I think something crashes when the game starts and causes it to change all the variables and switches related to the plug-in.
    I'm having a really hard time fixing this problem, almost in the middle of giving up Steam achievements.
    It's better to be stable than to have more features I guess.
  12. Hi everyone, I don't know if this thread is monitored at all, but I'm having trouble getting this set up correctly.

    When I open the console, I get "Uncaught SyntaxError: Unexpected token '<' in reference to the OrangeGreenworks plugin. There's no indication that it's connected through steam in any capacity. I've also tried adding a steam_appid text file in the root of my game folder to no avail. There's a shot of my lib folder below in case you can spy something I've missed there.

    I upgraded to NW.js 49.2. My SDK is 1.5. The greenworks javascript file is in the game's root (along with the lib folder), the OrangeGreenworks file is in the plugins folder and enabled, although I don't know if load order matters.

    Lastly, since updating to NW.js 49.2, I get the following warning, though I don't know if it's related to this problem in any capacity:

    DevTools failed to load SourceMap: Could not load content for chrome-extension://odlameecjipmbmbejkplpemijjgpljce/js/libs/pixi.js.map: System error: net::ERR_FILE_NOT_FOUND


    lib folder.jpg

    EDIT: I opened up the plugin and the whole thing looks like a weird html doc. I would be grateful if anyone happened to have the plugin on their end and could share it so I could see the difference.

    EDIT 2: Ok, so the download link to the OrangeGreenworks plugin in this thread redirects to some kind of html code instead of the plugin. I should have probably checked that first instead of just plugging it in and assuming everything was fine. I was able to find the correct plugin on the author's GitHub.
  13. .
  14. magicbatteryacid said:
    Or am I supposed to put it in RPG Maker's main folder's "upmost folder"?

    How does that even work exactly? Because not all PCs will organize the files the same, there's sort by file type, alphabetical, etc. It's a personal preference setting in windows...
    KillerGin said:
    the top most folder of RPG Maker MV. (...where your Game.rpgproject file is located.)
    The base directory of your project.
  15. .
  16. I don't know why you read "the directory where your Game.rpgproject file is located" or "the base directory of your project"...and then click into a sub-folder called audio. :guffaw:

    (You also keep saying "upmost" when that is not the word that was used...but that's really not the issue)

    The instructions say to put the greenworks.js file into the base directory of your project, the directory you just posted a screenshot of that has Game.rpgproject, index.html, package.json and supertoolsengine.html

    Don't click into any other folder.
  17. .
  18. magicbatteryacid said:
    Yeah I mis-qouted that, but what exactly does top most folder mean in general? I assumed it was the top folder within the project.
    What Does Top Level Folder/Directory Mean?
    magicbatteryacid said:
    First it says top most folder of RPG Maker MV. That which would imply its the folder of the engine
    Correct, that wording is confusing.
    magicbatteryacid said:
    but then it continues saying it's the one where the "Game.rpgproject" is located, which as far as I know, are only in game project folders
    Also correct, which is the part that I found to be quite clear. That's why I was confused that you kept going into other folders, as they were neither the top-level folder of MV nor of your project.

    Also, just the fact of what you're doing should be a clue that it can't have anything to do with the installation directory of MV, as that has nothing to do with the files contained in your exported project. Those are all (encrypted and) copied from your project folder.
  19. .