OrangeGreenworks - Steam Integration with Achievements and Time Log

wzackw

Veteran
Veteran
Joined
Nov 24, 2015
Messages
38
Reaction score
14
First Language
English
I just got it working too. What I did was copy the lib folder (with greenworks-osx64.node) and greenworks.js to Game.app\Contents\Resources\app.nw
Then throw in the following files into the lib folder from the sdk:

steam_api.dll
steam_api.lib
libsteam_apidylib (from osx32 folder)
libsdkencryptedappticket.dylib (from osx32 folder)

Also copied and overwrote everything from nw.js.

When you say that you "copied and overwrote everything from nw.js", into what folder did you copy them?

I overwrote "PkgInfo," "MacOS" and "Info.plist" with those from from nw.js, and then copied the contents of the nw.js Resources folder into the Resources folder of my game.

But I must be doing something wrong, because achievements aren't working on the Mac build, while they work on PC just fine.
Thanks in advance for any help!
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,604
Reaction score
3,857
First Language
Java's Crypt
Primarily Uses
RMMZ
Hey,
I'm trying to get this working, but have encountered something strange. When I try to start my game (it does show it playing in my Steam profile fine), it launches a black box, but never actually starts up the game. I'm using the Windows 32-bit one (i'm on Windows 10) and have verified that i'm using the proper build and all and followed the instructions to the letter. What can cause this?

The libs folder has these in it:
greenworks-win32.node
sdkencryptedappticket.dll
sdkencryptedappticket.lib
steam_api.dll
steam_api.lib

Thanks!

Edit: Oh, it appears SRD's GameUpgrade is the culprit. Grr. Well, I guess i'll use an older version, since all I use is basic Achievements anyway.
Yeah, all SRD's plugins that open a new window have a compatibility problem with newer nw.js versions.
It shouldn't be hard for him to fix, though.
 

SimProse

Veteran
Veteran
Joined
Jul 9, 2016
Messages
375
Reaction score
202
First Language
English
Primarily Uses
Yeah, all SRD's plugins that open a new window have a compatibility problem with newer nw.js versions.
It shouldn't be hard for him to fix, though.

Not holding my breath for that, as he seems to have moved on from plugins lately.
I ended up using the older 1.0 version of your plugin that you posted in this thread, and it now works fine.
 

Nekonron

Veteran
Veteran
Joined
Sep 16, 2015
Messages
59
Reaction score
28
First Language
English
Primarily Uses
RMMV
When you say that you "copied and overwrote everything from nw.js", into what folder did you copy them?

The folder is:
Game.app\Contents\Resources\app.nw
 

wzackw

Veteran
Veteran
Joined
Nov 24, 2015
Messages
38
Reaction score
14
First Language
English
I found a solution, but it doesn't involve copying anything into Game.app\Contents\Resources\app.nw as @Nekonron suggested. (I ended up at this solution because I couldn't determine which files should be copied into the app.nw folder. Just copying the Contents folder from nw.js into Game.app\Contents\Resources\app.nw didn't work for me.)

Instead I copied/overwrote the folders INSIDE the "Contents" folder of nw.js to their counterparts INSIDE the "Contents" folder of my game. So, in other words, I copied over the folders "MacOS" and "Versions", AND copied the files INSIDE the "Resources" folder into the corresponding "Resources" folder in my game.

Achievements work, but now I am also getting a strange new error. When I access the Options menu from the title screen and press cancel to close it, the game crashes and says "error: EACCES: permission denied mkdir '/save/'."

Screen-Shot-2017-12-11-at-6.25.54-PM-600x456.png



EDIT:
I figured out that the error happens after overwriting the folder "MacOS" (which contains a file called nwjs.)

I'm sorry for the very long post, but does anyone know where I'm going wrong? I'm glad about the achievements, but Options menu crashing is a pretty major bug.

ADDITIONAL EDIT:
@Nekonron I downloaded your game and checked the files, and it looks like you did what I did. The only differences are that you are using OrangeGreenworks version 1.1 and I am using 1.2, and your "save" folder (which seems to be the source of the problem for me) contains a file called "file21.rpgsave.bak" while mine contains a file called "config.rpgsave."

FINAL SOLUTION:
It was having problem with the location of the save folder used for options/config, so I used the code that @Hudell suggested adding as a plugin earlier in this thread to solve a similar problem on PCs, and that fixed it! Now you can exit the option menu on Macs and unlock achievements, no problem at all!

(For the record, I'm using RPG Maker 1.5.1, so I guess the problem that required this fix in older versions is still present!)
 
Last edited:

Tuomo L

Oldbie
Veteran
Joined
Aug 6, 2012
Messages
2,442
Reaction score
1,365
First Language
Finnish
Primarily Uses
RMMV
Can someone give an indepth guide for dummies to deploying for Mac? This is how my players see it on Mac right now on Steam or it crashes.

Screen_Shot_2017-12-15_at_2.18.26_AM.png
 
Joined
Jul 9, 2015
Messages
34
Reaction score
16
First Language
English
Primarily Uses
Can someone give an indepth guide for dummies to deploying for Mac? This is how my players see it on Mac right now on Steam or it crashes.

I'm not sure if you're trying to deploy the game using only your PC, but I was having similar issues when I tried that approach. Normally deploying the Mac version from my PC works fine, but I found that once I had copied the nw.js files over and transfered it to my Mac, the game would just crash right away for no discernible reason. It only started working once I copied the nw.js files using my Mac.
 

Tuomo L

Oldbie
Veteran
Joined
Aug 6, 2012
Messages
2,442
Reaction score
1,365
First Language
Finnish
Primarily Uses
RMMV
I'm not sure if you're trying to deploy the game using only your PC, but I was having similar issues when I tried that approach. Normally deploying the Mac version from my PC works fine, but I found that once I had copied the nw.js files over and transfered it to my Mac, the game would just crash right away for no discernible reason. It only started working once I copied the nw.js files using my Mac.

Will try.

EDIT: Stil crashing after copying the files over on Mac.


Seriously, can I get step-by-step instructions preferably with pictures? This is insanely hard and convoluted.
 
Last edited:

wzackw

Veteran
Veteran
Joined
Nov 24, 2015
Messages
38
Reaction score
14
First Language
English
I agree that it is unnecessarily complicated. But did you see my post above? I tried to explain it as clearly as possible.

You just have to go inside your game and inside the nwjs file (by right-clicking and choosing "Show Package Contents" on both), add the contents of the "Resources" folder from njws to the "Resources" folder of your game, and also replace the "MacOS" folder. Does that make sense?

I also had to add a line of code someone posted earlier in this thread so that the game doesn't crash when people access the Options menu, a bug that was somehow caused by doing this process.
 

Tuomo L

Oldbie
Veteran
Joined
Aug 6, 2012
Messages
2,442
Reaction score
1,365
First Language
Finnish
Primarily Uses
RMMV
I agree that it is unnecessarily complicated. But did you see my post above? I tried to explain it as clearly as possible.

You just have to go inside your game and inside the nwjs file (by right-clicking and choosing "Show Package Contents" on both), add the contents of the "Resources" folder from njws to the "Resources" folder of your game, and also replace the "MacOS" folder. Does that make sense?

I also had to add a line of code someone posted earlier in this thread so that the game doesn't crash when people access the Options menu, a bug that was somehow caused by doing this process.

I tried doing that, it still crashed on startup. What sort of settings you have on Steamworks? Did you change working folders?
 

Maxmani

Warper
Member
Joined
Dec 24, 2017
Messages
2
Reaction score
0
First Language
English
Primarily Uses
Other
I tried doing that, it still crashed on startup. What sort of settings you have on Steamworks? Did you change working folders?
Same here. Replacing the nwjs file inside MacOS makes the game run but achievements don't work.
 

wzackw

Veteran
Veteran
Joined
Nov 24, 2015
Messages
38
Reaction score
14
First Language
English
Hmm, I don't know. Doing all that worked for me (of course after doing the other steps of putting files in folders pre-deployment, but that part's the same as deploying to PC).

EDIT: And in all my struggles, I never had it crash on startup. When I did anything the wrong way, the worst that happened was just that Achievements didn't work (and before I added that one line of code it would crash after closing the options menu). So I really don't know, sorry...
 
Joined
Jul 9, 2015
Messages
34
Reaction score
16
First Language
English
Primarily Uses
Seriously, can I get step-by-step instructions preferably with pictures? This is insanely hard and convoluted.

Okay, I'll give this a go and see if it helps. Hopefully I didn't miss anything out. No pictures at the moment but I might add them later. (Also note that I'm doing all of this process on a Mac.)


Part One: Downloading Files


a) From here: https://github.com/greenheartgames/greenworks/releases

Download the latest version of Greenworks for Mac. (I’m using greenworks-v0.12.0-nw-v0.26.6-osx-x64.zip)

b) From here: https://dl.nwjs.io

Download the version of nwjs for Mac that is mentioned on your version of Greenworks. (I’m using nwjs-v0.26.6-osx-x64.zip from the v0.26.6 folder)

c) Login to https://partner.steamgames.com and download the version of Steam SDK mentioned on your version of Greenworks. (I’m using Steamworks SDK 1.41)


Part Two: Deployment

Open your Game.rpgproject. Go to File > Deployment, and choose Mac OS X from the deployment options. Choose your output location and deploy the game.


Part Three: Copying the Nwjs files

a) In your output location, there should be a file named credits.html and a package called Game. Right-click on Game and click “Show package contents.”

b) In a separate window, open your nwjs zip file. Similarly, it should contain a file named credits.html and a package called nwjs. Right-click on nwjs and click “Show package contents.”

c) You now have two packages open, nwjs and Game. The following files need to be copy and pasted from the nwjs package into your Game package:

- /Contents/Info.plist (overwrite the original file in your Contents folder)

- /Contents/PkgInfo (overwrite the original file in your Contents folder)

- /Contents/MacOS/nwjs (overwrite the original file in your Contents/MacOS/ folder)

- /Contents/Versions/ (just copy the folder itself into your Contents folder)

- Finally, copy and paste everything from /Contents/Resources/ into the /Contents/Resources/ folder of your game package. There should be 57 files and folders in total, none of which are overwriting anything in your game.


Part Four: Copying Files to the app.new Folder

a) Inside your Game package, locate the main project folder at /Contents/Resources/app.new/

b) Open your Greenworks zip file. Copy both Greenworks.js and the “lib” folder into /app.new/

c) Open your Steamworks SDK zip file. Locate the following files and copy them directly into your /app.new/lib/ folder:

- /redistributable_bin/steam_api.dll
- /redistributable_bin/steam_api.lib
- /redistributable_bin/osx32/libsteam_api.dylib
- /public/steam/lib/osx32/libsdkencryptedappticket.dylib


Part Five: Testing

In the /app.new/ folder, create a text file named steam_appid.txt and write the App ID of your game inside. This will allow you to test your game and check if everything is working before you upload it to Steam.

With Steam running in the background, try launching your Game package by double-clicking it. As long as you set up your Steam_appid.txt file correctly, Steam should show that your game is running.
 
Last edited:

Maxmani

Warper
Member
Joined
Dec 24, 2017
Messages
2
Reaction score
0
First Language
English
Primarily Uses
Other
The game crashes with this error log.
 

Attachments

  • Error_Log.txt
    38.9 KB · Views: 9

Tuomo L

Oldbie
Veteran
Joined
Aug 6, 2012
Messages
2,442
Reaction score
1,365
First Language
Finnish
Primarily Uses
RMMV
My achievements now no longer unlock for some reason, what's going on?

Greenworks failed to load. Make sure you copied all files from the Steamworks SDK to the right folders;
 
Last edited:
Joined
Jul 9, 2015
Messages
34
Reaction score
16
First Language
English
Primarily Uses
@Maxmani: Sorry, I'm not Mac-savvy enough to pinpoint what's wrong from the error log. I can only say that following the above procedure is what works for me.

@Tuomo L : Details, details ... Achievements no longer unlock on the Windows version of your game? Are they working on the Mac version?

Did you follow the above tutorial, and then create a new deployment for Windows using the same project? If so, remember you may have overwritten the Greenworks.js in your main project folder with the one from v0.12.0. In that case you'd need to download Greenworks v0.12.0 for Windows (along with nwjs v0.26.6) and follow the usual procedure from Hudell's blog to set everything up. Don't forget to copy the files from SDK 1.41 too.

I've updated the tutorial so that all files are copied over after deployment, to avoid any issues like that.
 
Last edited:

ayannya

Villager
Member
Joined
Jun 3, 2017
Messages
20
Reaction score
4
First Language
English
Primarily Uses
RMMV
Hey,
I'm trying to get this working, but have encountered something strange. When I try to start my game (it does show it playing in my Steam profile fine), it launches a black box, but never actually starts up the game. I'm using the Windows 32-bit one (i'm on Windows 10) and have verified that i'm using the proper build and all and followed the instructions to the letter. What can cause this?

The libs folder has these in it:
greenworks-win32.node
sdkencryptedappticket.dll
sdkencryptedappticket.lib
steam_api.dll
steam_api.lib

Thanks!

Edit: Oh, it appears SRD's GameUpgrade is the culprit. Grr. Well, I guess i'll use an older version, since all I use is basic Achievements anyway.

Hey SimProse,

How did you realize that it was SRD's plugins that caused this problem? Just curious. ;)

Also, seems like mine doesn't work even with the older version -- still a black box there instead of the game. Did you modify anything else before it was fixed? Any help would be appreciated.
 

ayannya

Villager
Member
Joined
Jun 3, 2017
Messages
20
Reaction score
4
First Language
English
Primarily Uses
RMMV
Hi all,

First thank you so much @Hudell for creating this plugin. It finally gives me some hope after all these searching/testing/failing/learning...

Two issues I'm having here:

1. The first time I launched my game in steam, (after all configuration of orangeGreenworks are done and the game update built and set live on steam,) I successfully saw a badge in my game saying that if I want to access Steam Community from inside my game I should press some keys (first image attached). This badge was not seen before I added in this plugin and everything, so I assume here that it's part of the plugin's functionality, and that I had got it to work properly by then.

However from the second time on the in-game badge was never shown. Steam does know that I'm playing my game though, by showing "- running" on the game's status. But since inside the game there're no badge or any steam notification displaying, I can't be sure that it's still working.
steam1.jpg

2. I'm using this plugin to unlock achievements, and I'm wondering how I can be sure that it is working, if the game is still in its development mode on Steam and haven't been released. Upon successful unlocking of an achievement, will it show this achievement on my Steam profile? Will it show any badge or messages in-game? And finally, is there a way to check? (I know there's a possibility that the majority of the people here are adding this new functionality to their existing and already released game so it might be easier for them to check if the achievement works...)

Right now I've written a simple loop to test (2nd image attached), but it does not seem to work as all I get is the 3rd image showing after each looping.
steam5.png
steam2.png

Other info FYI: I'm the game's developer, have its full access and everything. The plugin setup should be correct judging from the first point, but I'm willing to provide screenshots and everything or do the check again. I also have the "black box" problem but have found a simple workaround of just using the original Game.exe from RMMV and rename it to nw.exe, and will stick to it as long as it still seems to work properly.

Please help. Any hints at all will be greatly appreciated... (First time posting in forums. Have been googling for at least 3 days and tried different plugins ever mentioned by people and finally here to see something much more promising ;w;)
 

Matseb2611

Innovate, don't emulate
Veteran
Joined
Oct 15, 2012
Messages
4,574
Reaction score
6,401
First Language
English
Primarily Uses
RMMV
Hi. Just wanted to answer your second question as I've been using Hudell's plugin in my two latest projects. From when I was testing the achievements, they unlocked fine for me even before the game was officially released (assuming you've activated the achievements via Steamworks already). :)
 

SimProse

Veteran
Veteran
Joined
Jul 9, 2016
Messages
375
Reaction score
202
First Language
English
Primarily Uses
Hey SimProse,

How did you realize that it was SRD's plugins that caused this problem? Just curious. ;)

Also, seems like mine doesn't work even with the older version -- still a black box there instead of the game. Did you modify anything else before it was fixed? Any help would be appreciated.

I saw an older post in this thread that mentioned SRD's GameUpgrade plugin as the issue, and once they removed it, it worked fine.
 

Latest Threads

Latest Profile Posts

seems absolutely WILD to me now all the hundreds of hours of work I used to do in 2k(3) over a decade ago with a resolution of 320x240. that seems so insanely TINY now, seemed so normal at the time!
Playing Aroma Indosiar theme song.
Aroma is an Indonesian TV show about cooking. :)
Working on a characteeer! (Why is it so hard to color hair?) ;-;
Silly-Sketches.png
Just finished eventing a couple simple puzzles in RMMV, for my very first game "Sample Quest." Just messing around, throwing things together, and calling it a story XD On a non-RM note, got my hair cut today!
I feel the need to inform everyone on the forums NOT to go with Web Hosting Canada for your hosting needs. It is by far the worst customer service and just overall experience I have ever had with hosting and I am Canadian...

Forum statistics

Threads
115,373
Messages
1,089,359
Members
150,071
Latest member
qwertyuiopasdfghjkl
Top