2017年01月11日

ポケモン サンムーンで固定乱数成功者現る!どういう仕組みか気になる

nmbbmn


スポンサードリンク



まさかの固定乱数ができるようになりましたああああああああ
AA縺ョ逕サ蜒丞喧 (172)



Discuss SFMT random number generator in Sun&Moon.

In Sun&Moon, when decide a wild pokemon's IVs, PID, Encryption Constant, etc, it is SFMT (SIMD-oriented Fast Mersenne Twister; MEXP=19937) that be used.

And the initial seed is a 32-bit value, used by sfmt_init_gen_rand().

Moreover, in the QR scanner, when the message "Searching for a QR code..." is showed, "sfmt_genrand_uint64(&sfmt) % 17" is used to decide the hands of clock.

So, you can identify the seed by brute force of 2^32 seeds. I tried it in practice, and succeeded.

Here is a picture of the hands of clock.


fbgngfhgfjyt
I will provide an additional explanation.

I say, when the game calls genrand_uint64(), one frame advances.

There are 416 frame advances when the game starts.

And while the player is on the field, frame advances about 30 times per second to decide player's blinking. If NPCs exist, more advances will occur.

Of course, in the QR scanner, there is no frame advance for brinking.



3,4世代同様フレームで進むみたいね
針を見極める練習をしなければ
AA縺ョ逕サ蜒丞喧 (224)



スポンサードリンク

このエントリーをはてなブックマークに追加 mixiチェック Share on Tumblr

コメントする

名前:
 
 

ページトップ