lanceewing / agile

Sierra AGI (Adventure Game Interpreter) engine written in C#
15 stars 7 forks source link

Implement automatic skipping of questions at start in KQ4, GR, MH1 and LSL #54

Closed lanceewing closed 1 year ago

vafada commented 1 year ago

do you have anything in mind on how to implement this?

Im interested at doing the LSL one

lanceewing commented 1 year ago

@vafada , yes I do, in fact I've already implemented it for MH1 and GR. I will push my changes already, as there is a placeholder there for LSL1. I'll let you implement that one, and I'll take a look at the KQ4 one now.

When I was trying to decide where to put it, I decided it didn't really belong in the AGILibrary, as that should detail with the pure resources, and I didn't want to pollute the purity of the AGILE interpreter either. So I decided to put it into a method in the AgileForm class, called PatchGame, that is called after the game is selected, but before it creates the Interpreter instance. I think that putting it there will also make added a preference option for it (as proposed by Collector) easier as well.

I implemented the patch for MH1 and GR in slightly different ways. For GR, I changed a single new.room command in LOGIC.0 to go directly to the title screen sequence rather than the question logic. Seems to work. For MH1, that approach wasn't possible in a clean way, so I decided to patch the "question" LOGIC itself, and changed the first command in the LOGIC to be a "goto" to the line of code that processes a successful answer. This likewise seems to work quite well.

lanceewing commented 1 year ago

@vafada , my code has been pushed to master for the MH1 and GR patches.

lanceewing commented 1 year ago

I have just added the patch for KQ4.

So we now have all four games supported.

Currently we've only tested this with specific versions of these games. Chances are that this part of each game is the same in all released versions, but there is a small chance that some AGI command byte codes may have shifted between releases.

As it is difficult to perform such exhaustive testing, I think we can close this for now, and if a game version is discovered for which any of the patches does not work, then we can revisit.