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 


What's the correct way to use Cheat Engine in Pokemon Silver

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Pandemoniu
How do I cheat?
Reputation: 0

Joined: 12 Aug 2022
Posts: 7

PostPosted: Fri Aug 12, 2022 2:38 am    Post subject: What's the correct way to use Cheat Engine in Pokemon Silver Reply with quote

Hello.

As the title inquires, I'm trying to figure out what's the way to use Cheat Engine in Pokemon Silver. Specifically in this case, it's a Rom Hack of Pokemon Silver called Pokemon Dark Energy. (Played on the emulator mGBA.)

In the game, there's a currency (additional to and separate from the typical Pokemon game's currency you get for selling items and winning Pokemon Trainer Battles) called BP. I'm trying to figure out how to use Cheat Engine to increase BP.

When I tried a 4-byte scan, it didn't work. I tried 2-byte, and managed to find the address of the BP value, tracking it going from 0BP to 15BP (using Exact Values both times). My initial test to increase the value by a small amount worked. (I think I changed it to 100BP?) But when I tried to change it to a very high value (some rewards are in the hundred-thousands), I started getting wonky values that translated to the in-game BP going up and down within a certain small range, rather than just linearly going up.

What's weird is, when I messed around and got my BP to 255, increasing it the "normal way" let it go past 255 in-game, despite the value seemingly going down at the address I found in Cheat Engine. Messing with it again, I got it to 511, but not higher until I obtained more BP "legitimately" and was then able to get to 700-something, then again to 1010 or whatever it was after obtaining an additional 17BP in-game.

I've since closed Cheat Engine and went to sleep, and I worry now that I'm not even going to be able to fjnd the BP amount again. At this point, I honestly don't know how I found it last time.

What exactly happened here? And what's the correct way to go about doing this to increase my BP to the high amounts I'm going to need?


Thanks in advance to anyone who can help me with any of this.
Back to top
View user's profile Send private message
sbryzl
Master Cheater
Reputation: 6

Joined: 25 Jul 2016
Posts: 252

PostPosted: Fri Aug 12, 2022 6:42 am    Post subject: Reply with quote

Older systems can be limited in the amount of ram they can use so the data arrays are often very small and may only use 1 byte each.

I don't know how this particular game works but even if the data was 2 bytes I would search only for the last single byte. You can figure out the last byte by using windows calculator, switching to programmer view, entering your number in dec then ticking the hex mode button. Searching for a single byte means you don't have to worry about what endianess it is until you locate and can look and see for your self in memory view.
Back to top
View user's profile Send private message
Pandemoniu
How do I cheat?
Reputation: 0

Joined: 12 Aug 2022
Posts: 7

PostPosted: Fri Aug 12, 2022 7:43 am    Post subject: Reply with quote

sbryzl wrote:
Older systems can be limited in the amount of ram they can use so the data arrays are often very small and may only use 1 byte each.

I don't know how this particular game works but even if the data was 2 bytes I would search only for the last single byte. You can figure out the last byte by using windows calculator, switching to programmer view, entering your number in dec then ticking the hex mode button. Searching for a single byte means you don't have to worry about what endianess it is until you locate and can look and see for your self in memory view.


Thank you!

I admit, I'm really still a beginner in all this. I'll need to re-read this after I've had a good rest and I may need to ask follow-up/clarifying questions later.

Still, I got some of what you're saying. The first thing is that I need to change Value Type to 'Byte' and search the Exact Value (I think??) that way. Not sure what "last single byte" is; I've also never used Windows Calculator, so that'll be a first. (And I had to Google "Endianness", but I'm still a little confused as to its context in this case.)

Actually, except for the last bit, know that I've thought on this as I typed, your suggestions/instruction are more straight forward then they may have appeared to me.

Thanks again! Very Happy


EDIT: So the BP amount is 1,023. I opened Windows Calculator, switched to programmer mode, entered the number as a decimal number, and it gave me 3FF as a hexadecimal number.

What am I supposed to do with this on Cheat Engine? I've changed the Value Type to 'Byte', but I'm really not sure what I'm supposed to enter. Do I check the "hex" box next to the value entry in Cheat Engine? And what is the "last single byte" I'm supposed to search? Is it 'F' or 'FF'?

EDIT 2: I found the address again. But it's the same issue as when I found it initially. Changing this byte's Value only lets me increase the amount of BP by a 255 difference of whatever the "max" was before, and only if I get BP in-game to roll over whatever byte lets it increase.

How do I find this other byte(s)?

(When I figure out what's this forum's image dimensions again, I'll attach an image of the memory page; once I do maybe you or someone else will have a chance of knowing what any of this screen means, as I've never touched it before in my times using Cheat Engine.)
Back to top
View user's profile Send private message
sbryzl
Master Cheater
Reputation: 6

Joined: 25 Jul 2016
Posts: 252

PostPosted: Fri Aug 12, 2022 8:35 am    Post subject: Reply with quote

Sounds like you are doing it right. Now you know where the last byte "ff" is. The other bytes in the value should be on either side of that byte depending on endianness.

edit: You can right click on the address of the byte and select browse this memory region or press ctrl-b to see everything around it.
Back to top
View user's profile Send private message
Pandemoniu
How do I cheat?
Reputation: 0

Joined: 12 Aug 2022
Posts: 7

PostPosted: Fri Aug 12, 2022 8:44 am    Post subject: Reply with quote

sbryzl wrote:
Sounds like you are doing it right. Now you know where the last byte "ff" is. The other bytes in the value should be on either side of that byte depending on endianness.


I figured out what to resize my image to so it won't stretch the screen. (I hope.)

I'm clueless when it comes to looking memory viewer. Hope you can help me out there. I also have no clue how I'd figure out the other bytes, or what endianness is in this context.

EDIT:

Quote:
edit: You can right click on the address of the byte and select browse this memory region or press ctrl-b to see everything around it.


Neat! I did not know that; I'll give it a try!

EDIT 2: Actually, that's what I already did. It's how I took the screen.

Speaking of, here's the back end of an imgur link to a better quality, if this one was shrunk too much to be much use looking at.

/WoAEQZi



Screenshot (205).png
 Description:
Relevant Address has the blue-highlighted byte.
 Filesize:  246.46 KB
 Viewed:  2730 Time(s)

Screenshot (205).png


Back to top
View user's profile Send private message
sbryzl
Master Cheater
Reputation: 6

Joined: 25 Jul 2016
Posts: 252

PostPosted: Fri Aug 12, 2022 9:00 am    Post subject: Reply with quote

I see the 'FF' there but not the preceding byte '03' if that's what it still is. If it's directly before it off-screen that would make it big endian which is the less common type.

Most intel and newer processors now deal in little endian. Not a big deal though you can still edit it byte by byte or there might be a lua function around here somewhere for conversion. Maybe Cheat Engine has some built-in big endian functionality now, I'm not sure.
Back to top
View user's profile Send private message
Pandemoniu
How do I cheat?
Reputation: 0

Joined: 12 Aug 2022
Posts: 7

PostPosted: Fri Aug 12, 2022 9:09 am    Post subject: Reply with quote

sbryzl wrote:
I see the 'FF' there but not the preceding byte '03' if that's what it still is. If it's directly before it off-screen that would make it big endian which is the less common type.

Most intel and newer processors now deal in little endian. Not a big deal though you can still edit it byte by byte or there might be a lua function around here somewhere for conversion. Maybe Cheat Engine has some built-in big endian functionality now, I'm not sure.


I admit, I don't really know what you mean. ;(

And FF is on the far left; there's nothing to left of it.
Back to top
View user's profile Send private message
sbryzl
Master Cheater
Reputation: 6

Joined: 25 Jul 2016
Posts: 252

PostPosted: Fri Aug 12, 2022 9:12 am    Post subject: Reply with quote

What comes before it is above. You can scroll up by using the arrow key. Hopefully the rest of the value is 1 line up all the way to the right.
Back to top
View user's profile Send private message
Pandemoniu
How do I cheat?
Reputation: 0

Joined: 12 Aug 2022
Posts: 7

PostPosted: Fri Aug 12, 2022 9:37 am    Post subject: Reply with quote

I found it!

What I did was try to search for the byte before the hex FF. So, it would fluctuate between hex 04 when the number got high enough and hex 03 when it was around this low. So by messing with BP amounts to increase and decrease back and forth between 03 and 04, I was able to narrow it down.

And what do you know? Maxing both Addresses to hex FF gets the max BP of 65,535!

The second address is 03151ED1, while the one I found first is 03151ED2.

I attached the screen shot of this, for completion's sake.

EDIT: Argh! I'm not done TT_TT

I need to go higher, to 6 digits in BP, not 5.

But maybe the address above 03151ED1 will be the one I need? So 03151ED0?

EDIT 2: I guess it would be 03151ECF that I should try?

EDIT 3: This Address didn't work. It was at hex 00 and reset itself to 00 when I try to change it to FF. :<

Guess I'll need to find it some other way...

EDIT 4: Nope, it really was 03151ED0. It's just that I didn't see it when I was did "got to" in the top part of the Memory Viewer screen.

So I had to find it the hard way.



Screenshot (206).png
 Description:
This was the other Address.
 Filesize:  187.68 KB
 Viewed:  2713 Time(s)

Screenshot (206).png


Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Fri Aug 12, 2022 11:01 am    Post subject: Reply with quote

Note that data isn't necessarily stored at a byte granularity. Pokemon games in particular often store data at bit granularity when it's convenient. e.g. iv data and pp values in the gen 2 pokemon data structure

Also, values aren't necessarily aligned (turn off fast scan).

Given this is a romhack and BP was clearly hacked on (BP was introduced in gen 3 emerald), anything could happen I guess.

_________________
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
Pandemoniu
How do I cheat?
Reputation: 0

Joined: 12 Aug 2022
Posts: 7

PostPosted: Fri Aug 12, 2022 11:30 am    Post subject: Reply with quote

Thanks again, @sbryzl! I appreciate it!

How do I give you reputation?
Back to top
View user's profile Send private message
sbryzl
Master Cheater
Reputation: 6

Joined: 25 Jul 2016
Posts: 252

PostPosted: Fri Aug 12, 2022 11:46 am    Post subject: Reply with quote

Pandemoniu wrote:
Thanks again, @sbryzl! I appreciate it!

How do I give you reputation?


No problem. I think there's a waiting period and post count before the rep button shows. Don't worry about it.
Back to top
View user's profile Send private message
Pandemoniu
How do I cheat?
Reputation: 0

Joined: 12 Aug 2022
Posts: 7

PostPosted: Fri Aug 12, 2022 2:32 pm    Post subject: Reply with quote

sbryzl wrote:
Pandemoniu wrote:
Thanks again, @sbryzl! I appreciate it!

How do I give you reputation?


No problem. I think there's a waiting period and post count before the rep button shows. Don't worry about it.


Ah, okay. (Didn't realize that feature was behind the probation wall, too.)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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