Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Pages: 1 [2]  All

Author Topic: Steam plugin  (Read 10914 times)

0 Members and 1 Guest are viewing this topic.

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 39
  • Offline Offline
  • Gender: Male
  • Posts: 5668
    • View Profile
    • Dead:Code Site
Re: Steam plugin
« Reply #15 on: March 24, 2014, 04:38:08 PM »

Did you define the achievements on your steam project page? Those achievements names ("achievement_2") need to be present in steam's database.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Gurkan

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
    • View Profile
Re: Steam plugin
« Reply #16 on: March 25, 2014, 08:57:18 AM »

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.
« Last Edit: March 25, 2014, 05:30:51 PM by Gurkan »
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 299
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Steam plugin
« Reply #17 on: December 14, 2014, 09:28:03 AM »

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
Logged

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 299
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Steam plugin
« Reply #18 on: December 18, 2014, 04:24:00 AM »

Any suggestions anyone? I kinda need this fast.
Logged

Dan Peach

  • Occasional poster
  • **
  • Karma: 4
  • Offline Offline
  • Posts: 95
    • View Profile
    • Viperante - Game Development
Re: Steam plugin
« Reply #19 on: June 02, 2015, 02:15:58 PM »

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. :)

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 39
  • Offline Offline
  • Gender: Male
  • Posts: 5668
    • View Profile
    • Dead:Code Site
Re: Steam plugin
« Reply #20 on: June 04, 2015, 05:49:08 PM »

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.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Dan Peach

  • Occasional poster
  • **
  • Karma: 4
  • Offline Offline
  • Posts: 95
    • View Profile
    • Viperante - Game Development
Re: Steam plugin
« Reply #21 on: June 05, 2015, 01:14:27 AM »

Thanks man. :)

Dan Peach

  • Occasional poster
  • **
  • Karma: 4
  • Offline Offline
  • Posts: 95
    • View Profile
    • Viperante - Game Development
Re: Steam plugin
« Reply #22 on: June 07, 2015, 01:25:53 AM »

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.

Dan Peach

  • Occasional poster
  • **
  • Karma: 4
  • Offline Offline
  • Posts: 95
    • View Profile
    • Viperante - Game Development
Re: Steam plugin
« Reply #23 on: June 07, 2015, 01:46:37 AM »

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:

Code: WME Script
  1. else if(Keyboard.KeyCode==VK_HOME)
  2.   {
  3.    if(SteamAchieve.StatsAvailable)
  4.     {
  5.          SteamAchieve.ResetAllStats(true);
  6.          Game.Msg("Achievements Reset");
  7.         }
  8.   }
  9.  

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.  ;D

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.

« Last Edit: June 07, 2015, 04:43:52 PM by Dan Peach »
Logged

Dan Peach

  • Occasional poster
  • **
  • Karma: 4
  • Offline Offline
  • Posts: 95
    • View Profile
    • Viperante - Game Development
Re: Steam plugin
« Reply #24 on: June 07, 2015, 05:44:41 PM »

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!  ;D

HanaIndiana

  • WinterNewb
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Female
  • Posts: 7
  • It's all about strategy and adventure!
    • View Profile
Re: Steam plugin
« Reply #25 on: July 26, 2015, 01:33:49 AM »

Thanks Dan!!
Logged
hanagames.weebly.com

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: Steam plugin
« Reply #26 on: January 23, 2016, 10:08:27 PM »

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
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 :D
« Last Edit: January 23, 2016, 10:43:06 PM by hubertMichael »
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula
Pages: 1 [2]  All
 

Page created in 0.233 seconds with 17 queries.