Skip to content

Instantly share code, notes, and snippets.


DRayX/ Secret

Created November 24, 2021 08:18
Show Gist options
  • Save DRayX/d618ca7adc69065950a30425fae6eece to your computer and use it in GitHub Desktop.
Save DRayX/d618ca7adc69065950a30425fae6eece to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
(0x09,0x14),(0x0a,0x14),(0x0b,0x14),(0x0c,0x14),(0x0d,0x14),(0x0e,0x14),(0x0f,0x14),(0x10,0x14),(0x11,0x14),(0x12,0x14),(0x13,0x14),(0x14,0x14),(0x15,0x14),(0x16,0x14),(0x17,0x14), (0x19,0x14),(0x1a,0x14),
(0x09,0x15),(0x0a,0x15),(0x0b,0x15), (0x0d,0x15),(0x0e,0x15),(0x0f,0x15),(0x10,0x15),(0x11,0x15),(0x12,0x15),(0x13,0x15),(0x14,0x15),(0x15,0x15),(0x16,0x15),(0x17,0x15),(0x18,0x15),(0x19,0x15),(0x1a,0x15),
(0x09,0x1b),(0x0a,0x1b),(0x0b,0x1b),(0x0c,0x1b),(0x0d,0x1b),(0x0e,0x1b), (0x10,0x1b),(0x11,0x1b),(0x12,0x1b),(0x13,0x1b),(0x14,0x1b),(0x15,0x1b),(0x16,0x1b),(0x17,0x1b),(0x18,0x1b),(0x19,0x1b),(0x1a,0x1b),
(0x09,0x1d),(0x0a,0x1d),(0x0b,0x1d),(0x0c,0x1d),(0x0d,0x1d),(0x0e,0x1d),(0x0f,0x1d),(0x10,0x1d), (0x18,0x1d),(0x19,0x1d),(0x1a,0x1d),
(0x09,0x1e),(0x0a,0x1e),(0x0b,0x1e),(0x0c,0x1e),(0x0d,0x1e),(0x0e,0x1e),(0x0f,0x1e),(0x10,0x1e), (0x19,0x1e),(0x1a,0x1e),
(0x09,0x1f),(0x0a,0x1f),(0x0b,0x1f),(0x0c,0x1f),(0x0d,0x1f),(0x0e,0x1f),(0x0f,0x1f),(0x10,0x1f), (0x18,0x1f),(0x19,0x1f),(0x1a,0x1f),
(0x09,0x20),(0x0a,0x20), (0x0d,0x20),(0x0e,0x20),(0x0f,0x20),(0x10,0x20), (0x18,0x20),(0x19,0x20),(0x1a,0x20),
(0x09,0x21),(0x0a,0x21), (0x0d,0x21),(0x0e,0x21),(0x0f,0x21),(0x10,0x21), (0x18,0x21),(0x19,0x21),(0x1a,0x21),
(0x09,0x22),(0x0a,0x22),(0x0b,0x22),(0x0c,0x22),(0x0d,0x22),(0x0e,0x22),(0x0f,0x22),(0x10,0x22), (0x18,0x22),(0x19,0x22),(0x1a,0x22),
(0x09,0x23),(0x0a,0x23),(0x0b,0x23),(0x0c,0x23),(0x0d,0x23),(0x0e,0x23),(0x0f,0x23),(0x10,0x23), (0x18,0x23),(0x19,0x23),(0x1a,0x23),
(0x09,0x28),(0x0a,0x28),(0x0b,0x28),(0x0c,0x28),(0x0d,0x28),(0x0e,0x28),(0x0f,0x28),(0x10,0x28),(0x11,0x28),(0x12,0x28),(0x13,0x28),(0x14,0x28),(0x15,0x28), (0x19,0x28),(0x1a,0x28),
(0x09,0x29),(0x0a,0x29),(0x0b,0x29),(0x0c,0x29),(0x0d,0x29),(0x0e,0x29),(0x0f,0x29),(0x10,0x29),(0x11,0x29),(0x12,0x29),(0x13,0x29),(0x14,0x29),(0x15,0x29), (0x19,0x29),(0x1a,0x29),
(0x09,0x2a),(0x0a,0x2a),(0x0b,0x2a),(0x0c,0x2a),(0x0d,0x2a),(0x0e,0x2a),(0x0f,0x2a),(0x10,0x2a),(0x11,0x2a),(0x12,0x2a),(0x13,0x2a),(0x14,0x2a),(0x15,0x2a), (0x19,0x2a),(0x1a,0x2a),
(0x09,0x2c),(0x0a,0x2c),(0x0b,0x2c),(0x0c,0x2c),(0x0d,0x2c),(0x0e,0x2c),(0x0f,0x2c),(0x10,0x2c),(0x11,0x2c),(0x12,0x2c), (0x14,0x2c),(0x15,0x2c),(0x16,0x2c),(0x17,0x2c),(0x18,0x2c),(0x19,0x2c),(0x1a,0x2c),
(0x09,0x2d),(0x0a,0x2d),(0x0b,0x2d), (0x0f,0x2d),(0x10,0x2d),(0x11,0x2d),(0x12,0x2d),(0x13,0x2d),(0x14,0x2d),(0x15,0x2d),(0x16,0x2d),(0x17,0x2d),(0x18,0x2d),(0x19,0x2d),(0x1a,0x2d),
(0x09,0x2e),(0x0a,0x2e),(0x0b,0x2e), (0x0f,0x2e),(0x10,0x2e),(0x11,0x2e),(0x12,0x2e),(0x13,0x2e),(0x14,0x2e),(0x15,0x2e),(0x16,0x2e),(0x17,0x2e),(0x18,0x2e),(0x19,0x2e),(0x1a,0x2e),
(0x09,0x2f),(0x0a,0x2f),(0x0b,0x2f), (0x0f,0x2f),(0x10,0x2f),(0x11,0x2f),(0x12,0x2f),(0x13,0x2f),(0x14,0x2f), (0x17,0x2f),(0x18,0x2f),(0x19,0x2f),(0x1a,0x2f),
(0x09,0x30),(0x0a,0x30),(0x0b,0x30),(0x0c,0x30),(0x0d,0x30),(0x0e,0x30),(0x0f,0x30),(0x10,0x30),(0x11,0x30),(0x12,0x30),(0x13,0x30),(0x14,0x30), (0x17,0x30),(0x18,0x30),(0x19,0x30),(0x1a,0x30),
(0x09,0x31),(0x0a,0x31), (0x0c,0x31),(0x0d,0x31),(0x0e,0x31),(0x0f,0x31),(0x10,0x31),(0x11,0x31),(0x12,0x31),(0x13,0x31),(0x14,0x31),(0x15,0x31),(0x16,0x31),(0x17,0x31),(0x18,0x31),(0x19,0x31),(0x1a,0x31),
def getDailyRandom(seed):
if seed & 0x80000000 != 0:
return 0x100000000 - seed
return seed
def lotPoint(seed):
daily_split = [0] * SPAWN_COUNT
daily_rand = getDailyRandom(seed)
for i in range(SPAWN_COUNT):
daily_split[i] = daily_rand >> (8 * (SPAWN_COUNT - 1 - i)) & 0xff
total_tiles = len(TILE_DATA)
section_length = total_tiles // SPAWN_COUNT
add_extra = total_tiles % SPAWN_COUNT
result = [0] * SPAWN_COUNT
extra = 0
for i in range(SPAWN_COUNT):
result[i] = extra + section_length * i + daily_split[i] % section_length
if i < add_extra:
extra += 1
return result
if __name__ == '__main__':
import sys
lotto = int(sys.argv[1])
seed_low = (lotto * 0xeeb9eb65 + 0xfc77a683) & 0xffff
print([TILE_DATA[x] for x in lotPoint(seed_low)[2:]])
print([TILE_DATA[x] for x in lotPoint(seed_low | 0x80000000)[2:]])
Copy link

XIAA25 commented Nov 29, 2021

Hi, could you make some video or something to explain the code. I'm intrested in how you find this out 💯

Copy link

@XIAA25 , well it seems that TILE_DATA is actually the map in hexadecimal form with format [(Column, Row),(Column, Row)....]

After that, it comes the weird wizardy magic, (idk how he found the algorithm)

Copy link

XIAA25 commented Nov 29, 2021

@metantonio Yeah I understander the first part, I was more searching towards the research of the algorithm
To be honest it's pretty awesome since the game is out like ten days ago and the RNG in the game is already searched at the point that now we already can find the seed and "manipulate" other part of the game. (by manipulating I mean more something like make predictions based on the seed we found) I'm wondering if it's possible with this method to maybe search to "manipulate" other RNG events, such as encountering Shiny, perfect IV...
It's just awesome and being so passionated about those things I just wanna see more of it

Copy link

metantonio commented Nov 29, 2021

@XIAA25 right now, with check summary menu glitch, you can transform any pokemon (that can evolve in 1 level) into shiny, but you need 1 shiny pokemon at least in vault and 1 rare candy. As you can duplicate pokemons and objects with same glitch, it's very useful

Copy link

XIAA25 commented Nov 29, 2021

@metantonio I'm maybe going to say something a little stupid, but I feel like that's cheating in some way.
Like if you now the RNG and how to use it, I mean, that's okay, but getting a shiny that way doesn't feel the same if you use the check summary glitch. But out of curiosity I will still do a little google search on this x)

Edit: just saw the video, It's just epic. Just a little sad it's only the pokemon that needs to evolve, but I'm pretty sure in two days they will find another glitch which can make any pokemon Shiny.

Copy link

I can't use it... My loto number is 08413 but the page doesn't do a thing

Copy link

Cashews54 commented Dec 19, 2021

I'm curious, do I have to stand ON the feebas tile or stand next to it and aim my rod at the tile? The calculator page could use a note clarifying this.

Copy link

XIAA25 commented Dec 20, 2021

@Cashews54 if I'm not wrong it says the tile where feebas can appear. So to answer your question properly:
You need to stand next to the tile and aiming your rod on the tile to have a feebas (note that there's still only 50% chance feebas appear so you maybe want to try multiple times)

Copy link

DRayX commented Dec 20, 2021

@Cashews54 My version of the calculator has some additional FAQ and a short explanation of how it works:

Copy link

cdepratt commented Dec 22, 2021

This wasn't working for me as of 1.1.3 version. I was very very careful to be casting my rod into the correct tile. I will try again tomorrow with a new lotto number

Copy link

I was also having troubles with 1.1.3 version on shining pearl. Luckily my gf hadn't updated yet and could confirm on 1.1.2 that it was working still

Copy link

It’s currently not working with the new update :(

Copy link

aposp commented Dec 23, 2021

Agreed, it does not appear to be working on 1.1.3. Have tried twice now, verifying with a screenshot that I entered the correct lotto ID.

Copy link

First of all, thank you to all those involved in creating this algorithm, I'm sure this must have taken tons of time to figure out! Next, as of 12/23 even using two days of lotto tickets, none of the generated tiles green or red were feebas tiles (I fished like 10 times per tile to be sure), so I think I can confirm that this was patched in the 1.1.3 update. Finally, if you guys figure out how to get this working again in the future it would be awesome if you could notify me!
Thanks again!

Copy link

TimHe95 commented Dec 24, 2021

Not working on 1.1.3
What a pity...

Copy link

For me it worked (Version 1.1.3). 🥳

I had 4 recommended tiles and I planned on trying every tile at least 3 times. I was successful on the 3rd try at the first tile already.

There is an old and a new version of the calculator. I used this one:

Copy link

drewbritton commented Jan 21, 2022

With the 1.1.3 update there is a new version of this same calculator tool. But instead of just providing one Lotto ID number, the new tool requires at least 2 days-worth of Lotto IDs and Swarm info (which route there appears to be a lot of a specific Pokémon for a given day—you can find this by opening your menu and checking the ‘current objective’) in order to help narrow down your exact game seed…and thus accurately determine the four tiles that spawn Feebas on a given day.

Copy link

What are the sold sphere/Drill sphere checks about and where can I find that info?

Copy link

Does this work on the Nintendo DS version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment