Skip to content

Cheats Window

LawnMeower edited this page Aug 31, 2024 · 3 revisions

This frame allows you to execute cheats of your search results as lua scripts. If you are unfamiliar with the lua programming language you can check out the official lua reference manual. Not deep understand of Lua is required to create simple cheats.

MungPlex Custom Lua Functions and Variables

In order to interact with games it is necessary to have custom functionalities. In the following you will learn about all additional features required to create cheat codes written in Lua with extensions for MungPlex.

Read Functions

The following functions can be used to read data from memory:

Show
  • bool ReadBool(uint64 address): returns the boolean value located at address of the game's memory
  • int8 ReadInt8(uint64 address): returns the signed 8-bit value located at address of the game's memory
  • int16 ReadInt16(uint64 address): returns the signed 16-bit value located at address of the game's memory
  • int32 ReadInt32(uint64 address): returns the signed 32-bit value located at address of the game's memory
  • int64 ReadInt64(uint64 address): returns the signed 64-bit value located at address of the game's memory
  • uint8 ReadUInt8(uint64 address): returns the unsigned 8-bit value located at address of the game's memory
  • uint16 ReadUInt16(uint64 address): returns the unsigned 16-bit value located at address of the game's memory
  • uint32 ReadUInt32(uint64 address): returns the unsigned 32-bit value located at address of the game's memory
  • uint64 ReadUInt64(uint64 address): returns the unsigned 64-bit value located at address of the game's memory
  • float ReadFloat(uint64 address): returns the float value located at address of the game's memory
  • double ReadDouble(uint64 address): returns the double value located at address of the game's memory
  • table ReadArrayInt8(uint64 address, uint32 count): returns the signed 8-bit array of count elements located at address of the game's memory
  • table ReadArrayUInt8(uint64 address, uint32 count): returns the unsigned 8-bit array of count elements located at address of the game's memory
  • table ReadArrayInt16(uint64 address, uint32 count): returns the signed 16-bit array of count elements located at address of the game's memory
  • table ReadArrayUInt16(uint64 address, uint32 count): returns the unsigned 16-bit array of count elements located at address of the game's memory
  • table ReadArrayInt32(uint64 address, uint32 count): returns the signed 32-bit array of count elements located at address of the game's memory
  • table ReadArrayUInt32(uint64 address, uint32 count): returns the unsigned 32-bit array of count elements located at address of the game's memory
  • table ReadArrayInt64(uint64 address, uint32 count): returns the signed 64-bit array of count elements located at address of the game's memory
  • table ReadArrayUInt64(uint64 address, uint32 count): returns the unsigned 64-bit array of count elements located at address of the game's memory
  • table ReadArrayFloat(uint64 address, uint32 count): returns the float array of <count elements located at address of the game's memory
  • table ReadArrayDouble(uint64 address, uint32 count): returns the double array of count elements located at address of the game's memory

Write Functions

The following functions can be used to write data to game memory:

Show
  • WriteBool(uint64 address, bool value): writes the boolean value to address of the game's memory
  • WriteInt8(uint64 address, int8 value): writes the int8 value to address of the game's memory
  • WriteInt16(uint64 address, int16 value): writes the int16 value to address of the game's memory
  • WriteInt32(uint64 address, int32 value): writes the int32 value to address of the game's memory
  • WriteInt64(uint64 address, int64 value): writes the int64 value to address of the game's memory
  • WriteFloat(uint64 address, float value): writes the float value to address of the game's memory
  • WriteDouble(uint64 address, double value): writes the double value to address of the game's memory
  • WriteArrayInt8(uint64 address, table array): writes the int8 array to address of the game's memory
  • WriteArrayInt16(uint64 address, table array): writes the int16 array to address of the game's memory
  • WriteArrayInt32(uint64 address, table array): writes the int32 array to address of the game's memory
  • WriteArrayInt64(uint64 address, table array): writes the int64 array to address of the game's memory
  • WriteArrayFloat(uint64 address, table array): writes the float array to address of the game's memory
  • WriteArrayDouble(uint64 address, table array): writes the double array to address of the game's memory

RAM Fill and Slide

These functions consecutively write values and increment/decrement those alongside the address as many times as defined by count. Note that an address increment does not consider the value size. For instance, to consecutively write int32 values the minimum desired address increment would be 4 or -4. Increment values are signed(!). The first write does not apply any increment. If you don't want a value increment just pass a valueIncrement of 0.

Show
  • FillAndSlideInt8(uint64 address, int64 addressIncrement, int8 value, int8 valueIncrement, uint8 count): consecutively writes value + valueIncrement to address + addressIncrement count times
  • FillAndSlideInt16(uint64 address, int64 addressIncrement, int16 value, int16 valueIncrement, uint16 count): consecutively writes value + valueIncrement to address + addressIncrement count times
  • FillAndSlideInt32(uint64 address, int64 addressIncrement, int32 value, int32 valueIncrement, uint32 count): consecutively writes value + valueIncrement to address + addressIncrement count times
  • FillAndSlideInt64(uint64 address, int64 addressIncrement, int64 value, int64 valueIncrement, uint32 count): consecutively writes value + valueIncrement to address + addressIncrement count times
  • FillAndSlideFloat(uint64 address, int64 addressIncrement, float value, float valueIncrement, uint32 count): consecutively writes value + valueIncrement to address + addressIncrement count times
  • FillAndSlideDouble(uint64 address, int64 addressIncrement, double value, double valueIncrement, uint32 count): consecutively writes value + valueIncrement to address + addressIncrement count times

Log Functions

Show
  • LogText(char* text): Logs the given text to the log frame
  • LogUInt8(uint8 value, bool hex): Logs the given uint8 value to the log frame. If hex is true, the printed value will be in hex
  • LogUInt16(uint16 value, bool hex): Logs the given uint16 value to the log frame. If hex is true, the printed value will be in hex
  • LogUInt32(uint32 value, bool hex): Logs the given uint32 value to the log frame. If hex is true, the printed value will be in hex
  • LogUInt64(uint64 value, bool hex): Logs the given uint64 value to the log frame. If hex is true, the printed value will be in hex
  • LogInt8(int8 value, bool hex): Logs the given int8 value to the log frame. If hex is true, the printed value will be in hex
  • LogInt16(int16 value, bool hex): Logs the given int16 value to the log frame. If hex is true, the printed value will be in hex
  • LogInt32(int32 value, bool hex): Logs the given int32 value to the log frame. If hex is true, the printed value will be in hex
  • LogInt64(int64 value, bool hex): Logs the given int64 value to the log frame. If hex is true, the printed value will be in hex
  • LogFloat(float value): Logs the given float value to the log frame
  • LogDouble(double value): Logs the given double value to the log frame
  • LogBool(bool value): Logs the given bool value to the log frame

Misc. Functions

Show
  • bool IsInRange(uint64 value, uint64 start, uint64 end): Checks if value is >= start and < end. This can be used to verify pointers are within a valid range to prevent possible game crashes during loading times
  • copyMemory(uint64 source, uint64 destination, uint32 count): copies the count bytes of memory located at source to destination

Registers

Show These variables can be used to store and keep values across execution cycles and different cheats.
  • INTREG00 - INTREG31: Integer registers
  • NUMREG00 - NUMREG31: Float registers
  • BOOLREG00 - BOOLREG31: Boolean registers

Get Module Addresses

Module addresses can be returned by calling the Modules field and the target module name in brackets.
Example: Addr = Modules["mono.dll"]

Cheat List

A list of all saved cheats. Check each one you want to be active.
MungPlex_cheats_01

Cheat Information

This can be used to edit an existing cheat or add a new one.
MungPlex_cheats_02

  • Title: The Cheat's title
  • Hacker(s): Who has made the cheat
  • Lua Cheat: The Lua Cheat script
  • Description: Description and usage information about the cheat
  • Add To List: Adds new cheat to list
  • Update Entry: Updates the currently selected entry
  • Delete Entry: Deletes the selected cheat from the list

Old-School Cheat to Lua Cheat Conversion

This allows you to convert decrypted cheat codes to Lua. Note that some codes may not work because addresses may be shifted on emulators.
MungPlex_cheats_04

  • Cheat Format: Select the input cheat format
  • Cheat to be converted: The decrypted cheat code you wish to be converted
  • Convert to Lua: A button that does what it says

Cheat Control

Gives you further control of the cheat(s).
MungPlex_cheats_03

  • Cheat List/Text Cheat: Whether to execute all selected cheats or the cheat in the right text field (Lua Cheat)
  • Interval: How many times a secon the cheat(s) should be executed. If the game visibly overwrites your values you may move the slider to the right.
  • Apply/Terminate Cheats: Turns cheats on or off. If some syntactical error appears you will be notified bt the log window.