The Greenworks plugin allows you to integrate your game with Steam using the Steamworks API.

Support notes

If Steam is unavailable or something has gone wrong Is available will be false, so check it's true before using Steam features. There should be a message in the dev tools console if something went wrong (use the 'Show dev tools' action in the NW.js plugin to check).

Unfortunately Greenworks does not currently work in preview mode.

Changes after export to get Greenworks working

After you export your project for NW.js, you'll need to make the following changes before the Greenworks plugin works.

Step 1: Add Steamworks SDK DLLs

Package.nw is just a zip file with a different extension. You can open it either by renaming it to .zip, adding a file, then renaming it back to .nw (you may need to change settings to show file extensions). Alternatively you can associate the .nw file extension with a program that can open zips like WinRAR and just drag-and-drop extra files in. Note: package.nw is only created if you export with Package assets enabled. If disabled, just drop the files in to the same folder.

Download the Steamworks SDK from the Steam partner site. Make sure the version matches the one specified for the Greenworks plugin version. From the redistributable_bin folder, copy the appropriate file for the platform. For example add steam_api.dll to package.nw for the win32 build, steam_api64.dll for the win64 build, etc.

As of Greenworks for NW.js 0.19.4, you also need to copy a sdkencryptedappticket library. This can be found in public\steam\lib in the Steamworks SDK. You need to copy this to package.nw in the same way you did for steam_api.dll. For example for the win64 version, copy public\steam\lib\win64\sdkencryptedappticket64.dll to package.nw.

Step 2: Create a text file named steam_appid.txt in the same folder as nw.exe

The steam_appid.txt file should contain nothing but your app ID on Steam. If you don't have one yet, for testing you can use Construct 2's app ID of 227240. You must also have Construct 2 installed on your copy of Steam. It can be the free edition, and it works fine side-by-side with a non-Steam install. (If the app ID is not valid and installed, Greenworks won't work.) Also make sure the file has an ANSI/ASCII encoding in your text editor, otherwise it may put a UTF-8 BOM at the start of the file.

Step 3: Make sure Steam is running and you are logged in to Steam

Greenworks requires Steam to be running in the background with a logged in user to work.

Step 4: Start the app and check Greenworks features work

Hopefully everything works! If not, check the support notes above.

Download

0.30.4 Stable (967 KB)

Info

  • Official Official addon

Statistics

  • Download count 290 total downloads
  • Latest download count 139 downloads of latest version
  • Average download count 2 downloads per day average

Owners

Tags

  • 14 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • Will support of Steam Leaderboards be added?

  • This is great!!! For this version of NWjs 0.26.6 (26th February 2018) --in-process-gpu seems to be required to be added in the "chromium-args" properties in package.json which is found in package.nw for the overlay to work properly.

    Also it seems black lines that appear from letterbox are pretty bad for the achievement popup. I would use scale inner or something else.

  • Thanks you!

  • Thanks Scirra!

  • Thank you, Scirra! This plugin will be really useful. :)

  • Any chance this will be updated to support Steam Cloud?

  • What does the steam achievement activation event look like?

  • Ashley The overlay and achievement visual prompt doesn't seems to work on Mac.

    Backend is working though. >Is available>activate achievement>no visual prompts in game

    Alt tab and checked>achievements are recorded though.

    Tried putting the 3 files inside all the different folders but still no visual prompts. Is this a known issue?

    EDIT: Same issue with Linux.

    For Window, when the Steam overlay appears, there's no way to close it other than force shutting down the game.

    • Ashley, i'm also having some trouble with the Greenworks plugin. I'm pretty sure that i followed every step of the tutorial (i'm familiar with that stuff, it's similar to what i had to do with the old Steam4C2 plugin) but the overlay is not showing up. And i think theres a function missing in this plugin, how are we supposed to close the overlay if we can only open it?

    • [-] [+]
    • 1 points
    • (0 children)
    [deleted]
  • Please, make an updated version of this plugin so it can work with the new C3 runtime, that's the only thing i need to port my project! Thank you! :)