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 


Macro for moduleBase

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
wulfcare
Advanced Cheater
Reputation: 0

Joined: 27 Feb 2023
Posts: 64

PostPosted: Tue Feb 20, 2024 4:58 pm    Post subject: Macro for moduleBase Reply with quote

Hi guys,

Since I have to rename a game I am playing on steam, it means I need to go through my cheat table and update the module name each time e.g game1.exe + ofset to game2.exe + offset. Is there a macro for moduleBase in cheat engine, so i no longer have to rename. e.g. MACRONAME + ofset.

Thanks for anyone who took the time to read this,
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 150

Joined: 06 Jul 2014
Posts: 4657

PostPosted: Tue Feb 20, 2024 5:11 pm    Post subject: Reply with quote

You could probably open up the .CT file in a text editor (it's just an xml file) and mass replace game1.exe to game2.exe. Just back up the original cheat table first.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 35

Joined: 16 Feb 2017
Posts: 1483

PostPosted: Tue Feb 20, 2024 8:04 pm    Post subject: This post has 1 review(s) Reply with quote

You can use this logic if it works for you.

It will update all your scripts if you provide the old and new directory.

Code:
if myfrm1 then myfrm1.Destroy() myfrm1=nil end
DP1=getScreenDPI()/96
myfrm1=createForm()
myfrm1.height=100*DP1 myfrm1.width=200*DP1 myfrm1.left=261*DP1 myfrm1.top=98*DP1
myfrm1.PopupMode=0 myfrm1.caption="myfrm1"
myfrm1.Position="poDesktopCenter" myfrm1.BorderStyle="bsSingle"  myfrm1.ShowInTaskBar="stAlways"
-------------------------
local mytbl = {}
----------------------- mytbl.edt1 ----- 
mytbl.edt1=createEdit(myfrm1)
mytbl.edt1.AutoSize=true
mytbl.edt1.height=23*DP1 mytbl.edt1.width=130*DP1 mytbl.edt1.left=35*DP1 mytbl.edt1.top=5*DP1
mytbl.edt1.text=""
mytbl.edt1.alignment="taLeftJustify"
mytbl.edt1.Font.Style="fsBold" mytbl.edt1.Font.Size=0*DP1
-----------------------
----------------------- mytbl.edt1 ----- 
mytbl.edt2=createEdit(myfrm1)
mytbl.edt2.AutoSize=true
mytbl.edt2.height=23*DP1 mytbl.edt2.width=130*DP1 mytbl.edt2.left=35*DP1 mytbl.edt2.top=35*DP1
mytbl.edt2.text=""
mytbl.edt2.alignment="taLeftJustify"
mytbl.edt2.Font.Style="fsBold" mytbl.edt2.Font.Size=0*DP1
-----------------------
----------------------- mytbl.btn1 ----- 
mytbl.btn1=createButton(myfrm1)
mytbl.btn1.AutoSize=false
mytbl.btn1.height=25*DP1 mytbl.btn1.width=130*DP1 mytbl.btn1.left=35*DP1 mytbl.btn1.top=70*DP1
mytbl.btn1.caption="Create Script"
mytbl.btn1.Font.Style="fsBold" mytbl.btn1.Font.Size=0*DP1
-----------------------

mytbl.btn1.OnClick=function ()
  if mytbl.edt1.Text=="" or mytbl.edt2.Text=="" then
    showMessage("GameName.exe not found!")
  else
    local al=getAddressList()
    cnt = addresslist_getCount(al)
     local oldName = mytbl.edt1.Text
     local newName = mytbl.edt2.Text
     for i=0, cnt-1 do
         local mr = addresslist_getMemoryRecord(al,i)
         scrpt = (mr.Script):gsub(oldName,newName)
         mr.Script = scrpt
         mr.endEdit()
     end
   end
end



asm script:

Code:
[ENABLE]
{$LUA}
if syntaxcheck then return end

--lua code

{$ASM}
[DISABLE]

{$LUA}
if syntaxcheck then return end
if myfrm1 then myfrm1.Destroy() myfrm1=nil end

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
wulfcare
Advanced Cheater
Reputation: 0

Joined: 27 Feb 2023
Posts: 64

PostPosted: Tue Feb 20, 2024 8:13 pm    Post subject: Reply with quote

Perfect, thats exactly what i needed Aylin <3
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 468

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

PostPosted: Tue Feb 20, 2024 9:36 pm    Post subject: This post has 1 review(s) Reply with quote

$process
_________________
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
wulfcare
Advanced Cheater
Reputation: 0

Joined: 27 Feb 2023
Posts: 64

PostPosted: Tue Feb 20, 2024 9:47 pm    Post subject: Reply with quote

Ok thats even easier lol,

<3 dark byte
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