Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#13414 closed defect (fixed)

AGI engine doesn't load invalid GameIDs.

Reported by: Doomlazer Owned by: bluegr
Priority: low Component: Engine: AGI
Version: Keywords:
Cc: Doomlazer Game:

Description

I'm unclear whether this intentional or a bug, but AGI games that aren't in the detection tables can't be launched in SVM version 2.2.x and above.

For example, take a retail copy of SQ1 (DOS). It can be added and launched to any version of ScummVM without issue. If the game logic is modified in any way, as would happen for a fan translation, in WinAGI or AGI Studio the behavior changes.

In ScummVM 2.0.0 everything works normally - it's identified as not being in the detection tables, but can still be added and launched.

In ScummVM 2.1.x the game cannot be added, but if it's already there (i.e. added through 2.0.0) the game still launches successfully.

In ScummVM 2.2.x and above the game cannot be added or launched.

This is an uncommon edge case, but makes things more difficult for AGI translations since they must be tested in ScummVM 2.0.0 or lower until they are added to the detection tables.

If this is intentional change, so be it, but since modified SCI games will still launch successfully in ScummVM 2.1.x and above I'm assuming it might be a bug with the AGI engine. Fixing it would remove some confusion for AGI translators who don't stumble on the fact that undetected AGI games can still be launched in 2.0.0.

Since it's assumed AGI translations would eventually be added to the detection tables this is a low priority, but I thought I'd call it you your attention anyway. Thank you!

Change History (11)

comment:1 by m-kiewitz, 6 months ago

Hello,

I don't know the exact change, but I'm pretty sure this is a bug.
See SCI, where it's of course supposed to work. There is no way that we would ever have every single fan game in the detection tables, and even if we had, there wouldn't be a way to test new games under ScummVM, which would be quite silly.

comment:2 by ZvikaZ, 6 months ago

That's strange.
I've checked it now, both with ScummVM 2.5.1, and with git version from few days ago, and it seems OK...

I've taken SQ1, verified that's it's added correctly.
Then opened it at WinAGI 2.1.16, changed the message at Logic104, line 68 to :

display(23, 16, "Welcome Zvika");

and then I could both add it, and run the previously added game (and of course, see my modified message at the beginning).

The ScummVM console showed this message (among more information):

Your game version has been detected using fallback matching as a
variant of sq1 ("" "" "13/04/2022 19:26:35").
If this is an original and unmodified version or new made Fanmade game,

When trying to add, I was given a menu with many fallbacks options, one of them was SQ1.
Makes sense to me...

Please try to make the same changes as I did, to make sure that we have a common base line, and report whether it succeeds or not.

If my simple change works for you, but something bigger doesn't, please try to give detailed instructions so I can try to follow along and see the problem, so I can try to fix it...

comment:3 by Doomlazer, 6 months ago

Well, that's odd. I tried your changes to logic104, but for me the game will not launch in either 2.5.1 or 2.6.0git.

It's true that it can be added as "("" "" "13/04/2022 19:26:35")", I was selecting a different option that wouldn't add, but it is possible to add the game to ScummVM by choosing the last option - on that point I was mistaken. The only SQ1 option it displays when adding is the amiga version which won't add.

Despite being able to add the game I still can't launch it with the logic104 change. I'm making the change, then just clicking the run button so it prompts me to compile the changes. ScummVM displays the message "Could not find any engine capable of running the selected game." and the console output is:

Matched game IDs for the agi engine: agidemo, bc-amiga, ddp-amiga,
goldrush-coco3, kq1-amiga, kq2-2gs, kq3-amiga, kq4-coco3, lsl1, mh1-coco3,
mh2-coco3, mixedup-2gs, pq1, sq1-st, sq2, xmascard, 2playerdemo, tetris,
agitetris1998, caitlyn, cardriver1, serguei1, serguei2, shifty0, sq0, sqx,
spacequest35

  {"logdir", 0, "819117da79a2ff8c79c9c1b2b815554c", 372},

WARNING: MetaEnginePlugin for target "SQ-fallback" not found!!
User picked target 'SQ-fallback' (engine ID 'agi', game ID 'SQ')...
   Looking for a plugin supporting this target... AGI preAGI + v2 + v3
WARNING: 'SQ' is an invalid game ID for the engine 'agi'. Use the --list-games option to list supported game IDs!

I would have chalked this up to user error since it's working for you, but this has happened for me with several games (KQ1, flagquest) and Threepwang is experiencing the same thing as well.

Are you changing the game ID? I believe I tried changing it several days ago with no success, but it sounds like in your test you're also leaving it to the WinAGI 2.1.16 defaults same as me.

I'm getting the same outcomes testing on either Mac or PC with both 2.5.1 and 2.6.0. I'm starting with the Steam SQ 2016 Collection version if that makes any difference. As I mention in the OP, everything works as expected in SVM 2.0.0 for me.

Last edited 6 months ago by Doomlazer (previous) (diff)

comment:4 by ZvikaZ, 6 months ago

You're right :-)

I forgot to mention that in WinAGI, I've changed the "GameID" from the default AGI to sq1.

Please try it, maybe it makes the difference.

Last edited 6 months ago by ZvikaZ (previous) (diff)

comment:5 by Doomlazer, 6 months ago

Yes, it works for me when changing the GameID from what it imports in WinAGI as "SQ" to "sq1". I was canceling out of that WinAGI prompt and running the game externally in SVM.

So is it still a bug if ScummVM can't launch AGI fan games with a GameID not in the detection tables? Seems like we've zeroed in on the issue at least.

Last edited 6 months ago by Doomlazer (previous) (diff)

comment:6 by ZvikaZ, 6 months ago

I'm not saying it's not bug.
I just want to understand the situation. What's working and what not.

So, when you import SQ1 in WinAGI, what's its GameID?
If I understood you correctly, that's SQ.
Right?
If so, that's strange, because for me it's AGI.

comment:7 by Doomlazer, 6 months ago

Yes, by default WinAGI is setting the GameID to SQ on import. So strange it wouldn't on your end.

If I import LSL1 it comes in as AGI which works fine. KQ1 imports as KQ1, which works as well.

This might only be a problem for SQ1 and the solution is to simply rename it the GameID to SQ1. Any fan games could use the generic AGI. Thank you for your time looking into this.

comment:8 by Doomlazer, 6 months ago

Summary: AGI engine no longer loads games missing from the detection tablesAGI engine doesn't load invalid GameIDs.

comment:9 by Doomlazer, 6 months ago

According to AGK, WinAGI and AGI Studio are choosing the GameID based on the presence of the .COM game loader in the imported game folder. Usually it's Sierra.com, which sets the GameID to "AGI", but in my case the SQ1 folder has SQ.COM, so it's getting set as "SQ", which SVM has trouble with.

There were some other contributing factors: I was mistakenly choosing the amiga option for SQ1 when adding the game to SVM (user error), and if I make changes to a game already added to SVM I believe I must remove the game and re-add it to SVM for the game to load.

This ended up being more of a "me" problem than I initially realized, so I don't know if any changes are really needed. Thank you m-kiewitz, ZvikaZ and AGK for taking the time to address this and help me understand what was going wrong!

comment:10 by bluegr, 6 months ago

Owner: set to bluegr
Resolution: invalid
Status: newclosed

Thanks for the heads up! So, this is not a bug in ScummVM. Closing as invalid

comment:11 by bluegr, 6 months ago

Resolution: invalidfixed

This bug has been addressed by PR 3814:
https://github.com/scummvm/scummvm/pull/3814

Note: See TracTickets for help on using tickets.