OrangeGreenworks - Steam Integration with Achievements and Time Log

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
1,014
Reaction score
439
First Language
English (USA)
Primarily Uses
RMMV
Disregard this. Looks like my problem may have returned.

Also, I seem to be receiving invalid achievement name errors even with the quotes.

EDIT: In case it helps I'm using 64-bit NW.JS and here are the files as they are listed in my game install.
 

Attachments

  • 2021-04-12.png
    2021-04-12.png
    73 KB · Views: 11
  • 2021-04-12 (1).png
    2021-04-12 (1).png
    53.6 KB · Views: 11
Last edited:

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
1,014
Reaction score
439
First Language
English (USA)
Primarily Uses
RMMV
After further analysis I have determined that my account is being read properly during playtesting so long as the app id file is present and I am testing from the Steam version. However, it doesn't seem to work properly when launched standalone. I'm at a loss - can someone advise?
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,602
Reaction score
3,837
First Language
Java's Crypt
Primarily Uses
RMMZ
Did you create the steam_appid.txt file?
 

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
1,014
Reaction score
439
First Language
English (USA)
Primarily Uses
RMMV
As I said, the app ID file is present. It's when I deploy to Steam that I start having problems. I even have a debug menu set up to cross-check my Steam information, but on deployment it shows Play Test as the user (as if I didn't do anything right). I have also confirmed that the files are all present in their places.

At any rate, I've cycled one of my achievements by removing and re-adding it. I'm not sure if that'll make much difference but I'm willing to give anything a try.

EDIT: I probably should've included a snapshot of my debug menu implementation. In case it helps I also have an issue where adding the integration code in Steamworks launch options makes the game completely unplayable (in that it soft locks at boot, displaying only an empty rectangle and nothing else although the game still continues to run).
 

Attachments

  • 2021-04-19.png
    2021-04-19.png
    107.8 KB · Views: 3
Last edited:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,602
Reaction score
3,837
First Language
Java's Crypt
Primarily Uses
RMMZ
Ah, sorry, I interpreted your last comment wrong. I'm assuming Steam was opened when you launched the standalone game. If it's open and there's nothing on the console, then I don't know what could be causing problems.
 

OneManIndie

THE One-Man Indie!
Veteran
Joined
Sep 22, 2013
Messages
348
Reaction score
204
First Language
English
Primarily Uses
RMXP
Question: Do I use
Code:
OrangeGreenworks.activateGameOverlay();
to get the Steam overlay to come up?
 

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
1,014
Reaction score
439
First Language
English (USA)
Primarily Uses
RMMV
I think so, but I think it also depends on using --in-process-gpu which I have not been able to get going (as it immediately soft locks my game during startup).

In the meantime I finally got the plugin working in my game. I'm not sure how, but after I rearranged some of my logic related to Steamworks (particularly the platform detection used to determine how to handle achievements) it started to work without question. (Also, I switched from using the MV control variable interface to setting them in a script eval block, which I had to do anyway for the game not to crash on me when deploying to other platforms and storefronts e.g. Xbox, GameJolt etc.)

EDIT: I lied yesterday - unlock verification is still not working properly for the achievements menu. I changed the code on the F9 debug in the deployed game so that I would be able to check for achievement verification without having to copy over the SDK version of NW.JS, and all 100 switches which correspond to my achievements return true... and that's even for the achievements that I haven't yet unlocked.
 
Last edited:

OneManIndie

THE One-Man Indie!
Veteran
Joined
Sep 22, 2013
Messages
348
Reaction score
204
First Language
English
Primarily Uses
RMXP
Hmm... It's a bit tricky, but let's look at it this way. Once we get this figured out, well have a much better way to integrate Steam for RPG Maker for others to use.
 

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
1,014
Reaction score
439
First Language
English (USA)
Primarily Uses
RMMV
I finally figured it out: you need to add --disable-direct-composition in addition to --in-process-gpu, and then the game won't freeze. (Also, it turned out to be a more general issue with NW.JS.) You can also add it directly into your package.json by adding this under your js-flags (but before anything else e.g. your window settings):

JSON:
"chromium-args": "--in-process-gpu --disable-direct-composition",

That way the package.json looks something like this:

JSON:
{
  "name": "",
  "main": "www/index.html",
  "js-flags": "--expose-gc",
  "chromium-args": "--in-process-gpu --disable-direct-composition",
  "window": {
    "title": "",
    "toolbar": false,
    "fullscreen": true,
    "width": 1109,
    "height": 624,
    "icon": "www/icon/icon.png"
  }
}

After that just run the game and you have a functional overlay with no crashes.
 

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
1,014
Reaction score
439
First Language
English (USA)
Primarily Uses
RMMV
One more thing I forgot to add. While the process of resolving matters with the plugin was still being worked out, the issue of displaying the achievement list came up. Since the plugin is only partially documented for this purpose I figured that I would explain how to accomplish this.

First of all, I found the code detection method to be completely useless (or at least from my observations), and you also need to have released your game (otherwise you will be redirected to your Steam profile). Then, wherever you want to open your achievements list just use the following script evaluation:

JavaScript:
OrangeGreenworks.activateGameOverlay('Achievements')

Once the required conditions for your game are met, your achievements page will open in the overlay.

As a side note, you can also use this script evaluation for other purposes defined by Steamworks by using the respective keyword for that particular page. The complete list of possible values for the script call are as follows:
  1. Achievements
  2. Friends
  3. Community
  4. Players
  5. Settings
  6. OfficialGameGroup
  7. Stats
All values are string type so don't forget to use quotes.
 

Hayden

Veteran
Veteran
Joined
Jan 14, 2018
Messages
162
Reaction score
21
First Language
English
Primarily Uses
RMMV
I got this all setup and then when I tried to play the game just to see if I'd set it up right, it just says unexpected token > in the console when I press F12.

Any idea what I'm doing wrong here?
 

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
1,014
Reaction score
439
First Language
English (USA)
Primarily Uses
RMMV
I got this all setup and then when I tried to play the game just to see if I'd set it up right, it just says unexpected token > in the console when I press F12.

Any idea what I'm doing wrong here?
My guess is that you either forgot your steam_appid.txt which should be in the root of your game package, or you haven't deployed a test build yet. Otherwise I have no idea.
 

Songsmith

Veteran
Veteran
Joined
Jun 17, 2016
Messages
68
Reaction score
4
First Language
English
Primarily Uses
N/A
Another ask (it's been nearly half a year since the last one) for updating the MakerDevs instructions to set up achievements on a Mac build. When you have the chance of course.
 

Latest Threads

Latest Profile Posts

how does everybody even finish anything

i have like 5 projects in the backburner and it's just so sad that i probably won't get to finish all or maybe even any of them
Did you know that 90% of people in the world use the number in their sentence as they see fit?
It's been a long time since I was here but I have a lot of updates... btw I am teaching again about game programming and game design in some schools here in Brazil hahahaha It's good to see kids and teens learning this kind of thing!
welp, I literally can't continue working on ALEX now that my MZ trial is up (unless I somehow place in the jam which I don't remotely deserve to for my unfinished crap) so I am back on my bullshit

Forum statistics

Threads
113,891
Messages
1,078,235
Members
147,983
Latest member
H3ctorGH
Top