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 


[ASM] Problem with my "Crew Godmod" script

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

Joined: 13 Feb 2013
Posts: 76

PostPosted: Thu Feb 28, 2013 11:51 am    Post subject: [ASM] Problem with my "Crew Godmod" script Reply with quote

Hello,

I am making a cheat table for the game "Faster Than Light" but I have a problem with my "Crew Godmod" script. In fact, it was working good until I've decided to change it.

Before I change it, the script was just putting the life of every crew members to 100 with the ligne "mov [eax+28],(float)100". It was working fine but it was looking a bit weird for some "special" crew members who doesn't have their maximal health to 100. The health bar wasn't full, even if it wasn't decreasing when they was hit. So that was kind of "ugly" I guess x)

What I've decided to set the health "[eax+28]" to the max health "[eax+54]" so every health bar will look full, so I've changed my script like that :

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
mov edx,[eax+54]
mov [eax+28],edx

originalcode:
fld dword ptr [eax+28]
mov edx,[edx+08]

exit:
jmp returnhere

"FTLGame.exe"+109091:
jmp newmem
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"FTLGame.exe"+109091:
fld dword ptr [eax+28]
mov edx,[edx+08]
//Alt: db D9 40 28 8B 52 08


The problem is that now, the script crash the game everytime I activate it. I've tested differents solutions but none on them work. I assume the game crash because I save the [eax+54] value into the eax register, but [eax+54] is already in the eax register so that may cause problem ?

I've tried save [eax+54] into others registers but either it crash the game, either the script is not working and create bugs Sad

Can anyone help me out here ? Thank you ^^
Back to top
View user's profile Send private message
DDS
Expert Cheater
Reputation: 3

Joined: 10 Feb 2011
Posts: 112
Location: Bill's Planet

PostPosted: Thu Feb 28, 2013 12:32 pm    Post subject: Reply with quote

u Forgat to Save the Register edx, thats why ur Script is Crashing.

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

fld dword ptr [eax+28]

push edx  //Always Save the Registers
mov edx,[eax+54]
mov [eax+28],edx
pop edx // and When you get Done Restore Them to their Original Value

originalcode:
mov edx,[edx+08]

exit:
jmp returnhere

"FTLGame.exe"+109091:
jmp newmem
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"FTLGame.exe"+109091:
fld dword ptr [eax+28]
mov edx,[edx+08]
//Alt: db D9 40 28 8B 52 08


Also, whenever you are Working with Float Values, Always Change Their Value After they been Put, on Top of the FPU Stack.

Take Care
DDSTrainers

_________________
elDarkDragonSlayer
Back to top
View user's profile Send private message Visit poster's website
redleouf
Advanced Cheater
Reputation: 0

Joined: 13 Feb 2013
Posts: 76

PostPosted: Thu Feb 28, 2013 12:58 pm    Post subject: Reply with quote

Thank you for the quick answer and those two tips Smile

But unfortunately it is still not working, at least it don't crash anymore, but when I activate the script all my crew members instantly die Confused

I've also tried to replace "edx" by "eax" but that one just crash the game again.
Back to top
View user's profile Send private message
DDS
Expert Cheater
Reputation: 3

Joined: 10 Feb 2011
Posts: 112
Location: Bill's Planet

PostPosted: Thu Feb 28, 2013 1:01 pm    Post subject: This post has 1 review(s) Reply with quote

Then try to put your code Before the fld dword ptr [eax+28] Opcode, and Make Sure that the Opcode [eax+54] is your Crews Max Health.

Quick Edit :

you are Lucky that this Game still installed in my Computer.

Anyways, if you Look at the Value at [eax+54] you will find out why all your crew is going down Razz.

im not Gonna tell you the Value of it, you Gonna have to find out for your self. u Can do it by Adding the Value of the Register eax + the OffSet 54
by Clicking the Add Address Manually and Set the Type to Float.

Also if you Scroll up a bit in the Memory Viewer im Sure you can Find the Max health Value with out Having to Look for it with the Dissect Data/Structures Function.

if you still Having problems, Just let me Know and i Will Post the Solution.

_________________
elDarkDragonSlayer
Back to top
View user's profile Send private message Visit poster's website
redleouf
Advanced Cheater
Reputation: 0

Joined: 13 Feb 2013
Posts: 76

PostPosted: Thu Feb 28, 2013 1:52 pm    Post subject: Reply with quote

Wow, I found it ! Thank you a lot ! Smile

It is weird that the offset 54 was showing the same value of the max health for 2 characters in the "Dissect Data/Structures" but show a total other value when you enter it as a pointer ! Surprised

Do you know why ?

And thank you again for the quick answer and the good help !
Back to top
View user's profile Send private message
DDS
Expert Cheater
Reputation: 3

Joined: 10 Feb 2011
Posts: 112
Location: Bill's Planet

PostPosted: Thu Feb 28, 2013 5:10 pm    Post subject: Reply with quote

I hane no Idea why.

and Ur Welcome.

if U Found this Post Helpful, dont Forget to Give me Some Reputation Wink

_________________
elDarkDragonSlayer
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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