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 


How to add new cheats into existing trainer interface

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

Joined: 07 Apr 2020
Posts: 37

PostPosted: Thu Apr 23, 2020 12:00 pm    Post subject: How to add new cheats into existing trainer interface Reply with quote

For example,I have a +49trainer,I somehow create a new hack.but I already have my old one made.How do I add new hacks without deleting my old FRM LFM saves?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 472

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

PostPosted: Thu Apr 23, 2020 12:02 pm    Post subject: Reply with quote

open the .ct version and look at the .lua code.
It shouldn't be that hard to add new lines

(assuming you did save as a normal .ct before saving as
.exe)

_________________
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
MichaelLee01
Cheater
Reputation: 0

Joined: 07 Apr 2020
Posts: 37

PostPosted: Wed Apr 29, 2020 3:12 pm    Post subject: Reply with quote

Dark Byte wrote:
open the .ct version and look at the .lua code.
It shouldn't be that hard to add new lines

(assuming you did save as a normal .ct before saving as
.exe)



Thank you.

i checked my lua code and found this:

memrec501_hotkey0.onPostHotkey=onPostHotkey1

function onPostHotkey2(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=Hotkey.Owner
local isActive=memrec.Active --get the state after the hotkey got triggered
CETrainer.CHEAT2.setActive(isActive) --gui update, nothing else
if gPlaySoundOnAction then
if isActive then
playSound(gActivateSound)
else
playSound(gDeactivateSound)
end
end
end


It seems memrec501 is my hotkey ID.So how do I know my hotkey ID?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 472

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

PostPosted: Wed Apr 29, 2020 3:14 pm    Post subject: Reply with quote

In the memoryrecord for the hotkey select "set/change hotkeys"
select the appropriate hotkey and in the bottom right there will be an ID

_________________
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
MichaelLee01
Cheater
Reputation: 0

Joined: 07 Apr 2020
Posts: 37

PostPosted: Wed Apr 29, 2020 3:39 pm    Post subject: Reply with quote

Dark Byte wrote:
In the memoryrecord for the hotkey select "set/change hotkeys"
select the appropriate hotkey and in the bottom right there will be an ID


Thanks for answering.
if you look at my picture
I have my last cheat42.Now I create a cheat43 and I want to put that into my trainer.Is there a way to add one more without totally deleting my LFM file?



20200430053158.png
 Description:
 Filesize:  1.13 MB
 Viewed:  2880 Time(s)

20200430053158.png


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 472

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

PostPosted: Wed Apr 29, 2020 4:03 pm    Post subject: Reply with quote

ctrl+c / ctrl+v might work.
_________________
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
MichaelLee01
Cheater
Reputation: 0

Joined: 07 Apr 2020
Posts: 37

PostPosted: Wed Apr 29, 2020 4:35 pm    Post subject: Reply with quote

Dark Byte wrote:
ctrl+c / ctrl+v might work.



Thank you,It did work.But how do I bind my new hotkey into new hack?
I set my hotkey via cheat table.
I even manually add lua code,but everytime I generate a trainer,it will automatically delete my new lua code



20200430062957.png
 Description:
 Filesize:  50.45 KB
 Viewed:  2868 Time(s)

20200430062957.png


Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1549

PostPosted: Wed Apr 29, 2020 9:17 pm    Post subject: Reply with quote

MichaelLee01 wrote:

I even manually add lua code,but everytime I generate a trainer,it will automatically delete my new lua code




Since you are using Lua Script, register it and work with it every time.
No matter how you recorded it, it will wait for you.
On the left top of Lua >> File >> SaveAll >> Save: Trainer.CT. and OK.

_________________
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
Dark Byte
Site Admin
Reputation: 472

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

PostPosted: Thu Apr 30, 2020 2:31 am    Post subject: Reply with quote

don't generate the trainer. save as .exe
_________________
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
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting 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