This is the AMP version of this page.
If you want to load the real page instead, click this text.

Help! Is there any way to modify a field offset

EpicCode

1/3 Games Approved
I have a few things I'd like to modify but they only give field offsets. Can this be done..? If so how..? Thanks for anyone's input, I haven't seen anything regarding this.
 
Well I know there is a way just kind of need to know what address I start counting away from. Ok so I posted a example. Say I want to modify "targethp" the field offset is 2C. Looks like it falls under enemy scanner which starts at 0x6947B4. This would make it fall at 0x6947E0.

Does this sound correct..? If no one has ever done this we can figure it out together as it would be beneficial.
 
No it takes a int value as a parameter and does something with it but doesn't return a value. :)
ah yes you're right,
but when it comes to hooking, that is the one i'd like to mess up. those fields that you were mentioning could be called, and set it to a value.

I'm new to hooking, so don't ask me about it.
 
Yes they absolutely are able to be called, just need to know the starting place and add the field offset to it to get the exact address. I just need some direction on where the starting address is because there is usually a public and static method which both are different starting offsets entirely. I guess I could trial and error to figure it out, just wondered if anyone has done this. I've never seen anyone do it. Most of the good stuff is not a actual direct memory address but rather a field offset.
 
add the field offset to what?
i don't understand, what i know about field offset, they are like a legends that should be called.
example if you view the hex
28 00 90 E5 1E FF 2F E1

so 0x28(targethp) is called there which is you're targethp.
 
and the 0x28, has nothing to do with the virtual address. you're not going to add the field offset to virtual address, that's not how field offset works.
Just like my example above, that's how field offset is used.
 
Field offset is the bytes away from another main address holder like player entity. So you add the field offset to the main address in which case is player entity.
 
Atleast that's how it's done with pc games. Ok so like for example you have Entityzombies. The game defines a field offset for each zombie on map once spawned and places the HP holder on it. That is the direct bytes away from each starting point of each zombie info followed by coordinates
 
i dont know how it's written in memory but in il2cpp or assembly-csharp games of androids, we usually edit the dll or so file not memory.

field
enemyhp 0x28

method
public int hp(): RVA: 0x1009fc0

if you open the dll or so file in hex editor in address 0x1009fc0 you see
28 00 90 E5 1E FF 2F E1
or
LDR R0, [R0, #0x28]
BX LR
or
load the 0x28 to R0, return

we edit that to
01 00 A0 E3 1E FF 2F E1
or
MOV R0, #1
BX LR

to make hp = 1
 
Yea but where are you getting the address if only given a field offset. I'm no noob. I'm a very very advanced modder that even can exploit server sided stuff. The example I have is nothing I'm actually working on, it was merely a example. I'm literally only given a field offset so how can you even locate the address to look at lol
 
I was at work so it was a bit hard to concentrate on what you were saying at the time but I get what you are saying now, if you modded enemy health to return 1 they would never die as it would always return 1 as their health :P

Better to modify something like StartAttack and return it to false.
 
also from my example the enemy are weakened to hp1 not always 1, it can die, because that value can be changed in game, it just tells the program how many hp the enemy has? then you return 1.
 
You need to ensure that the field offset has its own values in order to use methods to update those offsets.

Example: 0x20 - targetHp, and it says paramvalue, you need to check the paramvalue class and check the methods on previous class that you're checking on and find the best working method to make it work.