Using Greenworks for Steam Publishing

29

Index

Features on these Courses

Stats

6,887 visits, 17,743 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 14 Apr, 2022.

Prepping your Game for Steam

Exporting your Project

There is a full tutorial for exporting to NW.js so we won't go into full detail here, but a couple of things to note:

  • It's been said a few times now, but it is very important: make sure that your NW.js version is the correct one for your version of Greenworks. Especially if you're downloading NW.js at export.
  • You'll need to add some files to your game once it's been exported and the exact method will depend on how you export. If you enable the Package Assets option then a file called package.nw will be created and you'll need to edit that to add the necessary files (we'll cover this more shortly) but if the Package Assets option is disabled, you can just drop the additional files into the game folder. Check the manual page for the NW.js export for more information on the Package Assetsoption.

Post-Export Tasks

Add the Steamworks SDK DLL Files

As we mentioned above, you'll need to add some files to your game to make sure it integrates properly with Steam. To do this, you'll need to unzip both your exported game and the Steamworks SDK.

As we mentioned previously the exact method for adding these files will change depending on how you've exported your game. If you used the Package Assets method, you'll need to locate package.nw in your game's folder.

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.

If you didn't package assets on export, then you can just drop the DLL files into the game folder.

As for the actual files you need to add – first locate the redistributable_bin folder in the Steamworks SDK, it should be in the sdk folder. Here you'll find DLL files for various platforms. Copy the appropriate file for the platform your build is aimed at. For example add steam_api.dll to package.nw for the win32 build, steam_api64.dll for the win64 build, etc.

You also need to add 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, use the sdkencryptedappticket.dll and .lib file from the win64 folder.

Create a Steam ID Text File

Create a new txt file in the root folder of your game write your game's ID into the file. You can find this in your game's Steam Page URL. Do not add anything else to this file.

Save the file in an ANSI format and call it steam_appid.txt. If you don't save in an ANSI/ASCII format, it may put a UTF-8 BOM at the start of the file, rendering it useless for this task.

Enabling F12 use for Steam Screenshots and Steam Overlay

For this, you'll need to edit the package.json file found in your game's folder. This will involve adding some new strings to the "chromium-args" line.

Add the following to that line:

--in-process-gpu

--disable-direct-composition

--disable-devtools

So you should end up with:

"chromium-args": "--enable-node-worker --disable-plugins --disable-internal-flash --disable-popup-blocking --allow-file-access-from-files --ignore-gpu-blacklist --in-process-gpu --disable-direct-composition --disable-devtools

These changes should allow the Steam Overlay to open and should stop NW.js opening Devtools when a player uses the standard Steam Screenshot key - F12.

  • 20 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • Can you teach how to upload DLCS?

    I have no idea how to do it

  • Very useful, thanks!

  • These flags no longer work for Steam overlay on most recent supported greenworks / nw.js

  • I can't add files to the package.nw files after renaming them to zip files or when using third party tools like 7Zip or Winrar. I can normally add files to other zip files, but these seemed to be locked down.

    • [-] [+]
    • 1
    • 1 points
    • (3 children)
    [deleted]
      • [-] [+]
      • 1
      • Laura_D's avatar
      • Laura_D
      • Construct Team Community Manager
      • 1 points
      • (2 children)

      The forums are a much better place to discuss issues with your project: construct.net/en/forum/construct-3/how-do-i-8

      Plus, then you can include screenshots of any error codes, or problems you're having in the process. If you can share how your achievements are set up in Steam in the forum thread, other users who have had success with Steam publishing may be able to point you in the right direction.

        • [-] [+]
        • 1
        • 1 points
        • (1 child)
          • [-] [+]
          • 1
          • Laura_D's avatar
          • Laura_D
          • Construct Team Community Manager
          • 1 points
          • (0 children)

          Having not published a game to Steam myself, I can't say - but I would assume you'd have to be testing the game through Steam to actually trigger achievements, seeing as it relies on Steam's API to do so. Afaik it shouldn't need to be published to trigger otherwise you wouldn't be able to test your achievements.

          Again, the forums are much better for this sort of thing but you could also ask for help in the unofficial community discord server, folks in there are usually super helpful.

          discord.gg/SuRp4kN8

  • Load more comments (12 replies)