ENGINE PLUGIN: AGSteam v3.4 (Windows; Linux; Mac OS X)

Started by monkey0506, Thu 27/10/2011 05:05:47

Previous topic - Next topic

AGD2

Not sure if I'm doing something wrong here, but I'm using v3.4 (Windows) with the "unified" dll. I went through all my game scripts and changed all instances of AGSteam. to AGS2Client. I also changed all the wrapped code from #ifdef AGSteam_VERSION to #ifdef AGS2Client_VERSION.

Previously, it compiled and the game played just fine. But with the new dll and the amended code above, I get the following issues:

1) With the Steam plugin enabled. If I compile the game, I get a compile error (which doesn't happen if I compile with the AGSteam.dll plug-in is disabled):

QuoteHero.asc(1778): Error (line 1778): buffer exceeded: you probably have a missing closing bracket on a previous line

The offending code is:

Code: ags

   #ifdef AGS2Client_VERSION
   AGS2Client.SetIntStat("WAFE_FIRE_POINTS", giWAFE_Points_FIRE");
   AGS2Client.SetIntStat("WAFE_AIR_POINTS", giWAFE_Points_AIR");
   AGS2Client.SetIntStat("WAFE_WATER_POINTS", giWAFE_Points_WATER");
   AGS2Client.SetIntStat("WAFE_EARTH_POINTS", giWAFE_Points_EARTH");
   #endif


It still crashes if I wrap each of the above four lines individually.


2) With the Steam plug-in disabled, entering any game room that contains the code AGS2Client.SetIntStat will crash the game with:
QuoteAn internal error has occurred. Please note down the following information..
(ACI version 3.4.1.15)
Error: Unable to create local script: Runtime error: unresolved import 'AGS2Client::SetIntStat^2'

I updated all script instances of AGSteam. to AGS2Client. and it worked fine when they were AGSSteam. instances.

Am I missing something really obvious here?


Crimson Wizard

Quote from: AGD2 on Thu 04/10/2018 17:04:35
QuoteHero.asc(1778): Error (line 1778): buffer exceeded: you probably have a missing closing bracket on a previous line

The offending code is:

Code: ags

   #ifdef AGS2Client_VERSION
   AGS2Client.SetIntStat("WAFE_FIRE_POINTS", giWAFE_Points_FIRE");
   AGS2Client.SetIntStat("WAFE_AIR_POINTS", giWAFE_Points_AIR");
   AGS2Client.SetIntStat("WAFE_WATER_POINTS", giWAFE_Points_WATER");
   AGS2Client.SetIntStat("WAFE_EARTH_POINTS", giWAFE_Points_EARTH");
   #endif


You have either missing opening quotemark or unnecessary ending quotemark at the second parameter.

AGD2

Quote from: Crimson Wizard on Thu 04/10/2018 17:12:21
You have either missing opening quotemark or unnecessary ending quotemark at the second parameter.

Damn, how the hell did I not notice that? It's one of those days, I guess. Thanks, CW.

Okay, that's solved both issues after I rebuilt all the files.

AGD2

I'm getting a few reports from beta testers that with AGSSteam v3.4, there's an issue with the Steam overlay (Shift + TAB), which I have also observed myself.

While the Steam Overlay is active, if you click anywhere (for example clicking on your friends list or looking up guides etc.) the game reacts as if you had clicked in-game with whatever icon was active at whatever placement it had when you opened the Steam Overlay. For example, if you have the walk icon selected, EGO starts moving to the spot where the cursor was pointing in the game. If you have the eye icon selected, EGO comments on whatever the cursor is pointing at behind the Overlay.

This happens with both the Open GL and Direct3D 9 drivers. (With the Software renderer, the Steam overlay does not appear at all when ALT + TAB is pressed).

AGD2

#144
Has anyone here released a game on Steam with AGSteam v3.4 yet and had it functioning stably?

My beta testers keep getting "Null String Referenced" fatal crashes on seemingly random achievements when SetAchievementAchieved is called. The same code didn't crash the game in previous versions, and I can't see anything in the AGS code or in my Steamworks stats/achievements settings that should cause this crash.

Sometimes I'll recompile the game and tweak some unrelated AGS code (and not edit any of the achievements or stats on the Steamworks side), then push the update to Steam, and suddenly the "Null String Referenced" fatal crash stops occurring for that achievement, but starts happening for other achievements.

Been trying to solve the issue for a few weeks now, but it seems v3.4 is possibly unstable and I may need to return to an older version.

Can you shed any light ton this, Monkey?

Dave Gilbert

The dll files we used for Unavowed are dated May 26th, 2018 and we've had no problems on PC. We've had issues with achievements not being unlocked on Mac, but nothing that crashed the game.

Chicky

AGD2, did you make any progress with this? Manage to find out what was causing the issues?

If anyone has a link to the dll files Dave used (May 26th 2018) I'd appreciate being pointed in the right direction. Github confuses me!

AGD2

#147
Yeah, it turns out that I needed to have all of the achievements referenced in my game code also set up in the Steamworks back-end. From what I could see, the AGSteam documentation mentioned nothing about this, so I was adding the achievements to Steamworks gradually, as time permitted. I had about 34 of 45 achievements added to Steamworks. But when I added them all, the crashes stopped happening.

So, it's not a bug with the plug-in. Just something to be aware of.

Stranga

#148
Hello there,

I know this is an old topic, but I just want to find out if this plugin will work with AGS 3.5.0? I have tried to implement it the same way as in v 3.4.1, but it doesn't seem to unlock anything. I've also tried both AGSteam and AGS2 plugins. My guess is that the plugin is out of date? I could be wrong but just taking a stab in the dark.

P.S sorry if I broke any rules, just really need help with this.


Edit: I forgot to add all the .dll files to my compiled folder. So it does work with 3.5.0. My bad everyone!

HappyCat

Can someone please tell if there's a way to use this plugin with Android AGS builds?

eri0o

There's no Steam for Android, so no.

drlynch

Hi, everyone:

Sorry, a question. Surely it has already been answered.

Does this plugin work to be used when developing under Windows? I ask because the name of the Discussion Thread indicates "Mac Os X".

Thank you and happy holidays.

Crimson Wizard

Quote from: drlynch on Thu 26/12/2019 13:28:48
Does this plugin work to be used when developing under Windows? I ask because the name of the Discussion Thread indicates "Mac Os X".

Yes, and title means that Mac OsX support was added last.

If you check download links you will see ones for Windows, linux and mac.

Khris

I was confused by this at first, too. Maybe a mod could edit the first post's title again, to indicate that it's also for Mac OS X, not just?

drlynch

Quote from: Crimson Wizard on Thu 26/12/2019 13:51:48
Quote from: drlynch on Thu 26/12/2019 13:28:48
Does this plugin work to be used when developing under Windows? I ask because the name of the Discussion Thread indicates "Mac Os X".

Yes, and title means that Mac OsX support was added last.

If you check download links you will see ones for Windows, linux and mac.
You're right ;), in Github it is clear that it exists for Windows, Linux and Mac.

Thank you very much for your contribution. Very useful.


Quote from: Khris on Fri 27/12/2019 11:52:48
I was confused by this at first, too. Maybe a mod could edit the first post's title again, to indicate that it's also for Mac OS X, not just?
You're right. In my opinion, the title creates confusion.

It would be better if the title was changed to another one where the different operating systems were titled.



Happy Holidays.

guga2112

Hi, I need all the help I can get.

I downloaded release 3.4 and followed the instructions. The editor plugin works fine, I can use the calls in the script and so on.

However, it seems like it's totally ignored by the engine. I can even remove the .dll file from the folder, nothing happens. The .Initialized property is always false and all calls return null.

I even tried to compile my own version, adding new calls or changing some returns to fixed values. New calls don't get registered and the game crashes. And my return values aren't there, the calls always return null.

It just seems like the engine is just not calling the .dll. What am I doing wrong? I tried with the unified, the disjoint, release, debug. Nothing. The changes I make on editor's side work, the engine ones disappear.

guga2112

So, I was wondering why my executable was still getting symbols like IsAchievementAchieved^1 even after I removed the plugin.

The code for release 3.5.0 creates stub functions for said plugins.

Can this create conflicts? Is that the reason why the actual calls don't get invoked?

Crimson Wizard

Quote from: guga2112 on Fri 06/03/2020 09:58:32
So, I was wondering why my executable was still getting symbols like IsAchievementAchieved^1 even after I removed the plugin.

The code for release 3.5.0 creates stub functions for said plugins.

Can this create conflicts? Is that the reason why the actual calls don't get invoked?

Hello.
Stubs are supposed to be generated only if the engine cannot find matching plugin. So the first question is whether plugin is found by the engine.
Hmm, no, that's second question, and the first question is, what system are you running on. :)
Try doing following, open acsetup.cfg near your game's exe, and add following under "misc" section:
Quote
[misc]
log=1
When you run next time, a log should appear in the standard savegame location (for example, it is "%USERPROFILE%\Saved Games\.ags\ags.log" on Windows).
Somewhere in this log engine will report what plugins does it look for, whether it found ones, and if not, was it able to find/generate stubs.

guga2112

Thanks for the help. I'm running Windows 10, 64 bit. The editor is version 3.5.0 patch 1.

So, there was indeed an error on my side, I didn't add steam_api.dll to the game folder.

However, it didn't completely solve my problem. I recompiled the plugin on VS2019 against the current Steam SDK, and if I use that one, it works fine.

But if I use both plugin and api dll from the github releases, it still fails.

So I suppose the problem is solved... for me. But I don't have time to look further into this.

guga2112

Nevermind, it works now  :-\ I guess I mixed all the DLLs I had...

SMF spam blocked by CleanTalk