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 


Optimizing or making my ff7 exp/ap/gil multiplier better

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
haleypadawan
How do I cheat?
Reputation: 0

Joined: 28 Jul 2021
Posts: 3

PostPosted: Wed Jul 28, 2021 6:42 am    Post subject: Optimizing or making my ff7 exp/ap/gil multiplier better Reply with quote

Hello, I really have no experience when it comes to coding or this kind of stuff but I managed to make a basic exp/ap/gil multiplier with what I understand looking at other people's work. I've seen some scripts use "push" and "mov" on theirs but I only used "imul" and seems to work fine. Can someone explain to me what the downside of not using those and how I should add it to my script? Thanks!

Code:

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat

 
 
aobscanmodule(INJECT,FF7.exe,89 0D C0 E2 99 00) // should be unique
alloc(newmem,$1000)

label(code)
label(return)
label(EXPMulti)
registersymbol(EXPMulti)

newmem:

code:
  imul ecx,[EXPMulti]
  mov [FF7.exe+59E2C0],ecx
  jmp return

EXPMulti:
dd #1

INJECT:
  jmp newmem
  nop
return:
registersymbol(INJECT)

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
INJECT:
  db 89 0D C0 E2 99 00

unregistersymbol(INJECT)
dealloc(newmem)
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Wed Jul 28, 2021 11:28 am    Post subject: Reply with quote

If you modify registers the game is using, bad stuff can happen. For example, if a code injection zeroes the eax register but the game was storing a pointer in there it's going to use later, then the game will dereference a null pointer and crash.

Most people don't have the knowledge, confidence, and/or interest to know which registers are fine to change and which need to be backed up and restored with push and pop respectively. So, any register they use, they back up to be safe.

It's not necessary in this case. The only changes your code injection makes that propagate outside of itself are to that static memory address (intended by you I assume) and the ecx register, which is probably fine.

_________________
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
haleypadawan
How do I cheat?
Reputation: 0

Joined: 28 Jul 2021
Posts: 3

PostPosted: Wed Jul 28, 2021 11:50 am    Post subject: Reply with quote

ParkourPenguin wrote:
If you modify registers the game is using, bad stuff can happen. For example, if a code injection zeroes the eax register but the game was storing a pointer in there it's going to use later, then the game will dereference a null pointer and crash.

Most people don't have the knowledge, confidence, and/or interest to know which registers are fine to change and which need to be backed up and restored with push and pop respectively. So, any register they use, they back up to be safe.

It's not necessary in this case. The only changes your code injection makes that propagate outside of itself are to that static memory address (intended by you I assume) and the ecx register, which is probably fine.


Alrighty thank you! Honestly just doing this because I see that cheat tables that I want to use are missing multipliers which for me is the most useful one out of everything else.

Hopefully it doesn't corrupt my save in the long run. Thanks again for replying and answering my questions
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1055
Location: 0x90

PostPosted: Wed Jul 28, 2021 12:19 pm    Post subject: Reply with quote

Always create a backup save if it's possible. There's always a risk when using hacks.
Back to top
View user's profile Send private message
haleypadawan
How do I cheat?
Reputation: 0

Joined: 28 Jul 2021
Posts: 3

PostPosted: Thu Jul 29, 2021 4:40 pm    Post subject: Reply with quote

Okay I updated my script for EXP and AP because for some reason if I try to multiply it by 5 the script multiplies it by 15 instead but GIL worked fine which kinda drove me a bit insane.
Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat

 
 
aobscanmodule(INJECT,FF7.exe,89 0D C0 E2 99 00) // should be unique
alloc(newmem,$1000)

label(code)
label(return)
label(EXPMulti)
registersymbol(EXPMulti)

newmem:

code:
  sub ecx,[FF7.exe+59E2C0]
  imul ecx,[EXPMulti]
  add ecx,[FF7.exe+59E2C0]
  mov [FF7.exe+59E2C0],ecx
  jmp return

EXPMulti:
dd #1

INJECT:
  jmp newmem
  nop
return:
registersymbol(INJECT)

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
INJECT:
  db 89 0D C0 E2 99 00
unregistersymbol(EXPMulti)
unregistersymbol(INJECT)
dealloc(newmem)

I still don't understand why that happens but at least its working correctly now
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