Info

  • Official Official addon

Statistics

  • Download count2,993 total downloads
  • Latest download count 1,545 downloads of latest version
  • Average download count2 downloads per day average

Owners

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 to package.nw

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.

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.