Help! Hacks not working properly (arm64)

libModz

Awesome Active Platinian
Original poster
Jun 2, 2022
167
29
28
UK
Hi guys, I've been trying to update my lgl mod menu to arm64, everything works except for hex patching some methods.

Example...

C++:
#if defined(__aarch64__) //To compile this code for arm64 lib only.

    PATCH("0x600124", "00 00 80 D2 C0 03 5F D6");
Clearing the app data makes it work but after closing the app and opening it again, it stops working for some reason. I have to keep clearing the app data everytime I start the game

Anyone know why this is and how I can fix it? Thanks
 
Last edited:

AZFernandez

Platinian
Dec 8, 2023
19
3
3
I'm using findMethod (by name) instead of offset
Hello. I tried to repeat this, but my hack stopped working even the first time I started it, I believe that the translator did not accurately translate your message and I simply did the wrong things. Could you show an example of your code? You provided this PATCH("0x600124", "00 00 80 D2 C0 03 5F D6"); in a similar form PATCH("SpendGems", "00 00 80 D2 C0 03 5F D6"); ?
Thank you
 

libModz

Awesome Active Platinian
Original poster
Jun 2, 2022
167
29
28
UK
Hello. I tried to repeat this, but my hack stopped working even the first time I started it, I believe that the translator did not accurately translate your message and I simply did the wrong things. Could you show an example of your code? You provided this PATCH("0x600124", "00 00 80 D2 C0 03 5F D6"); in a similar form PATCH("SpendGems", "00 00 80 D2 C0 03 5F D6"); ?
Thank you
Example:

C++:
PATCH_ADDR((uint64_t)findMethod("","RoomClient","CanRespawn"), "20 00 80 D2 C0 03 5F D6");
For this to work you need to add code to a file in your includes folder.
 
  • Like
Reactions: AZFernandez

AZFernandez

Platinian
Dec 8, 2023
19
3
3
PATCH_ADDR((uint64_t)findMethod("","RoomClient","CanRespawn"), "20 00 80 D2 C0 03 5F D6");
Well, I added this code to includes/Macros.h (it seemed like a good place for the code), but unfortunately my project didn't build. Obviously you made a lot of changes to the lgl template, but my programming skills are not very good, so I’m unlikely to be able to repeat it (maybe only if I see your modified mod menu template, but it’s a big impudence to ask it from you). I came to the conclusion that I will remove the display of the menu icon and will use the switch button, which will be activated by default, so my hacks continue to work on further restarts of the game). In any case, thank you for trying to help.
 

libModz

Awesome Active Platinian
Original poster
Jun 2, 2022
167
29
28
UK
Well, I added this code to includes/Macros.h (it seemed like a good place for the code), but unfortunately my project didn't build. Obviously you made a lot of changes to the lgl template, but my programming skills are not very good, so I’m unlikely to be able to repeat it (maybe only if I see your modified mod menu template, but it’s a big impudence to ask it from you). I came to the conclusion that I will remove the display of the menu icon and will use the switch button, which will be activated by default, so my hacks continue to work on further restarts of the game). In any case, thank you for trying to help.
No this code goes in main.cpp under hackthread.
You could just try using lgl 2.9 instead
 

AZFernandez

Platinian
Dec 8, 2023
19
3
3
No this code goes in main.cpp under hackthread
I guessed that this needs to be added to main cpp, but in your post you talked about some file in includes. So I have to create a file "file.h" in the includes folder, then in main.cpp I have to write this #include <file.h> and put PATCH_ADDR((uint64_t)findMethod("AddGems", "AddGold"), "E0 47 88 52 E0 01 A0 72 C0 03 5F D6"); in hackthread? But what code should be in file.h?
 

libModz

Awesome Active Platinian
Original poster
Jun 2, 2022
167
29
28
UK
I guessed that this needs to be added to main cpp, but in your post you talked about some file in includes. So I have to create a file "file.h" in the includes folder, then in main.cpp I have to write this #include <file.h> and put PATCH_ADDR((uint64_t)findMethod("AddGems", "AddGold"), "E0 47 88 52 E0 01 A0 72 C0 03 5F D6"); in hackthread? But what code should be in file.h?
Message me on Telegram: libModz