Before using this plugin, make sure you can get the official Greenworks plugin to work to debug any basic issues. If you only need the ACEs of the official plugin, there's no need to use this plugin

Motivation

In developing a C3 game for Steam distribution, I found I needed more API calls than the official plugin, so using the official plugin as a template, I added the ACEs for the following Greenworks APIs: Cloud File, more Achievements and Stats, DLC.

Reporting Issues

Please use the github issue list to report issues.

Installing steamworks sdk and steam_appid.txt

See the official Greenworks plugin documentation for a description of where to get and where to install the needed *.dlls (windows) or *.dynlibs (osx) and steam_appid.txt after export to nw.js.

Exporting and overlay

When exporting to nw.js, add the command lines '--in-process-gpu --disable-direct-composition --enable-features=nw2' in the export dialog box for windows overlay to work on Windows. Mac OS overlay with Greenworks appears to be buggy, do not expect it to work. For nw.js version, use only 0.33.3 for the plugin as it is. Later versions of nw.js can be used see this forum post for details.

General usage

The plugin generally follows this pattern: Call action (API call), wait for trigger (API callback), check expressions for data or error, depending on the trigger. Some data which are relatively static are always available in expressions (language, userID, etc. from the original plugin.) The others require an action call and trigger before using the data. [Technical aside, this is due to the Greenworks API being called on the DOM side vs render side, so each call requires a JS promise/resolve/reject call.]

Debugging

Some obvious things to check for which I have hit more than once myself:

  • Enable the nw.js or electron debug console to look for errors and info
  • If exporting with nw.js, it version 0.47.0? Other versions may not work - unless updated binaries are used.
  • Steamworks sdk libs (*.dll or *.dynlib are installed in the exported folder in the proper location? SDK version 1.49?
  • steam_appidt.txt is installed in exported folder with a valid id? '480' is a good test id, all users own this game. Use '480' for the example project.
  • Steam is running and a user is logged in?
  • To test with unreleased game or the test project on Steam use 'Games->Add non-steam game...'
  • Launched game _from_ Steam program for overlay to work?
  • If overlay not working, check if '--in-process-gpu --disable-direct-composition --enable-features=nw2' is used as command argument for nw.js,/electron.
  • If overlay not working, make sure render is occurring each frame, if needed add small rotating sprite in the display (set opacity to 1% so it's not visible to the user.)
  • See greenworks github docs for details on Greenworks APIs Greenworks APIs
  • On release to steam, disable F12 devtool shortcut for nw (otherwise Steam may reject it.) See this thread for more info on one devs way to intercept this. Also look at nw.js for options to remove developer mode.

    bit.ly/2EpkAnP[/li]

Electron

I am also using Electron to build the final executable, so added support for Electron. See Armaldio's excellent ElectronForConstruct for a description of the process/tool that they created to support Construct with Electron. Once setup, the tool will download greenworks binaries for the version of Electron being used. Very useful tool!

Mac

  • Mac has issues with steam_appid.txt file, put in: /steam_appid.txt or ~/steam_appid.txt, not app dir.
  • Once released on Steam and users install, the steam_appid.txt file is no longer needed.

For more Mac tips see: https://github.com/greenheartgames/greenworks/issues/183

Further Development

If you _really_ need a specific existing Greenworks API added to the plugin for your game release, leave an issue in the comments and I will review. Note: the Greenworks API does not support Steamworks leaderboards (a conscious decision on part of the Greenworks developers.)

Download

1.0.0 Stable (1.46 MB)

Info

Statistics

  • Download count720 total downloads
  • Latest download count 55 downloads of latest version
  • Average download count2 downloads per day average

Owners

  • 17 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • Could you get this working in C2? The official Greenworks doesn't support DLC.

    • Sorry, no, I am not doing development on C2 plugins, I am focused on C3. You could check if the Steam4C2 plugin is still supported, it may have DLC support.

  • Can I integrate steam workshop (with this plugin or in Construct 3 in general)?

    • Not with this plugin or I think the greenworks library it's based on. I suggest posting in the forums or the Construct Community Discord, I know some people are trying to do C3 workshop integration by using the web api, or creating their own c# libraries to make the calls (since the javascript greenworks library seems to only support older deprecated methods.)

  • Can someone attach their game .c3p file using the plugin - GREENGRINDS? I am not a native English speaker and it is very very difficult for me to make a working version of the game with - Activate achievement, steam CLOUD, DLC.....

    Please! Remove unnecessary files from your game, leave only events related to the plugin - GREENGRINDS and give link, this will help a lot of people.

  • Mikal, I do not know any other way to contact you, so excuse me to saying this here. I am hoping I could ask you a question about a different topic, if that is alright.

  • What Steam SDK is supported? 1.41? 1.42? or else?

  • Release 0.0.3.0

    Added support for Electron 7.0+ (sandbox remote require issue)

  • Tested some of the DLC APIs and updated with bugfixes in 0.2.8. Note that the ACEs for GetDLCDataByIndex will only work with newer Greenworks binaries, they will likely be available on the prebuild binary site mentioned below soon.

  • Added Greenworks DLC APIs in 0.0.2.6. However, this is untested as I do not have DLC in my game yet. See Greenworks docs for the APIs:

    github.com/greenheartgames/greenworks/blob/master/docs/dlc.md

    Report DLC issues or other issues (and there will be issues with untested code) here: github.com/MikalDev/ConstructAddons/issues so I can track them.

  • Yay for Steam developers! Thank you very much. I've grown tired of waiting for updates to the official greenworks plugin.