A Python tool performs static analysis on decompiled Sierra SCI adventure games (Leisure Suit Larry 2, King's Quest IV/VI, Laura Bow 2) to find softlocks — states where the game accepts input but victory is no longer reachable. It abstract-interprets decompiled scripts into a graph of room transitions, item movements and plot-flag writes, derives guard conditions, verifies they introduce no new softlocks, and recompiles patched scripts using a headless port of SCICompanion's compiler. No game-specific config is needed; start room, victory conditions, death signals and debug flags are all discovered automatically from each game's code. The project builds on sci-tools for decompilation and SCICompanion for compilation, and is released under MIT (with the SCICompanion port under GPL-2.0+).
Table of contents
DemoThe thirty-second versionWhat counts as a softlock? (or: Caveat Player)StatusHow it works, brieflyInstallRun itRunning the testsLayoutFuture workLicensingQuestions this post answers
How does this tool distinguish an unavoidable softlock from a death you can still recover from in old adventure games?
It distinguishes unwinnable states from avoidable deaths by reachability, not by death conditions. If an item needed to survive a later hazard is still obtainable from the location where the death occurs, that death is left in as an intentional hint; if the requirement can no longer be met, the crossing that causes it is blocked at the last point where the player can still comply. Developers exploring program analysis techniques can follow projects like this on daily.dev.
What toolchain is used to decompile and recompile Sierra SCI game scripts for patching?
Decompilation uses sci-tools (by sluicebox, MIT licensed), extended with a fork that adds a JSON typed control-flow AST output alongside the normal .sc source emitter. Recompilation uses SCICompanion's script compiler (by Philip Fortier, GPL-2.0+), ported to run headless on Linux via a compatibility layer replacing its MFC/Windows dependencies, then wrapped in Sierra's loose-patch header format. daily.dev surfaces open-source reverse-engineering projects for developers building similar analysis pipelines.
Which Sierra SCI adventure games have been fully analyzed and patched for softlocks so far?
Four games have been analyzed, patched, and play-tested: Leisure Suit Larry 2 (1988, SCI0), King's Quest IV (1988, SCI0), King's Quest VI (1992, SCI1.1), and Laura Bow 2 (1992, SCI1.1). King's Quest V, which uses the SCI1-middle hybrid engine, is in progress on a separate branch, and no game-specific analysis code is required across titles. daily.dev helps developers track progress on niche open-source retro-game tooling projects like this one.