View previous topic :: View next topic |
Author |
Message |
BeleRegis How do I cheat? Reputation: 0
Joined: 03 Oct 2022 Posts: 7
|
Posted: Tue Oct 04, 2022 12:28 pm Post subject: Help noob with codeshifting in Elona + Custom |
|
|
i've ran into trouble before with this game but i finally did some scripts, only to discover after starting the game for a second time that my scripts didn't work anymore (couldn't be injected or bytes at this adress weren't as expected). When i tried to rewrite another script i found out that the adresses for the codes were changing with every start. Searched in the forums for someone with the same problem and suggested to add manually the adress of the code and scan the result as usual to find the right adress, but in my case i had no luck. Any suggestions?
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 138
Joined: 06 Jul 2014 Posts: 4275
|
Posted: Tue Oct 04, 2022 1:26 pm Post subject: |
|
|
If the injection point isn't in a module (i.e. its address doesn't look like "game.exe+1234ABC"), do an AoB injection instead.
If one of the instructions in the injection point contains position dependent code (e.g. `mov eax,[game.exe+1234]` in 32-bit arch uses a direct offset, not relative), the easiest thing you can do is find a different injection point near there that doesn't contain position dependent code. Sometimes moving up or down a few instructions can let you do what you want without needing to include annoying instructions.
Sometimes that's not feasible, in which case you should use `reassemble` for running the original instruction and `readmem` for backing up and restoring the injection point. If `reassemble` isn't sufficient, you can parse the original instruction using a {$lua} block to extract whatever information you want from it.
Any AoB scans will need the relevant bytes replaced with wildcards. Manually check to make sure the AoB signature is sill unique (scan through all memory, not just writable).
readmem and reassemble:
https://forum.cheatengine.org/viewtopic.php?p=5485950#5485950
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
BeleRegis How do I cheat? Reputation: 0
Joined: 03 Oct 2022 Posts: 7
|
Posted: Tue Oct 04, 2022 1:43 pm Post subject: |
|
|
Wow! what an informative response. My respect for u guys is growing the more i learn.
I tried running an AoB injection after posting this as i stumbled with a post related to it. CE just froze for a long time (which i assumed to be a normal thing) but then a window poped up with "access violation" printed in it, but the second time i tried to do so CE just crashed for some reason. I've never made it to see the code. As for finding an upper point of injection... idk how to make it, since there's no instructions above that (all entries marked with "??"), or perhaps i'm a moron, i'm just starting
I'll try to figure it out how to do all the above suggestion and see how it goes
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 138
Joined: 06 Jul 2014 Posts: 4275
|
Posted: Tue Oct 04, 2022 2:35 pm Post subject: |
|
|
BeleRegis wrote: | there's no instructions above that (all entries marked with "??"), | Maybe you have a script active and you're looking at your own code?
The environment can get messed up if you screw around with scripts (e.g. forcefully disabling scripts without executing the disable section). Sometimes closing everything and restarting it can help.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
BeleRegis How do I cheat? Reputation: 0
Joined: 03 Oct 2022 Posts: 7
|
Posted: Tue Oct 04, 2022 3:05 pm Post subject: |
|
|
[quote="ParkourPenguin"] BeleRegis wrote: | there's no instructions above that (all entries marked with "??"), | Maybe you have a script active and you're looking at your own code?
damn perhaps is that, i was taking an screenshot to upload and then recalled to turn all scripts off and all the entries went red and replaced with "??"
weird, because the only script i have is to overwrite the health update to 0 to avoid damage, with cmp and the offset of the PC to avoid crashing the game
this assembly stuff is a headache. I'll try to run an AoB scan without using scripts previously and see if it works.
Thanks a lot for your help tho!
Update: ye i'm a moron, turns out the problem was the script active that was displacing the instruction to a non-modular address. I learned a lot still
|
|
Back to top |
|
|
|