Programmatically finding the version of AGS used for a game.

Started by Calin Leafshade, Wed 16/03/2011 21:10:17

Previous topic - Next topic

Calin Leafshade

Does anyone have any idea how I might find out which version of AGS was used to make an AGS game programmatically (specifically in .NET but any platform would be useful)

Failing that does anyone know how i might determine if a game was made using the dos version of the engine?

Clarvalon

Game.agf has it as an attribute of AGSEditorDocument:

    <AGSEditorDocument Version="3.0.3.2" VersionIndex="4" EditorVersion="3.1.2">

The System.IO namespace should be enough to grab it, though it might be cleaner to use System.XML.  Or deserialise the whole thing if you're feeling so inclined.
XAGE - Cross-Platform Adventure Game Engine (alpha)

monkey0506

I'm pretty sure he was specifically referring to compiled games, in which case he wouldn't have access to the AGF file at all.

I do know that (at least) the latest versions of AGS have the AGS version in the file's metadata under "Product version". I'm sure that .NET has some way to read a file's metadata, though I've never specifically done it or looked into it. I don't know how long AGS has added this metadata though..

Gilbert

AFAIK, if you right click the game executable and click the Version tab you'll find the engine version. I think you can retrieve these information from another programme but I'm not so sure.

Wyz

If you want a program to find the version of an executable you should probably play around with GetFileVersionInfo.
Life is like an adventure without the pixel hunts.

SMF spam blocked by CleanTalk