Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How to specify a static address + address offset in script?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
kaosnye
Cheater
Reputation: 0

Joined: 29 Apr 2014
Posts: 35

PostPosted: Tue Dec 13, 2022 6:53 pm    Post subject: How to specify a static address + address offset in script? Reply with quote

Hello.

I'm currently trying to use cheat engine to set up some very basic scripts for a PS2 game running on PCSX2.

I have two scripts currently, one which will store a user symbol for a base address.

Code:
[ENABLE]
alloc(pBase, 4096)

registersymbol(pBase)

pBase:
dq 258B7140000

[DISABLE]
dealloc(pBase)
unregistersymbol(pBase)


and the second that I'm having an issue with is trying get a script to modify an address utilizing that base address + the PS2 address (raw).


Code:
[ENABLE]

pBase + 0x204D8BB0: // <-- Unable to be processed?
//0x20394533218: <-- This will work if I comment out the above
  db 5

[DISABLE]

pBase + 0x204D8BB0:
//0x20394533218:
  db 3


If I set the pBase + aplOffset directly to the address I am trying to modify such as 0x258d7313217, then everything works fine. It seems I am unable to add addresses together in the assembler script?

The second script is a child of the first.

Any insight would be appreciated.
Thanks.

P.s., I manually search for the pBase address by subtracting a scanned address by the known address, and I'll figure out how to make that a pointer/aob at a later time.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 150

Joined: 06 Jul 2014
Posts: 4661

PostPosted: Tue Dec 13, 2022 8:36 pm    Post subject: This post has 1 review(s) Reply with quote

I'm not sure of what you're trying to do. Where did 0x20394533218 come from?

`pbase` is some address CE allocated.
`[pbase]` is the value stored at that address- i.e. the quadword 258B7140000.

Maybe `[pBase]+204D8BB0` is what you're looking for? It's definitely not 0x20394533218, though...

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
kaosnye
Cheater
Reputation: 0

Joined: 29 Apr 2014
Posts: 35

PostPosted: Tue Dec 13, 2022 9:00 pm    Post subject: Reply with quote

Interestingly, I thought I had tried wrapping [pBase] but it didn't activate the script when I tried, perhaps something else was going on.

However, doing that was the solution, thanks.

The 0x20394533218 was a different pBase value + the offset (just kept for personal reference mostly)

Thanks!


Solution for reference:
Code:
[ENABLE]


[pBase] + 0x201D3218:
  db 5

[DISABLE]

[pBase] + 0x201D3218:
  db 3
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites