 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
sub1to How do I cheat?
Reputation: 0
Joined: 20 Feb 2013 Posts: 8
|
Posted: Sun Mar 13, 2016 1:57 pm Post subject: FTL systems code injection |
|
|
I'm having some trouble making the various systems within invincible. Some of the systems seem to be controlled by different instructions.
I attached a screenshot of systems I'm talking about, in case that's unclear.
I have found some useful offsets which seem to apply to all the systems (using data/structure dissect). Some notes I took:
| Code: | -----------------
FTL system active points (shield)
-----------------
000c player/enemy
003c active points
0040 total avail slots
00ec avail slots (less than total means they're broken)
00f0 the (total) avail slots to compare 00ec to (amount of broken slots is 00f0-00ec)
00f4 % of bar destroyed (burned or attacked by enemy crew) |
The active points (green bars) are easy to find, and from there the total available slots (if less than the total, some of the bars will be red) are basically neighbors.
With the debugger I checked from where this value is being changed (for the shield) and made an easy fix (without aobscan for now because I'm lazy):
| Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
newmem: //this is allocated memory, you have read,write,execute access
cmp [ecx+0000000c],0
je exit
originalcode:
mov [ecx+000000EC],eax
exit:
jmp returnhere
"FTLGame.exe"+15223E:
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"+15223E:
mov [ecx+000000EC],eax
//Alt: db 89 81 EC 00 00 00 |
This works for all the (default (using the default ship)) systems except for the weapons system. I figured this might be because the weapons system is tied to the different weapon slots, and so might use a different function. So I checked what wrote to the weapons system (available slots) and made another 'script':
| Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
newmem: //this is allocated memory, you have read,write,execute access
cmp [ecx+0000000c],0
je exit
originalcode:
sub [ecx+000000EC],eax
exit:
jmp returnhere
"FTLGame.exe"+15D78B:
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"+15D78B:
sub [ecx+000000EC],eax
//Alt: db 29 81 EC 00 00 00 |
I then went on to buy a drone system and check if that's now also protected. It is not. I haven't checked the teleporter or any of the other systems you can get.
I'm wondering if I'm missing something here, or do I just have to inject code into different places to get it working for all systems?
| Description: |
|
| Filesize: |
130.9 KB |
| Viewed: |
5538 Time(s) |

|
|
|
| Back to top |
|
 |
SupremeWolf How do I cheat?
Reputation: 0
Joined: 02 Dec 2018 Posts: 6
|
Posted: Fri Dec 07, 2018 10:32 pm Post subject: |
|
|
| Code: |
newmem:
cmp [ecx+0000000c],0
je exit
originalcode:
sub [ecx+000000EC],eax |
I notice the offset is different. Should the code below 'newmem' be
?
|
|
| 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
|
|