Trying to find base addresses - Risk of Rain

Anything Cheat Engine related, bugs, suggestions, helping others, etc..
Post Reply
amendi
Noobzor
Noobzor
Posts: 6
Joined: Fri Aug 31, 2018 7:10 pm
Reputation: 0

Trying to find base addresses - Risk of Rain

Post by amendi » Mon Oct 08, 2018 1:27 pm

Hello guys,
i have been trying to find base adresses of basic values like HP, money and stuff in Risk of Rain, however it seems impossible,
when i find the value and then "find what writes to this adress" it always is the same syntax, for every value that i check:

mov [edi],ebx
fstp qword ptr [edi]

edi holds the adress of the certain value, in this case it's experience.
it seems to me like this value writes to itself, it's seems to be the loop

could someone maybe explain what's the problem here, or how to find the base adress in this case?

Thank you!

https://imgur.com/a/R583qHH

PS. could someplay please explain how to write script that would copy value from one adress to another, i have tried simple MOV [onead], secadd and it didnt work
for this case i was trying to write a script that would copy value of max HP to the current HP adress

User avatar
TheyCallMeTim13
Administration
Administration
Posts: 1141
Joined: Fri Mar 03, 2017 12:31 am
Reputation: 196
Contact:

Re: Trying to find base addresses - Risk of Rain

Post by TheyCallMeTim13 » Mon Oct 08, 2018 1:58 pm

Seems like you might have copies of the values, can you freeze them with an effect in game.

If yes, to get the base address you'll need to look before the instruction, and see how and from where EDI gets set. And for that you'll need to know some ASM.

As for copying a value MOV is what you want. Post your script, I'm betting that you tried to copy from and address to an address and you can't do that with MOV; copy to a register then to the address.
http://www.felixcloutier.com/x86/MOV.html

Also it looks like this will be a shared instruction, make sure you know what values you're changing. And as always with this kind of thing, backup your saves.

amendi
Noobzor
Noobzor
Posts: 6
Joined: Fri Aug 31, 2018 7:10 pm
Reputation: 0

Re: Trying to find base addresses - Risk of Rain

Post by amendi » Mon Oct 08, 2018 2:31 pm

Thank you for a such quick response!

Since solving this requires learning some ASM i will leave this for now, and i will return to this issue once i learn
As for copying the value, note that i am somewhat complete newbie. What i did was:
i tried to make a code injection where the current hp value is and then i just added one line to this code: MOV [maxhp], currenthp
this is the whole script:

alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

mov [19AC32E8], 19AC1E88 - line i added

originalcode:
add [eax],al
add [eax],al
add [eax],al

exit:
jmp returnhere

19AC1E88:
jmp newmem
nop
returnhere:

How should i do it i wanted it to be the script that i can turn on and off?



PS.
Do you know if there is a way to view values of the addresses when in the Memory Viewer window? Is it possible or are there other ways to do so?

amendi
Noobzor
Noobzor
Posts: 6
Joined: Fri Aug 31, 2018 7:10 pm
Reputation: 0

Re: Trying to find base addresses - Risk of Rain

Post by amendi » Mon Oct 08, 2018 2:50 pm

Allright to the PS i have already found an answer myself, you can just right click and display and change display type, awesome

User avatar
TheyCallMeTim13
Administration
Administration
Posts: 1141
Joined: Fri Mar 03, 2017 12:31 am
Reputation: 196
Contact:

Re: Trying to find base addresses - Risk of Rain

Post by TheyCallMeTim13 » Mon Oct 08, 2018 3:09 pm

Try the CE Tutorial(s), in the help menu. They really have a lot to teach, and are a great place to start.

And yeah, it's best to start with simple games (older ones can be better), but some times you do find games or cheats that are better if you come back after learning some new stuff.

For the script you tend to want to use the registry that holds the address, but if this is a shared instruction that can cause some issues. But in the script you posted you're setting the value of the address 0x19AC32E8 to 0x19AC1E88, which is the same as the injection address.
You'll want do something like this:
mov [{currentHealthaddress}],{maxHealthValueInHex}
or
mov [{currentHealthaddress}],(int){maxHealthValueInBase10} if it's an integer
mov [{currentHealthaddress}],(float){maxHealthValueInBase10} if it's a float

As for enabling and disabling, you need to add enable and disable sections. Have a look at this:
viewtopic.php?f=11&t=6509
And you'll want to use templates, seems like you did, but make sure to use the "cheat table framework" first (and try the AOB injection after that).
viewtopic.php?f=11&t=6536

And you can have a look at the CE Wiki: https://wiki.cheatengine.org/index.php?title=Main_Page
Or the forums tutorials section: viewforum.php?f=11

Post Reply

Who is online

Users browsing this forum: No registered users