You are not logged in.

Read the FAQ and Knowledge Base before posting.
We won't make a 3DS/2DS emulator.



#1 2012-09-17 12:53:09

Intersection7
Member
Registered: 2012-07-06
Posts: 14

probabilities in games

How would in-game probabilities work in correlation with savestates in desmume?
For example, if in a certain game, a certain enemy has a 40% chance to drop an item when killed. Let's say you saved a state right before you killed that enemy, then killed it, and didn't receive a drop. If you were to reload that save state, then kill the enemy in EXACTLY the same manner you did before, would you STILL have a 40% chance of getting that drop? In other words, do savestates retain in their memory the outcome of an event? And will it copy this outcome no matter what its probability is? Or do savestates reset those events, and adhere to the same chances you had initially?  I am asking this because I have noticed that savestates restore a game at exactly the same point and precisely the same configuration as it was when you saved it (I've noticed they even alter the save file).
Also, do games determine probabilities precisely when an event occurs (such as in the case of killing an enemy), or is it determined beforehand? And does this vary between games? In my experience playing Pokemon Diamond and later Pokemon Soul Silver -- the fact that the games are not supported is besides the point --, reloading right before an attack during a pokemon battle in Diamond might give me a different result on the attack, while in Soul Silver it never does.

Thank you for your time.

***Sorry for changing this post so often, I felt it wasn't clear enough.***

Last edited by Intersection7 (2012-09-17 17:54:17)

Offline

#2 2012-09-18 07:31:44

Manivo
Awesome Possum
Registered: 2009-02-15
Posts: 655

Re: probabilities in games

Everything is entirely up to the game itself, or rather the way it was coded by its developers. Most games rely on RNG (Random Number Generation) to decide the outcome of these events, which is essentially a number constantly changing in the background in order to create the appearance of randomness. This gets saved by the emulator in a savestate as well, so when you load it up again it continues from the same exact point as before, every single time.

If the game developer decided to have that number constantly running in the background then it's timing-based. Wait another second after loading your savestate to hit 'attack' and the outcome will be different. It can, however, also be decided at the start of your round, and all actions' random outcome will be based on that. Or it can all be decided at the start of a fight according to a 'seed' number which decides *all* the actions throughout the fight.


Esentially, your ability to cheatsave in pokemon is entirely up to the game's developer.

Offline

#3 2012-09-18 13:55:25

Intersection7
Member
Registered: 2012-07-06
Posts: 14

Re: probabilities in games

Thanks!

Offline

Board footer

Powered by FluxBB