Help! offset edit don't work

ItzBlady

Platinian
Im use nepmods tester and test any offset. All offset work, but if im add offset in mod menu, 90% offset don't work. Im check all offset, all. Right, without error. Im try use HOOK_LIB/Mshookfunction, but all don't work.
Codes:
void (*old_Speed)(void *instance);
void Speed(void *instance) {
if (feature6) {
*(int *) ((uint64_t) instance + 0x18) = 0;
}
return old_Speed(instance);
}

//
MSHookFunction(
reinterpret_cast<void*>(
getAbsoluteAddress(
"libil2cpp.so",
string2Offset("0x744594")
)
),
reinterpret_cast<void*>(Speed),
reinterpret_cast<void**>(&old_Speed)
);

//
HOOK_LIB("libil2cpp.so", "0x744594", Speed, old_Speed);

Im use lgl mod menu 3.2
 
Firstly, the tester uses patching, which is different than hooking (what you are doing here). Have you tried patching them inside lgl menu to verify if those offsets work?
Secondly, your hooks are confusing. Is Speed a void function? In that case, you are returning a value which is wrong. Is it an update function? Is the field ever really used? Well no one knows because your code is not clear :)
 
Firstly, the tester uses patching, which is different than hooking (what you are doing here). Have you tried patching them inside lgl menu to verify if those offsets work?
Secondly, your hooks are confusing. Is Speed a void function? In that case, you are returning a value which is wrong. Is it an update function? Is the field ever really used? Well no one knows because your code is not clear :)
No, speed this field offset, im use hook for field Offset.
// WeaponScr

[Address(RVA = "0x744594", Offset = "0x744594", VA = "0x744594")]
private void Update()

[FieldOffset(Offset = "0x18")]
public int ShootTime;
 
Try remove the toggle or change the input to other value

C++:
void (*old_Speed)(void *instance);
void Speed(void *instance) {
    *(int *) ((uint64_t) instance + 0x18) = 0;
}
 
No, speed this field offset, im use hook for field Offset.
// WeaponScr

[Address(RVA = "0x744594", Offset = "0x744594", VA = "0x744594")]
private void Update()

[FieldOffset(Offset = "0x18")]
public int ShootTime;

Again, the problem is with how you are using
the update function. You never call the original update among other things.
 
Last edited:
C++:
void (*old_Speed)(void *instance);
void Speed(void *instance) {
  if(instance != NULL && <bool>){
    *(int *) ((uint64_t) instance + 0x18) = 0;
  }
  old_speed(instance);
}

Use this, if it still doesn't work, then find another field or method because the game does not use it
 
C++:
void (*old_Speed)(void *instance);
void Speed(void *instance) {
  if(instance != NULL && <bool>){
    *(int *) ((uint64_t) instance + 0x18) = 0;
  }
  old_speed(instance);
}

Use this, if it still doesn't work, then find another field or method because the game does not use it
he uses just such ones, I checked this offset in the tester, and everything worked fine.
 
C++:
void (*old_Speed)(void *instance);
void Speed(void *instance) {
  if(instance != NULL && <bool>){
    *(int *) ((uint64_t) instance + 0x18) = 0;
  }
  old_speed(instance);
}

Use this, if it still doesn't work, then find another field or method because the game does not use it
 

Attachments

  • Screenshot_20220823_200743_com.yad.threedgz.jpg
    Screenshot_20220823_200743_com.yad.threedgz.jpg
    104.7 KB · Views: 110
Back
Top Bottom