 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Adrien Cheater
Reputation: 0
Joined: 01 Aug 2012 Posts: 48
|
Posted: Sun Dec 29, 2013 9:15 pm Post subject: [FAR CRY 3] Need Help with Opcodes for Health and Ammo |
|
|
I need help figuring out what to do for assembling a script for godmode in Far Cry 3. So far, I've found the instruction, the instruction address, the opcodes for health, and the disassembler.
Here's what I've found.
All Health is written to with this piece of code
| Code: | | movss [esi+10],xmm0 |
Disassembler:
Address
FC3_d3d11.RunGame+3EE061 F3 0F11 46 10 movss [esi+10],xmm0
Write Instruction address:
506E2D61
I know that if I replace the opcode with no operation, it not only gives the PLAYER godmode, but ALL NPC's godmode as well. That literally breaks the game - you can't die and you can't kill anything. I'm looking to only give the player godmode by way of code injection; I've done the tutorial and all is well and good, but I'm not sure how to put it all together in this case. I also can't find the gosh darn pointer for health, either. I know the max health value is 450 with all health slots available and filled, the address is a float, and it drops to 315 from full health at a jump height of about 3-5 meters.
All ammo clips are written to with this piece of code
The disassembler is FC3_d3d11.RunGame+4130F1 89 10 mov [eax],edx and the address of the write instruction is 57A77DF1. The pointer address for ammo in the clip is 033FE298 and its value changes with each equipped weapon, but the address is not green, indicating that it changes. I've encountered the same exact problem in Mercenaries 2 with health and I just don't know how to find the glorious green address without doing a pointer scan.
Now, I don't know what to do with all this information! I need someone to point me in the right direction. With the ammo clip, I want the amount of ammo in the clip to not change when I fire a round of ammunition. That will enable the effect of "bottomless clip," but I don't want to break the game. For health, I just don't want it to go down
Will someone please point me in the right direction? What am I missing?
Last edited by Adrien on Mon Dec 30, 2013 2:15 pm; edited 1 time in total |
|
| Back to top |
|
 |
UnIoN Expert Cheater
Reputation: 2
Joined: 17 May 2011 Posts: 146
|
Posted: Sun Dec 29, 2013 10:31 pm Post subject: |
|
|
you have to find an adress and value that indicates whitch health is curently decreasing.
you have to figure this out by yourself, trying to guess for what a given value could stand for.
basically this can be done when you do the following:
find one or better more enemys and find the health for each of them before they die. with that addresses you can use in the disassembler the tool dissect structure to find values that are always the same and could be used to describe = this is an enemy
for example at offset 2F there could be a byte value with 1 when its the enemy health and 0 when its your health that is decreasing.
with that information you write your injection by comparing this value
for example: | Code: | cmp [edi+2F],01
jne player
mov //write health
player:
jmp exit //dont write |
|
|
| Back to top |
|
 |
Adrien Cheater
Reputation: 0
Joined: 01 Aug 2012 Posts: 48
|
Posted: Sun Dec 29, 2013 10:49 pm Post subject: |
|
|
It would be very much useful if I had a controlled environment in-game where I could go about doing this. It took me 15 minutes to understand what you wrote but I think I can make it work utilizing the method you described and the code you wrote; I'm relatively new to playing around with code (I was never able to look at code for more than 20 seconds without getting a headache from trying to comprehend it) however I'm determined to get this right. When all is said and done, I'll present to you the final code, for verification that it's right in terms of syntax and stuff. Thank you!
Edit:
Okay, my first problem is that the enemies die too fast. I don't know the max health for an enemy and they die way before I can get an accurate address. However, I DO know that enemy health is PROBABLY between 0 and 500. it wouldn't make sense for an enemy to have greater health than the player... I've taken the least damaging weapon in the game and shot enemies to find their health, but they die. Way. Too. Fast.
The process I'm using for the scanning is (Float)>(Unknown Initial Value)>FIRST SCAN>Decreasing Value (every time I hit them with a round of ammo)>NEXT SCAN>Decreasing Value>NEXT SCAN>*they die*>Exact Value (0)
At that point I have more than 10,000 addresses left in the address box. Did you try doing this yourself?
Edit 2:
Okay, I've found another way to find an enemy's health address. Find the health disassembler, which is FC3_d3d11.RunGame+3EE061, and right click and find "Find out what addresses this instruction accesses" and you get a debugger window. You shoot your enemy and make them lose a bit of health, and that'll show up in the debugger window with the amount of health they have (as a float - health is always a float here) and how many times it was accessed - this is the number of times you've shot your enemy. Every enemy/animal has their own address for health, but they all access the same exact code. I know I'm beating around the bush here; I need to know what differentiates the player, an enemy, and an animal. Now, I need help... Again... I did the Dissect Data/structure but I don't know how to use it. |
|
| Back to top |
|
 |
UnIoN Expert Cheater
Reputation: 2
Joined: 17 May 2011 Posts: 146
|
Posted: Tue Dec 31, 2013 6:34 am Post subject: |
|
|
hi,
i will give you guidience,
not only the information from dissect data from your or from enemys health can be used for comparison,
sometimes you can also use the information given from "find out what writes to this address"
in this example from far cry 3 (v. 1.5) its the value from the register "edi" that gets my most attention.
the next part what you need to do is, find an place to inject your hack,
most the time you can use the address given from "find out what writes to this address".
try it out, you will find out that your code works, and you are immortal, but still so are your enemys, with a funny side effect (they are undead, they will still attack you even if they lost their head ^^)
now you need to read the code further and try to find the part, where the game sets your health when you lost some.
so you need to go up in the code and find that part that stores your health to "xmm0".
near some other comparison commands like ucomiss and comiss and other commands like movaps, you will find this: | Code: | | movss xmm0,[ebp+08] |
try this address out and inject your hack there
now test this out find out if your enemys are still turning into zombies |
|
| Back to top |
|
 |
Adrien Cheater
Reputation: 0
Joined: 01 Aug 2012 Posts: 48
|
Posted: Thu Feb 06, 2014 8:25 pm Post subject: |
|
|
Sorry for the month-wait response, but where do I find the xmm0 storage part? Only place I could find anything about xmm0 - xmm7 is when I do the debug window and click for more information about the instruction. As is seen here in the FPU, I see all the xmm# Registers and my values for health in the xmm0 and xmm1 registers.
I apologise for my incompetence. This is my first time without training wheels.
EDIT1: I suppose a better question would be "How do I access the xmm# registers so that I may edit them?"
EDIT2: I finally grew a brain and read into your post deeply. I created an auto assemble script, but I'm stuck as far as making my health value as much as I want it to be (double, to make sure the health bar never visibly goes down). I was thinking maybe a script like
but I really don't know since I'm right out of the frying pan.
EDIT3: Okay! I finally did it! I just had to make the Infinite Ammo script and it came to me, and I made a working script for Infinite Money, Infinite Clip Ammo, and Infinite Health. Here's the uploaded table: http://cheatengine.org/tables/moreinfo.php?tid=1362
Thank you so much for the help! I also give credit to Geri for his video tutorials about script-making. |
|
| 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
|
|