Cheating can easily be achieved by modifying the game's data while it is running. These methods of cheating are often less reliable than cheat codes included in a game by its creators. This is due to the fact that certain programming styles or quirks of internal game logic, different release versions of a game, or even using the same game at different times or on different hardware, may result in different memory usage and hence the trainer program might have no effect, or stop the game from running altogether. Modifying game data usually constitutes a violation of a software license agreement that prohibits modifying the program at all. for the
NES allows a player to insert codes to edit a game's memory values.
Memory editing Cheating via memory editing involves modifying the memory values where the game keeps its status information. The way to achieve this will vary depending on the environment in which the game is running.
Memory editing hardware cheat device for the
Nintendo 64 A cheat cartridge is attached to an interface port on a home computer or console. It allows a user to modify the game code either before or during its execution. An early example is the
Multiface for the ZX Spectrum, and almost every format since has had a cheat cartridge created for it; such as
Datel's range of
Action Replay devices. Another popular example of this is
Game Genie for
Genesis,
NES,
Super NES,
Game Boy, and
Game Gear game consoles. Modern disc-based cheat hardware includes
GameShark and Code Breaker which modify the game code from a large database of cheats. In later generation consoles, cheat cartridges have come to be replaced by cheat discs, containing a simple loader program which loads a game disc and modifies the main executable before starting it. The legality of this type of devices has been questioned, such as in the case of
Lewis Galoob Toys, Inc. v. Nintendo of America, Inc., in which
Nintendo unsuccessfully sued
Lewis Galoob Toys stating that its cheating device, the
Game Genie, created
derivative works of games and thus violated
copyright law.
Memory editing software The most basic way of achieving this is by means of memory editor software, which allows the player to directly edit the numeric values in a certain memory address. This kind of software usually includes a feature that allows the player to perform memory searches to aid the user to locate the memory areas where known values (such as the number of lives, score or health level) are located. Provided a memory address, a memory editor may also be able to "freeze" it, preventing the game from altering the information stored at that memory address. Game trainers are a special type of memory editor, in which the program comes with predefined functions to modify the
run time memory of a specific
computer game. When distributed, trainers often have a single + and a number appended to their title, representing the number of modifications the trainer has available. On
Microsoft Windows, a common type of video game hacking is through the use of
DLLs. Users use a third party program to inject the DLL into their game of choice.
Saved game editors Editing a saved game offers an indirect way to modify game data. By modifying a file in persistent storage, it is possible to effectively modify the runtime game data that will be restored when the game attempts to load the save game.
Hex editors were the most basic means of editing saved game files (e.g. to give the player a large sum of money in strategy games such as
Dune II). However, as happened with game editors, dedicated game-editing utilities soon became available, including functions to effortlessly edit saved data for specific games, rendering hex editing largely obsolete for this purpose. If a saved game is stored in multiple files, it may also be possible to cheat simply by mixing and matching these files. For example, if one file represents the items in a treasure chest, while another represents the player's inventory, then the player can save the game before and after picking up an item from the chest, and continue play using the treasure chest file before the item was picked up, and the inventory file from afterward -- allowing the player to pick up the item repeatedly, gaining multiple instances of the item, if the program's logic does not prevent them from having more than one of the item.
Network traffic manipulation An alternative method for cheating in online games involves modification of inbound or outbound network traffic between the client and server. One early implementation of this concept was seen with lag switches. A lag switch refers to any hardware or software mechanism that temporarily limits network traffic. They grew popular as, unlike most cheats, they could be used on the
Xbox One and
PS4 consoles. In
first-person shooters, a common use for lagswitches was the ability to understand enemy positions without any risk to the player. For example, if a player was unsure whether an enemy was present in a room, they could activate the lag switch to block network traffic momentarily. This would allow the player to enter the room and scout for enemies without their movements being transmitted to the game server. As a result, the player’s character technically remained in the safe position from the server’s (and enemy's) perspective. Once the player had gathered the necessary information about enemy locations, they could deactivate the lag switch and resume normal play. Many games have since implemented "anti-desync" measures to limit the effectiveness of lagswitches. This may include the client game preventing player movement if connection is lost. More modern methods typically involve lower level packet editing or forgery in a "
man-in-the-middle attack" style. For example, symmetric encryption keys could be read from the game's memory, granting access to inbound packets. These packets could be edited to provide the client game with information that does not reflect the server's reality. I.e. if an enemy player uses an ability that should slow your movement, the packet detailing the slow factor could be modified to a lower value, manipulating the client game into applying the lower value. Techniques like this are not as common as simple memory manipulation and are typically only used in specific scenarios. == Countermeasures ==