Saturday, July 25, 2020

Pinstripe and Broken Achievements

I wanted to write this post at the end of December, but the winter holiday season is a busy time, so that didn't happen. Then, by the time the holidays were over, I was already back at work, and forgot about it. Later on, I had an idea about writing this as a follow-up to How to Cheat in Spec Ops: The Line, but that didn't happen either, mostly due to laziness. Now I have a moment and I can only hope that I remember accurately the details of what I had meant to document in December.

So anyway, there's this game called Pinstripe. I have a hefty collection of random indie stuff in my Steam library, mostly from Humble Bundle and from Fanatical (formerly Bundle Stars), so I probably wouldn't remember exactly where I got this one in particular if there weren't records of it. Cross-referencing my Steam account's history of product key activations with IsThereAnyDeal's list of bundles featuring the game, I see that I must have gotten it from the $1 tier of Humble Jumbo Bundle 12, in late November of 2018. My achievement history shows that this is around the time I first played the game as well, so it didn't languish in my backlog for an extended period of time as many indie games from bundles tend to do. Late November into early December was a nice time to play the game as well, given the snowy winter setting.

Overall, it's a cute game. In any mini-review of any kind of game, I feel morally obligated to judge the gameplay first and foremost; but, in this kind of indie game, it would probably be a lie to say that the game and its mechanics are much more than a vehicle for the developer's artistic expression, which could have been channeled into a short film instead if it could have survived becoming that much less engaging. I won't claim to know the developer's intentions but I suspect the goal was to tell a story in an interactive medium and not to get the player hooked on addictive gameplay. So I'll just say that the gameplay is all right; it gets the job done, and manages to be neither frustrating nor entirely boring. But if you don't care for the story or the music or the art direction, you won't care for the game itself.

What stands out to me in hindsight is the audio. The soundtrack is really nice. The voice acting is also pretty great by video game standards. By the end, the story is perhaps a bit clichéd — well, perhaps incredibly clichéd, if I'm being perfectly honest — but its presentation is not as unbearably pretentious as so many indie games are. In short, they did a good job. It's a nice game. I should feel bad for having paid so little for it.

After having played through the game once or twice, I had unlocked all but one achievement:


Beating Pinstripe in an hour is not a remarkable feat. It's a short game. So, I thought, I might as well try it. There's no visible in-game timer, so I took note of the clock on my computer when I started, and played through the game, already knowing where to go and the solutions to the puzzles. I finished in less than an hour. The achievement didn't unlock. I figured the problem was that I had essentially started a "New Game Plus" so I deleted my save and even reinstalled the game to ensure I was starting with a clean slate. I finished the game in less than an hour again. The achievement didn't unlock.

A trip to the game's discussion forum on the Steam Community site revealed that I wasn't the only one having trouble with unlocking the achievement. It was apparently bugged. I checked the forum again today and it's apparently still bugged. There are workarounds which have solved the problem for some players. At least one guy claimed to have done it just by reinstalling the game, but that hadn't worked for me. In mid-December of 2018, someone came up with another fix which seemingly solved the problem for a lot of other players.

This fix involved editing the Windows registry. Specifically, according to this Steam forum post, one must clear a TotalPlayTime entry from HKEY_CURRENT_USER\Software\Atmos Games, LLC\Pinstripe. Yes, the game apparently tracks total play time in the registry. That just boggles my mind. I don't understand it. Perhaps I just don't understand game development or Windows software development well enough to see why Atmos Games would do this, but it seems insane to me. In any case, for whatever reason, this workaround didn't work for me. I assume I must have done it incorrectly, because it had worked for others. However, having failed once with this attempted registry hack, I had already failed the speedrun achievement at least three times in total, and I was fed up. I uninstalled the game.

However, this was not before I had seen another post claiming to have a fix for the Linux version of the game. At the time, I wasn't using Linux on my personal computer yet, but I figured I might try it someday. Sure enough, I started using Linux the following year. Attempting again to get the last achievement in Pinstripe wasn't really my top priority as a new Linux user, but I was bound to come back to it eventually.

So at the end of 2019, I reinstalled Pinstripe on Linux Mint. Now there was no longer a Windows registry claiming I had played for hours, so if I had still remembered how to finish the game quickly, I probably could have just unlocked the achievement fair and square in one attempt. Unfortunately, I hadn't played the game in about a year. I would most likely have had to play through the game once to remember what to do, and then a second time for the speedrun achievement. I had already messed around with this game enough, and I had already beaten the game in under an hour multiple times as verified by my own clock, so I didn't feel like playing fair. If this Linux workaround documented on Steam could be used to unbreak the achievement, it could also be used to cheat. So I decided to remove any chance of failure, and cheat.

I mean, in my defense, it was barely cheating. The game had already cheated me.

I played through most of the game, and sure enough, as I neared the end, I was not on track to beat the game in under 60 minutes. So I closed the game and, following the advice found in the Steam forum, I opened up the file ~/.config/unity3d/Atmos\ Games\,\ LLC/Pinstripe/prefs. It's a plaintext file in some XML-like format with a handful of tags specifying various preferences such as screen resolution height and width. As promised, there's also a line of the form
<pref name="TotalPlayTime" type="float">xxx</pref>
where xxx is the elapsed play time in seconds. Note that, for the sake of verifying what units are used here (for it could have been milliseconds for all I remember of December 2019), I just reinstalled the game and played it for about a minute, and this line in my current copy of this file now reads as follows:
<pref name="TotalPlayTime" type="float">62.1948</pref>
At the time I first found this file, I suppose it must have read something closer to 3600, as I was approaching the one-hour mark with not enough time to spare. So I opened up the file in vim, decreased the value by a few hundred seconds, opened the game back up, and played to the end. The achievement finally unlocked.

Now I've got my 100% completion in Pinstripe. Was it worth it? Well, no and yes. The time I spent trying to unlock the achievement on Windows was a waste of time. However, I still liked the game and wanted to play through it again last December; I also wanted to test drive the Linux version; and, while I was doing that, I figured I might as well get the achievement I was owed. Editing a text file, by the way, was a lot easier than playing around with the Windows registry. Linux wins again, I guess.

There are people who pay absolutely no attention to achievements. For the sake of my mental health, perhaps I should try to be one of them. For the most part, I guess I am. I have far too many games to be caring about unlocking all of the achievements in all of them, considering how many games have achievements which are just arbitrarily time-consuming, seemingly for no reason other than to decrease the number of players willing and able to unlock them and thus to increase their perceived value among self-proclaimed achievement hunters.

If I've already unlocked over 90% of a game's achievements, though, it's hard not to go for 100%. If there's only one achievement left, it's almost impossible not to try, or to be annoyed by it forever if I know it's unattainable. I have other games which, like Pinstripe, have some broken achievements, but there are not always easy workarounds to unbreak them. Do achievements really matter? Not really. But they're a part of the game, and you shouldn't sell broken stuff.

Dear game developers,
Stop selling broken stuff.