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 


Instant Build issue

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

Joined: 25 Feb 2015
Posts: 2

PostPosted: Wed Feb 25, 2015 10:51 am    Post subject: Instant Build issue Reply with quote

I have some problem with this opcodes here...

Code:

fld dword ptr [edi+1C]
fstp dword ptr [esi+1C]
lea eax,[edi+24]


The fstp dword ptr [esi+1C] is the opcode for instant build it represents the full value of 15.5 and if I nop fstp dword ptr [esi+1C] it it would lead to instant build but it will screw my graphic up.

I need to know how to use code injections to change the opcode into something that will make the value instantly full value.

Is this correct?


Code:
mov eax,[esi+10]               // Get pointer to additional info
 cmp dword ptr [eax+000006fc],1 // Player's unit?
 jne _ExitMX                    // Jump if false

 fld dword ptr [edi+1c]   // Get Current Build Time
 fadd dword ptr [edi+ff] 
 fstp dword ptr [esi+1c]



Example : Recruitment time to create unit, is 15.5 floating value, how do I make it 15.5 instantly without nopping fstp dword ptr [esi+1C]?
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Wed Feb 25, 2015 12:35 pm    Post subject: Reply with quote

Do not nop FPU instructions. Ever. Unless you are able to analyze and understand whole function.

Never blindly NOP FPU instructions.
Especially those:
- FL____ - like fld, fld1, fldz, fldpi, , ...
- F____P - like fstp, faddp, fsubp, fdivp, ...
- or F____RP - like fsubrp, ...
Because nopping those will cause unbalanced FPU stack.

Also nopping those:
fsub, fisub, fsubr, fisubr, ... - deceptively, they can not be nopped too. Because ST(0) can be used later.




http://forum.cheatengine.org/viewtopic.php?t=566568
http://forum.cheatengine.org/viewtopic.php?p=5515745#5515745


Example. If you want to NOP this instruction:
Code:
fstp dword ptr [xxxxxxx]



You must use something like this:
Code:
fstp ST(0)









maybe this will work for you
Code:
newmem:

originalcode:
fld dword ptr [edi+1C]  // orig
fstp dword ptr [esi+1C] // orig

mov eax,[esi+10]
cmp dword ptr [eax+000006fc],1 // Player's unit?
jne _ExitMX                    // Jump if false

mov dword ptr [esi+1c],(float)1000.0 // write 1000.0. It is way bigger than 15,
                                     // hopefully game logic can handle this

_ExitMX:
lea eax,[edi+24]        // orig
jmp returnhere

_________________
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 -> 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