Editing PC Video Game Files for Cheats

The basics of editing game files to enable or alter cheat codes in video games

Three young men gathered around a computer
Ernst Grasser/Getty Images

On many of the PC Cheats pages, you'll see instructions that a game file must be edited to enable cheats. In some cases, the cheat codes are actually put into the file. In fact, developers create what are known as debug codes, so they can test the game under various circumstances. Others simply create a special cheat code that must be enabled within the configuration file.

Editing a game file can be risky business if you're not too sure you are doing it right.

It's highly recommended that you create a backup of the file. If you make a mistake, just correct it.

How Do I Edit a File?

The easiest way to edit a game file is with a simple text editor, such as Windows Notepad or Wordpad — but you can use any text editor.

However, don't try to edit a hex file, which would require a hex editor. Such edits would be considered a modification to the game's code, and therefore is a bit more complicated than editing a line or two in a configuration file. For the most part, you'll never need to edit a hex file.

Problem! My File Won't Save!

If you have read the instructions on the cheat page, and made your modifications, but are unable to save the file with the changes, it's likely write-protected. Write protection is a setting that Windows uses to protect certain files from being edited or altered. You'll see this a lot with system files and folders.

Allowing the file to be edited is simple:

  • Select the file with your mouse and right-click it.
  • Select properties and left-click it. (a properties box will appear)
  • Click the 'General' tab and inspect the Attributes listed at the bottom and make sure the 'Read-only' checkbox is unchecked.
  • Click OK to close the properties box.
  • Now edit and save the file.

    Note: You may need to be logged into your computer with Administrator permissions to make these changes. Chances are, if it is your computer, you are already logged in as an Administrator.

    Cheat Codes for Various Games: