Did you define the achievements on your steam project page? Those achievements names ("achievement_2") need to be present in steam's database.
Wintermute Engine is no longer actively developed.
The original sources are archived on GitHub: wintermute-engine and wmelite. The runtime is now integrated into ScummVM, which runs Wintermute games on current systems.
- Wintermute Engine Forum >
- Wintermute Engine >
- Scripts, plugins, utilities, goodies >
- Topic: Steam plugin
Pages: 1 [2] All
Author
Topic: Steam plugin (Read 89162 times)
0 Members and 1 Guest are viewing this topic.
Hi Mnemonic!
Thanks for the quick answer. I've added that achievement on our page on Steamworks, yes.
EDIT: Forgot the last step of "Really publish to Steam". Been trying builds through steam without publishing the achievements.
Thanks for the quick answer. I've added that achievement on our page on Steamworks, yes.
EDIT: Forgot the last step of "Really publish to Steam". Been trying builds through steam without publishing the achievements.
Hi guys,
Maybe you can help. I am trying to work with the Steam plugin, but I cannot compile my game because I get an error message saying "Object 'SteamAPI' is referenced but no constructor is defined". Anyone know whats going on? Thanks
Maybe you can help. I am trying to work with the Steam plugin, but I cannot compile my game because I get an error message saying "Object 'SteamAPI' is referenced but no constructor is defined". Anyone know whats going on? Thanks
Any suggestions anyone? I kinda need this fast.
Noob questions...
1) Do these .dll files go into the WME Devkit folder in program files?
2) Do I need to select wme_steam.dll in the "plugins" section of "project settings"?
3) Is that all I need to do? I notice that other games have steam_api.dll in their steam folders. Do I need to include that with my build?
Thanks.
1) Do these .dll files go into the WME Devkit folder in program files?
2) Do I need to select wme_steam.dll in the "plugins" section of "project settings"?
3) Is that all I need to do? I notice that other games have steam_api.dll in their steam folders. Do I need to include that with my build?
Thanks.

1) Yes.
2) Yes. If you do that, ProjectMan will include the plugin with the final build. Otherwise you'd need to copy the file yourself.
3) Yes, you need to install steam_api.dll with your game.
2) Yes. If you do that, ProjectMan will include the plugin with the final build. Otherwise you'd need to copy the file yourself.
3) Yes, you need to install steam_api.dll with your game.
Thanks man. 

I seem to have found a problem with the plugin.
I've noticed that if you load a game, it stops working, and won't set any more achievements. I'm not loading an old save. I've tested it by starting a new game, doing the first achievement (which works fine), then saving the game, then loading the game, then doing the second achievement (does not get set). If I do not save and then load game, both achievements are set no problem.
I can't see how I am doing anything wrong. I'm just saving and then loading, which is what anyone playing the game would be doing.
I've noticed that if you load a game, it stops working, and won't set any more achievements. I'm not loading an old save. I've tested it by starting a new game, doing the first achievement (which works fine), then saving the game, then loading the game, then doing the second achievement (does not get set). If I do not save and then load game, both achievements are set no problem.
I can't see how I am doing anything wrong. I'm just saving and then loading, which is what anyone playing the game would be doing.
Seems to work ok if you quit the game, restart it, and THEN load the game and continue playing. But if you save and then load within the game, and carry on playing, the achievements stop being set.
EDIT
Ok, this actually doesn't seem to work. Nothing Steam related will work after loading a game. Not even my Achievement reset button. It's like the connection to Steam has been severed. I've tried adding "RequestStats" to AfterLoad to reconnect. Nothing. It just stops working after you load a game.
This is my reset code:
The reset code checks the connection, and if it's there, then it resets the achievements, and displays the message. After loading a game, I do not get the game.msg displaying, so that means the stats are NOT available, which means the connection is not there anymore. But why should loading a game result in this?
MORE EDIT:
Ok, so after more tests, I've discovered that if I put "global SteamAchieve = new SteamAPI();" in game.script, then nothing Steam related will work after loading a game, no matter if you exit the game and reboot or not.
But, if I define "SteamAchieve" in a scene_init.script (only on first visit), then Steam WILL work if you exit the game, reboot, and then load. But, it still won't work if you save and then load without exiting inbetween.
Also, I've discovered that if you define the Steam object more than once, then everything stops working. I'm no expert, but it kind of feels like the reason this issue is occuring is because for some reason, after you load a game, there is more than once instance of the Steam object. Or it's been defined again after loading. That would explain why, if you don't define it in game.script, then you exit, restart the game, THEN load, everything works normally. If you define it in game.script, it gets defined everytime you start the game, so if you load at that point, then the issue occurs. Hope I'm making some sense.
I think this might have been the problem Azrael was experiencing. If you didn't notice it was occuring after loading, then it would seem like a random problem with no explanation.
EDIT
Ok, this actually doesn't seem to work. Nothing Steam related will work after loading a game. Not even my Achievement reset button. It's like the connection to Steam has been severed. I've tried adding "RequestStats" to AfterLoad to reconnect. Nothing. It just stops working after you load a game.
This is my reset code:
Code: WME Script
- {
- if(SteamAchieve.StatsAvailable)
- {
- SteamAchieve.ResetAllStats(true);
- }
- }
The reset code checks the connection, and if it's there, then it resets the achievements, and displays the message. After loading a game, I do not get the game.msg displaying, so that means the stats are NOT available, which means the connection is not there anymore. But why should loading a game result in this?

MORE EDIT:
Ok, so after more tests, I've discovered that if I put "global SteamAchieve = new SteamAPI();" in game.script, then nothing Steam related will work after loading a game, no matter if you exit the game and reboot or not.
But, if I define "SteamAchieve" in a scene_init.script (only on first visit), then Steam WILL work if you exit the game, reboot, and then load. But, it still won't work if you save and then load without exiting inbetween.
Also, I've discovered that if you define the Steam object more than once, then everything stops working. I'm no expert, but it kind of feels like the reason this issue is occuring is because for some reason, after you load a game, there is more than once instance of the Steam object. Or it's been defined again after loading. That would explain why, if you don't define it in game.script, then you exit, restart the game, THEN load, everything works normally. If you define it in game.script, it gets defined everytime you start the game, so if you load at that point, then the issue occurs. Hope I'm making some sense.

I think this might have been the problem Azrael was experiencing. If you didn't notice it was occuring after loading, then it would seem like a random problem with no explanation.
Ok, I think I've solved this problem.
I had to put "SteamAchieve = null" in the load.script just before "Game.LoadGame(SelectedSlot)".
This seems to reset the Steam object before loading the previous instance of it in the save game. Everything seems to work now. Phew!
I had to put "SteamAchieve = null" in the load.script just before "Game.LoadGame(SelectedSlot)".
This seems to reset the Steam object before loading the previous instance of it in the save game. Everything seems to work now. Phew!

Thanks Dan!!
Hello,
I have a problem with this plugin. I've copied wme_steam.dll and steam_api.dll to WME DevKit folder. At the begining of game.script I added line
Problem is that I can't compile my game because I got error:
Method is called for 'g_Steam' which is not defined
Error applying filter to file [my scene.ini path here]
In project settings/plugins I turned on wme_steam.dll
I really need a help
PROBLEM SOLVED
I have forgot to initialize "global g_Steam;" at my scene.init
I have a problem with this plugin. I've copied wme_steam.dll and steam_api.dll to WME DevKit folder. At the begining of game.script I added line
Code: [Select]
global g_Steam = new SteamAPI(); in base.script I have Code: [Select]
global a_ship_escape; and in my scene.init script where I want to unlock achievment I have: Code: [Select]
if(a_ship_escape == null)
{
g_Steam.SetAchievement("a_ship_escape");
a_ship_escape = true;
}Problem is that I can't compile my game because I got error:
Method is called for 'g_Steam' which is not defined
Error applying filter to file [my scene.ini path here]
In project settings/plugins I turned on wme_steam.dll
I really need a help
PROBLEM SOLVED
I have forgot to initialize "global g_Steam;" at my scene.init

Pages: 1 [2] All
- Wintermute Engine Forum >
- Wintermute Engine >
- Scripts, plugins, utilities, goodies >
- Topic: Steam plugin






Logged




