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 deal with random variable?

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

Joined: 17 Apr 2014
Posts: 0

PostPosted: Sun Apr 20, 2014 3:56 am    Post subject: How to deal with random variable? Reply with quote

Hi every one. I'm playing an offline game, in which there are many resources (wood, food, gold, steel).
The building can be upgraded using wood.
Each time you upgrade a building, the building can get chance to upgraded by 10%, 20% or 50%. Getting 100% will make the building to a new level.
10%, 20% or 50% happen randomly. And of course the percentage of 50% is the smallest.
So my question is how to find the percentages above and modify it so that 50% upgrading will always occur.
Also in this game, I have another question, about random events, too.
You can buy an certain amount of wood, food or steel by going to a market.
The market has three offers each time with different ratios (1 gold by 1 food, or 1 gold by 2 food, or 2 gold by 1 food).
Every time you complete a purchasing with one offer, all three offers will be changed randomly with random ration (picking form a set of 1:1, 1:2 or 2:1).
So how to find the engine deciding the offers so that it can be modified to yield the best offers (1:2) any time.
I know assembly code, computer architecture and programming; and did all cheat engine 6.3 tutorials. But still can not beat this challenge.
So if any experts know how to solve these problems, please let me and other people know.
I appreciate any comments about answers, hints, or recommendations.
Back to top
View user's profile Send private message
zm0d
Master Cheater
Reputation: 7

Joined: 06 Nov 2013
Posts: 423

PostPosted: Tue Apr 22, 2014 4:01 am    Post subject: Reply with quote

Trum123 wrote:
Each time you upgrade a building, the building can get chance to upgraded by 10%, 20% or 50%. Getting 100% will make the building to a new level.
10%, 20% or 50% happen randomly. And of course the percentage of 50% is the smallest.


It's a bit more complex in my opinion, cause you are dealing with a couple of data structure (for each building one structure). I recommend you to scan first for the displayed value. If you found it, use CE method to find out what this displayed value accesses and you will get into deeper touch with assembler code. Use cheat engines structure tool and add multiple base addresses from the building and watch their bahavior (how their values change). If you think you found the real percentage value, then try to modify it.

Also you may search of the assembler instruction, which sets the percentage value in the buildings structures and modify it in a way, it always sets the percentage to a value you like Smile

Note that it will usually take some time to understand structures and find values you can match to a logic. (e.g. 100 = health, 120 = mana, ...).

Trum123 wrote:
Every time you complete a purchasing with one offer, all three offers will be changed randomly with random ration (picking form a set of 1:1, 1:2 or 2:1).

Also here you can do the same procedure as mentioned above. Scan for the displayed values and get to the real data model. Maybe you are good to go with CE Ultimap, too. It's a powerful tool to find assembler functions/procedures, but you need DBVM to be activated. There are some good tutorials, on how to use Ultimap, out in the WWW.
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