Showing posts with label duke nukem. Show all posts
Showing posts with label duke nukem. Show all posts

Thursday, February 6, 2020

How to Cheat in Spec Ops: The Line

Why Cheat?: A Quick Review of My Experience with a Not-Completely-Awful Game


I don't usually play military first-person shooters, let alone cover-based shooters like Spec Ops: The Line. But I got it for $1.00 (along with Duke Nukem Forever and The Darkness II) from Humble 2K Bundle 2, and... it wasn't that bad, at least on the default difficulty setting. I suppose it's precisely because I don't usually play this type of game that I didn't just see Spec Ops: The Line's cover-based shooting mechanics as an inferior version of what you would find in, say, a Gears of War game. For me, it was something different, and I enjoyed it, even though it was occasionally frustrating. Having gotten to the end of my first play-through, I could see myself playing it more, and none of the achievements seemed particularly hard to unlock, so I decided to play through the game a couple more times to go for 100% completion.

It was only at the point where I had unlocked all but one of the game's achievements — the one for beating the game on the hardest difficulty setting, FUBAR — that I realized how anti-fun the game could be. So I dropped it for a while. But after a few years of seeing 49/50 on the game's achievement tracker, it began to bother me.

The thing about me and achievements is that, while I'll make some effort to unlock them if they actually happen to be fun to unlock, I don't really care a whole lot about them otherwise... except in that they annoy me when they serve as a reminder of what's almost finished. In other words, while I don't normally treat a game with achievements as a tedious "to-do" list, 98% complete is just irritating.

So eventually, I did go back to the game and try to beat FUBAR mode, thinking it just couldn't be as bad as I remembered. But it was worse than I remembered. It was an enjoyable challenge for a while, and I actually got all the way to chapter 11 out of 15, but after a certain point, I couldn't play for more than 30 minutes at a time without getting annoyed. I wasn't enjoying it anymore, and while there were occasional moments of satisfaction in which I was able to pass a checkpoint by figuring out some optimal strategy and executing it perfectly, these moments were outnumbered by all the times when having gotten through a tough fight seemed like blind luck. The game's FUBAR difficulty setting isn't just unreasonable at times; it's also where the inherent flaws in the game's design really shine.

When one isn't having fun with a game anymore, does it make sense to keep playing just for an achievement? Not really. Not when nobody else is ever going to see or care about that achievement. When a game isn't fun anymore, the rational choice is either to drop it or to make it fun. I had begun to wonder if there was a way to cheat my way through the last bit of the game, as venting my frustration by breaking the game in some amusing way might make up for what felt like a waste of time so far. Turning that 49/50 into a 50/50 (so that even my undiagnosed OCD could accept that I'm done with the game) without having to subject myself to any more of this sadistic FUBAR nonsense would be nice too.

That's when I realized that the game's configuration files, which are encrypted in the Windows version on which I did the first half of my FUBAR play-through, are human-readable plaintext in the Linux version on which I continued the game after the termination of Windows 7 support gave me the final push towards using Linux for almost everything.

How To Cheat, The Easy Way: Step One Is To Install Linux (Which You Should Do Anyway Unless You Really Love Windows 10)


Install the Linux version of the game using the Linux version of the Steam client, and go to
~/.steam/steam/steamapps/common/SpecOps_TheLine/SRGame/Config
and you'll find a bunch of .ini files — 94 of them, by my count — and a single .txt file. I haven't fully explored the contents of these configuration files, because some of them are rather large, and there are too many of them to summarize here even if I had looked at them all. However, a quick browse through a few of them suggests that they contain variables for almost all the numerical and Boolean values one might want to alter, such as: player health, health regeneration rate, enemy health, the amount of damage required to explode enemies' heads, weapon damage, amount of ammo each weapon gets from ammo boxes, et cetera.

Some files have multiple variations. For example, the files
SRPawnEasy.ini
SRPawnEasy_Coop.ini
SRPawn.ini
SRPawn_Coop.ini
SRPawnHard.ini
SRPawnHard_Coop.ini
SRPawnInsane.ini
SRPawnInsane_Coop.ini
all contain values like character health. The ones with the "Coop" suffix obviously apply to the game's cooperative multiplayer mode, while the files marked "Easy", "Hard", and "Insane" presumably apply to the the game's "Walk on the Beach", "Suicide Mission", and "FUBAR" difficulty modes, respectively. I assume the "Combat Op" difficulty (which lies between "Walk on the Beach" and "Suicide Mission") is considered the default setting, so it probably just uses the values from SRPawn.ini (or SRPawn_Coop.ini for cooperative mode). Furthermore, I assume other difficulty modes will also fall back on SRPawn.ini for values which don't appear in their specific files, as SRPawn.ini has many more lines than the other variations.

I'm making some educated guesses here, because I haven't actually tried editing each of these files individually to confirm that the effects are what we might reasonably expect based on their names and contents. However, I did try editing the file SRPawnInsane.ini with the intent of modifying FUBAR mode. I started by modifying the health values of the player character, Walker, and his two squad mates, Lugo and Adams. This is just a matter of finding the right m_defaultHealth values. There are several m_defaultHealth lines, each appearing in a separate section indicating which character's default health level is being modified. Here's a snippet of SRPawnInsane.ini:
[SRGame.YPawn_Walker]
m_defaultHealth=60.0

[SRGame.YGamePawn_Player]
m_damageModifierExecuting=0.3
m_damageModifierReviving=0.3

[SRGame.YPawn_Lugo]
m_defaultHealth=220.0

[SRGame.YPawn_Adams]
m_defaultHealth=220.0

[SRGame.YPawn_AdamsAlone]

[SRGame.YPawn_Enemy]
m_defaultHealth=155.0
m_chanceToGrantGrenadeToExecutor=0.2
m_vaporizeModifier=3.56
m_headExplodeModifier=1.52
When I found this, I vastly increased the m_defaultHealth values found under [SRGame.YPawn_Walker], [SRGame.YPawn_Lugo], and [SRGame.YPawn_Adams]. I was unsure if it would actually work, but when I started up the game and continued my FUBAR mode campaign, it was clear that the player character and his squad mates were all practically invincible. It seemed too easy but it actually worked.

There are a few other things to note in the snippet above:
  • The [SRGame.YGamePawn_Player] section has a couple of damage modifier values; based on the names, I assume these will alter the amount of damage which the player will take while performing execution moves on enemies and reviving squad mates. However, I haven't tried changing these yet, so I don't know whether they are positive or negative modifiers. Does setting them to 0.0 mean the player takes full damage or that the player takes no damage? Presumably it's one or the other. Either way, setting them to 1.0 probably does the opposite of whatever setting them to 0.0 does, because the fact that each value is currently set to 0.3 suggests that these are fractions of the normal amount of damage.
  • The [SRGame.YPawn_AdamsAlone] section in SRPawnInsane.ini is, in fact, empty. However, it's not empty in SRPawn.ini or SRPawnEasy.ini. In each of those files, this section contains another m_defaultHealth line, so it's safe to assume that we can add one here as well, if we want to. When placed in this section, m_defaultHealth probably modifies the amount of health that Adams has during a sequence in which he is separated from the player.
  • The [SRGame.YPawn_Enemy] section contains some very specific modifiers; you can probably guess what they do based on the names. The file SRPawn.ini has even more values, any of which could most likely be modified here in SRPawnInsane.ini as well. The section name might be a bit misleading, though, as it seems to pertain only to one type of enemy. There are other sections called [SRGame.YPawn_MediumEnemy], [SRGame.YPawn_EnemyMarauder], [SRGame.YPawn_EnemyElite], and so on.
I'm just trying to give you an idea of what can be done with these configuration files. As noted above, some of the .ini files are rather large, so I'm probably just scratching the surface of what can be modified here. I haven't tried making substantial modifications myself — but it looks like you could, in theory, fine-tune many aspects of the game to be exactly how you want them. If you don't like the fact that the player can take damage while reviving squad mates, change it. If you don't like the amount of health that a particular enemy has, change it. If you want enemies' heads to explode with every headshot from any weapon, you can probably make it happen. Whether anyone cares enough about this game to do any of this, however, is another matter entirely.

I only went as far as modifying the health of Walker, Lugo, and Adams — adding a few zeroes to each number, before the decimal of course — and the rest of the FUBAR campaign was a hilarious joke. I got to the end in a tiny fraction of the time it would have taken if I had played the game fairly, and it's probably the only way I would have been willing to get to the end, as my patience had run out. And, for the record, this did unlock the achievement for finishing the game on FUBAR difficulty. Modifying these configuration files does not disable achievements.

Therefore, those of you who actually take achievements seriously as an indicator of your skill level, or something, might want to avoid playing with these configuration files while doing anything which might unlock an achievement. Personally, as noted above, I don't really care — but I can understand how others might regret unlocking a tough achievement by cheating. If you're the kind of person who takes pride in achievements, unlocking one by modifying the game might leave a bad taste in your mouth.

The Case For More Games Being This Easy To Exploit


The encrypted configuration files used by the Windows version of the game actually can be decrypted, but I can't personally vouch for the tool used to do so. I didn't bother with it when I played the Windows version of the game, because I didn't want to cheat at this game badly enough to put up with the extra steps, let alone the mysterious executable. (I trust it a bit more now that I've found it on PC Gaming Wiki, but when I first became aware of the decryption tool, it was through a link on some random forum.)

The fact that the files are not encrypted in the Linux version of the game is probably an oversight — or maybe they just didn't care, or maybe they figured Linux users would find out how to break into the files anyway, or maybe they already knew about the decryption tool for the Windows version by the time they made the Linux version so they decided decryption was pointless. In any case, the fact that the files are encrypted in the Windows version is a clear indication that players were not meant to mess with these files.

But why not?

Cheating in multiplayer games is not okay, because it spoils the experience for other players, hence the existence of anti-cheat measures in multiplayer games. When it comes to single-player games, though, I don't see why we shouldn't be able to do whatever we want with a game that we bought. Many single-player games are made to be (or just are) easily modifiable; Skyrim, for example, is famous for community-made mods. Other single-player games, however, are made to be (or just are) very difficult to modify, as the Windows version of Spec Ops: The Line would be if nobody had figured out how to decrypt its files.

It's almost a shame that a game like Spec Ops: The Line, which is considered by many to be thoroughly mediocre, happens to be one of the games in which so much of the configuration is exposed to players through plaintext or easily decrypted files. A lot of games expose graphical settings not found in-game via configuration files, but in my experience, the ability to change the gameplay this way is rare. I wish I could so easily make similar modifications to games like Alan Wake, not because they're hard and I need to cheat, but because it would be fun. I'd actually like to make Alan Wake harder. Unfortunately, it's not an easily modifiable game.

Achievements are a possible reason that a game's developers might not want players to have unmitigated access to configuration values like player health. Some people take achievements seriously, especially rare achievements which are difficult to unlock; the perceived value of such an achievement, for players able to unlock it through skill and perseverance, is lessened when someone like me unapologetically cheats to unlock it by modifying configuration values.

But just as developers can program a game to disable achievements when built-in cheat codes are activated, they could also program a game to disable achievements when some deliberately exposed configuration file differs from the intended defaults, as verified by a checksum or whatever. I guess I'm advocating for games to offer the same level of easy modification as Spec Ops: The Line, if not more, but on purpose instead of by accident.

Some developers release powerful tools for modding their games, which is great. Changing a configuration file is also great, though, especially for players who aren't going to bother learning how to use whatever modding tools exist. My philosophy as a software developer is that hard-coding arbitrary numbers is bad and everything which reasonably could be configurable should be configurable, and maybe that's far easier said than done when it comes to games — I'm a software developer, not a game developer — but I have a feeling that most games hide configuration from players on purpose, and doing this just to prevent a human from cheating against a computer is silly. The ability to cheat is not going to ruin a game for anyone with any self-control.

I'm also a big fan of games having plaintext save files, for similar reasons. I've played a few, and although I've rarely bothered to skip ahead or otherwise cheat by editing their save files, knowing that I had the option was nice. Save editing is probably hard to detect, so I don't expect it from games whose developers want achievements to mean something — but as with all forms of unintended cheating, my selfish take on the subject is that I should be able to cheat to unlock achievements, and also, deal with it.

Sorry for making the global achievement statistics for Spec Ops: The Line slightly less accurate though, I guess.

Wednesday, October 10, 2012

Five Things I'd Like to See in Half-Life 3

First, a brief history of the Half-Life series:
1998 — Half-Life
1999 — Half-Life: Opposing Force
2000
2001 — Half-Life: Blue Shift; Half-Life: Decay
2002
2003
2004 — Half-Life 2
2005
2006 — Half-Life 2: Episode One
2007 — Half-Life 2: Episode Two
2008
2009
2010
2011
2012
I've left the uneventful years on the timeline to illustrate the gaps between releases and to show how long it's been since production of the series came to a halt. As of today, it has been exactly five years since Half-Life 2: Episode Two — a game which ends abruptly with a painful cliffhanger — was released to the public as part of The Orange Box.

A continuation, presumably titled Half-Life 2: Episode Three, was announced back in 2006, and it was originally supposed to come out sometime in 2007, but we still haven't seen it. There hasn't even been a demo or a trailer. To this day, the official website for The Orange Box still claims that Half-Life 2: Episode Two is the "the second in a trilogy" of episodic expansions for the popular first-person shooter, but Half-Life developer Valve has given us almost no information except for some weird ideas which, if the game is still in production, have probably been dropped already.

Valve is known for long development cycles, lots of delays, and drastic changes during those long development cycles, which lead to more delays. What makes their silence on Episode Three so frustrating is that the Episodes, like other "episodic" games, were supposed to be released in rather quick succession. The whole point, I thought, was to release content in small chunks, as they were finished, so that fans wouldn't have to wait half a decade for the next installment. But I guess that wasn't working out.

If another Half-Life game is ever released, it almost certainly won't be an Episode; Valve co-founder Gabe Newell says they're done with episodic content, which essentially translates to "Half-Life 2: Episode Three is never coming." Of course, that doesn't rule out a proper Half-Life 3, which is exactly what we need. The next addition to the series will have to be a full game (and a damn good one) if Valve hopes to come within reach of the impossibly high expectations generated by such a long wait.

It's likely that Half-Life 3 won't life up to these expectations at all. Valve kind of screwed things up by promising the prompt release of an episodic expansion which never came to be. The endless wait for Half-Life 2: Episode Three seamlessly evolved into an endless wait for Half-Life 3, and now many see Half-Life 3 as vaporware, despite the fact that the five-year gap in this series is nothing compared to the 15-year development of the poorly received Duke Nukem Forever.

But if we ever get a sequel, there are a few things I'd like to see. (Note that spoilers follow.)

1. A more open world (but not too open)


Nearly three weeks ago, some rumors regarding Half-Life 3 made the rounds on all the usual gaming sites. (This is nothing special, really; it's been nonstop rumors for five years, and they should always be taken with a grain of salt, but at least they give us something to talk about.) According to some anonymous but reliable source — sounds legit, guys — Half-Life 3 will be an open-world game, and will be released sometime after 2013. I'm not digging the 2014+ release date, but an open world sounds nice. Until now, the Half-Life games have been very linear. More exploration, multiple paths, and optional objectives would be a welcome addition to the series.

What we don't need is another S.T.A.L.K.E.R. or some kind of role-playing game. Those are nice, but they're not what Half-Life is all about. While I'm sure Valve is aiming to avoid accusations that their next game is too linear — that it essentially boils down to "shoot everything, move to the next room, shoot everything, repeat" — I hope they don't completely abandon the method of storytelling that has worked so well in their games so far. It would be nothing short of jarring to go from Half-Life 2: Episode Two, an action-packed but story-driven shooter with clear objectives, to something more like a free-roam sandbox with not enough direction and too much empty space.

2. A portal gun (or something like it)


It doesn't take a genius to figure out that the Portal and Half-Life stories are intertwined. Portal contained some funny references to Half-Life's Black Mesa, and Half-Life 2: Episode Two brought Portal into Half-Life canon with its mention of Aperture Science in the final act. It's an odd relationship, since Half-Life is a semi-serious first-person shooter whereas Portal is a humorous puzzle game... but there are thematic similarities.

While Portal's humor doesn't quite fit with the general tone of the Half-Life series, both franchises heavily feature teleportation, and this is probably why Valve thought it was appropriate to tie them together. The extent to which Valve plans to pursue this connection, obviously, is unknown — I certainly don't expect Gordon Freeman and Chell to team up against the Combine — but after making such a big deal out of the Aperture Science research vessel Borealis at the end of Episode Two, it's too late to drop the subject entirely. It will be downright silly if the next Half-Life game doesn't feature the Borealis and, by extension, other things related to Aperture Science.

With any luck, that includes some kind of handheld portal device, preferably one that's a little more stable than the Displacer Cannon from Half-Life: Opposing Force. Aperture's portal gun, if featured in Half-Life 3, could (in part) fill the role of Half-Life 2's gravity gun as the slightly-gimmicky puzzle-solving item that's also a weapon if you use it right. I know we've all had plenty of time to play around with the portal gun in Portal and Portal 2, but using it in a combat-oriented game could be kind of fun.

3. The extent of the Combine's power


While Gordon Freeman was in stasis between the end of Half-Life and the beginning of Half-Life 2, we missed an apocalypse. By the time we arrive in City 17, human society has already collapsed under the heel of an enormous alien empire, and the occupying forces, it would seem, have since largely withdrawn, leaving what's left of our species under the control of brainwashed transhuman soldiers.

Throughout Half-Life 2 and the Episodes, we see the aftermath of the Seven Hour War which ended in Earth's surrender, but we never see the Combine display the kind of raw power that could bring an entire planet to its knees in less than a day. What we see instead is a somewhat underwhelming uprising against what must have been a tiny fraction of the army that invaded Earth. This is why we know we're in a world of trouble when Dr. Kleiner speaks, after the uprising begins, of the Combine's "inevitable return and what is certain to be unimaginable retaliation."

But how unstoppable are they? What's their evil-alien-empire power level? Could they take on the Covenant from Halo or the Reapers from Mass Effect? We just don't know.

And this, in part, is what makes the story in Half-Life 2 as good as it is. Just enough is left to the player's imagination. We know the Combine are scary, but the fact that we don't know just how scary they are makes them even scarier. We don't need to see the Seven Hour War to believe it, and I honestly hope Valve doesn't give us a prequel to illustrate it. (That seems like a great excuse for a bad game.) But if Half-Life 3 continues (and perhaps concludes) the story arc left unfinished in Episode Two, it would be nice to see the bad guys step it up a bit.

After one game and two expansions, our alien overlords have only embarrassed themselves in their failed attempts to track down and kill a single theoretical physicist. It seems like the right time to see a glimpse of their true power. Besides, we've already spent enough time shooting metrocops and blowing up striders. We need something bigger.

4. A single-player campaign


This probably seems like a strange thing to hope for, since nearly every game in the series to date is primarily single-player. (The notable exceptions are the PS2-exclusive Half-Life: Decay and the Japan-only arcade Half-Life 2: Survivor.) However, we do have a reason to fear for the future of single-player games. Electronic Arts, for example, has abandoned them, and Gabe Newell himself said last year that Valve no longer had any interest in creating games "with an isolated single-player experience."

Naturally, Half-Life fans waiting for the next sequel were horrified, and even though Gabe later attempted to clarify his statement to let us know that the company hadn't given up on single-player games entirely, I'm still a bit worried. While they might continue making single-player games, they seem to have a lot of ideas about making these games more social.

It seems plausible, for example, that Half-Life 3 might be built for some kind of cooperative mode where one player controls Gordon Freeman and the other controls Alyx Vance. I hope this doesn't happen. I also don't want to see Half-Life 3 loaded with a bunch of pointless social features. I like single-player games, and I prefer to play them without being bothered about friend requests and leaderboards.

I'm sure that Half-Life 3 will have its own analog to Half-Life 2: Deathmatch, but it would be great if they could just keep the single-player and multiplayer components separate, so I can play one and ignore the other.

5. An ending (I know, it's a stretch)


The Half-Life games are fun, but they tend to have terrible endings which hardly qualify as endings at all.

The original ends with Gordon Freeman being kidnapped by the so-called "G-Man" (whose identity and motives are never explained), Opposing Force ends with the same fate for Adrian Shephard (who is never seen again), Half-Life 2 ends with Freeman being whisked away by the G-Man again (leaving the story at an explosion-related cliffhanger), Episode One ends with another explosion (followed by a train crash and a fade to black), and Episode Two ends awkwardly with one supporting character crying over another supporting character's corpse. (It was the worst finale I've ever seen in the history of video games, and perhaps that's because it was never meant to be a finale. Keep in mind that, at some point, they were actually planning to finish Episode Three.)

Blue Shift has a happy ending, but it isn't a particularly interesting one.

So I won't be surprised if Half-Life 3 ends with another suspenseful but unresolved situation — another set-up for another sequel that might take another ten years to make — but it would be great if Valve could just give us some kind of satisfying resolution instead. I'm not saying they should end the story entirely, but they could at least cool it with the unbearable cliffhangers. In other words, if Valve plans on rolling the credits right after an important character dies, or having the G-Man stop by for another inexplicable kidnapping, I'd rather not play the game at all.