- The game's GameID in WinAGI is determined by the .com file's name, or `AGI` if it's `sierra.com`
Not quite true. If a valid game loader (*.COM file) is detected when importing a game, the loader's file name is used as the default WinAGI GameID, which is usually 'KQ1', SQ1' or whatever the install batch file named the loader. If the loader is 'sierra.com, then the default WinAGI GameID will be 'SIERRA'. If no valid loader file is found, then the default WinAGI GameID will be 'AGI'.
Doomlazer pointed out correctly below that the default WinAGI GameID is 'agi' if the game loader is 'sierra.com'.- ScummVM tries fallback detection, based on GameID's value in WinAGI
To be clear, this will only be the case if your game includes the WinAGI game properties file (*.wag) in your game's directory. If you don't include the WAG file, then SCUMMVM will (obviously) use a different method to determine what game (and version) is running.
- Note that Space Quest 1 (for example) might have 'sq.com' in some distributions, which will make its GameID in WinAGI to be 'SQ', while scummvm expects it to be 'sq1'. Just modify it in WinAGI
(emphasis added)
THIS! The WinAGI GameID property can easily be changed to whatever you want it to be. You don't have to accept whatever it gets set to when a game is imported.
The WinAGI GameID has no intrinsic value to an AGI game; it is there to help identify your game while you are editing. There is a built-in feature that let you easily use that property as an argument for the 'set'game.id' command, but that's it.
The SCUMM folks have decided to also use the WinAGI GameID in their detection functions- while I am generally OK with that, I must say I'm mildly annoyed that their implementation seems to be a source of confusion regarding what's going on with WinAGI. I don't think it has to be this complicated. If it were me, I would have assumed any game that includes a WinAGI game file is either a fan-made game, if the WinAGI GameID is not a known Sierra gameid, or a variant of a Sierra game if it is known.
I don't normally use ScummVM when runnig/testing games. So did a small bit of testing (using v2.5.1). First, by running ScummVM directly, and then trying to Add and then Start a game.
If I modify SQ1, and leave 'sq1.wag' file in the game directory, with a WinAGI GameID value of 'sq1, and then Add the game to ScummVM, it shows a list of games to choose from, including
- Space Quest I: The Sarien Encounter ("<description>" "<version>" "<datetime>"/DOS)
where <description>, <version> and <datetime> correspond to the Description, GameVersion and LastEdit fields from the sq1.wag file. And the game runs in ScummVM.
Changing the WinAGI GameID to any other 'Sierra' gameid ('kq1', pq1', etc) also shows a similar option, and the game will run.
If I modify the WinAGI GameID value to 'TEST' (or anything other than a Sierra gameid or 'AGI'), I get the option to add
- ("<description>" "<version>" "<datetime>"/DOS)
but when trying to run the game, it fails, saying "Could not find any engine capable of running the selected game."
If I modify the WinAGI GameID value to 'AGI', then I get this option:
- Sierra AGI game ("<description>" "<version>" "<datetime>"/DOS)
and the game runs. So, using a WinAGI GameID of 'AGI' or a Sierra gameid will allow a game with a .WAG file to run in ScummVM. Using any other WinAGI GameID won't.
Next, I tried to run ScummVM from within WinAGI, by selecting ScummVM as the game platform.
The first thing I noticed is that there's a bug in how WinAGI builds the command line to add to ScummVM. It uses a hard coded value of 'agi' for the [game] parameter. I'm pretty sure I tested that when I added this feature, and I recall thinking that 'agi' as a command line [game] parameter meant to run the game using the AGI engine. Either I'm mis-remembering, or something changed in ScummVM since I added that.
The effect of this is that if the WinAGI GameID is *not* 'agi', then the game won't run when you click the 'Run' button. You'll get a message from ScummVM saying the game data files can't be found.
That was easy enough to fix. (I'll try to get a new version out shortly.) But it exposes the same issue as noted above - if the WinAGI GameID is not 'agi' or a Sierra gameid, then the game will not run in ScummVM when you click on the 'Run' button.
That kinda sucks, and I hope the fix you submitted to ScummVM will fix that.