Difference between revisions of "Lua:readBytes"

From Cheat Engine
Jump to navigation Jump to search
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The address list is the place where all the addresses will go that you think are usable.
+
[[Category:Lua]]
 +
'''function''' readBytes(''Address'', ''Bytecount'', ''ReturnAsTable'' ) ''':''' (byte, ...) '''-''' table
  
The list can be navigated by using the keyboard and mouse. There are 2 ways to change a value in the list, by either double-clicking the value, or by selecting it and pressing enter. For all the other items in the list just double click on it and it will open up a new window allowing you to change it.
+
Returns the bytes at the given address
  
The check boxes allow you to freeze and unfreeze the address. If you freeze a address the address will not change until you unfreeze it. The value does change but Cheat Engine will restore the value to it's frozen state every few milliseconds (The number of milliseconds can be changed in the settings window).
+
===Function Parameters===
 
+
{|width="85%" cellpadding="10%" cellpadding="5%" cellspacing="0" border="0"
There are 3 types of freezing: Normal ('''='''), Allow Increase Only ('''+'''), and Allow Decrease Only ('''-'''). You can change the type of freezing by clicking on the symbol right of the check box. The allow positive and negative can be set also by keyboard's numeric '''+''' and '''-''' keys.
+
!align="left"|Parameter
 
+
!align="left"|Type
Also, when you right-click on one or more addresses a pop-up window will show with additional options.
+
!style="width: 80%;background-color:white;" align="left"|Description
* Delete this record: Remove the selected values, pointers or scripts from the table.
 
* Change record: Change the description, address, type and value for the selected records.
 
* Browse this memory region: Open the memory viewer and jump to the address in the hex view.
 
* Show as hexadecimal/show as decimal: Display the selected records in hexadecimal or in decimal again.
 
* Change color: Change the color of the selected records.
 
* Set/Change hotkeys: Set or change a hotkey to freeze or change a value in any way or to toggle a script on/off. Hotkeys are saved with your table.
 
* Toggle selected entries: Freeze/unfreeze selected addresses and toggle scripts on/off.
 
* Change script: Edit the selected script.
 
* Pointer scan for this address: Open the pointer scanner to search for pointers.
 
* Find out what accesses this address: Use the debugger to show codes that are accessing to the address.
 
* Find out what writes to this address: Use the debugger to show codes that are writing to the address.
 
* Recalculate new addresses: Recalculated the addresses according to the given parameters.
 
* Force recheck symbols: Recheck symbols in the table.
 
* Cut, Copy, Paste: Using the clipboard.
 
* Create Header: Create Headers to organize your records in groups.
 
 
 
 
 
The following keys can be used when the address list has focus:
 
{|cellpadding="10%" cellpadding="5%" cellspacing="0" border="solid"
 
!align="left"|Key(s)
 
!style="width: 80%" align="left"|Description
 
 
|-
 
|-
|Enter
+
|Address
|Change Value
+
|[[CEAddressString]] or Integer
 +
|The address to read
 
|-
 
|-
|Ctrl+Enter
+
|Bytecount
|Change Description
+
|Integer
|-
+
|The number of bytes to read
|Ctrl+Alt+Enter
 
|Change Address
 
|-
 
|Alt+Enter
 
|Change Type
 
|-
 
|Shift+Ctrl+Alt+Enter
 
|Change address Complex
 
|-
 
|Space
 
|Freeze or Enable / Disable script
 
|-
 
|Grey Keypad Plus
 
|Freeze but allow increase
 
|-
 
|Grey Keypad Minus
 
|Freeze but allow decrease
 
|-
 
|Delete
 
|Delete Address
 
|-
 
|Ctrl+Alt+A
 
|Open the auto assembler
 
 
|-
 
|-
 +
|ReturnAsTable
 +
|Boolean
 +
|Returns a table object instead of multiple return values
 
|}
 
|}
  
 +
{{LuaSeeAlso}}
  
You can make additions to the list either by adding them from the [[Help_File:Found_address_list|found address list]] or by clicking the.
+
=== Related Functions ===
'Add address manually' button. Here you type the exact address, a description for it and it's datatype.
+
{{ReadWriteMemory}}
You can also opt to create a pointer-path here on this same dialog.
 
 
 
 
 
As of Cheat Engine 6 you can re-arrange items in the list by dragging them and even attach entries to other entries as well
 
 
 
 
 
You can use the address list to change values of memory records.
 
There are a few special values you can enter that have a special effect.
 
If you enclose a value by parenthesis '''(  )'''  and the value is the name of an address list entries description, the new value will be that of that specific address list entry.
 
 
 
 
 
Example:
 
 
 
You have two entries. One named "Health" and the other named "Max Health" with the value 100
 
If you change the value of Health to "(Max Health)" Health will get the value 100
 
 
 
 
 
Tip: If you first freeze a record and then set the value to "(Max Health)" cheat engine will constantly write the current value of "Max Health" to "Health"
 
 
 
 
 
Another special notation that the change value field supports is enclosing the new value by square brackets '''[ ]'''
 
The value between the backets will be calculated by lua as if it would do a "return <valuebetweenbrackets>"
 
For example [10+12] would return 22, but you can also do more advanced scripting like [readInteger(12345678)*2]
 
 
 
== Links ==
 
* [[Cheat Engine:Help File|Help File]]
 
 
 
* [[Help_File:Found_address_list|Back]]
 
 
 
* [[Help_File:Table_Extras|Next]]
 

Latest revision as of 00:01, 25 January 2018