Most Generation PRNG Help / Information

Here is an easy way to figure it:

TargetNumber = InitialOffset - 13;

Happiness = TargetNumber / 12 (Integer math, round down)
CoinToss = TargetNumber MOD 12

This does break for numbers 12 and below, though, so the easy thing to do for those is:

CoinToss = InitialOffset-1;

SO
--------------------------------------------

If(InitialOffset < 13)
---CoinToss = InitialOffset-1;
Else
---TargetNumber = InitialOffset - 13;

---Happiness = TargetNumber / 12 (Integer math, round down)
---CoinToss = TargetNumber MOD 12
Thanks Mingot, this should do it =)

EDIT: Where does the IntialOffset come from?

lol Vlie I made my own calculator thing for this too. Mine works for divisible by 12 numbers :P lol LOL, it works for every frame, but not for 12 and 24 =P

Vlie, can you add an option that converts the PID of the shiny to nature and maybe gender and ability. I'm already working on this! Shouldn't be taking long!
 
I will continue tomorrow,

but I have a question:

Monster 539019E 0
Initial 95133C7E 31 2 15477
Initial A7130273 52 20 618
Initial CA132950 485 55 10567
Initial B21364D1 1478 31 25800
Initial A013172C 1897 13 5923
Initial B11315CF 4424 30 5574
Initial B7130169 6670 36 352

I took the Bolded, that's correct, right?
 

Syberia

[custom user title]
is a Smogon Media Contributor Alumnus
As long as you're not stalling things out on the continue screen for an unusually long time, the one with ~600 as the delay is the one you want to use.
 
As long as you're not stalling things out on the continue screen for an unusually long time, the one with ~600 as the delay is the one you want to use.
OK. Well that one is careful, and I have my perfect Spiritomb Parent, and the spiritomb from my Signature here at Platinum. So I'm going to try! Which me good luck =)
 
If anyone good with seeds and all that gets on and reads this, please go on the irc for wifi. I need to discuss a theory.
 
If what mingot told me about FR/LG's RNG is correct (that it stores the current seed in your save file), then I just thought of a possible implementation of this in those games as well.

1) Load your game

2) Sweet Scent a pokemon

3) Check its IVs and nature

4) Input them into Mingot's seed finder and take note of your Monster Seed*.
*The initial seeds it gives you will all be incorrect, but that's irrelevant because if your starting seed is the same every time, the monster seed is an acceptable substitute. You will adjust the timing later to account for this.
Also, Sweet Scented pokemon will not work with the current seed finder, because it cannot work backwards from anything other than method 1 PIDs. Until it can, you will have to use an in-game legendary. But that's OK, as you will not be saving the game. So go ahead and catch what you plan to SR, and check it for now.

5) Input the Monster Seed as the starting seed on RNGReporter.

6) Adjust the IV/nature criteria to whatever you want, make sure "starting frame" is set to 0, set the "frames to search" to however long you're willing to wait, and go search frames.

7) Make note of the frame you want to use. The delay outputted by RNGReporter will actually be the number of frames past your initial seed after which the one you want shows up. Input this number into emloop.

8) SR your game and start emloop's timer**.
I do not know when FRLG's RNG starts counting frames. It seems logical that, if the seed is stored in the save file, it would begin counting from when you select Continue on the welcome screen. Meaning you should start emloop when you choose Continue.

9) Wait until the timer runs out, and catch your pokemon.

10) Check its IVs, and see where they are on the list RNGReporter generated.

11) Adjust your timing. Since you took some time to catch the pokemon you checked your seed with, you will likely be several seconds off. That's ok, adjust as usual. This is taking up the time between your real starting seed and the seed of the test pokemon you caught.

11) Keep SRing until you get your desired spread.


This is completely untested, and simply based off of my understanding of how the game works based on what I've been told.

Questions:
Does FRLG store its starting seed in the save file, and use it every time until it's saved again?
When does FRLG's RNG start counting, using the saved seed?
Not sure if this is the right place, but i'll go ahead and try this out if anyone is interested. I wanna try to help out at least a lil :P

Anyone have any ideas on how to prove / disprove this? Just follow the steps right?

Edit: Lol so much for that, after getting the spreads by typing in the stats of an articuno i caught then reseting and the spread i got wasnt on the list =/ If anyone has anything else fr / lg to test let me know :D
 
CRAP my AR DS just died on me (when I turn it on, it doesnt detect it) so no more testing for me :(
If anyone knows how to fix this please pm me. Is there anything I can test without the use of an AR?
 
It seems SRing for legends in Plat. is going to be a bit more difficult. My reasoning.

For the PID, it uses both time from the starting time and the time on the continue screen. So, what we're going to have to do is start at a certain time, then wait to start Plat. until another certain time, then spend ANOTHER certain time on the continue screen before SRing the legend. And for this we need to know how long it's going to take you on each screen. I'm still working it all out, but it's tough.

I just got an Azelf to the exact wait time on the Continue screen, 15522 frames. However, my seconds were off. I need to figure out how to fix that..

Also, it seems its not time on the Continue screen, but time before continuing. So, the second the music is heard and the screen goes black with the red trim, I believe the RNG starts. Then you can wait there, or in the continue screen, but you need to hit your save file at the exact right time to get the right seed. Some how, seconds play into this, but my brain is mush and I can't get it... More tomorrow.
 
I have a question, could someone tell me howthe international parents work? Are bred pokemons from D/P and Pal Parked pokémons international parents? Or are internation parents from game with other languages?
 

ΩDonut

don't glaze me bro
is a Programmer Alumnusis a Forum Moderator Alumnusis a Top Researcher Alumnusis a Top Contributor Alumnus
I have a question, could someone tell me howthe international parents work? Are bred pokemons from D/P and Pal Parked pokémons international parents? Or are internation parents from game with other languages?
They're two Pokemon from two different regions. Japan or US\UK\AUS are two; I don't know what are the others.
 
I have a question, could someone tell me howthe international parents work? Are bred pokemons from D/P and Pal Parked pokémons international parents? Or are internation parents from game with other languages?
International parents are pokemon coming from different versions (languages). When using them the nature won't be passed even if the everstone is hold by the female parent but the odd of an egg being shiny is increased. This means that there'll be more shiny PIDs and the chances that one lies in the very early "frames" will be higher

EDIT : Mingot-- I'm working at the PID generation @ the day-care and also at how the NRN advances in the game. I should have it finished in a hour or two
 
OK, well I have only European Pokémon Games.

And I hope to present a PID -> Nature, Gender, Ability Calculator in about 2 hours =)
 
among european versions German/french/english/italian/spanish count as different versions...so If you have german and english versions as I assume they'll do well for the international parents.

By the way. I seem to have found how the IRN seed advances and how the pid is generated...

let's start with the 0th table construction

t[0] = Initial SEED
t[n] = (( upper 2bits of t [n-1] ) xor t [n-1]) * 0x6c078965 + n

where n = 1 - 623

these values are not to be used as SEEDs but will serve only to form the successive tables.
let's see how to form the first table. An auxiliary 32 bit variable needs to be introduced
k[0] , k[1]

k[0] = (t[A] and 0x80000000) or (t and 0x7fffffff)
k[1] = (k[0]/2) and t[C]

where
A=n B=n+1 C=n+397 for 0 < = n < = 226
A=n B=n+1 C=n-227 for 227< = n < = 622
A=n B=0 C=396 for n = 632


and t[A],t,t[C] refer to the elements of the 0th table

for each n (0-623)
-A,B,C are defined
-k[0],k[1] are also defined
the elements of the new table are formede as follows

t[n] = k[1]xor0x9908b0df if k[0] is odd
t[n] = k[1] if k[0] is even

Each successive table can be formed in a similar way from the previous one.
In the end a total of M tables are formed (M can be choosen at free will) numbered by the index "m", the m-th depending on the (m-1)th etc, etc...

Furthermore each table has 624 elements numbered by the index "n"

the IRNG is then formed as : S[(m-1)*624+n] = t[n] of the mth table

with :
m = 1 - M
n = 0 - 623


when the seed in the IRN is designated as E ( E = S(indices))
the PID is formed by means of an auxiliary 32 bit variable K[n] , n = 0,1,2; as follows

(it's a different variable from the previous k)

k[0] = (E/0x800) xor E
k[1] = ((k[0]*0x80) and 0x9d2c5680) xor k[0]
k[2] = ((k[1]*0x8000) and 0xefc60000) xor k[1]
性格値= (k[2]/0x40000) xor k[2]

(性格値 shoud be the japanese for PID...it actually means character value)

then if the parents are from different countries, the following formula is iterated up to 4 times

for i = 1:4
PID = PID*0x6c078965+1
if (PID is shiny) >>>break the cycle!!!
end

(I used a pseudo-programming syntax for better explaining)
 
among european versions German/french/english/italian/spanish count as different versions...so If you have german and english versions as I assume they'll do well for the international parents.

By the way. I seem to have found how the IRN seed advances and how the pid is generated...

t[0] = Initial SEED
t[n+1] = (( upper 2bits of t [n-1] ) xor t [n-1]) * 0x6c078965 + n

where n = 1 - 623
however I didn't understend how n is found for values greater than 623
the translator says : "and a decimal cuts it off whenever I appear"

I'm in the process of working the PID formula out of the japanese article
Well I have only the version that I bought in The Netherlands, I assume that it will be the UK version.

Anyway
Finished and working, a PID to Nature Gender Ability Calculator

http://platinum.x-treem.nl
 
As far as Nsider goes, we've got a couple people working on this too. (Samnitmar, Zang, and me to a lesser extent) If we find out anything new we'll be sure to post it here.
 
Well I have only the version that I bought in The Netherlands, I assume that it will be the UK version.

Anyway
Finished and working, a PID to Nature Gender Ability Calculator

http://platinum.x-treem.nl
That is excellent, Vlie, works perfectly too :D I need some help working out the coin flip/double click things (probably not the best place to ask) but can anyone help me with this :)
 
Edited the previous post with the PID formula, it includes the international parents factor! now I'm working out the IRN's seed advancing law
 
That is excellent, Vlie, works perfectly too :D I need some help working out the coin flip/double click things (probably not the best place to ask) but can anyone help me with this :)
What do you want to know about the coin/double?

And I have a question: The IVS are set when the battle starts, so after sweet scen animation?

And about the International Parents, it doesn't matter if the Parents are from the same region, as long as they are different from the ROM language?
 

Users Who Are Viewing This Thread (Users: 1, Guests: 11)

Top