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.
OrangeGreenworks - Steam Integration with Achievements and Time Log
● ARCHIVED · READ-ONLY
-
-
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?
-
Did you create the steam_appid.txt file?
-
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). -
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.
-
Question: Do I useCode:to get the Steam overlay to come up?
OrangeGreenworks.activateGameOverlay(); -
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. -
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.
-
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. -
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:
- Achievements
- Friends
- Community
- Players
- Settings
- OfficialGameGroup
- Stats
-
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.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? -
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.
-
Do you happen to have a version of the plugin on your end? I got the same error mentioned above, and when I opened up the plugin to see what was wrong, it's because the whole plugin is a weird html doc.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.
[EDIT] Yeah, it seems like @Hudell 's plugin link on MakerDevs redirects to an html doc instead. I found the plugin on Github and it's working fine. Unfotunately, that means it's been redirecting to the wrong script since at least June, when the other person commented. :kaoswt: -
I'm trying to use the setStat function in the plugin based on the documentation here, but it doesn't seem to work. For example say in the Steam stat config, the API name for the stat is "name", I tried a bunch of variations of the code in the script input, such as:
greenworks.setStat(name, 1)
greenworks.setStat('name', 1)
greenworks.setStat("name", 1)
greenworks.setStat(name, 1);
greenworks.setStat('name', 1);
etc
None of these seem to affect the progress stat on the Steam Achievements page, but I'm not familiar with scripting so I might be missing something. I'm pretty sure I configured everything right, because the activateAchievement and clearAchievement functions grant/removes the achievement just fine. And while I'm asking, is there a way I can increase the stat by 1 instead of setting a specific value? Thanks in advance!
EDIT: Solved! Turns out I needed to change greenworks to OrangeGreenworks, and define the stat name with a variable first (i.e. name = "statname"). In case anyone else needs the script for increasing the stat by 1 instead of setting a specific value, here it is:
name = "statname"
value = OrangeGreenworks.getStatInt(name) + 1
OrangeGreenworks.setStat(name, value) -
As it appears the set-up instructions for this plugin have all but disappeared off the web, I am going to link the instructions via the internet archive for anyone who plans to use this in the future.
-
So achievements are working... however, the overlay is not. Only when I'm not playing in full-screen I actually see the Achievement pop-up.
I am launching the game directly from the .exe, not from Steam. Is this expected to be tested only by launching the executable through Steam? -
So achievements are working... however, the overlay is not. Only when I'm not playing in full-screen I actually see the Achievement pop-up.
I am launching the game directly from the .exe, not from Steam. Is this expected to be tested only by launching the executable through Steam?
Well, I answered myself by trying it out myself and...
Yes launching the game through Steam did enable the Overlay! :) -
Which is the script call to call an achievement on Steam?
-
Code:Where ID is the id for the archievement you want to earn.
OrangeGreenworks.activateAchievement('ID');
Altough I'm on rpg maker mv 1.5.1 and I can't get it to work either :)
my nw version is 1.2.0? according to the console log.
I added the steam sdk 1.20 to the lib folder in the root folder. I did tried sone other versions as wel without succes.
the app_id text is in the root folder
the greenworks.js is in the root folder (does that need to be another version?)
the orangegreenworks is activated.
console log says:
Greenworks failed to load. Make sure you copied all files from the Steamworks SDK to the right folders;