cyanic's Steam Achievements Integration

IsFutureBright

Lightning Bolt Action
Veteran
Joined
Dec 26, 2012
Messages
120
Reaction score
11
First Language
Portuguese
Primarily Uses
Thanks. I sent him a message and will keep investigating to see if I can get this through :)
 

EternalShadow

Veteran
Veteran
Joined
Sep 16, 2012
Messages
5,805
Reaction score
1,051
First Language
English
Primarily Uses
Try the version on the pointers-fix branch: link. I tested it on Windows 10, but nowhere else, so there may still be some problems.


Bug explanation: In the version of Ruby used in VX Ace, pointers are treated as strings. It appears that Ruby copied the return value literally as a string, so the end result is a truncated vtable at the first NULL character. Changing some return values to number should have Ruby retain the original pointer value.


Just gonna come in here and say this fixed it, and I'm on Win 7 :)  (it too, suddenly broke for me about the time that someone else posted on here saying it broke!)
 

IsFutureBright

Lightning Bolt Action
Veteran
Joined
Dec 26, 2012
Messages
120
Reaction score
11
First Language
Portuguese
Primarily Uses
You don't need to upload a build, but you do need to make sure the stats are configured properly, then published. If you need some live help, try chatting up Miller, since he's got it all integrated and should know how to get everything working on Steam's end (I don't have my own game, so no access to the partner panel to look things up).


Hey cyanic! I was able to get it working. The problem was that I had to do  "steam.request_current_stats" before using the "get_stat_int" or the "get_num_achievements". Thanks :)
 

cyanic

Veteran
Veteran
Joined
Nov 16, 2015
Messages
106
Reaction score
64
Primarily Uses
The script has been updated for Steamworks SDK 1.37. If you are not planning on updating your steam_api.dll, you don't want to update to this version.
 

Cloud_FFVII

Veteran
Veteran
Joined
Dec 31, 2015
Messages
31
Reaction score
1
First Language
Spanish
Primarily Uses
The script has been updated for Steamworks SDK 1.37. If you are not planning on updating your steam_api.dll, you don't want to update to this version.


Perfect cyanic! Thank you very much... I was checking this today to see if there was any update...


Also, I wanted to ask you something...do you have the Steamworks SDK 1.37 complete? Could you download it? I'm trying since last week but the file doesn't download complete :(  Could you upload it? (I know this doesn't have anything to do with the script, so it's okay if you don't want) :D  
 

cyanic

Veteran
Veteran
Joined
Nov 16, 2015
Messages
106
Reaction score
64
Primarily Uses
I have the latest SDK downloaded, but I can't redistribute it because of the license agreement. Usually if you try a few times or wait to the next day, the download should work again. Not sure why it wouldn't download all the way, though. Maybe try another browser?
 

Cloud_FFVII

Veteran
Veteran
Joined
Dec 31, 2015
Messages
31
Reaction score
1
First Language
Spanish
Primarily Uses
I have the latest SDK downloaded, but I can't redistribute it because of the license agreement. Usually if you try a few times or wait to the next day, the download should work again. Not sure why it wouldn't download all the way, though. Maybe try another browser?


Okay, I understand. I'm a Steam Developer as well but for some reason the download link is not complete when I try from my profile (I'm using the spanish steamwork page, maybe that's the reason). Anyways, thank you! I'll try to download it from another browser or computer. :)  
 

Cloud_FFVII

Veteran
Veteran
Joined
Dec 31, 2015
Messages
31
Reaction score
1
First Language
Spanish
Primarily Uses
Hello Cyanic, sorry for double posting. I have a weird problem with the script now, and I'm going crazy with it. XD 
I noticed that, when I'm playing the game for a while, I leave it idle or when I change focus and use my computer while the game is running -after a while- it lags alot! It's running at 60 fps, it's normal, and then suddently falls to 4-7 fps and I have to press ALT+ENTER to go fullscreen (or window, depends) and then it's fixed...


There's no specific action that triggers this, it happens random.


I tried removing the script and it fixes it. It's weird because it seems like a problem with a paralel event of memory, but everything works fine without the achievements script. Maybe something to do with the new Steam SDK? (I did not update the script or the SDK)


Thank you for any help!
 

cyanic

Veteran
Veteran
Joined
Nov 16, 2015
Messages
106
Reaction score
64
Primarily Uses
I've added a new version with function for setting achievement progress here. I haven't tested it yet as I don't have an RPG Maker project handy to do so, but if you're feeling adventurous or is in need of the feature, take it for a spin.
 

cyanic

Veteran
Veteran
Joined
Nov 16, 2015
Messages
106
Reaction score
64
Primarily Uses
I noticed that, when I'm playing the game for a while, I leave it idle or when I change focus and use my computer while the game is running -after a while- it lags alot! It's running at 60 fps, it's normal, and then suddently falls to 4-7 fps and I have to press ALT+ENTER to go fullscreen (or window, depends) and then it's fixed...
Hmm... Does it happen if you don't call any of the methods in the script? Just keep a reference to SteamUserStatsLite.instance somewhere, but don't call anything within it. That way it could be narrowed down to whether it's the script itself, or an issue when you're calling the script (like maybe doing it too often).
 

Cloud_FFVII

Veteran
Veteran
Joined
Dec 31, 2015
Messages
31
Reaction score
1
First Language
Spanish
Primarily Uses
Hi cyanic! It's been a while...XD sorry for bother you with this, but the script is not longer working with the latest Steamwork (1.41)...I don't know what happened...no error, no message, nothing, the achievement just doesn't pop...are you still supporting this? :D

Thanks in advance!
 

Zeriab

Huggins!
Veteran
Joined
Mar 20, 2012
Messages
1,200
Reaction score
1,256
First Language
English
Primarily Uses
RMXP
Do you test-play your game through the editor? If so, try to run it normally.

Should that not work try download an earlier SDK and see if that fixes it for you.
 

cyanic

Veteran
Veteran
Joined
Nov 16, 2015
Messages
106
Reaction score
64
Primarily Uses
Hi, sorry for the super late response (I think the thread reply notifications might have gone into spam). I just tried the latest SDK version, and it's working fine.

Also did a bit of tidying up on the OP, so links should no longer be broken. I added a note that if you have steam_appid.txt in your project folder and you launch RPG Maker using the project file, the current app ID will be set to your own and you can test achievements when launching with playtesting from RPG Maker.
 
Last edited:

Labyrinthine

Artist/ Developer
Veteran
Joined
Jun 23, 2014
Messages
451
Reaction score
400
First Language
Finnish
Primarily Uses
Hello Cyanic, sorry for double posting. I have a weird problem with the script now, and I'm going crazy with it. XD
I noticed that, when I'm playing the game for a while, I leave it idle or when I change focus and use my computer while the game is running -after a while- it lags alot! It's running at 60 fps, it's normal, and then suddently falls to 4-7 fps and I have to press ALT+ENTER to go fullscreen (or window, depends) and then it's fixed...


There's no specific action that triggers this, it happens random.


I tried removing the script and it fixes it. It's weird because it seems like a problem with a paralel event of memory, but everything works fine without the achievements script. Maybe something to do with the new Steam SDK? (I did not update the script or the SDK)


Thank you for any help!
I have the same problem. At completely random times, the game suddenly starts lagging very badly. The framerate drops somewhere between 4-7 FPS just like Cloud_FFVII mentioned.
Is there any solution to this?
 

cyanic

Veteran
Veteran
Joined
Nov 16, 2015
Messages
106
Reaction score
64
Primarily Uses
Do you have an example project I can look at?
 

Labyrinthine

Artist/ Developer
Veteran
Joined
Jun 23, 2014
Messages
451
Reaction score
400
First Language
Finnish
Primarily Uses
I have only tried it in the game I have in Steam, obviously since that's where the achievements function. It has not yet been released, though.

I can also confirm the only way to stop the lag is either end the game completely or switching to alt-enter fullscreen and back. I suppose the lag doesn't appear at all if the player uses the alt-enter fullscreen at all times. So, the problem would be limited to windowed-mode gameplay.

At times, I could play an hour or two with no problems, but at some point the lag appears nevertheless.
 
Last edited:

cyanic

Veteran
Veteran
Joined
Nov 16, 2015
Messages
106
Reaction score
64
Primarily Uses
If you could possibly cut it down to maybe just one map that this happens on and you can consistently reproduce, it would be very helpful. You can send me a conversation if you want.
 

Labyrinthine

Artist/ Developer
Veteran
Joined
Jun 23, 2014
Messages
451
Reaction score
400
First Language
Finnish
Primarily Uses
I added some stuff in my previous post ^
 

cyanic

Veteran
Veteran
Joined
Nov 16, 2015
Messages
106
Reaction score
64
Primarily Uses
I wonder if it has anything to do with callbacks. My example only shows running callbacks when you're doing something with achievements. Maybe if you add a call to "SteamUserStatsLite.instance.update" somewhere in the game update loop it might help (you'll have to dig through the engine code, I don't have a VX Ace project handy right now).
 

Labyrinthine

Artist/ Developer
Veteran
Joined
Jun 23, 2014
Messages
451
Reaction score
400
First Language
Finnish
Primarily Uses
Uhh, not sure how to do that... I really don't know much of anything about scripting. Got any idea where this game update loop would be located?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Trading has been halted on the TSX (Canadian stock market) because of "technical issues". Suspicious... I'm bracing myself for a sea of red tomorrow lol
The Loco-Motion song pre-dates the dance. Meaning the lyrics are kinda misleading. "Everybody's doing a brand new dance now"... No they weren't, you just used peer pressure to trick everyone into going along with it.
Love it when someone confuses "RPG Maker (or script/plugin) has a bug" with "I didn't set it up right and it's not working as I want (or gives an error)"
Is animation really as hard as I think it is?
Out of sudden, snow. Everywhere.

Forum statistics

Threads
94,579
Messages
922,046
Members
124,446
Latest member
chungagunga
Top