11 March 2016 - Forum Rules

Main Menu

[QUESTION] How to figure out random values?

Started by Romsstar, January 28, 2012, 09:09:14 AM

Previous topic - Next topic


Game: Digimon World 1 (1999)
Platform: PSX

Things already noted down:
- Table File
- A script dumper
- Some codes like the Position of the things I'm looking for.

Allright here is my problem:

Everytime you enter a screen the game determines whether there will be a random item spawned or not.
Some are rare, some are common. I guess there is some sort of Random Number Generator involved, although I can't say for sure.

There is similar behaviour for Battling. Every time you battle a digimon and the enemy has a potential technique your digimon could learn,
a random process (or at least let's call it random until I know for sure) determines whether your Digimon learns this technique or not.

Also there is a similar behaviour with three Digimon in the game which appear randomly everytime you enter a particular screen. (they only roam in one area).

What I already tried:

Ok since I know the values of the Items that Spawn I figured that by looking for them by try and error I would find them eventually.
This was easier with items that have numbers the game isn't using that often. Anyways I got the positioning (x,y,z) of the items and where it is stored in the Memory.

So I figured: Set a breakpoint on one of those values to find out how it is determined which item is gonna be there and if there is gonna be an item at all.

Naturally it brought me some points on read, some on write. I tried messing around with that stuff. But as it seems the adresses were not part of the process but only for the positioning.
(The position is always random too).

I tried something similar with the techniques and with the mentioned Digimon as well.
And if I had find out something useful I wouldn't be creating this thread right now.

Was my approach wrong? Is there some particular kind of technique which I can work with to figure this kind of stuff out?
I used the PsX Debugger.


Well the random function of computer programs aren't so random actually Though that will still heavily depend on how you implement the randomize function to begin with. 

I have actually wrote a script to carry out some concrete thing to determine how random values could be so random, or if they even hold some random value to them and depending on the language you are using, there are different implementations.