Show HN: Automatically detect and patch walking-dead states in Sierra games (github.com)

2 points by wkfauna ↗ HN
Hi HN, I've become lazier in my old age and struggle to replay my favorite Sierra games from the 80s and 90s because I keep getting into those situations where I need an item from 3 acts ago, I have no save game handy, and now I gotta make dinner.

So I'm building the Lucasartsifier: a static analysis tool that decompiles Sierra resource files, automatically finds those states, automatically generates code to prevent the player from getting into those states, then emits loose patch files that can be placed alongside the original game resources. There's no game-specific code involved; all the logic is generic, though of course Sierra introduces new idioms and mechanics in every game so every new supported game needs a bunch of engine work.

So for example in Leisure Suit Larry 2, the patched game prevents you from boarding the cruise ship until you have both the sunscreen and the Grotesque Gulp. Without them you die on the raft 3 play-hours later.

So far this works on Leisure Suit Larry 2 (SCI0), King's Quest 4 (SCI0), King's Quest 6 (SCI1.1), and Laura Bow 2 (SCI1.1). I'm currently working on King's Quest 5 (SCI1.0).

This is work done with Claude -- I do the design and playtesting and it does the rest :D

Any feedback, play testing, and suggestions would be great!

80 comments

[ 0.31 ms ] story [ 72.3 ms ] thread
(comment deleted)
Nice job! I actually wrote a blog article about my love/hate relationship with KQ4 in particular - with a particular shoutout to my incredible irritation with the whole golden bridle scene [1].

Without spoiling anything, are you accounting for stuff like a player saving in the Minotaur's Labyrinth without a... shall we say crucial item necessary for a trap scene?

[1] - https://mordenstar.com/blog/kqiv

Yes I'm with you on that bridle! And you can only get it by typing "look down", which is infuriating! I'm also discovering, working on KQ5, that it is really evil in allowing you to use items in certain ways that look fine at first (the action succeeds), but bite you in the butt later because you needed that item for something else and there was an other option you could have used. For example, throwing the leg of lamb at the cat to chase it away will work... but then good luck surviving the mountains. I love these games but MAN.

In KQ6, the patched game prevents you from returning to the Labyrinth entrance unless you hold everything you need for inside. Stepping on the mountain will just not work. So you can save inside... you should be "safe" at that point (as safe as you can ever be in a Sierra game, lol).

> In KQ6, the patched game prevents you from returning to the Labyrinth entrance unless you hold everything you need for inside. Stepping on the mountain will just not work

Nice~

> throwing the leg of lamb at the cat to chase it away will work... but then good luck surviving the mountains.

Agree! Some of the KQs will even give you a few points (not the maximum, since it’s not the optimal action) for doing something that’s considered “good,” even though it puts the game into an unwinnable state later on.

That's evil! But it does make me feel a little better about not using points as a proxy :D
This is so cool, what a great project!

I remember using a single save game and soft locking myself in Space Quest 2 by not getting the glowing gem, and in Space Quest 1 I think by not picking up the shard of broken glass, and being so pissed off about having to replay.

The LSL dip and sunscreen issues you fixed were particularly egregious, by that point I feel like they should have fixed things.

While Sierra should absolutely be recognized for spawning an entire genre of games that were legitimately fun, it is crazy that they were fine with shipping games with these broken states, when it was eminently preventable.

Thanks!! I mean, I can kiiiinda see it as a design philosophy... It does make games harder and make them feel higher stakes. What really gets me is some of the later games that look like they would be safe, but aren't. For example Gabriel Knight 1 has a day structure that looks like it would prevent you from getting stuck... but it doesn't, you can trigger a day's end without getting everything you actually need. That's just, like, evil haha
> it is crazy that they were fine with shipping games with these broken states, when it was eminently preventable.

Given what I know about Sierra (nothing first-hand, just impressions based on what I've read), I would not be surprised at all if this was entirely intentional.

> it is crazy that they were fine with shipping games with these broken states

It was an intentional part of their game design.

"We know that you are brave, but you might want to save."
tangent: this unfortunate design choice by the old Sierra adventure games has been discussed a number of times on the Designer Notes podcast, focused on game design [1]. Soren opens each discussion by asking the guest which is the first game they remember.

[1] https://www.idlethumbs.net/designernotes/

This is so cool - very impressive!

Read the whole ReadMe to understand how you pulled this off.

Halfway through, I shiver, wait a minute I recognize this writing style…

I would have so preferred to remain impressed and excited by what a fellow human came up with - sometimes I really hate what AI is taking from us

I just don't mind it so much. I realized a bit of the way through that the readme was AI generated, and then I read the Show HN intro on this post, and realized the entire thing was AI generated.

But... so what? Is it useful? Yeah, looks like it. Has someone else built it, by hand, and written a readme for it, by hand? No, I don't think so. The world is a slightly better place because this exists, so maybe we shouldn't complain so much about how it was made to exist.

Someone had a frustration, and had an idea about how to solve that frustration, but decided to use a tool to write the code for him, based on his design for how the problem should be solved. That's maybe not how I would have done it, because I enjoy coding for pleasure, but that's just me, and I can absolutely sympathize with someone wanting a problem solved with code, but not wanting to write that code themselves.

> sometimes I really hate what AI is taking from us

I agree that LLMs have not been all roses and rainbows, but in this case, an LLM has given us something that we wouldn't otherwise have.

As soon as I saw bold text, I knew. Humans never bold things.
This is great. Would you provide the changes as patches like they do for romhacks?

This is some true quality of life improvement when playing these games and have to make dinner.

Or the author could get in touch with GoG, who currently distribute several classic Sierra games. I'm sure they would be happy to offer patched versions.
The discussion here reminded me of the "Cruelty Scale" (https://www.ifwiki.org/Cruelty_scale) It was originally created specifically in relation to text adventure games, but seems appropriate to a broader range of game types.

The rankings are based on criteria like how far the game lets you go after making a get-stuck choice before you realize you're stuck, and whether that realization comes with clear information about what the wrong choice was.

The delay is the real killer. You don't realize you're driving off a cliff until you’ve already hit the ground.
Aha, but there's an added dimension to this Sierra-branded cruelty:

A young 8-year-old me, playing Police Quest for the first time. Sits through the briefing. Gets the gun, the ammo, the briefcase, from the locker room. Grabs the car key. Heads out to the parking lot, gets in the car, starts driving... and immediately dies: "you failed to perform the prescribed vehicle walkaround."

A bit of a "gotcha" for sharewareing the game, because said prescription was in a manual I definitely did not own (remember the games that would ask you for, say, the third word of the tenth page of the manual, as a form of DRM? brilliant.)

NO PROBLEM: ASSIGNMENT RECEIVED: I WILL SAVE THE GAME EARLY AND OFTEN!

Begin another playthrough. Lather, rinse, repeat. Play for several hours, carefully save scumming my way to glory: I have built a complex ladder of 10 save slots that I am slowly rotating through. Then the action gets heavier and heavier, and the saves come faster and faster, until the climax of the game, where you have the Death Angel cornered. "Radio for help."

And there it says: "With what radio?"

The one I had left back at the station, I don't know, 10 hours ago? But that's okay, because I can head back to the station and grab it from one of my convenient saves!

No, no I cannot. I have over-indexed and let fear win the day and save scummed myself into oblivion. The earliest save is in a walking-dead state as well. I am toast.

I died a bit that day. A painful lesson for an 8-year-old to learn. As Bennett Foddy says in his Getting Over It soliloquy, "When games were new, they wanted a lot from you; daunting you, taunting you, resetting and delaying you. Players played stoically. Now everyone’s turned off by that."

"use nightstick" - took me ages. I didn't know what a nightstick was, it's not a term known in my country
Pressing random buttons before you know the language of the game your playing is peak gaming childhood for me.
Sierra games didn't use random buttons, you had to type phrases :(
My memory says there's some of them that didn't. Mixed Up Mother Goose, Black Cauldron, and both Manhunter games come to mind. I can be wrong, though. Sierra probably also has a ton of games I don't remember at all. They did a lot of games. A lot.
I legit started learning English from King's Quest 4. One of my first words was "Zounds!".
You could have also learned how to edit the saves to give yourself the radio :) . A tall ask of an 8-year-old of course, but not beyond the realm of possibility. Funny you mention Bennett Foddy's Getting Over It, because that's kind of how I "beat" it. After about 6 years of on and off attempts that always died around the church, I got fed up and edited the physics constants to make the game significantly easier. Since I used my own skill to hack the game and not an outside patch, I consider that "beating" the game in a sense.

I am now thinking if you can pull off an adventure game where some puzzles require editing the save file. It would be pretty tricky to make it understandable to most people. Now that I think about it, I wouldn't put it past Deltarune to eventually have an easter egg that can only be reached from a save state, which is impossible to achieve through normal gameplay. I know it doesn't have one right now, because all the scripts have been examined in depth and nothing like that was found.

i remember using a hex editor to edit save games to give me more in game money. felt like a hacker in a movie :)
For me, cracking open the data for some castle adventure ascii character game was one of the first steps to being a real programmer.
I think I spent more time figuring out how the character save files worked in the original Bard's Tale CRPG than actually playing the game; I certainly made more progress with doing so!
Was this on DOS? "ASCII castle adventure game" brings back memories!
I would suggest, without spoilers, that you go play the original Doki Doki literature club right now.
I did, but found it somewhat boring. Yes, I did get to the stuff you're thinking about, but personally it felt too forced. The game was trying to present itself as breaking the fourth wall in a way that is impossible with something built on Ren'Py. That is, I would say DDLC tries too hard and ends up stretching my suspension of disbelief past its breaking point.

Also, past the weird bits, there isn't anything there. I have no reason to care for these characters. It feels like a vertical slice of a longer game, or a proof of concept.

DDLC has a really cool idea that should be tried again, in a way that remains consistent within its game world, with more character depth and a longer story.

Some of them also had some cheat/debug commands you could get into. I know you could teleport to other screens, but I don't recall if you could use a command to get an item, particularly in PQ1. Or if there was a way to get back to the state you were in before that if you e.g. teleported to the station to pick up something and then tried to teleport back to the screen where you needed the item.

I remember I could not get the obscure nonsensical spells right in KQ3 but I could sort of skip past them to see most of the plot.

While I have genuine sympathy for 8-year-old you, this has made for a thoroughly entertaining story which current you can tell, I and several of my friends I shared it with have laughed thoroughly, one of them remarked:

  That sounds like me….
  Legit, the pre-car inspection and the radio killed me
  Remember it like it was yesterday
Kind of interesting for humans that things like this which at the time are so painful can be amazing to reminisce about years later.
Ha! I love this! This is absolutely an "iykyk" situation. I brought this thread up with my brother and he remembered every bit of it as well.

Here's a friendly reminder you can play Police Quest in your browser, right now:

http://sarien.net/policequest#hq

Perhaps I was always a weirdo but while it did frustrate me when I ran into these I always found it to be an amusing part of the game. So much more so than games requiring specific twitch reflexes or hand eye coordination that I might not be able to pull together. But it probably says something that many of my favorite games back then are described as "punishing" today. Of course these days I wouldn't last 5 minutes if parachuted into one, but I've become soft!

The one exception to the above was the Hitchhiker's Guide to the Galaxy game, which can fuck right off.

Everytime I see a bad guy get cuffed in a movie in the front, I say "nope! the cop can get choked out now!". Thanks Police Quest, you taught us all a little safety that day.
> "When games were new, they wanted a lot from you; daunting you, taunting you, resetting and delaying you. Players played stoically. Now everyone’s turned off by that."

Most old games had a very short gameplay, single digit hours. They had to be challenging by any means so the player gets their money's worth.

It blows my mind to go back and look up how long some games such as Sonic 2 actually took, compared to the amount of time I spent failing to complete it in my youth.
I remember taking forever to finish the 1993 version of The Punisher on an arcade machine, and never managed at all for the 1991 NES version, only to finish them in probably 1h in an emulator with about a bazillion coins/retries :).
Yeah I played Grim Fandango with a guide and clocked something like 8 hours.

There was also the conspiracy that publishers made a lot of money with selling strategy guides back in the days.

The final scene in PQ1, where you're incognito? I'm pretty sure you don't need a radio there, or are even allowed to have one. You get searched before they let you into the poker room. Instead you get a hidden pen transmitter from the cops in your hotel room.
Not the poker room... the... park? In the bushes? You're asking a lot of eight-year-old me's memory here, man.
Just trying to sort out the details. I think any story, even a funny one, improves when the facts are correct.

The scene in the park indeed requires the radio. It's not very climactic though; you're just arresting some drug dealer, not confronting Death Angel.

This is why you dont use linear save frequency. 5 min, 10 min, half an hour, one hour, two hours etc
I still do this. Save in a new slot when I start something new and cycle between a few slots as I go along. I'm sure I wouldn't need that with most newer games and I rarely if ever jump back to undo something, but somehow I feel like any of those saves could become corrupted at any time or I could be soft-locked somewhere.
If anyone wonders why adventure games died...
LucasArts kept them alive for a few more years :)

But also, you die aplenty in a FPS game.

One of the worst cases of this I played back in the 80s was Ultima V. To avoid spoilers, there's an obscure item that you need to get before you attempt the (very long) final dungeon, but the game only hints at its existence. If you neglect to bring it, you are allowed to play to the very end at which point it tells you that you are marooned in the final screen and cannot win because you didn't bring the item. Ultima V is still my favorite Ultima, but that part of it was ultimate cruelty!
[dead]
The volcano at the end of Leisure Suit Larry 2. The elevator door opening after you drop your bomb into the crater is handled in the PIC, not in the room script. So the game ending condition is essentially invisible if all you look at is the scripts.

Also in LSL2, nothing in the script tells you that you can't dodge the KGB agents on the beach by walking around them.

Great. And the elevator door is operated by script?
For those wondering just how pervasive this is:

https://tvtropes.org/pmwiki/pmwiki.php/UnwinnableByDesign/Si...

Was the idea that these were incredibly complex and convoluted puzzles that you'd be expected to "solve" by playing over and over until it was completable?

You'd expect one or two of these things to slip through by mistake, but so many indicates it was a bizarre but deliberate design decision?

I'm not sure how it became the norm in text adventure games, but for platformers part of it was a hold over from games being designed to be quarter eaters in arcades. Kids that played those became adults that made the next ones. I /suspect/ that a similar thing has happened with the kids that grew up on the N64 and gamecube had four player local coop as the ceiling and now lots of games that probably could have more than 4 players at a time (albeit with balance probably thrown out) are capped at 4. Looking at you, concerned ape :|
They weren't even complex or convoluted. It was just a quiet, "Fuck you, you didn't think to try picking that item an hour ago so now you have to restart."
As a kid, I owned Kings Quest 3 and 5 (side note, KQ5 was available on NES). Both are in the cruel category, and I never met anyone who came close to beating them. They were fun to play occasionally, but the most fun was had by showing to friends and letting them play (everyone was blown away).

Sierra operated a 1-900 tipline (cost $0.75 per minute or similar). I can't imagine anyone beating these games without those tips or tips from a magazine.

I remember in Kings Quest 6 you can meet a guy early on in the bookstore which becomes relevant (but not critical?) right at the end. I never knew how relevant though, as the time I played it through right to the end wasn't one of the times when he'd happened to be in the bookstore early on.

I guess that's not enough of a dead end to block progress.

Maybe it'd be enough just to know what happens in the castle if Prince Alexander had befriended him. Otherwise I guess I'll carry that unresolved thread around with me for another ~25 years.

I played KQ6 as a small kid who could barely speak English, and again ~10 years later as a grad student. The day I stumbled on the long ending and found myself in the Realm of the Dead still counts as one of the most mind-explodey things that ever happened to me.
I'm a native English speaker, but I was a young kid as well and so I remember learning a lot of the puns and wordplay in English much later on in life after first seeing them in that game. I'm sure another playthrough would reveal even more.

"Stick in the mud", "Wallflower", those sorts of thing.

Games used to often be brutally unforgiving. If you hadn't saved recently and you died (or inadvertently made the game unwinnable without knowing), tough luck, so for some games I'd save regularly "just in case", even if saving was relatively slow.

I was somewhat astonished when mid/late 2000's I was watching a friend play a game (on a console I think) where if you missed a jump over a bottomless pit, instead of you going back to your last save or check point, your character was right back to just before the jump and you could try again instantly.

One of my very favourite games of all time is Star Control II and I was thrilled when Jimmy Maher did a review of it [0] (and then felt a bit upset that he essentially said he felt it was overrated). One of his criticisms which I felt was very fair was that the game had a hard in-game time limit, and although the warning signs are obvious in retrospect, until you actually hit it you don't realize it's there, meaning that your fate could have been sealed hours and hours before the actual time limit because there was not enough remaining time to travel to the places needed to win and you were actually walking-dead for that period. However, I suppose it makes the next play through easier as you'll know more of what to do.

[0]: https://www.filfre.net/2018/12/star-control-ii/

In (real) roguelikes, if you die you get to start from the beginning with a new character. Saves are only for when you want to continue the game some other time.
Years later, I appreciated the ability the get stuck in Sierra games. It makes each decision or moment just that much more important. Leave no stone unturned or thought unthunk!
Ate the pie? You're gonna die.
100% the only non-trivial useful application of formal methods I've ever seen
I will have to install back my old games !!!
I'm still traumatized from Space Quest I because I didn't grab a broken glass from the windshield of our crashed spaceship before entering the cave with the laser.

It's been 40 years. I vote wkfauna for President.

This is just very cool. Thanks for sharing.
This is wonderfully delightful. I wish I'd thought of it.

I am exploring decompilation - MAME ROM to idiomatic JavaScript. It's going pretty well - the LLM does a good job translating from one language (machine) to another (JavaScript) which I guess is how the LLMs got their start.

Does your input have symbols to assist understanding, or do the LLMs have to work it out for themselves?

Warning: self-promotion: https://github.com/qarl/arcade-js

Thanks! I use sci-tools for the decompilation. It produces a LISP-ish S-expression source. I also extended it to produce a JSON AST.
AH. And I see that sci-tools has access to English derived symbols from the classes and methods.

That answers my question - whether your system is generating novel symbols.

Warning: this whole thread is full of spoilers!! :-D
I remember being mostly okay with this level of cruelty when this was one of the few games I had available all summer, but I tried to play some of them again as a middle aged guy and I couldn't believe I had put up with this.

This is one of those so obvious it's brilliant ideas and a lot of people are going to be grateful. Thank you.