AGS unresolved import

Previous topic - Next topic

BillyBuerger

I just downloaded the game from GOG and installed it.  When I try to run, I get an error...

Loading game failed with error:
Script link failed: Runtime error: unresolved import
'AGS2Client::SetAchievementAchieved^1'.

The game files may be incomplete, corrupt or from
unsupported version of AGS.

The install went without any errors so I'm assuming there was no issue in the download.  I'll try downloading again later as I don't have very fast internet and need to do other stuff on the internet right now.  Is there anything I can check on?  Does AGS get registered with the system that it might be conflicting with something else?

MusicallyInspired

I just installed from the GOG install file with no issues. I was going to suggest using GOG Installer's file verifier/checker but it doesn't seem to exist in this installer. Try redownloading. It's possible for the installer to be intact but still have corrupted somehow when downloading.

TwoEdge

If I understood it correctly, a developer posted that there's a .dll dependency that's tied to achievements in the gog version and you must run it through Galaxy. Apparently, the only true non-drm version is the humble one. Here's the post in question:

https://steamcommunity.com/app/270610/discussions/0/1741106440040790058/

MusicallyInspired

Ah. Yeah, even though I installed with the installer, when I launched it it launched GOG Galaxy automatically.

TwoEdge

Yeah, but I figured he probably didn't have galaxy installed (as many gog users), hence the error.

MusicallyInspired

Right. I just didn't make the connection that it starting up Galaxy was for that reason.

BillyBuerger

That's probably it and is annoying AF.  Part of the reason why I liked GOG was I didn't need to use a client to play my games.  And they let me download the game itself directly, not through their client.  If this is the issue, at least it should give a reasonable message that the client is required instead of just bombing.  Ug, thanks for your help.

GameDevChris

You shouldn't need to have Galaxy installed to play the GOG version of the game. Just the Galaxy.dll and agsgalaxy.dll files need to be in the game folder when you launch it. As long as they're there, then the game should work without any issues.

It sounds like the files are corrupt. Re-downloading them should probably fix it.

BillyBuerger

Hmmm, maybe it's something else than.  I redownloaded, same issue.  Installed Galaxy and ran, same issue.  Uninstalled the game and reinstalled with Galaxy installed, same issue.  Only thing I haven't done yet is install directly from Galaxy instead of from the downloaded copy.  The install did include agsgalaxy.dll and galaxy.dll in the game folder already.

BillyBuerger

Reinstalled the game directly from Galaxy and still got the same problem.  There must be something on my PC that's conflicting and not using the right versions of the DLL or something.

BillyBuerger

Good news is that I installed it on my Laptop and it works just fine.  So definitely something about my setup on my primary desktop that's having the issue.  Just not sure what that is.

GameDevChris

Yeah, that's very strange. It seems people experience this issue from time to time with various AGS games that use the Steam/GOG plugins. Here's a similar report someone posted on the Steam forums for another game. Steam and GOG use a shared plugin system on AGS, you'd just need to grab the "galaxy" dll files instead of "steam" ones wherever "steam" is mentioned in the filename or instructions:

https://steamcommunity.com/app/253110/discussions/2/1620600279667799528/

BillyBuerger

I'm not following.  The link does describe the same problem on steam.  But it talks about downloading new versions of the dlls which only seem to have steam versions.  No galaxy versions are listed.  It does seem to suggest that some of this stuff should work for steam or galaxy but without spending too much time getting into the weeds of this stuff, I'm not following what would need to be done different from the steam solution.  And it seems weird that downloading new versions of the dlls would be required when the same dll versions that came with the game work on other systems.

Could you be more specific about what files I would need to get for galaxy?  Maybe I'm just missing it.  That happens often enough.

GameDevChris

#13
It's possible that you have a DLL conflict: that is, somewhere on your computer you have an earlier version of AGSteam.dll, and AGS tries to read that one instead of the more recent one (which should be in your Mage's Initiation folder). Can you run a search on your computer for files named AGSteam.dll, and see what it turns up?

Alternatively, you may need to update Visual C++ Redistributable for Visual Studio 2015 - this is a small one-time download, see details here: https://www.microsoft.com/en-us/download/details.aspx?id=48145

Upon further thought, I'm not even sure the suggestion posted in that Steam thread would even work,as our game doesn't use the disjoint version of the AGS Steam plug-in. If you still want to give it a try anyway, here are the links:

1. Back-up all the .dll files in your game directory, so that you can copy them back over if the steps below don't work.

2. Download the file "agsgalaxy-disjoint.dll" from here:
https://bitbucket.org/monkey0506/agsgalaxy/downloads/

Rename it to just agsgalaxy.dll and then copy it into your game folder and overwrite the existing "agsgalaxy.dll" file.

3. Also download "steam_api.dll" from here:
https://github.com/monkey0506/agsteam/releases

Copy it into your game folder and overwrite the existing file.  If it doesn't work, copy your original back-up dll files back over these ones.

--EDIT--

I've also heard that Avast anti-virus can possibly cause that. If you use that, try temporarily disabling it before running the game. If it works then, you may need to add the game's .exe file to your whitelist.

BillyBuerger

Thanks for the reply.  I downloaded the dlls you specified and that doesn't change anything.  They appear to be exactly the same files the game already comes with.  I also tried downloading the VC redist.  Windows errors saying that newer versions are already installed.  I have 2010, 2013 and 2017 installed, x86 and x64.  I've tried uninstalling 2017 and then I can install 2015.  I realized I haven't rebooted since trying any of this so I did that while I was at it.  Still nothing.  I reinstalled 2017 again as it likely came with Visual Studio 2017.  Finally, I don't have avast or any other antivirus other than Windows.

GameDevChris

Are you able to test it on another computer or laptop, so we can determine whether its something to do with that specific PC?

BTW, did you buy the game directly from GOG or were you a Kickstarter/Paypal backer?

BillyBuerger

Yes, it works fine on my laptop.  So the issue is specifically related to my PC.  I was on the Kickstarter and redeemed through GOG.

GameDevChris

I wish we could find a definitive fix for this bug, as it's really annoying not to be able to give advice that "just works".

What I'd recommend you do is download the DRM-Free build from the link in Humble and play that instead. It doesn't contain any dependencies on Steam/GOG Galaxy plugins and won't result in this crash.  Just be aware that if you do that, your savegames between the DRM-Free version and the Steam/GOG version won't be compatible with each other. The DRM-Free version also has all the same achievements in game (Viewable by pressing F2).

BillyBuerger

Ug, yeah, I'm stupid.  I saw the Steam and GOG options and picked GOG over steam as I've had some good results with GOG in the past.  But I stopped and didn't see the DRM free option below that.  Downloaded that and everything is fine.  Thanks for your help with this.

GameDevChris

No worries, it's still troubling that the glitch exist. I'll try to get to the bottom of it. Sorry for the inconvenience!

Dungy

I also continue to have the same problem as above.  I purchased a GOG version, and do not have a Humblestore version.  Is there other advice on how I can play this game without purchasing a second copy?  Any ETA on fixing this bug?

GameDevChris

Check your PM's, I just sent you a message.

If the solutions above don't work, I'm not sure it can be "fixed". We didn't write the AGS Galaxy plug-in, so it's difficult to pinpoint why this crash occurs on some systems and not others. Frustrating, nonetheless. If a solution is found, we'll definitely roll it out, ASAP.

But in the meantime, the best thing we can do is advise people to play the DRM-Free build that's not linked to Steam or GOG's api's.