Chapter 11: Cheating & File Manipulation


          Just about every kind of video game has cheats built into it, and Baldur's Gate is no exception—particularly since it's been out for more than 10 years, so it's
only natural that its workings would have been thoroughly figured out by now. There are a few basic reasons to cheat:
1) Cheating to correct bugs in the game. Even in a game that is properly patched & Fixpacked, bugs can unfortunately still occur. Usually, the only fair way to remedy the situation is to operate from outside of the game for a bit. One known bug that is both irritatingly intermittent and (apparently) unfixable is that sometimes, Thieves who Dual to another class and get their Thief half back in ToB may discover that, upon reactivation of their Thief class, the game has forgotten about all the points that they had allocated into their Thieving skills. If this should happen to you, the only way to correct the problem is to hack your Thieving skills back to where they're supposed to be.
Happily, the 'Respawning NPC' bug is now fixed, in all versions of the game.
2) Cheating for testing purposes. Usually done only by modders or people foolish enough to be writing an encyclopedic website about the game, this is purely exploratory in nature—seeing how well something works, or if it even works at all.
3) Cheating for stylistic/roleplay reasons. Multi-classed and Dual-classed characters use the avatar and paperdoll of whichever of their classes has the larger Hit Dice: If you're a Fighter/Thief, you look like a Fighter. If you're a Cleric->Mage, you look like a Cleric, even while your Cleric half is buried in the Dual. You might very well decide, "Heck no, I'm wearing Mage Robes now, damn right I wanna see what they look like," and so you hack your avatar to Male (or Female) Human Mage. This has absolutely no effect on gameplay, its only function is cosmetic, so there's clearly nothing unfair about it. You can even change your avatar into an Ogre or Ettercap or Beholder if you really want to. But note that the avatars not legally available to party characters do not have paperdolls, and many of them have side affects: Some creature avatars are too big to fit through most doorways, some have faster or slower Movement Rates, and some have no spellcasting animations: If you try to cast a spell while using one of these avatars, the game will crash.
          Some cheating done for roleplay purposes does have actual impact on the game, however: According to the rules, Elves cannot have less than 8 Charisma, but suppose you wanted to roleplay a really repugnant Elf, with involuntary projectile vomiting and a penchant for making improper suggestions to attractive females. So just hack your Charisma down to an illegal (for Elves, anyway) value, and there you go. Or suppose you wanted to play an illegal race/class combination, like a Gnomish Ranger or a Half-Orc Bard. Or you might want to make some cheating changes based on some legal changes: For example, if your Strength score should happen to go from 18 up to 19, your Weight Allowance would suddenly jump from 200 pounds all the way up to 500—and you might decide that that kind of muscle growth fully justifies hacking on some extra Charisma, as well.
4) Cheating to correct your own mistakes. Suppose you need a certain item (such as a key) to do something, and you KNOW you had it, you just can't remember where you left it. Some people (usually of a roleplaying bent) will scour the game for where they might have left it, and if they still can't find it, give up
Art by Mike Sassthat quest as a lost cause. Others (usually powergamers) will simply hack the key back into their Inventory (or adjust the game variable, or whatever) immediately, without even spending 5 minutes to backtrack & discover where they might have dropped it.
5) Cheating solely to make your character/party more powerful. Many players do this, for a variety of reasons. There are a few who give themselves all the best items in the game right from Day 1, or drop their THAC0 to -12 or whatever, simply because that's what makes the game more fun for them. Others will mitigate that somewhat, using various roleplaying-ish justifications for doing so; like starting a new character in BG2, and hacking his EXP from 89,000 all the way up to 161,000—the same EXP he would have earned if he'd been started in BG1 and taken through a full game of BG1+TotSC, without the time and bother of taking him through a full game of BG1+TotSC. While you are of course free to play the game in whatever manner you please, be aware that as a general rule, cheating to make things easier for yourself isn't going to impress people a whole lot when you talk about your character on the forums.



          That was the why, now it's time for the what. Back in Chapters 6 & 7, I said that the various items & spells in the game do one heck of a lot of different things; cheating, however, opens those doors of possibility even wider, because there are some opcodes that the vanilla game does not use. Sure, you can do basic stuff like creating & removing items and creatures in the middle of your game, or messing with your hitpoints or Resistances or changing game variables, that's easy. But if you're interested in cheating more creatively and constructively, you can do things like make an Amulet that takes Alteration spells cast directly at the wearer, and bounces them right back at the person who cast them. Or if you think Enemy X is too easy a kill for where he appears in-game, you can tweak his stats to be a more respectable opponent. You can alter the game's DIALOG.TLK file and correct the bug in Degrodel's line where he says 'Ragefast' instead of 'Ramazith.' You can create all-new spells for your party to learn and cast, and edit the AI of various enemies in the game to give them the ability to cast those spells too. You can edit the game's data files and straighten out the Druid's funky EXP progression, or make Mages get 5 Lore per level instead of 3. Of course, changes at these levels sort of stop being cheats and start becoming more like mods, which is more appropriate for the next chapter, so let's ramp it back down to cheating.

Q: "What can I change about my character?"
          A: Pretty much anything you see in the Records screen.
Your Race, Class, Kit, Gender, hitpoints, proficiency points, etc. There are some limits, determined by the hardcoded settings of the game, but those are few. If you don't like being an Illusionist and would rather be an Enchanter instead, you can do that (and yes, the Evocation spells you learned while an Illusionist will remain in your spellbook, but if you want to be fair you can delete them). If you disagree with the Dual-Classing rule that lets you choose a kit for your first class but not your second, you can remedy that. You can even give your character a kit of a completely different class—like putting the Berserker kit on a Bard. You can never have more than one kit on any one character, though. Also, you can hack illegal equipment onto your characters (like making a Wizard Slayer wear magical rings & the like), but these illegal items will automatically be kicked down into the character's Backpack the next time he Levels Up.

Q: "What can I change about the game I'm currently playing?"
          A: Again, pretty much anything.
Rather than repeat myself, I'll just direct you to the next section down this page (the how of cheating) for a list of some of the things that can be done. As far as major things that you can't do, the only one that comes to mind is hacking in the recruitable NPCs to join your party: You can enter the code that creates the creature, and you can talk to them, and they will join you just like they normally would, but as soon as you try to Save the game or move from one major map area to another, the game immediately crashes. (That's what happens in BG1, at least.) The only safe way to cheat in party members is to teleport yourself to their location, recruit the real one, and then teleport back. Hacking in barnyard animals to get revenge on snotty Nobles, however, works just fine.
Malign MY personal hygeine, will you? Hah! Try keeping your carpets clean NOW, lady!

Q: "What can I change about creatures, items & spells?"
          A: Once again, pretty much anything . . . but be careful.
Editing characters in your party and hacking items & spells into your game will only affect that one game, but if you start messing with actual files you could potentially screw up every game of BG you play from then on. Happily, the editing programs used to alter *.CRE, *.ITM, and *.SPL files are less user-friendly than the ones used for editing your Savegames, so that in itself tends to ward off players who don't (yet) know what they're doing. One thing to watch out for is asking the game to use animations that don't exist: If you try to make a Crossbow that's held in only 1 hand, or a Wolf that can cast spells, or a Staff that Monks can use, the computer will look for the *.BAM files that show a 1-handed Crossbow, or a Wolf casting a spell, or a Monk holding a 2-handed weapon . . . and when it fails to find them, the game will crash.

Q: "What can I change about core game files?"
          A: See the previous answer, only more so.
There are a few things that can't be done, like altering the effects of various levels of proficiency in the Weapon Styles, or the levels/effects of Turn Undead, or the bottom-row buttons in the main game screen, because these things are hardcoded directly into the game engine. But by & large, you can do quite a lot . . . change or remove the EXP caps, alter the Experience levels of the various NPCs when you recruit them, mess with what items get dropped as random treasure, change the behavior of enemies, edit entire kits, etc.

Q: "What can I change about the game engine itself?"
          A: Go away.
Seriously, while it technically is possible to decompile BALDUR.EXE and tweak the source code, it is both very complicated and very risky. Unless you're absolutely fluent in Assembly language and can multiply in hexadecimal in your head, don't even think about going here.



          And now, the juicy bit: How to cheat.

The first type of cheating isn't cheating at all, but rather simple (and mostly cosmetic) file manipulation—which is actually reqired to move your character from BG1 into BG2, a practice that BioWare encourages. When you beat BG1, the game automatically exports your character's *.CHR file to the Characters folder (a subdirectory of the main BG1 folder). Simply take that file (usually named CHAR1.CHR) and drop it into the Characters folder of your BG2 directory. Then start a new game of BG2, and instead of rolling a character from scratch, press the "Import" button and select CHAR1. You'll have to reassign your weapon proficiencies & Thieving skills (to be completely different from how you had them in BG1, if you want), and you'll also have the opportunity to change your name, in case you
decided that playing as a character named "Hemorrhoids" wasn't
really such a great idea after all. Exporting a player-made character isn't limited to the end of BG1; you can do it at any point of either game.
          Perhaps the most common type of manipulation is using custom portraits. If you are dissatisfied with the portraits that come with the game, you can add more: There are multiple websites from which you can download new pictures, or you can even make your own: Take any image and make two copies of it, one 110x170 pixels and the other 38x60 pixels. Both images must be bitmaps with 24-bit depth (saving the pictures in Microsoft Paintbrush works for this). If you wish, you can also make a third image, 210x330 pixels, but this is highly optional as it's only used once, at the very end of ToB—there's an Epilogue after you beat the game. Downloadable portrait sets contain only the small and medium pictures, not the large. Once you have the finished bitmap images, simply put them into the Portraits
Art by Mike Sassfolder of your BG directory, and you'll be able to select them for your player-made characters; either during Character Creation, or in the middle of a game. You can also force recruitable NPCs to use different portraits as well. Take Coran: He's an Elf with 16 Charisma, a preference for big swords and longbows, and a well-deserved reputation as a ladies' man. He's a freelance Thief, unaffiliated with any guild or other larcenous organization. For whatever reason, BioWare saw fit to give him the picture on the left: A Human with no chin and a dumbass haircut, who dual-wields daggers and wears the mark of the Shadow Thieves of Amn. If you should happen to find a picture that you think looks more like Coran (with the picture on the right being one example), you can have Coran use that picture by making the 2 bitmap files described above, giving them the same names as the images that Coran normally uses (CORANL.BMP and CORANS.BMP), and putting those files into your game's Override directory. If you want to go back to the original, just move or delete those 2 files.
          Similar to custom portraits are custom soundsets. These exist in *.WAV format and are saved to the Sounds folder: Each complete soundset consists of dozens of individual files, which must all be correctly named, but I'll assume that whatever site you're downloading these from has already done that job for you. As
with the portraits, you can force recruitable NPCs to use those sounds by correctly renaming them & dropping them into the Override folder.
          The last main type of file manipulation is alternating between Multiplayer & Single Player: If you're not content with the variety of recruitable NPCs in the game, you can roll your own by starting a Multiplayer game, and making as many characters as you want. Then start the game, Save, and quit. Move the Saved-game folder you just made from the "mpsave" to the "save" directory, and start BG again: You are now playing a regular, Single-Player game of BG, but with 1 or more extra party members that you rolled yourself.
The Multiplayer trick, a great way to build themed parties. Order of the Stick fanart by Tenser01.

Now we move on to real cheating. The first two methods were built-in by BioWare, largely so they could fix bugs in the game while they were playtesting it. The game engines of BG1 and BG2 are based on something called a LUA platform, which may be issued commands in the middle of a game by using the CLUA Console. To access this console, you'll need to quit the game, open up the directory that contains the game (the default installation paths are C:\Program Files\Black Isle\Baldur's Gate and C:\Program Files\Black Isle\BGII - SoA for BG1 and BG2, respectively), and find the file BALDUR.INI. Open it up, and add a couple of lines: Find the line that says [Program Options], and directly underneath it, add the lines
Debug Mode=1
Cheats=1
CheatKeys=1
exactly as you see them written here. Then add those 3 lines again, underneath the line that says [Game Options]. The "Cheats" and "Debug Mode" commands allow access to the CLUA console, and the "CheatKeys" activates certain cheat commands for BG2. Both the Console and the CheatKeys were originally added for game-testing and bugfixing purposes. To show the Console, during a game of BG1 (while you're on the Main Game Screen) press CTRL-TAB to show or hide the Console. In BG2, the Console is brought up by pressing CTRL-SPACE. The Console itself is just a small window in which you can type text, which tells the game to do certain things:
CLUAConsole:SetCurrentXP(161000) : Sets the Experience of the currently-selected party member to 161,000 EXP.
CLUAConsole:CreateItem("SCRL75") : Creates a single Identify scroll in your party's first empty Inventory slot.
CLUAConsole:CreateItem("AROW01", 50) : Creates a single stack of 50 unenchanted Arrows.
CLUAConsole:CreateItem("KILLSW01") : In BG2, this creates the "Killsword," a Longsword usable by any character, which does thousands of
          hp of various types of damage, grants 100% Magic Resistance and bonuses of -10 to AC & -50 to THAC0, as well as a bunch of immunities.
CLUAConsole:CreateCreature("GIBBER01") : Creates a hostile Gibberling.
CLUAConsole:MoveToArea("AR0300") : Teleports selected party members (as close as possible) to the upper-left hand corner of
          AR0300.ARE. In BG1, AR0300 is BG City Northeast, and in BG2, it's the Docks District.
CLUAConsole:ExploreArea() : Removes all the Fog of War in the area, as if you had already explored the entire map.
Looks like SOMEBODY'S been messing with their avatar. CLUAConsole:AddGold(456) : Adds 456 gold pieces to the party's current amount of money.
CLUAConsole:SetWeather(0) : For the next hour or so, there will be no weather effects. Using a parameter of 1 with this
         command will cause it to rain, and a parameter of 2 will make it snow.
CLUAConsole:AddSpell("SPPR302") : The creature under the mouse pointer will learn the Priest spell of Call Lightning,
         if it has access to Priest spells.
CLUAConsole:CriticalItems() : Places certain items needed for the endgame of BG1 in your Inventory.
CLUAConsole:FirstAid() : Creates 5 Potions of Healing, 5 Antidotes, and a Stone to Flesh scroll.
CLUAConsole:GetGlobal("CHAPTER", "GLOBAL") : Displays the value of Global variable CHAPTER in the
         game's text window. GLOBAL may also be replaced with LOCALS or a specific area file, if you wish to check those
          types of variables.
CLUAConsole:SetGlobal("CHAPTER", "GLOBAL", 6) : Sets the Global variable CHAPTER to equal 6.
CLUAConsole:EnableCheatKeys() : If you're in BG1, or have not added the "CheatKeys=1" line to the BALDUR.INI
          of BG2, this command activates the in-game Cheat Keys, listed below. If the Cheat Keys are activated via the
          CLUA console and not through the .INI file, they will be once again turned off the next time the game is Reloaded.

          The Cheat Keys (not all of which were implemented in BG1):
CTRL-8 : During the "rolling your stats" section of Character Creation, sets your stats to 18(00) / 18 / 18 / 18 / 18 / 18.
CTRL-1 : Cycles the "armor level" of the avatar / paperdoll of the selected character. Cosmetic only, it does not change their actual AC.
CTRL-2 : Screen fades to black, used in some cutscenes.
CTRL-3 : Screen fades from black back to normal, again used in cutscenes.
CTRL-4 : Toggles highlighting of "interactive" portions of the map, such as doors, traps, and other triggers.
CTRL-6 : The avatar / paperdoll of the selected character cycles upward to the next avatar in the list.
CTRL-7 : The avatar / paperdoll of the selected character cycles downward to the next avatar in the list.
CTRL-I : Prompts an in-party banter to occur.
CTRL-J : All selected party members teleport (as close as possible) to the mouse pointer.
CTRL-Q : Forces creature under the mouse pointer to join the party.
CTRL-R : Creature under mouse pointer is fully healed & Dispelled.
CTRL-T : Jumps the game's clock forward by 1 hour, which has the side effect of causing short-duration effects to expire.
CTRL-X : Gives the ARxxxx, and x-pos / y-pos coordinates, of the point under the mouse pointer.
CTRL-Y : Applies thousands of hp of various damage types to the creature under the mouse pointer.
You can use different parameters in most of the CLUA commands: SetCurrentExp and AddGold will set Experience Points and increment the Party Gold in accordance with the integer you use in the command, although the game will still not allow a party member's EXP to exceed the EXP cap. The commands of CreateItem, CreateCreature, AddSpell, MoveToArea, and GetGlobal / SetGlobal will operate in reference to whatever item, creature, spell, map area, or variable (respectively) that you specify. In these latter commands, the parameters (the filename of the item, map area, etc.) of each command are not case-sensitive, but the rest of the command line (the "CLUAConsole:" bit and the actual command you want it to execute) must be typed exactly as you see it above.

          The final type of cheating (that I'll discuss in this chapter, anyway) is the use of Savegame Editors. The first was Gatekeeper, named after Baldur's Gate,
which evolved into Shadowkeeper after the release of Shadows of Amn. Shadowkeeper was then reverse-engineered into Sword Coast Keeper, apparently because the original Gatekeeper program was incompatible with some of the changes introduced in TotSC. These editors exist largely through the hard work and good graces of Aaron O'Neil, and can be used to make changes to the party members (stats, race, class, hitpoints, combat stats, equipment, spells, skills, colors, etc.) and the global variables that are part of any saved game. The original Gatekeeper also allowed you to change your party's location, giving you the option to choose from a large number (although not 100%) of the game's major map areas as the map where your party would appear once you loaded up that edited Savegame. The Keepers are the most powerful hacking tools described in this chapter; they can do most of what the CheatKeys do, and duplicate almost all of the CLUA commands, and there's tons of stuff that can only be done by editing Savegames—such as hacking your Thieving skills back up to where they were before you Dual-Classed. One important fact about the Keepers is that it's not a good idea to run them and the game itself at the same time. Sword Coast Keeper, for one, locks the game's DIALOG.TLK file so it can access it—and while it's in use by SCK, BG1 cannot read from it, and therefore cannot boot up. The reverse is also true, in that SCK cannot load while BG1 is running. As a general rule, avoid leaving the game running while you're messing with any editor.
Art by Mike Sass


Recurring Issues
          If you find that your game crashes frequently, you probably have a corrupt file. Reinstalling the game usually works, but if the original copy is also damaged (the CD got scratched, for instance), you'll need to hunt down the specific file(s) in question: If the game always crashes upon casting a certain spell, or playing a certain movie, or entering a certain map area, there's your culprit. Your best bet is probably to go on the forums, and ask somebody to email a (zipped) copy of that file to you.
          The game can get stuck at certain points if you're Invisible: If somebody needs to deliver a plot-central bit of dialogue to you, but they can't speak to you because they can't see you, they (and the game) won't know what to do, and you could all be standing around for quite a long time. This may have been remedied in the Fixpack, giving those important NPCs the ability to see invisible creatures for those critical dialogues.
          The appearance of Biff the Understudy is not a bug, or at least not as buggy as it could be. In BG1, Biff was implemented as a safety measure in certain events: If an NPC is supposed to say something, but (for whatever reason) that NPC is inconveniently missing and/or dead, the game will automatically warp in Biff to read the vanished person's lines. Odd, but it gets the job done.




Power corrupts.
Now that you know why, when, and how to cheat, all you have to remember is one simple rule: Do Not Cheat. Remember what I said in Chapter 3, that your first game is your ONE chance to see the game as it was meant to be seen, and how all of your future games are going to be colored by your metagaming knowledge of your first trip? Yeah, sure, if you really WANT to spend your maiden voyage through BG as little more than a tagalong being dragged behind the Killsword as it carves through the game, you can do that . . . but if that's your idea of fun, why play the game at all? Why even read this website? Also, if you make edits before you're sure how things are supposed to turn out, you could do more harm than good, reaching the endpoints of certain quests and then going back to do the middle, and in general screwing everything up. No, as a newbie you have little choice but to assume that everything you encounter will be bug-free; if Reloading doesn't change anything, just accept it, or at most go to one of the Internet forums about the game and post your questions there. (To observe proper decorum, however, search their archives for related threads first.) Later on, after you've played through the game (or at least that section of it) a couple of times, you'll have learned what's correct and what's not. Remember, I list some "this container cannot be opened by any means" and "this door is barred from the other side" in my Walkthrough. You'd better check to make sure your "bug" isn't one of those.
Q: "Is (description of in-game behavior here) a bug?"
          A: Probably not.
Bugs are more likely to occur in BG2 (because it was rushed through production much more hastily than BG1), but that's why the G3 Fixpack (and its predecessor, BaldurDash) is so thorough. Most bugs that can be fixed have been fixed. Still, you will occasionally
run into something odd, or even something bad. But that doesn't mean it's a bug: It could be intended behavior, it could be that you actually didn't do something as correctly as you think you did, or it could simply be a freak accident. When you encounter a strangeness, your first reaction should not be to reach for the CLUAConsole or the CheatKeys, nor should it be to Save the game and call in the Keeper. When you hit what you think is a bug, your first reaction should be to Reload and try it again. 9 times out of 10, the situation will function normally. It's a "no-problem" problem, my very favorite kind.

Q: "Through my many previous playthroughs of the game and my knowledge of its mechanics, I am absolutely certain that (in-game behavior) is a bug. What should I do?"
          A: Use cheats to re-create the correct game behavior as closely as possible.
For example, suppose that there's a door you have to open, and in spite of your having done everything perfectly correctly, that door just refuses to open. If Reloading doesn't fix it, and the door is controlled by a variable, you should Save, and try using the appropriate Keeper to set the variable to (what you think is) the correct value. If that doesn't work, your best bet is to use CTRL-J and/or MoveToArea to teleport the party to the exact spot where they would be after stepping through the door.
          In the event that you need to talk to somebody, and that person is (wrongly) Hostile to you, again, your best bet is to Reload. If they still want to kill you, try CTRL-Y on them (Note: Not even CTRL-Y works on everything, some creatures are wearing "MINHP1" items that prevent them from dying through hitpoint loss), and then use CreateCreature to spawn another copy of them—if this version isn't mad at you, they should behave correctly. Beware, however: Many creatures have several versions of themselves, all with the same creature name ("Bob") but different filenames (BOB01, PPBOB, C6BOB, etc.), so you may need to make many attempts to CLUA in the correct—and only the correct—version, otherwise you may compound the problem by using cheats to affect portions of the game that you shouldn't legally be even able to get to yet.





Back to
Chapter 10:
Powergaming/Roleplaying

Up to
Table of Contents



Forward to
Chapter 12:
Mods & Modding