cleolibrary / CLEO-Redux

Experimental JavaScript runtime for GTA 3D era games/GTA IV/Bully
https://re.cleo.li
Other
213 stars 20 forks source link

SA: DE How to read and write memory #25

Closed GouLiGuoJiaNaive closed 2 years ago

GouLiGuoJiaNaive commented 2 years ago

Is there a feasible way to read/write the memory of San Andreas (The Definitive Edition) I can easily modify them through the Cheat engine, but I need to use this opcodes in the script to achieve some functions.

XMDS commented 2 years ago

Currently, the read and write memory commands cannot be used in the DE version of SA. Because the game uses x64. These commands will be supported in future versions, please wait. But you can implement them through C++ and write your project (if you need)

GouLiGuoJiaNaive commented 2 years ago

It seems to be waiting for a while, but I believe it will not be too long.

XMDS commented 2 years ago

In fact, a few hours ago. x87 is discussing commands to read and write memory. But only for discussion, because the game uses x64, the memory method will be different. The order hasn't been confirmed yet

XMDS commented 2 years ago

In addition, there is no need for two Chinese to communicate here in English. You can contact me with QQ

JuniorDjjr commented 2 years ago

I do not have so much knowledge in memory hacking, but I didn't understand the difficulty for being x64.

Soon in the early days I made a test asi to understand how the memory of the game is positioned and if it is possible to write it without any problems (SA:DE), and I actually wrote new values in memory, and I saw it by the cheat engine, the values really have been changed correctly and have effect in the game. But I didn't do anything so complex, probably I'm missing some detail here.

I used https://github.com/thelink2012/Injector

XMDS commented 2 years ago

I do not have so much knowledge in memory hacking, but I didn't understand the difficulty for being x64.

Soon in the early days I made a test asi to understand how the memory of the game is positioned and if it is possible to write it without any problems (SA:DE), and I actually wrote new values in memory, and I saw it by the cheat engine, the values really have been changed correctly and have effect in the game. But I didn't do anything so complex, probably I'm missing some detail here.

I used https://github.com/thelink2012/Injector

Yes. What you said is absolutely correct. I did exactly this in my "DisableTextMissing.asi", it prevents the text "missing" from being left behind. I used https://github.com/thelink2012/injector

In addition, I recommend adding this: https://github.com/ThirteenAG/Hooking.Patterns

x87 commented 2 years ago

0.8.4 adds READ_MEMORY and WRITE_MEMORY in SA:DE https://github.com/cleolibrary/CLEO-Redux/blob/master/using-memory-64.md