 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Terenas How do I cheat?
Reputation: 0
Joined: 25 Feb 2015 Posts: 2
|
Posted: Wed Feb 25, 2015 10:51 am Post subject: Instant Build issue |
|
|
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 |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Wed Feb 25, 2015 12:35 pm Post subject: |
|
|
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:
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 |
|
 |
|
|
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
|
|