SCI/Script Patching Scope
Script Patches
ScummVM's SCI engine features a script patcher written by Martin Kiewitz. We use this to fix bugs in the original games and even add new features. ScummVM's SCI engine is now so stable that most reported bugs turn out to be bugs in Sierra's scripts.
We have many script patches There are two parts to each: a signature of known bytes and the new bytes to replace them with. When a script is loaded and a signature matches, the bytes are replaced in memory before the script is run. Inline patching is an effective technique, but there are limits to what it can do. That is probably for the best.
The ability to modify games is a great power with a great responsibility. ScummVM developers, and the FreeSCI developers before them, spent a tremendous amount of effort to accurately reproduce the SCI engine. They did not do this work just to rewrite the games to be different. The question is what do we change, and what do we not.
Guidelines
The following are guidelines for what is in scope for script patches. These are not rules, this is just an explanation of what we already do, and there are exceptions. This gives us something to point to when an issue is beyond our scope or ability to patch.
In scope for patching
- Crashes
- Lockups
- Timing problems
- Game breaking bugs
- Wrong or missing messages (when the right message is available)
- Score bugs
- ScummVM incompatibilities
- Optional enhancements
Out of scope for patching
- Puzzles
- Story
- Message text
- Input commands
- General behavior
- Quest for Glory's RPG rules
Gray areas
- Non-fatal programming mistakes
- Quest for Glory 4
- Fun
We try to only patch uncontroversial details. Almost every patch prevents something unwanted and unintentional from happening. Usually these things are completely unrelated to the game, such as a crash. This is one of the reasons why patches aren't optional. If it really would be preferable for a patch to not be applied, then that patch is probably a mistake. Please let us know if you think a mistake has been made.
Quest For Glory
We receive a lot of bug reports about original behavior in QFG games.
QFG's RPG rules may not always make sense, but it is not our place to change them. For better or worse, they are what they are. They are the games. Even if we wanted to change them, it would be a never-ending task, and beyond what can be done with inline patching. The only way to address these issues is with a full fan-mod, such as Ash Lancer's QFG3 Update and QFG4 Update. See the release notes to appreciate how many rule bugs are in these games.
QFG4 is a special case because it is the buggiest SCI game. It was the final SCI game for ScummVM to officially support, because first we had to fix enough script bugs so that it was playable. QFG4 has far more patches than what would normally be acceptable, and their scope is far beyond what we would normally allow. Many of these patches were written by a QFG4 specialist years ago. There are still countless script bugs, and we will never be able fix them all — the supply is endless. We are now only focused on game-breaking bugs.