Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Cheat Engine suggestions

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Razi
Expert Cheater
Reputation: 1

Joined: 17 Jan 2018
Posts: 202

PostPosted: Wed May 15, 2019 9:50 pm    Post subject: Cheat Engine suggestions Reply with quote

Cheat Engine suggestions: (this is my opinion and what I would like to add to the Cheat Engine)

1) add events OnMouseScrollUp and OnMouseScrollDown to the editbox. To be able to do the following: when the mouse wheel scrolls up, increase value in the editbox by 1, when the mouse wheel scrolls down, decrease value by 1. Or add NumericUpDown element to form designer (editbox with up and down arrow buttons)

2) when you push on the "Add Address Manually" in the "Add Address" window, add ability to increase\decrease value by 1 with mouse wheel in the "Address" editbox. So, simply by scrolling mouse wheel, you can see what values has previous 10 Addresses or next 10 Addresses.
Or add NumericUpDown element instead edit box (NumericUpDown - editbox with up and down arrow buttons)

3) same, when copy paste memory record, add ability to increase\decrease value by 1 with mouse wheel in the "Adjust Address by" editbox in the "Paste table entries" window.
Or add NumericUpDown element instead edit box

4) add little more empty space between open and save buttons, because sometime when you open 50 .CT files per 5 minutes you can press save button instead open button, and make open and save buttons 1.5 times wider (increse width of open and save buttons).

5) add Lua Engine to the main menu in the general CE window and call Lua Engine with hotkeys: ctrl + L, from general CE window. The simplier Lua Engine can be called then users will use it more often and faster will learn Lua.

6) add 3 bytes search, because some games use 3 bytes values

7) add checkbox list to form designer

8 ) add table with grid element to form designer

9) add Dissect Data/structures to the main menu in the general CE window and call it with hotkeys: ctrl + D, from general CE window (I know, Dissect Data/structures is not used often)

10) add increase\decrease value by 1 with mouse wheel in the search value editbox when you search values in the process

11) add button "add all addresses" from found list to address list

12) add label, that shows current quantity of memory records in the address list

If you agree with one of the points, then tell what do you agree with?


Last edited by Razi on Thu May 16, 2019 1:00 pm; edited 4 times in total
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Wed May 15, 2019 10:29 pm    Post subject: Reply with quote

4. no need to make CE's UI ugly, use hotkeys CTRL-O (open) CTRL-S (save) CTRL-ALT-S (save as)

6. you can use bitwise or binary operations. (/*-+&| and if needed disable alignment)

9. CE's main window is designed to b like that, just keep memory view open then click it and ctrl-d. (or keep dissect window open)

11. scan-list ctrl-a, then address-list ctrl-v.

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
Back to top
View user's profile Send private message Visit poster's website
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Wed May 15, 2019 10:40 pm    Post subject: This post has 1 review(s) Reply with quote

You can open the Lua Engine from the main form with "Ctrl+Alt+Shift+L".
Or you can add this to the auto run folder. It will put the menu item in the "Table" menu and assign the shortcut "Ctrl+L".
Code:

local t = translate
local format = string.format

local TableMenuItemName = 'miTable'

local function showLuaEngine()
   local frmLuaEngine = getLuaEngine()
   frmLuaEngine.show()
   return frmLuaEngine
end

local function addLuaEngineShortCut()
   if MainForm.Menu == nil then return end
   local menuItems = MainForm.Menu.Items
   local miTable = nil
   for i = 0, menuItems.Count - 1 do
      if menuItems[i].Name == TableMenuItemName then
         miTable = menuItems[i]
      end
   end
   if miTable ~= nil then
      local mi = createMenuItem(miTable)
      mi.Caption = t('Open Lua Engine')
      mi.Shortcut = 'Ctrl+L'
      mi.onClick = showLuaEngine
      miTable.insert(1, mi)
   end
end

addLuaEngineShortCut()


_________________
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Wed May 15, 2019 11:18 pm    Post subject: Reply with quote

5: ctrl+alt+L
6: no. Create a custom type for that yourself. (also, that 3 byte type you're referencing is likely a 4 byte decimalfloat where the last byte is a value of 0/256 to 255/256 added to it)

8: i never found a use for that thing. It looks bad no matter how you use it. Have you tried using it in Lazarus?

9: not sure how useful that is. You only have addresses there in the middle of structures. Also: hold down ctrl and type in M,D will get you there as well

11: ctrl+a and that arrow

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Razi
Expert Cheater
Reputation: 1

Joined: 17 Jan 2018
Posts: 202

PostPosted: Thu May 16, 2019 12:47 pm    Post subject: Reply with quote

@TheyCallMeTim13: Thanks a lot, exactly what was needed.

OldCheatEngineUser wrote:
6. you can use bitwise or binary operations. (/*-+&| and if needed disable alignment)
It helped, binary decimal search helps to find 3 bytes values.

Dark Byte wrote:
6: no. Create a custom type for that yourself.

Is it possible to create this custom type as lua extension file and add it to autorun folder? How to do it with lua code?
Quote:
8: i never found a use for that thing. It looks bad no matter how you use it. Have you tried using it in Lazarus?
No, never tried. May find this useful when need to read and write from 100 addresses, but you know better how it looks.
Quote:
9: not sure how useful that is. You only have addresses there in the middle of structures. Also: hold down ctrl and type in M,D will get you there as well

Yes, it is probably better to do this in the form of a lua extension, because it is not often used.

Quote:
12) show current quantity of memory records
I'll try to explain why I want to add this function. When CE is open with memory records. When I removed or added several memory records three hours ago, I don’t remember exactly if I should save the modified cheat table or not. Using every couple minutes the following code, is not so comfortable:
Code:
local addressList = getAddressList()
local a= addressList.Count
print(a)
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Thu May 16, 2019 4:35 pm    Post subject: Reply with quote

Try this script it will create the "Tools" menu item if needed and add the shortcut menu items to it.
Code:

local t = translate
local format = string.format

local TableMenuItemName = 'miTable'
local mvToolsItemName = 'Extra1'
local mvDissectDataMenuItemName = 'miDissectData2'

local MainMenuItemName = 'ools1' --'miTools' -- 'ools1'
local MainMenuItemCaption = 'Tools'

if MainForm == nil then
   MainForm = getMainForm()
end

local function createMainFormMenu()
   if MainForm.Menu == nil then return end
   local menuItems = MainForm.Menu.Items
   local miTools = nil
   for i = 0, menuItems.Count - 1 do
      if menuItems[i].Name == MainMenuItemName then
         miTools = menuItems[i]
         miTools.visible = true
         addMenuItem(miTools, '-')
      end
   end
   if miTools == nil then
      miTools = createMenuItem(MainForm)
      miTools.Name = MainMenuItemName
      miTools.Caption = MainMenuItemCaption
      menuItems.insert(menuItems.Count - 2, miTools)
   end
   return miTools
end


local function showLuaEngine()
   local frmLuaEngine = getLuaEngine()
   frmLuaEngine.show()
   return frmLuaEngine
end

function addMenuItem(parent, caption)
   if parent == nil then return nil end
   local newItem = createMenuItem(parent)
   parent.add(newItem)
   newItem.Caption = caption
   return newItem
end

local function addMenuShortCuts()
   if MainForm.Menu == nil then return end
   local menuItems = MainForm.Menu.Items
   local miTools = createMainFormMenu()
   local menuItems = getMemoryViewForm().Menu.Items
   local miExtra = nil
   local miDissectData = nil
   for i = 0, menuItems.Count - 1 do
      if menuItems[i].Name == mvToolsItemName then
         miExtra = menuItems[i]
      end
   end
   for i = 0, miExtra.Count - 1 do
      if miExtra[i].Name == mvDissectDataMenuItemName then
         miDissectData = miExtra[i]
      end
   end
   if miTools ~= nil and miExtra ~= nil and miDissectData ~= nil then
      local mi = createMenuItem(miTools)
      mi.Caption = t('Dissect data/structures')
      mi.Shortcut = 'Ctrl+Shift+D'
      mi.onClick = miDissectData.doClick
      miTools.add(mi)
   end
   if miTools ~= nil then
      local mi = createMenuItem(miTools)
      mi.Caption = t('Open Lua Engine')
      mi.Shortcut = 'Ctrl+L'
      mi.onClick = showLuaEngine
      miTools.add(mi)
   end
end


addMenuShortCuts()



As for custom types in Lua, here is one that creates a simple money type.
Code:

local TypeName = 'Money'
local ByteCount = 4
local IsFloat = false

local function bytesToValue( ... )
   local bytes = { ... }
   return (byteTableToDword({ bytes[1], bytes[2], bytes[3], bytes[4] }) / 100)
end
local function valueToBytes(value)
   local bytes = dwordToByteTable(value * 100)
   return bytes[1], bytes[2], bytes[3], bytes[4]
end

registerCustomTypeLua(TypeName, ByteCount, bytesToValue, valueToBytes, IsFloat)

https://wiki.cheatengine.org/index.php?title=Lua:registerCustomTypeLua
https://wiki.cheatengine.org/index.php?title=Lua:registerCustomTypeAutoAssembler

_________________
Back to top
View user's profile Send private message Visit poster's website
Razi
Expert Cheater
Reputation: 1

Joined: 17 Jan 2018
Posts: 202

PostPosted: Fri May 17, 2019 2:13 am    Post subject: Reply with quote

When I put "Tools" script in the autorun folder it is not executed.
The following script works much slower, then usual search. Is it because it is a lua script?
Code:
local typename = '3 bytes'
local bytecount = 3
local isFloat = false

local function bytesToValue( ... )
   local bytes = { ... }
   return (byteTableToDword({ bytes[1], bytes[2], bytes[3] }))
end
local function valueToBytes(value)
   local bytes = dwordToByteTable(value)
   return bytes[1], bytes[2], bytes[3]
end

registerCustomTypeLua(typename, bytecount, bytesToValue, valueToBytes, isFloat)


Found custom 3 byte search autoassemble script written by Dark Byte:
Code:
alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(UsesFloat,1)
alloc(CallMethod,1)
alloc(PREFEREDALIGNMENT,1)

TypeName:
db '3 byte integer',0

ByteSize:
dd 3

PREFEREDALIGNMENT:
db 1

UsesFloat:
db 0 //Change to 1 if this custom type should be treated as a float

CallMethod:
db 1 //Remove or change to 0 for legacy call mechanism

//The convert routine should hold a routine that converts the data to an integer (in eax)
//function declared as: cdecl int ConvertRoutine(unsigned char *input, PTR_UINT address);
//Note: Keep in mind that this routine can be called by multiple threads at the same time.
ConvertRoutine:
//jmp dllname.functionname
[64-bit]
//or manual:
//parameters: (64-bit)
//rcx=address of input
//rdx=address
mov eax,[rcx] //eax now contains the bytes 'input' pointed to
and eax,00ffffff //strip off bit 24 to 31

ret
[/64-bit]

[32-bit]
//jmp dllname.functionname
//or manual:
//parameters: (32-bit)
push ebp
mov ebp,esp
//[ebp+8]=address of input
//[ebp+c]=address
//example:
mov eax,[ebp+8] //place the address that contains the bytes into eax
mov eax,[eax] //place the bytes into eax so it's handled as a normal 4 byte value
and eax,00ffffff //strip off bit 24 to 31

pop ebp
ret
[/32-bit]

//The convert back routine should hold a routine that converts the given integer back to a row of bytes (e.g when the user wats to write a new value)
//function declared as: cdecl void ConvertBackRoutine(int i, PTR_UINT address, unsigned char *output);
ConvertBackRoutine:
//jmp dllname.functionname
//or manual:
[64-bit]
//parameters: (64-bit)
//ecx=input
//rdx=address
//r8=address of output
//example:
mov [r8],cx //first 16 bits
shr ecx,#16 //move the upper 16 bits of ecx to the lower
mov [r8+2],cl //this results in bits 16 to 23 to be written to r8+2

ret
[/64-bit]

[32-bit]
//parameters: (32-bit)
push ebp
mov ebp,esp
//[ebp+8]=input
//[ebp+c]=address
//[ebp+10]=address of output
//example:
push eax
push ebx
mov eax,[ebp+8] //load the value into eax
mov ebx,[ebp+10] //load the output address into ebx

mov word [ebx],ax
shr eax,#16
mov [ebx+2],al
pop ebx
pop eax

pop ebp
ret
[/32-bit]


How to register this 3 bytes aa script? Where should I put this aa script, in the autorun folder?
function registerCustomTypeAutoAssembler(autoassemblerscript)
function registerCustomTypeAutoAssembler(typename, bytecount, autoassemblerscript)
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Fri May 17, 2019 2:18 am    Post subject: This post has 1 review(s) Reply with quote

autorunfolder should work (just name it something.lua)

Code:

registerCustomTypeAutoAssembler(
[[
alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(UsesFloat,1)
alloc(CallMethod,1)
alloc(PREFEREDALIGNMENT,1)

TypeName:
db '3 byte integer',0

ByteSize:
dd 3

PREFEREDALIGNMENT:
db 1

UsesFloat:
db 0 //Change to 1 if this custom type should be treated as a float

CallMethod:
db 1 //Remove or change to 0 for legacy call mechanism

//The convert routine should hold a routine that converts the data to an integer (in eax)
//function declared as: cdecl int ConvertRoutine(unsigned char *input, PTR_UINT address);
//Note: Keep in mind that this routine can be called by multiple threads at the same time.
ConvertRoutine:
//jmp dllname.functionname
[64-bit]
//or manual:
//parameters: (64-bit)
//rcx=address of input
//rdx=address
mov eax,[rcx] //eax now contains the bytes 'input' pointed to
and eax,00ffffff //strip off bit 24 to 31

ret
[/64-bit]

[32-bit]
//jmp dllname.functionname
//or manual:
//parameters: (32-bit)
push ebp
mov ebp,esp
//[ebp+8]=address of input
//[ebp+c]=address
//example:
mov eax,[ebp+8] //place the address that contains the bytes into eax
mov eax,[eax] //place the bytes into eax so it's handled as a normal 4 byte value
and eax,00ffffff //strip off bit 24 to 31

pop ebp
ret
[/32-bit]

//The convert back routine should hold a routine that converts the given integer back to a row of bytes (e.g when the user wats to write a new value)
//function declared as: cdecl void ConvertBackRoutine(int i, PTR_UINT address, unsigned char *output);
ConvertBackRoutine:
//jmp dllname.functionname
//or manual:
[64-bit]
//parameters: (64-bit)
//ecx=input
//rdx=address
//r8=address of output
//example:
mov [r8],cx //first 16 bits
shr ecx,#16 //move the upper 16 bits of ecx to the lower
mov [r8+2],cl //this results in bits 16 to 23 to be written to r8+2

ret
[/64-bit]

[32-bit]
//parameters: (32-bit)
push ebp
mov ebp,esp
//[ebp+8]=input
//[ebp+c]=address
//[ebp+10]=address of output
//example:
push eax
push ebx
mov eax,[ebp+8] //load the value into eax
mov ebx,[ebp+10] //load the output address into ebx

mov word [ebx],ax
shr eax,#16
mov [ebx+2],al
pop ebx
pop eax

pop ebp
ret
[/32-bit]
]])

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Razi
Expert Cheater
Reputation: 1

Joined: 17 Jan 2018
Posts: 202

PostPosted: Fri May 17, 2019 5:39 am    Post subject: Reply with quote

@Dark Byte, Thanks, search works much faster.
Dissect Data/structures can be called from general CE window with hotkeys: ctrl + alt + D, but menu item is much better.
To work from autorun folder in the "Tools" script need to change:
Code:
local MainMenuItemName = 'ools1' --'miTools' -- 'ools1' ,
--change to
local MainMenuItemName = 'miTools' --'miTools' -- 'ools1'


also Lua Engine (or Dissect Data/structures) can be called from menu item with key press simulation:
Code:
MainForm = getMainForm()
local t = translate
local format = string.format

local TableMenuItemName = 'miTable'

local function showLuaEngine()
      keyDown(VK_CONTROL)
      keyDown(VK_MENU)
      keyDown(VK_SHIFT)
      sleep(50)
      doKeyPress(VK_L)
      sleep(50)
      keyUp(VK_CONTROL)
      keyUp(VK_MENU)
      keyUp(VK_SHIFT)
end

local function addLuaEngineShortCut()
   if MainForm.Menu == nil then return end
   local menuItems = MainForm.Menu.Items
   local miTable = nil
   for i = 0, menuItems.Count - 1 do
      if menuItems[i].Name == TableMenuItemName then
         miTable = menuItems[i]
      end
   end
   if miTable ~= nil then
      local mi = createMenuItem(miTable)
      mi.Caption = t('Open Lua Engine')
      mi.Shortcut = 'Ctrl+L'
      mi.onClick = showLuaEngine
      miTable.insert(1, mi)
   end
end

addLuaEngineShortCut()

Is there a command that simulates key press more than 1 button? something like: doKeyPress(VK_CONTROL + VK_MENU + VK_SHIFT + VK_L)
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Fri May 17, 2019 7:16 am    Post subject: Reply with quote

Razi wrote:
...
Code:
local MainMenuItemName = 'ools1' --'miTools' -- 'ools1' ,
--change to
local MainMenuItemName = 'miTools' --'miTools' -- 'ools1'
...


It will create a different "Tools" manu then the default one CE makes.
If you execute this:
Code:

   local menuItems = MainForm.Menu.Items
   for i = 0, menuItems.Count - 1 do
      print(menuItems[i].Name)
   end

You'll get this output:
Code:
File1
Edit3
Process1
miTable
mi3d
ools1
miDotNET
miNetwork
Plugins2
miLanguages
miHelp

So it might be better to name it something else, or you'll get 2 "Tools" menus if you add one in the tools section in the CE settings.


Not sure why you want to do open the Lua Engine that way instead of just calling show, but "(key1 | key2 | key3 | key4)" should work. You could also just use the memory view form's menu item's "doClick", same as the dissect data one does.

_________________
Back to top
View user's profile Send private message Visit poster's website
Razi
Expert Cheater
Reputation: 1

Joined: 17 Jan 2018
Posts: 202

PostPosted: Fri May 17, 2019 9:39 am    Post subject: Reply with quote

TheyCallMeTim13 wrote:
Not sure why you want to do open the Lua Engine that way instead of just calling show, but "(key1 | key2 | key3 | key4)" should work. You could also just use the memory view form's menu item's "doClick", same as the dissect data one does.

Because with key press simulation can be called many things, just need to put the desired keys. Of course, .show() is much better.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites