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 


The Random Chest

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

Joined: 03 Oct 2006
Posts: 62

PostPosted: Sun Sep 13, 2015 9:18 am    Post subject: The Random Chest Reply with quote

Hello everyone.

I was searching something like that but found anything so I started this thread.

Some game I play theres a treasure chest who pops a random iten when opened. Like 5 different itens. This value is fixed. Fromd good to worst.

Is there any way to fix this value in order to reach only one item from all the 5 possibilities?

Thank you. Very Happy
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Sun Sep 13, 2015 11:29 am    Post subject: This post has 1 review(s) Reply with quote

For starters, try the unrandomizer (it's on CE's main menu).

If it doesn't work, I suggest trying to find the variable that holds whether the chest has been opened or not, and loot the chest until you get the item you want. You're basically looking for a 0 (or 1) that becomes 1 (or 0) once the chest has been looted. If chests are breakable in your game, try to find its hitpoints first because the opened yes/no flag is very likely to be nearby (their addresses should have the 4-5 leftmost in common).

_________________
DO NOT PM me if you want help on making/fixing/using a hack.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Sep 13, 2015 12:10 pm    Post subject: Reply with quote

This could be a tough one.

The game may do its random roll when the chest spawns or when the chest is opened.
In essence, you need to find the static list from where it retrieves the items it can contain.

A nice place to start is as Gniarf said, find the structure associated with the chest.
This may give you a pointer to the list of items it contains or maybe just some identifier.
You may be able to use that identifier to find out what accesses it and trace that code.
Or look for other addresses containing that identifier and see if the memory nearby contain item details.

Of course, if the item inside is selected when the chest spawns, all of the randomization will have already occurred.
You won't be able to find any useful functions which will have already spawned the item.
Maybe if the game reuses the same memory when the chest respawns...

Another approach may be to find the identifiers associated to each item it can contain.
Do a Grouped search looking for those 5 identifiers within close proximity to each other.
This could be the list from where the chest selects the item.

However, if you know how the item identifiers work, you might as well just change an existing item to the one you want.
This also depends on how the game controls inventory.

Your best hope is that the game is Mono or .NET so you can find the function by name. Smile
Back to top
View user's profile Send private message
Snow1337
Catastrophic Cheatah
Reputation: 1

Joined: 12 Oct 2004
Posts: 183
Location: Your, Computer

PostPosted: Sun Sep 13, 2015 1:17 pm    Post subject: Reply with quote

I successfully did it with rupees in Zelda but those values have decimals which make it easier, I did it in a chest game.. all I did was search for the value of the rupee as it appeared above the chest (I paused the game with the chest open), then changed the value
_________________
Back to top
View user's profile Send private message Visit poster's website
projetof
Advanced Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 62

PostPosted: Sun Sep 13, 2015 2:08 pm    Post subject: Reply with quote

Thank you everyone for the replies.

Updating. The chest is just like zelda, but with random itans instead. You don't break the chest, just go to it and open it.

Gonna try the randomizer, thank you Very Happy


I'll update this thread if i got something.
Back to top
View user's profile Send private message
Snow1337
Catastrophic Cheatah
Reputation: 1

Joined: 12 Oct 2004
Posts: 183
Location: Your, Computer

PostPosted: Sun Sep 13, 2015 5:04 pm    Post subject: Reply with quote

It will be hard to target the specific chest because you can only search once or twice for the value seeing as each chest has its own address and once its open.. your Unknown Value search ends. Unless

If you can save the game before you open it, search Unknown Value, reopen save game and search Has Changed.. go back to game, walk around (dont open chest), search Unchanged Value.. keep doin this until you have the value of one chest then open the Memory Viewer, the next chests are most likely 02/04/0C or 0E bytes from each other and each one has either a 1-10(A) randomizer or it carries the value of the item in different codes (i.e 03 being Dagger)

Good luck

_________________
Back to top
View user's profile Send private message Visit poster's website
projetof
Advanced Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 62

PostPosted: Mon Sep 14, 2015 9:56 am    Post subject: Reply with quote

Thank you.

The good poinnt is that you can go back to the stage after you loof the previous chest and it will be there again and again. But the item will be random every time you open it.

So you basically can keep opening it every time you clear the stage. Smile

I know with trial and error each one of the 5 itens the chest will grant you. But I failed to find the address for each one of them. Still looking for it. Smile
Back to top
View user's profile Send private message
Snow1337
Catastrophic Cheatah
Reputation: 1

Joined: 12 Oct 2004
Posts: 183
Location: Your, Computer

PostPosted: Mon Sep 14, 2015 10:32 am    Post subject: Reply with quote

Just keep doing Unknown/Changed/Unchanged.. once you have one of them then you can figure out the algorithm of the rest by either Memory Viewer pr Dissecting the Data Structure
_________________
Back to top
View user's profile Send private message Visit poster's website
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